aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2015-03-10 12:45:48 +0800
committermi <mi@FreeBSD.org>2015-03-10 12:45:48 +0800
commitad8a70b67382b0c9b73c70a3277c7830d8722be4 (patch)
tree6df02959da5e136ecb8ca24ade76b092dec1caa6
parentaa1f9e6a321172630de410537ba24d87c3e37514 (diff)
downloadfreebsd-ports-gnome-ad8a70b67382b0c9b73c70a3277c7830d8722be4.tar.gz
freebsd-ports-gnome-ad8a70b67382b0c9b73c70a3277c7830d8722be4.tar.zst
freebsd-ports-gnome-ad8a70b67382b0c9b73c70a3277c7830d8722be4.zip
When downloading (from GitHub), use the commit-ID instead of "master" --
in case these files are ever updated. Instead of versioning the two distfiles themselves, use a versioned DIST_SUBDIR. Compile the code straight from ${_DISTDIR} without copying any files around after download.
-rw-r--r--devel/lua-gettext/Makefile17
-rw-r--r--devel/lua-gettext/distinfo8
2 files changed, 13 insertions, 12 deletions
diff --git a/devel/lua-gettext/Makefile b/devel/lua-gettext/Makefile
index ea54dd536112..5b04f140c16e 100644
--- a/devel/lua-gettext/Makefile
+++ b/devel/lua-gettext/Makefile
@@ -5,9 +5,10 @@ PORTNAME= gettext
PORTVERSION= 1.5
PORTREVISION= 2
CATEGORIES= devel
-MASTER_SITES= https://raw.githubusercontent.com/nuclewall/bsdinstaller/master/src/lib/lua/gettext/
+MASTER_SITES= https://raw.githubusercontent.com/nuclewall/bsdinstaller/${GH_COMMIT}/src/lib/lua/gettext/
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
-DISTFILES= lua_gettext.c?rev=${CVER} gettext.lua?rev=${LVER}
+DISTFILES= lua_gettext.c gettext.lua
+DIST_SUBDIR= lua-${PORTNAME}-${GH_COMMIT}
MAINTAINER= ports@FreeBSD.org
COMMENT= Gettext binding for Lua 5
@@ -16,20 +17,20 @@ USES= gettext lua:51
CVER= 1.15
LVER= ${PORTVERSION}
+GH_COMMIT= 8323bb9
PLIST_FILES= %%LUA_MODSHAREDIR%%/gettext.lua \
%%LUA_MODLIBDIR%%/lgettext.so
+MAKEFILE= ${FILESDIR}/Makefile
+MAKE_ENV+= VPATH=${_DISTDIR}
+NO_WRKSUBDIR= yes
do-extract:
- ${MKDIR} ${WRKSRC}
-.for file in ${DISTFILES}
- ${CP} ${DISTDIR}/${file} ${WRKSRC}/${file:C/\?.*$//}
-.endfor
- ${CP} ${FILESDIR}/Makefile ${WRKSRC}
+ # Bulding straight from ${_DISTDIR}
do-install:
@${MKDIR} ${STAGEDIR}${LUA_MODSHAREDIR}
- ${INSTALL_DATA} ${WRKSRC}/gettext.lua ${STAGEDIR}${LUA_MODSHAREDIR}
+ ${INSTALL_DATA} ${_DISTDIR}/gettext.lua ${STAGEDIR}${LUA_MODSHAREDIR}
@${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}
${INSTALL_PROGRAM} ${WRKSRC}/lgettext.so ${STAGEDIR}${LUA_MODLIBDIR}
diff --git a/devel/lua-gettext/distinfo b/devel/lua-gettext/distinfo
index 3b0fdfbedfbd..c75fb16c19e5 100644
--- a/devel/lua-gettext/distinfo
+++ b/devel/lua-gettext/distinfo
@@ -1,4 +1,4 @@
-SHA256 (lua_gettext.c?rev=1.15) = c3ba6db0e0220f2789d06099ce28372b5a30234ffee78caf5fa47efdf274baaf
-SIZE (lua_gettext.c?rev=1.15) = 1429
-SHA256 (gettext.lua?rev=1.5) = a861d10a6aba7d0949c0851fff4d42a494bfaffbcc93a163ec85cecb38309fe3
-SIZE (gettext.lua?rev=1.5) = 315
+SHA256 (lua-gettext-8323bb9/lua_gettext.c) = c3ba6db0e0220f2789d06099ce28372b5a30234ffee78caf5fa47efdf274baaf
+SIZE (lua-gettext-8323bb9/lua_gettext.c) = 1429
+SHA256 (lua-gettext-8323bb9/gettext.lua) = a861d10a6aba7d0949c0851fff4d42a494bfaffbcc93a163ec85cecb38309fe3
+SIZE (lua-gettext-8323bb9/gettext.lua) = 315