From 348e1827fe736dde2773fd6e23ae7ebe7cd561e9 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 15 Oct 2004 04:41:13 +0000 Subject: [PATCH] install pkgconfig file for png. From: Jacob Meuser --- graphics/png/Makefile | 4 ++-- .../png/patches/patch-scripts_libpng_pc_in | 15 +++++++++++++++ .../patches/patch-scripts_makefile_openbsd | 19 +++++++++++++------ graphics/png/pkg/PLIST | 4 +++- 4 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 graphics/png/patches/patch-scripts_libpng_pc_in diff --git a/graphics/png/Makefile b/graphics/png/Makefile index 82b104f0363..e2c87b95d6f 100644 --- a/graphics/png/Makefile +++ b/graphics/png/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.49 2004/09/22 21:08:20 brad Exp $ +# $OpenBSD: Makefile,v 1.50 2004/10/15 04:41:13 brad Exp $ COMMENT= "library for manipulating PNG images" DISTNAME= libpng-1.2.7 -PKGNAME= ${DISTNAME:S/lib//} +PKGNAME= ${DISTNAME:S/lib//}p1 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpng/} diff --git a/graphics/png/patches/patch-scripts_libpng_pc_in b/graphics/png/patches/patch-scripts_libpng_pc_in new file mode 100644 index 00000000000..68fea2296e5 --- /dev/null +++ b/graphics/png/patches/patch-scripts_libpng_pc_in @@ -0,0 +1,15 @@ +$OpenBSD: patch-scripts_libpng_pc_in,v 1.1 2004/10/15 04:41:13 brad Exp $ +--- scripts/libpng.pc.in.orig Sat Sep 11 22:19:36 2004 ++++ scripts/libpng.pc.in Thu Oct 14 03:07:03 2004 +@@ -4,8 +4,8 @@ exec_prefix=${prefix} + libdir=${exec_prefix}/lib + includedir=${exec_prefix}/include + +-Name: libpng12 ++Name: libpng + Description: Loads and saves PNG files + Version: 1.2.7 +-Libs: -L${libdir} -lpng12 -lz -lm +-Cflags: -I${includedir}/libpng12 ++Libs: -L${libdir} -lpng -lz -lm ++Cflags: -I${includedir}/libpng diff --git a/graphics/png/patches/patch-scripts_makefile_openbsd b/graphics/png/patches/patch-scripts_makefile_openbsd index 39432c73d35..0e1b035f150 100644 --- a/graphics/png/patches/patch-scripts_makefile_openbsd +++ b/graphics/png/patches/patch-scripts_makefile_openbsd @@ -1,6 +1,6 @@ -$OpenBSD: patch-scripts_makefile_openbsd,v 1.10 2004/09/20 01:24:11 brad Exp $ +$OpenBSD: patch-scripts_makefile_openbsd,v 1.11 2004/10/15 04:41:13 brad Exp $ --- scripts/makefile.openbsd.orig Sat Sep 11 22:19:36 2004 -+++ scripts/makefile.openbsd Sat Sep 18 22:43:38 2004 ++++ scripts/makefile.openbsd Thu Oct 14 03:48:56 2004 @@ -1,13 +1,16 @@ -# makefile for libpng +# makefile for libpng under OpenBSD @@ -22,7 +22,7 @@ $OpenBSD: patch-scripts_makefile_openbsd,v 1.10 2004/09/20 01:24:11 brad Exp $ LIB= png SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \ -@@ -21,24 +24,36 @@ CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBL +@@ -21,24 +24,39 @@ CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBL NOPROFILE= Yes @@ -34,12 +34,15 @@ $OpenBSD: patch-scripts_makefile_openbsd,v 1.10 2004/09/20 01:24:11 brad Exp $ +DOCS= README libpng.txt -pngtest.o: pngtest.c -+all: ${_LIBS} libpng-config ++all: ${_LIBS} libpng-config libpng.pc + +pngtest.o: pngtest.c ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} -pngtest: pngtest.o ++libpng.pc: ++ cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(PREFIX)! > libpng.pc ++ +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(PREFIX)\"; \ @@ -66,7 +69,7 @@ $OpenBSD: patch-scripts_makefile_openbsd,v 1.10 2004/09/20 01:24:11 brad Exp $ fi if [ ! -d ${DESTDIR}${LIBDIR} ]; then \ ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \ -@@ -52,21 +67,19 @@ beforeinstall: +@@ -52,21 +70,24 @@ beforeinstall: if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \ ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \ fi @@ -75,6 +78,9 @@ $OpenBSD: patch-scripts_makefile_openbsd,v 1.10 2004/09/20 01:24:11 brad Exp $ + if [ ! -d ${DESTDIR}${DOCDIR} ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${DOCDIR}; \ fi ++ if [ ! -d ${DESTDIR}${LIBDIR}/pkgconfig ]; then \ ++ ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/pkgconfig; \ ++ fi afterinstall: @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a @@ -89,7 +95,8 @@ $OpenBSD: patch-scripts_makefile_openbsd,v 1.10 2004/09/20 01:24:11 brad Exp $ + -m ${NONBINMODE} ${HDRS} ${DESTDIR}${INCDIR} ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include -- ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ ++ -m ${NONBINMODE} libpng.pc ${DESTDIR}${LIBDIR}/pkgconfig + ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png + -m ${NONBINMODE} ${DOCS} ${DESTDIR}${DOCDIR} diff --git a/graphics/png/pkg/PLIST b/graphics/png/pkg/PLIST index 9d4dc5402ef..13dd33340b6 100644 --- a/graphics/png/pkg/PLIST +++ b/graphics/png/pkg/PLIST @@ -1,10 +1,12 @@ -@comment $OpenBSD: PLIST,v 1.17 2004/09/15 00:50:10 espie Exp $ +@comment $OpenBSD: PLIST,v 1.18 2004/10/15 04:41:13 brad Exp $ %%SHARED%% bin/libpng-config include/libpng/ include/libpng/png.h include/libpng/pngconf.h lib/libpng.a +lib/pkgconfig/ +lib/pkgconfig/libpng.pc @man man/cat3/libpng.0 @man man/cat3/libpngpf.0 @man man/cat5/png.0