Bug 187972 - devel/lua-alien: Update to version 0.7.0
Summary: devel/lua-alien: Update to version 0.7.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-26 18:40 UTC by tkato432
Modified: 2014-05-21 06:40 UTC (History)
0 users

See Also:


Attachments
file.diff (7.72 KB, patch)
2014-03-26 18:40 UTC, tkato432
no flags Details | Diff
devel_lua-alien.diff (7.64 KB, patch)
2014-04-17 18:50 UTC, tkato432
no flags Details | Diff
devel_lua-alien.diff (7.69 KB, patch)
2014-04-26 19:27 UTC, tkato432
no flags Details | Diff
devel_lua-alien.diff (7.70 KB, patch)
2014-05-19 18:56 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2014-03-26 18:40:01 UTC
- Update to version 0.7.0

New file:
files/patch-src__alien.c

Remove file:
files/patch-Makefile
files/patch-src-alien-core.c
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-03-26 18:40:12 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 tkato432 2014-04-17 18:50:54 UTC
Remake of the patch against current tree.
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2014-04-26 04:08:32 UTC
State Changed
From-To: open->feedback

makefile reject
Comment 4 tkato432 2014-04-26 19:27:37 UTC
Here is the corrected patch.
Comment 5 Martin Wilke freebsd_committer freebsd_triage 2014-05-19 08:23:30 UTC
State Changed
From-To: feedback->open

.
Comment 6 Martin Wilke freebsd_committer freebsd_triage 2014-05-19 08:23:38 UTC
State Changed
From-To: open->feedback

makefile rejected.
Comment 7 tkato432 2014-05-19 18:56:03 UTC
Here is the corrected patch.
Comment 8 dfilter service freebsd_committer freebsd_triage 2014-05-21 06:38:56 UTC
Author: miwi
Date: Wed May 21 05:38:50 2014
New Revision: 354708
URL: http://svnweb.freebsd.org/changeset/ports/354708
QAT: https://qat.redports.org/buildarchive/r354708/

Log:
  - Update to 0.7.0
  
  PR:		187972
  Submitted by:	Ports Fury

Added:
  head/devel/lua-alien/files/patch-src__alien.c   (contents, props changed)
Deleted:
  head/devel/lua-alien/files/patch-Makefile
  head/devel/lua-alien/files/patch-src-alien-core.c
Modified:
  head/devel/lua-alien/Makefile
  head/devel/lua-alien/distinfo
  head/devel/lua-alien/pkg-plist

Modified: head/devel/lua-alien/Makefile
==============================================================================
--- head/devel/lua-alien/Makefile	Wed May 21 05:37:53 2014	(r354707)
+++ head/devel/lua-alien/Makefile	Wed May 21 05:38:50 2014	(r354708)
@@ -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
-
-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/:.*//:tu}DIR_REL=	share/${p:C/.*://}${LUA_PKGNAMEPREFIX}${PORTNAME}
-${p:C/:.*//:tu}DIR=	${PREFIX}/${${p:C/:.*//:tu}DIR_REL}
-.endfor
+USE_GITHUB=	yes
+GH_ACCOUNT=	mascarenhas
+
+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
+
+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}
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
-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
-
-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-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 && ${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>

Modified: head/devel/lua-alien/distinfo
==============================================================================
--- head/devel/lua-alien/distinfo	Wed May 21 05:37:53 2014	(r354707)
+++ head/devel/lua-alien/distinfo	Wed May 21 05:38:50 2014	(r354708)
@@ -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

Added: head/devel/lua-alien/files/patch-src__alien.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/lua-alien/files/patch-src__alien.c	Wed May 21 05:38:50 2014	(r354708)
@@ -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
+ 

Modified: head/devel/lua-alien/pkg-plist
==============================================================================
--- head/devel/lua-alien/pkg-plist	Wed May 21 05:37:53 2014	(r354707)
+++ head/devel/lua-alien/pkg-plist	Wed May 21 05:38:50 2014	(r354708)
@@ -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%%
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 9 Martin Wilke freebsd_committer freebsd_triage 2014-05-21 06:38:57 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!