diff --git a/lib/libz/Makefile b/lib/libz/Makefile index c60252fad598..48e57ccc2a1a 100644 --- a/lib/libz/Makefile +++ b/lib/libz/Makefile @@ -53,6 +53,17 @@ INCS= zconf.h zlib.h .PATH: ${ZLIBSRC}/test +ZLIB_VERSION!= sed -n '/define.*ZLIB_VERSION/{s,[^0-9.],,gp;q;}' ${ZLIBSRC}/zlib.h + +zlib.pc: zlib.pc.in + sed -e 's,@prefix@,/usr,g ; \ + s,@exec_prefix@,$${prefix},g ; \ + s,@libdir@,$${exec_prefix}/lib,g ; \ + s,@sharedlibdir@,$${libdir},g ; \ + s,@includedir@,$${prefix}/include,g ; \ + s,@VERSION@,${ZLIB_VERSION},g ;' \ + ${.ALLSRC} > ${.TARGET} + minigzip: all minigzip.o $(CC) -o minigzip minigzip.o -L. -lz diff --git a/lib/libz/zlib.pc b/lib/libz/zlib.pc deleted file mode 100644 index b9ad734e1df5..000000000000 --- a/lib/libz/zlib.pc +++ /dev/null @@ -1,14 +0,0 @@ -# $FreeBSD$ -prefix=/usr -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -sharedlibdir=${libdir} -includedir=${prefix}/include - -Name: zlib -Description: zlib compression library -Version: 1.2.10 - -Requires: -Libs: -L${libdir} -L${sharedlibdir} -lz -Cflags: -I${includedir}