ports/180786: lua52 lacks a pkgconfig file

Julio Merino julio at meroh.net
Sun Dec 29 13:03:57 UTC 2013


Here comes an updated version of the patch to add a pkgconfig file for
lua52.  I've also taken the chance to merge in asomer's improvements
of using SUB_FILES instead of a manual sed command.

On Tue, Jul 23, 2013 at 9:20 PM,  <FreeBSD-gnats-submit at freebsd.org> wrote:
> Thank you very much for your problem report.
> It has the internal identification `ports/180786'.
> The individual assigned to look at your
> report is: freebsd-ports-bugs.
>
> You can access the state of your problem report at any time
> via this link:
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=180786
>
>>Category:       ports
>>Responsible:    freebsd-ports-bugs
>>Synopsis:       lua52 lacks a pkgconfig file
>>Arrival-Date:   Wed Jul 24 01:20:00 UTC 2013



-- 
Julio Merino / @jmmv
-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile	(revision 337901)
+++ Makefile	(working copy)
@@ -3,6 +3,7 @@
 
 PORTNAME=	lua
 PORTVERSION=	5.2.3
+PORTREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	http://www.lua.org/ftp/
 PKGNAMESUFFIX=	52
@@ -40,6 +41,19 @@
 		INSTALL_INC=${STAGEDIR}${PREFIX}/include/lua52 \
 		INSTALL_EXEC="${INSTALL_PROGRAM}"
 
+# Cope with the lack of support for Lua 5.2 in bsd.lua.mk.  These
+# overrides, which are required below, should be removed once bsd.lua.mk
+# understands this lua version.
+LUA_PREFIX?=    ${PREFIX}
+LUA_SUBDIR?=    lua${PKGNAMESUFFIX}
+LUA_INCDIR?=    ${LUA_PREFIX}/include/${LUA_SUBDIR}
+LUA_LIBDIR?=    ${LUA_PREFIX}/lib/${LUA_SUBDIR}
+
+SUB_FILES=	lua-${LUA_VER}.pc
+SUB_LIST=	version=${PORTVERSION} \
+		libdir=${LUA_LIBDIR} \
+		includedir=${LUA_INCDIR}
+
 .include <bsd.port.options.mk>
 
 .if ${ARCH} == "amd64" || ${ARCH} == "powerpc"
@@ -57,5 +71,7 @@
 		${STAGEDIR}${PREFIX}/man/man1/lua52.1
 	@${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \
 		${STAGEDIR}${PREFIX}/man/man1/luac52.1
+	${INSTALL_DATA} ${WRKDIR}/lua-${LUA_VER}.pc \
+		${STAGEDIR}${PREFIX}/libdata/pkgconfig
 
 .include <bsd.port.mk>
Index: files/lua-5.2.pc.in
===================================================================
--- files/lua-5.2.pc.in	(revision 0)
+++ files/lua-5.2.pc.in	(working copy)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+version=%%version%%
+libdir=%%libdir%%
+includedir=%%includedir%%
+
+Name: Lua
+Description: An Extensible Extension Language
+Version: ${version}
+Libs: -L${libdir} -llua -lm
+Cflags: -I${includedir}
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 337901)
+++ pkg-plist	(working copy)
@@ -7,6 +7,7 @@
 include/lua52/lualib.h
 lib/liblua-5.2.a
 lib/liblua-5.2.so
+libdata/pkgconfig/lua-5.2.pc
 man/man1/lua52.1.gz
 man/man1/luac52.1.gz
 @dirrmtry %%DATADIR%%/5.2


More information about the freebsd-ports-bugs mailing list