diff options
author | miwi <miwi@FreeBSD.org> | 2014-05-21 13:38:50 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2014-05-21 13:38:50 +0800 |
commit | 796440627cb805235cac533ec62d5efc72cf3315 (patch) | |
tree | 59f7505123d813c6c8d4b5c883ed104add790283 /devel/lua-alien/Makefile | |
parent | d09ac4f15ced3b906ba98dcf6b7c2b3d5da29b30 (diff) | |
download | freebsd-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/lua-alien/Makefile')
-rw-r--r-- | devel/lua-alien/Makefile | 83 |
1 files changed, 33 insertions, 50 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> |