Bug 190054 - [PATCH] graphics/lua-gd stagify, new LIB_DEPENDS syntax
Summary: [PATCH] graphics/lua-gd stagify, new LIB_DEPENDS syntax
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: lua
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-21 08:50 UTC by Sergey V. Dyatko
Modified: 2014-05-23 17:40 UTC (History)
0 users

See Also:


Attachments
file.diff (323 bytes, patch)
2014-05-21 08:50 UTC, Sergey V. Dyatko
no flags Details | Diff
file.diff (1.81 KB, patch)
2014-05-21 08:50 UTC, Sergey V. Dyatko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey V. Dyatko 2014-05-21 08:50:02 UTC
* Use new LIB_DEPENDS syntax
* Stagify

Fix: [tiger@laptop]:/<2>graphics/lua-gd>svn diff pkg-plist 
[tiger@laptop]:/<2>graphics/lua-gd>svn diff Makefile
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-05-21 08:50:06 UTC
Responsible Changed
From-To: freebsd-ports-bugs->lua

lua@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-05-23 17:37:07 UTC
Author: mandree
Date: Fri May 23 16:37:01 2014
New Revision: 354942
URL: http://svnweb.freebsd.org/changeset/ports/354942
QAT: https://qat.redports.org/buildarchive/r354942/

Log:
  Convert to staging. Modernize.
  
  PR:		190054
  Submitted by:	Sergey V. Dyatko (maintainer)

Modified:
  head/graphics/lua-gd/Makefile
  head/graphics/lua-gd/pkg-plist

Modified: head/graphics/lua-gd/Makefile
==============================================================================
--- head/graphics/lua-gd/Makefile	Fri May 23 16:35:24 2014	(r354941)
+++ head/graphics/lua-gd/Makefile	Fri May 23 16:37:01 2014	(r354942)
@@ -12,7 +12,7 @@ COMMENT=	GD bindings for the Lua program
 
 LICENSE=	MIT
 
-LIB_DEPENDS=	gd:${PORTSDIR}/graphics/gd
+LIB_DEPENDS=	libgd.so:${PORTSDIR}/graphics/gd
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
@@ -22,12 +22,9 @@ CFLAGS+=	-I${LUA_INCDIR} -I${LOCALBASE}/
 LDFLAGS+=	-shared -L${LOCALBASE}/lib -lgd -L${LUA_LIBDIR} -llua -lm
 GDFEATURES=	`gdlib-config --features |sed -e "s/GD_/-DGD_/g"`
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
-.if ${ARCH} ==	"amd64"
-CFLAGS+=	-fPIC
-.endif
+CFLAGS_amd64+=	-fPIC
 
 do-build:
 	${CC} -o ${WRKSRC}/gd.so ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} ${GDFEATURES} ${WRKSRC}/luagd.c
@@ -35,19 +32,19 @@ do-build:
 LUA_MODLIBDIR=	${PREFIX}/lib/lua/${LUA_VER}
 
 do-install:
-	${MKDIR} ${LUA_MODLIBDIR}
-	${INSTALL_PROGRAM} ${WRKSRC}/gd.so ${LUA_MODLIBDIR}
-	${LUA_CMD} ${WRKSRC}/test_features.lua
+	${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}
+	${INSTALL_PROGRAM} ${WRKSRC}/gd.so ${STAGEDIR}${LUA_MODLIBDIR}
+	${SETENV} LUA_CPATH=${STAGEDIR}${LUA_MODLIBDIR}/?.so ${LUA_CMD} ${WRKSRC}/test_features.lua
 .if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	cd ${WRKSRC}/doc/ && ${INSTALL_DATA} * ${DOCSDIR}/
-	@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}"
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC}/doc/ && ${INSTALL_DATA} * ${STAGEDIR}${DOCSDIR}/
+	@${ECHO_MSG} "===> Documentation installed in ${STAGEDIR}${DOCSDIR}"
 .endif
 
 .if ${PORT_OPTIONS:MEXAMPLES}
-	${MKDIR} ${EXAMPLESDIR}
-	cd ${WRKSRC}/demos && ${INSTALL_DATA} * ${EXAMPLESDIR}
-	@${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}"
+	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	cd ${WRKSRC}/demos && ${INSTALL_DATA} * ${STAGEDIR}${EXAMPLESDIR}
+	@${ECHO_MSG} "===> Examples installed in ${STAGEDIR}${EXAMPLESDIR}"
 .endif
 
 .include <bsd.port.mk>

Modified: head/graphics/lua-gd/pkg-plist
==============================================================================
--- head/graphics/lua-gd/pkg-plist	Fri May 23 16:35:24 2014	(r354941)
+++ head/graphics/lua-gd/pkg-plist	Fri May 23 16:37:01 2014	(r354942)
@@ -1,4 +1,4 @@
-lib/lua/%%LUA_VER%%/gd.so
+%%LUA_MODLIBDIR%%/gd.so
 %%PORTDOCS%%%%DOCSDIR%%/cat.png
 %%PORTDOCS%%%%DOCSDIR%%/catdiff.png
 %%PORTDOCS%%%%DOCSDIR%%/catmsg.png
_______________________________________________
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 3 Matthias Andree freebsd_committer freebsd_triage 2014-05-23 17:37:40 UTC
State Changed
From-To: open->closed

Committed, with minor changes.  Thanks!  Specifically, LUA_CPATH needs 
to be set when running test_features.lua, else the gd module is only 
found if an older version of the port is already installed.