1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

Update lua-lgi to 0.7.2

Port to lua 5.2
Port awesome to lua 5.2 (use pkgconfig to properly figure out how to build with lua 5.2)
This commit is contained in:
Baptiste Daroussin 2014-01-10 16:09:10 +00:00
parent 24c26f4c57
commit 6dee98d982
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339364
6 changed files with 23 additions and 86 deletions

View File

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= lgi
PORTVERSION= 0.7.1
PORTVERSION= 0.7.2
PORTREVISION= 1
CATEGORIES= devel
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
@ -14,13 +14,18 @@ RUN_DEPENDS:= ${BUILD_DEPENDS}
USE_GITHUB= yes
GH_ACCOUNT= pavouk
GH_COMMIT= 1bbf1bc
GH_COMMIT= efa920a
GH_TAGNAME= 0.7.2
USES= pkgconfig
USE_LUA= 5.1+
USE_GMAKE= yes
USES= gmake lua pkgconfig
MAKE_ARGS+= PREFIX=${PREFIX} LUA_LIBDIR=${LUA_MODLIBDIR} \
LUA_INCDIR=${LUA_INCDIR} LUA_VERSION=${LUA_VER} \
CORE=corelgilua${LUA_VER_STR}.so
MAKE_ENV+= LUA_CFLAGS=-I${LUA_INCDIR}
CPPFLAGS+= -I${LOCALBASE}/include/${LUA_SUBDIR}
post-patch:
@${REINPLACE_CMD} -e 's/51/${LUA_VER_STR}/g' \
${WRKSRC}/lgi/core.c \
${WRKSRC}/lgi/core.lua
NO_STAGE= yes
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (lgi-0.7.1.tar.gz) = 31f273e056959cea5a4e929b0e81b21e89c852d8a0e874bc6f78017c93d3a5a0
SIZE (lgi-0.7.1.tar.gz) = 268357
SHA256 (lgi-0.7.2.tar.gz) = ddcae1c6e0e91dc7f68d809633d4f4ad64fbe1f62e27fc60d75d1c7e887429d2
SIZE (lgi-0.7.2.tar.gz) = 270800

View File

@ -1,31 +0,0 @@
--- lgi/override/Gdk.lua.orig 2013-06-25 14:33:15.000000000 +0300
+++ lgi/override/Gdk.lua 2013-06-25 14:34:28.000000000 +0300
@@ -54,16 +54,18 @@
} do Gdk._constant[name] = Gdk.Atom(val) end
-- Easier-to-use Gdk.RGBA.parse() override.
-local parse = Gdk.RGBA.parse
-function Gdk.RGBA._method.parse(arg1, arg2)
- if Gdk.RGBA:is_type_of(arg1) then
- -- Standard member method.
- return parse(arg1, arg2)
- else
- -- Static constructor variant.
- local rgba = Gdk.RGBA()
- return parse(rgba, arg1) and rgba or nil
- end
+if Gdk.RGBA then
+ local parse = Gdk.RGBA.parse
+ function Gdk.RGBA._method.parse(arg1, arg2)
+ if Gdk.RGBA:is_type_of(arg1) then
+ -- Standard member method.
+ return parse(arg1, arg2)
+ else
+ -- Static constructor variant.
+ local rgba = Gdk.RGBA()
+ return parse(rgba, arg1) and rgba or nil
+ end
+ end
end
-- Gdk.Window.destroy() actually consumes 'self'. Prepare workaround

View File

@ -1,39 +0,0 @@
--- ./lgi/Makefile.orig 2013-03-04 22:10:19.000000000 +0100
+++ ./lgi/Makefile 2013-03-26 23:07:31.000000000 +0100
@@ -5,10 +5,13 @@
# License: MIT
#
-PREFIX = /usr/local
+PREFIX ?= /usr/local
LUA_VERSION=5.1
-LUA_LIBDIR = $(PREFIX)/lib/lua/$(LUA_VERSION)
-LUA_SHAREDIR = $(PREFIX)/share/lua/$(LUA_VERSION)
+LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION)
+LUA_SHAREDIR ?= $(PREFIX)/share/lua/$(LUA_VERSION)
+LUA_CFLAGS ?= -I$(LUA_INCDIR) $(CPPFLAGS)
+LUA_LIBDIR ?= $(LUA_MODLIBDIR)
+LUA_SHAREDIR ?= $(LUA_MODSHAREDIR)
GINAME = gobject-introspection-1.0
PKGS = $(GINAME) gmodule-2.0 libffi
@@ -74,11 +77,11 @@
CORESOURCES = $(wildcard *.lua)
install : $(CORE) $(VERSION_FILE)
- mkdir -p $(DESTDIR)$(LUA_LIBDIR)/lgi
- cp $(CORE) $(DESTDIR)$(LUA_LIBDIR)/lgi
- mkdir -p $(DESTDIR)$(LUA_SHAREDIR)
- cp ../lgi.lua $(DESTDIR)$(LUA_SHAREDIR)
- mkdir -p $(DESTDIR)$(LUA_SHAREDIR)/lgi
- cp $(CORESOURCES) $(VERSION_FILE) $(DESTDIR)$(LUA_SHAREDIR)/lgi
- mkdir -p $(DESTDIR)$(LUA_SHAREDIR)/lgi/override
- cp $(OVERRIDES) $(DESTDIR)$(LUA_SHAREDIR)/lgi/override
+ mkdir -p $(DESTDIR)$(LUA_MODLIBDIR)/lgi
+ cp $(CORE) $(DESTDIR)$(LUA_MODLIBDIR)/lgi
+ mkdir -p $(DESTDIR)$(LUA_MODSHAREDIR)
+ cp ../lgi.lua $(DESTDIR)$(LUA_MODSHAREDIR)
+ mkdir -p $(DESTDIR)$(LUA_MODSHAREDIR)/lgi
+ cp $(CORESOURCES) $(VERSION_FILE) $(DESTDIR)$(LUA_MODSHAREDIR)/lgi
+ mkdir -p $(DESTDIR)$(LUA_MODSHAREDIR)/lgi/override
+ cp $(OVERRIDES) $(DESTDIR)$(LUA_MODSHAREDIR)/lgi/override

View File

@ -1,4 +1,4 @@
%%LUA_MODLIBDIR%%/lgi/corelgilua51.so
%%LUA_MODLIBDIR%%/lgi/corelgilua%%LUA_VER_STR%%.so
%%LUA_MODSHAREDIR%%/lgi.lua
%%LUA_MODSHAREDIR%%/lgi/class.lua
%%LUA_MODSHAREDIR%%/lgi/component.lua

View File

@ -3,7 +3,7 @@
PORTNAME= awesome
PORTVERSION= 3.5.2
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= x11-wm
MASTER_SITES= http://awesome.naquadah.org/download/
@ -19,9 +19,9 @@ BUILD_DEPENDS= asciidoc:${PORTSDIR}/textproc/asciidoc \
xmlto:${PORTSDIR}/textproc/xmlto \
xcb-util>=0.3.8:${PORTSDIR}/x11/xcb-util \
xproto>=7.0.11:${PORTSDIR}/x11/xproto \
${LUA_MODLIBDIR}/lgi/corelgilua51.so:${PORTSDIR}/devel/lua-lgi \
${LUA_MODLIBDIR}/lgi/corelgilua${LUA_VER_STR}.so:${PORTSDIR}/devel/lua-lgi \
${LOCALBASE}/share/xml/docbook/4.5/docbookx.dtd:${PORTSDIR}/textproc/docbook-xml-450
RUN_DEPENDS= ${LUA_MODLIBDIR}/lgi/corelgilua51.so:${PORTSDIR}/devel/lua-lgi
RUN_DEPENDS= ${LUA_MODLIBDIR}/lgi/corelgilua${LUA_VER_STR}.so:${PORTSDIR}/devel/lua-lgi
LIB_DEPENDS= libcairo.so:${PORTSDIR}/graphics/cairo \
libev.so:${PORTSDIR}/devel/libev \
libfreetype.so:${PORTSDIR}/print/freetype2 \
@ -34,11 +34,10 @@ LIB_DEPENDS= libcairo.so:${PORTSDIR}/graphics/cairo \
libexecinfo.so:${PORTSDIR}/devel/libexecinfo
USE_XZ= yes
USES= cmake iconv pkgconfig
USES= cmake iconv pkgconfig lua
CMAKE_ARGS+= -DSYSCONFDIR=${PREFIX}/etc
USE_EFL= imlib2
USE_GNOME= glib20 pango gdkpixbuf2
USE_LUA= 5.1+
USE_XORG= pixman x11 xau xcb xdmcp xext xft xinerama xrandr xrender \
xproto
LDFLAGS+= ${ICONV_LIB}
@ -60,7 +59,10 @@ IGNORE= cannot find dependency: The cairo exists but not with XCB support. Pleas
.endif
post-patch:
@${REINPLACE_CMD} -e "/LUA_EXECUTABLE lua/ s,lua,lua-${LUA_VER}," \
@${REINPLACE_CMD} -e "/LUA_EXECUTABLE lua/ s,lua,lua${LUA_VER_STR}," \
-e '/Lua51/d' \
-e 's/glib-2.0/lua-${LUA_VER} glib-2.0/g' \
-e '/LUA51_FOUND/,+2d' \
${WRKSRC}/awesomeConfig.cmake
@${REINPLACE_CMD} -e "s,^lua ,${LUA_CMD} ," \
${WRKSRC}/build-utils/lgi-check.sh