tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
RTI add zlib.pc to devel/zlib
In working on updating cups to 1.7 and adding cups-filters to pkgsrc, I
came across (on solaris) that the pkgsrc zlib doesn't have a zlib.pc
whereas on my illumos-based distribution, it surprisingly does.
Not to mention that zlib doesn't create ZLIB_CFLAGS, ZLIB_LIBS,...
It seems appropriate to facilitate getting at least pkg-config to work.
Attached is a git diff for comments/approval.
diff --git a/devel/zlib/Makefile b/devel/zlib/Makefile
index d2c7ab7..7d3addf 100644
--- a/devel/zlib/Makefile
+++ b/devel/zlib/Makefile
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.47 2013/05/27 16:22:10 adam Exp $
DISTNAME= zlib-1.2.8
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpng/} \
http://zlib.net/
@@ -15,18 +16,30 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_LIBTOOL= yes
+PKGCONFIG_OVERRIDE+= zlib.pc.in
+
CFLAGS+= ${CPPFLAGS}
LDFLAGS.Cygwin= -no-undefined
-INSTALLATION_DIRS= include lib ${PKGMANDIR}/man3
+SED_TRANSFORMS+= -e "s,@prefix@,${PREFIX},g"
+SED_TRANSFORMS+= -e "s,@exec_prefix@,${PREFIX},g"
+SED_TRANSFORMS+= -e "s,@PACKAGE_VERSION@,${PKGVERSION_NOREV},g"
+SED_TRANSFORMS+= -e "s,@includedir@,${PREFIX}/include,g"
+SED_TRANSFORMS+= -e "s,@libdir@,${PREFIX}/lib,g"
+
+INSTALLATION_DIRS= include lib lib/pkgconfig ${PKGMANDIR}/man3
do-extract:
${CP} -r ${FILESDIR} ${WRKSRC}
+post-build:
+ cd ${WRKSRC} && ${SED} ${SED_TRANSFORMS} zlib.pc.in >zlib.pc
+
do-install:
${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libz.la
${DESTDIR}${PREFIX}/lib
${INSTALL_MAN} ${WRKSRC}/zlib.3 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3
${INSTALL_DATA} ${WRKSRC}/zconf.h ${DESTDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/zlib.h ${DESTDIR}${PREFIX}/include
+ ${INSTALL_DATA} ${WRKSRC}/zlib.pc ${DESTDIR}${PREFIX}/lib/pkgconfig
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/zlib/PLIST b/devel/zlib/PLIST
index 7008f62..5ef561a 100644
--- a/devel/zlib/PLIST
+++ b/devel/zlib/PLIST
@@ -2,4 +2,5 @@
include/zconf.h
include/zlib.h
lib/libz.la
+lib/pkgconfig/zlib.pc
man/man3/zlib.3
diff --git a/devel/zlib/files/zlib.pc.in b/devel/zlib/files/zlib.pc.in
new file mode 100644
index 0000000..ee2ccc2
--- /dev/null
+++ b/devel/zlib/files/zlib.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: zlib
+Description: zlib compression library
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lz
Home |
Main Index |
Thread Index |
Old Index