Modified: trunk/dports/devel/lua-lpeg/Portfile (140552 => 140553)
--- trunk/dports/devel/lua-lpeg/Portfile 2015-09-22 17:24:33 UTC (rev 140552)
+++ trunk/dports/devel/lua-lpeg/Portfile 2015-09-22 18:46:28 UTC (rev 140553)
@@ -26,7 +26,11 @@
depends_lib port:lua
patchfiles patch-makefile.diff
-post-patch {
+
+# This should be done in post-patch, but lua is only available as a dependency
+# in configure and later phases. Thus, using pkg-config to get the C and LDFLAGS
+# fails miserably in trace mode.
+pre-configure {
reinplace "s|%%CFLAGS%%|${configure.cflags} [exec ${prefix}/bin/pkg-config lua --cflags]|" ${worksrcpath}/makefile
reinplace "s|%%LDFLAGS%%|${configure.ldflags} [exec ${prefix}/bin/pkg-config lua --libs]|" ${worksrcpath}/makefile