Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2014 03:29:38 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/187972: devel/lua-alien: Update to version 0.7.0
Message-ID:  <20140327032938.272bdee5ebd2956b14a076b8@yahoo.com>
Resent-Message-ID: <201403261840.s2QIe17J011429@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         187972
>Category:       ports
>Synopsis:       devel/lua-alien: Update to version 0.7.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 26 18:40:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p7 i386
>Organization:
>Environment:
>Description:
- Update to version 0.7.0

New file:
files/patch-src__alien.c

Remove file:
files/patch-Makefile
files/patch-src-alien-core.c

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/devel/lua-alien/Makefile devel/lua-alien/Makefile
--- /usr/ports/devel/lua-alien/Makefile	2014-01-23 03:35:54.000000000 +0900
+++ devel/lua-alien/Makefile	2014-03-27 00:00:00.000000000 +0900
@@ -2,80 +2,56 @@
 # $FreeBSD: head/devel/lua-alien/Makefile 340722 2014-01-22 17:00:46Z mat $
 
 PORTNAME=	alien
-PORTVERSION=	0.5.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
 
 LICENSE=	MIT
 
-LIB_DEPENDS=	ffi:${PORTSDIR}/devel/libffi
+LIB_DEPENDS=	libffi.so:${PORTSDIR}/devel/libffi
 
-USE_LUA=	5.1
+WRKSRC=		${WRKDIR}/${DISTNAME}
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	mascarenhas
 
-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 -shared
-MAKE_ENV+=	LIB_OPTION="${LDFLAGS}" LIB_EXT=".so" LUA="${LUA_CMD}"
-TESTS_EXCLUDE=	tests/alien tests/alien.lua
-
-GITHUB_USER=	mascarenhas
-GITHUB_SRC_SUFX=e667d5d
-
-.if ${CFLAGS:M-fstack-prot*}
-MAKE_ENV+=	__MAKE_CONF= # inherit CFLAGS only once
-CFLAGS+=	-fno-stack-protector
-.endif
-
-# add lua prefix to directories
-.for p in data: docs:doc/ examples:examples/
-${p:C/:.*//:U}DIR_REL=	share/${p:C/.*://}${LUA_PKGNAMEPREFIX}${PORTNAME}
-${p:C/:.*//:U}DIR=	${PREFIX}/${${p:C/:.*//:U}DIR_REL}
-.endfor
-
-post-extract:	.SILENT
-	${RM} -rf ${WRKSRC}/libffi
-	${FIND} ${WRKSRC} -type f -name .git-darcs-dir -delete
-
-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
-
-NO_STAGE=	yes
-do-install:
-	${MKDIR} ${LUA_MODLIBDIR}/${PORTNAME}
-.for f in core.so struct.so
-	${INSTALL_PROGRAM} ${WRKSRC}/src/alien/${f} \
-		${LUA_MODLIBDIR}/${PORTNAME}
-.endfor
-	${INSTALL_DATA} ${WRKSRC}/src/alien.lua ${LUA_MODSHAREDIR}
-.if !defined(NOPORTDATA)
-	${MKDIR} ${DATADIR}
-	${INSTALL_SCRIPT} ${WRKSRC}/src/constants ${DATADIR}
-	${TAR} cf - -C${WRKSRC} ${TESTS_EXCLUDE:S,^,--exclude ,} tests \
-		| ${TAR} xof - -C${DATADIR}
-.endif
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
-	${TAR} cf - -C${WRKSRC}/doc . | ${TAR} xof - -C${DOCSDIR}
-.endif
-.if !defined(NOPORTEXAMPLES)
-	${MKDIR} ${EXAMPLESDIR}
-	${TAR} cf - -C${WRKSRC}/samples . | ${TAR} xof - -C${EXAMPLESDIR}
-.endif
-
-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}/,}
+USES=		shebangfix zip
+SHEBANG_FILES=	src/constants
+SHEBANG_LANG=	lua
+lua_OLD_CMD=	/usr/bin/env lua
+lua_CMD=	${LUA_CMD}
+USE_LUA=	5.1
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--disable-silent-rules \
+		--libdir=${LUA_MODLIBDIR} \
+		--datadir=${LUA_MODSHAREDIR} \
+		--with-lua-suffix="-${LUA_VER}"
+
+CPPFLAGS+=	-I${LUA_INCDIR} -I${LOCALBASE}/include -DBSD
+LDFLAGS+=	-L${LUA_LIBDIR} -L${LOCALBASE}/lib
+
+DOCSDIR=	${PREFIX}/share/doc/lua-${PORTNAME}
+EXAMPLESDIR=	${PREFIX}/share/examples/lua-${PORTNAME}
+
+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-install:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKSRC}/doc && ${INSTALL_DATA} alien.* \
+		${STAGEDIR}${DOCSDIR})
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	(cd ${WRKSRC}/samples && ${INSTALL_DATA} *.lua \
+		${STAGEDIR}${EXAMPLESDIR})
 
 .include <bsd.port.mk>
diff -urN /usr/ports/devel/lua-alien/distinfo devel/lua-alien/distinfo
--- /usr/ports/devel/lua-alien/distinfo	2014-01-23 03:35:54.000000000 +0900
+++ devel/lua-alien/distinfo	2014-03-27 00:00:00.000000000 +0900
@@ -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 -urN /usr/ports/devel/lua-alien/files/patch-Makefile devel/lua-alien/files/patch-Makefile
--- /usr/ports/devel/lua-alien/files/patch-Makefile	2014-01-23 03:35:54.000000000 +0900
+++ devel/lua-alien/files/patch-Makefile	1970-01-01 09:00:00.000000000 +0900
@@ -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 -urN /usr/ports/devel/lua-alien/files/patch-src-alien-core.c devel/lua-alien/files/patch-src-alien-core.c
--- /usr/ports/devel/lua-alien/files/patch-src-alien-core.c	2014-01-23 03:35:54.000000000 +0900
+++ devel/lua-alien/files/patch-src-alien-core.c	1970-01-01 09:00:00.000000000 +0900
@@ -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 -urN /usr/ports/devel/lua-alien/files/patch-src__alien.c devel/lua-alien/files/patch-src__alien.c
--- /usr/ports/devel/lua-alien/files/patch-src__alien.c	1970-01-01 09:00:00.000000000 +0900
+++ devel/lua-alien/files/patch-src__alien.c	2014-03-27 00:00:00.000000000 +0900
@@ -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 -urN /usr/ports/devel/lua-alien/pkg-plist devel/lua-alien/pkg-plist
--- /usr/ports/devel/lua-alien/pkg-plist	2014-01-23 03:35:54.000000000 +0900
+++ devel/lua-alien/pkg-plist	2014-03-27 00:00:00.000000000 +0900
@@ -1,17 +1,11 @@
-%%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.la
+%%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%%
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140327032938.272bdee5ebd2956b14a076b8>