aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2014-05-21 13:38:50 +0800
committermiwi <miwi@FreeBSD.org>2014-05-21 13:38:50 +0800
commit796440627cb805235cac533ec62d5efc72cf3315 (patch)
tree59f7505123d813c6c8d4b5c883ed104add790283 /devel
parentd09ac4f15ced3b906ba98dcf6b7c2b3d5da29b30 (diff)
downloadfreebsd-ports-gnome-796440627cb805235cac533ec62d5efc72cf3315.tar.gz
freebsd-ports-gnome-796440627cb805235cac533ec62d5efc72cf3315.tar.zst
freebsd-ports-gnome-796440627cb805235cac533ec62d5efc72cf3315.zip
- Update to 0.7.0
PR: 187972 Submitted by: Ports Fury
Diffstat (limited to 'devel')
-rw-r--r--devel/lua-alien/Makefile83
-rw-r--r--devel/lua-alien/distinfo4
-rw-r--r--devel/lua-alien/files/patch-Makefile31
-rw-r--r--devel/lua-alien/files/patch-src-alien-core.c11
-rw-r--r--devel/lua-alien/files/patch-src__alien.c11
-rw-r--r--devel/lua-alien/pkg-plist15
6 files changed, 50 insertions, 105 deletions
diff --git a/devel/lua-alien/Makefile b/devel/lua-alien/Makefile
index 2ba734803a59..19b1a4698d72 100644
--- a/devel/lua-alien/Makefile
+++ b/devel/lua-alien/Makefile
@@ -2,13 +2,10 @@
# $FreeBSD$
PORTNAME= alien
-PORTVERSION= 0.5.1
-PORTREVISION= 1
+PORTVERSION= 0.7.0
CATEGORIES= devel
-MASTER_SITES= http://nodeload.github.com/mascarenhas/alien/tarball/
+MASTER_SITES= GHC
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
-DISTFILES= ${DISTVERSION}
-DIST_SUBDIR= lua-${PORTNAME}
MAINTAINER= ports@FreeBSD.org
COMMENT= Lua -> C FFI
@@ -17,60 +14,46 @@ LICENSE= MIT
LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi
-USES= lua
+WRKSRC= ${WRKDIR}/${DISTNAME}
-WRKSRC= ${WRKDIR}/${GITHUB_USER}-${PORTNAME}-${GITHUB_SRC_SUFX}
-CFLAGS+= -I${LOCALBASE}/include -I${LUA_INCDIR} \
- -DBSD -fPIC
-LDFLAGS+= -L${LOCALBASE}/lib -L${LUA_LIBDIR} -llua-${LUA_VER} -shared
-MAKE_ENV+= LIB_OPTION="${LDFLAGS}" LIB_EXT=".so" LUA="${LUA_CMD}"
-TESTS_EXCLUDE= tests/alien tests/alien.lua
+USE_GITHUB= yes
+GH_ACCOUNT= mascarenhas
-GITHUB_USER= mascarenhas
-GITHUB_SRC_SUFX=e667d5d
+USES= libtool lua shebangfix zip
+SHEBANG_FILES= src/constants
+SHEBANG_LANG= lua
+lua_OLD_CMD= /usr/bin/env lua
+lua_CMD= ${LOCALBASE}/bin/${LUA_CMD}
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --disable-silent-rules \
+ --libdir=${LUA_MODLIBDIR} \
+ --datadir=${LUA_MODSHAREDIR} \
+ --with-lua-suffix="${LUA_VER_STR}"
+INSTALL_TARGET= install-strip
-.if ${CFLAGS:M-fstack-prot*}
-MAKE_ENV+= __MAKE_CONF= # inherit CFLAGS only once
-CFLAGS+= -fno-stack-protector
-.endif
+CPPFLAGS+= -I${LUA_INCDIR} -I${LOCALBASE}/include -DBSD
+LDFLAGS+= -L${LUA_LIBDIR} -L${LOCALBASE}/lib
-# add lua prefix to directories
-.for p in data: docs:doc/ examples:examples/
-${p:C/:.*//:tu}DIR_REL= share/${p:C/.*://}${LUA_PKGNAMEPREFIX}${PORTNAME}
-${p:C/:.*//:tu}DIR= ${PREFIX}/${${p:C/:.*//:tu}DIR_REL}
-.endfor
+DOCSDIR= ${PREFIX}/share/doc/lua-${PORTNAME}
+EXAMPLESDIR= ${PREFIX}/share/examples/lua-${PORTNAME}
OPTIONS_DEFINE= DOCS EXAMPLES
-post-extract: .SILENT
- ${RM} -rf ${WRKSRC}/libffi
- ${FIND} ${WRKSRC} -type f -name .git-darcs-dir -delete
+post-patch:
+ @${REINPLACE_CMD} -e \
+ '/^install-data-am:/s|install-dist_docDATA.*|| ; \
+ /^[[:cntrl:]]/s|install-dist_samplesDATA$$||' \
+ ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e \
+ 's|/usr/lib|${LOCALBASE}/lib| ; \
+ /luarocks/d' ${WRKSRC}/samples/*.lua
-post-patch: .SILENT
- ${REINPLACE_CMD} '1s|.*|#! ${LUA_CMD}|' ${WRKSRC}/src/constants
- ${REINPLACE_CMD} -i '' \
- -e 's|/usr/lib|${PREFIX}/lib|' \
- -e '/luarocks/d' \
- ${WRKSRC}/samples/*.lua ${WRKSRC}/tests/*.lua
-
-do-install:
- @${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}/${PORTNAME}
- (cd ${WRKSRC}/src/alien && ${INSTALL_LIB} core.so struct.so \
- ${STAGEDIR}${LUA_MODLIBDIR}/${PORTNAME})
- @${MKDIR} ${STAGEDIR}${LUA_MODSHAREDIR}
- ${INSTALL_DATA} ${WRKSRC}/src/alien.lua ${STAGEDIR}${LUA_MODSHAREDIR}
- @${MKDIR} ${STAGEDIR}${DATADIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/src/constants ${STAGEDIR}${DATADIR}
- ${TAR} cf - -C${WRKSRC} ${TESTS_EXCLUDE:S,^,--exclude ,} tests \
- | ${TAR} xof - -C${STAGEDIR}${DATADIR}
+post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
- (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
+ (cd ${WRKSRC}/doc && ${INSTALL_DATA} alien.* \
+ ${STAGEDIR}${DOCSDIR})
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- (cd ${WRKSRC}/samples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
-
-regression-test: build
- ${LN} -fs ${TESTS_EXCLUDE:S,tests/,../src/,} ${WRKSRC}/tests
- cd ${WRKSRC}/tests && ${LUA_CMD} test_alien.lua
- ${RM} -f ${TESTS_EXCLUDE:S,^,${WRKSRC}/,}
+ (cd ${WRKSRC}/samples && ${INSTALL_DATA} *.lua \
+ ${STAGEDIR}${EXAMPLESDIR})
.include <bsd.port.mk>
diff --git a/devel/lua-alien/distinfo b/devel/lua-alien/distinfo
index d2b6e98b28f0..01929503d4a0 100644
--- a/devel/lua-alien/distinfo
+++ b/devel/lua-alien/distinfo
@@ -1,2 +1,2 @@
-SHA256 (lua-alien/0.5.1) = 5dadc6067f2495da2b78d0ba1fb27d8e33117c138dc76ae4cb500c9b9cd1a26b
-SIZE (lua-alien/0.5.1) = 775968
+SHA256 (alien-0.7.0.zip) = ca77a40858a0fb9ac3998f28fda0825ac4af2f4eed0f5d34d74f943867d4adfe
+SIZE (alien-0.7.0.zip) = 369994
diff --git a/devel/lua-alien/files/patch-Makefile b/devel/lua-alien/files/patch-Makefile
deleted file mode 100644
index 03b28cb8525b..000000000000
--- a/devel/lua-alien/files/patch-Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
---- Makefile~
-+++ Makefile
-@@ -1,22 +1,14 @@
-
- all: src/alien/core.so src/alien/struct.so tests/libalientest$(LIB_EXT)
-
--src/alien/core.o: src/alien/core.c libffi/include/ffi.h
-- $(CC) -c $(CFLAGS) -Ilibffi/include -o src/alien/core.o src/alien/core.c
-+src/alien/core.o: src/alien/core.c
-+ $(CC) -c $(CFLAGS) -o src/alien/core.o src/alien/core.c
-
--libffi/include/ffi.h:
-- cat executables | xargs chmod +x
-- cd libffi && ./configure --disable-shared CC=gcc
--
--libffi/Makefile:
-- cat executables | xargs chmod +x
-- cd libffi && ./configure --disable-shared CC=gcc
-+src/alien/struct.o: src/alien/struct.c
-+ $(CC) -c $(CFLAGS) -o src/alien/struct.o src/alien/struct.c
-
--libffi/.libs/libffi.a: libffi/Makefile
-- cd libffi && make CC=gcc
--
--src/alien/core.so: src/alien/core.o libffi/.libs/libffi.a
-- export MACOSX_DEPLOYMENT_TARGET=10.3; $(CC) $(LIB_OPTION) -o src/alien/core.so src/alien/core.o -lgcc -Llibffi/.libs -lffi
-+src/alien/core.so: src/alien/core.o
-+ export MACOSX_DEPLOYMENT_TARGET=10.3; $(CC) $(LIB_OPTION) -o src/alien/core.so src/alien/core.o -lgcc -lffi
-
- src/alien/struct.so: src/alien/struct.o
- export MACOSX_DEPLOYMENT_TARGET=10.3; $(CC) $(LIB_OPTION) -o src/alien/struct.so src/alien/struct.o
diff --git a/devel/lua-alien/files/patch-src-alien-core.c b/devel/lua-alien/files/patch-src-alien-core.c
deleted file mode 100644
index 61847640b665..000000000000
--- a/devel/lua-alien/files/patch-src-alien-core.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/alien/core.c~
-+++ src/alien/core.c
-@@ -301,7 +301,7 @@ static void *alien_loadfunc (lua_State *
- #define FFI_STDCALL FFI_DEFAULT_ABI
- #endif
-
--#ifdef DARWIN
-+#if defined(DARWIN) || !defined(FFI_SYSV)
- #define FFI_SYSV FFI_DEFAULT_ABI
- #endif
-
diff --git a/devel/lua-alien/files/patch-src__alien.c b/devel/lua-alien/files/patch-src__alien.c
new file mode 100644
index 000000000000..6851e5714757
--- /dev/null
+++ b/devel/lua-alien/files/patch-src__alien.c
@@ -0,0 +1,11 @@
+--- src/alien.c.orig
++++ src/alien.c
+@@ -332,7 +332,7 @@
+ #define FFI_STDCALL FFI_DEFAULT_ABI
+ #endif
+
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(BSD)
+ #define FFI_SYSV FFI_DEFAULT_ABI
+ #endif
+
diff --git a/devel/lua-alien/pkg-plist b/devel/lua-alien/pkg-plist
index 975253a0266e..22e40d6f89e3 100644
--- a/devel/lua-alien/pkg-plist
+++ b/devel/lua-alien/pkg-plist
@@ -1,17 +1,10 @@
-%%LUA_MODLIBDIR%%/alien/core.so
-%%LUA_MODLIBDIR%%/alien/struct.so
-%%PORTDATA%%%%DATADIR%%/constants
-%%PORTDATA%%%%DATADIR%%/tests/alientest.c
-%%PORTDATA%%%%DATADIR%%/tests/libalientest.so
-%%PORTDATA%%%%DATADIR%%/tests/test_alien.lua
+bin/constants
+%%LUA_MODLIBDIR%%/alien_c.so
+%%PORTDOCS%%%%DOCSDIR%%/alien.html
%%PORTDOCS%%%%DOCSDIR%%/alien.md
-%%PORTDOCS%%%%DOCSDIR%%/index.html
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gtk.lua
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/libc.lua
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/string_array.lua
%%LUA_MODSHAREDIR%%/alien.lua
-@dirrm %%LUA_MODLIBDIR%%/alien
-%%PORTDATA%%@dirrm %%DATADIR%%/tests
-%%PORTDATA%%@dirrm %%DATADIR%%
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%