svn commit: r361069 - stable/11/lib/libz

Xin LI delphij at FreeBSD.org
Fri May 15 00:51:31 UTC 2020


Author: delphij
Date: Fri May 15 00:51:30 2020
New Revision: 361069
URL: https://svnweb.freebsd.org/changeset/base/361069

Log:
  MFC r360952: Generate zlib.pc from source.

Deleted:
  stable/11/lib/libz/zlib.pc
Modified:
  stable/11/lib/libz/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libz/Makefile
==============================================================================
--- stable/11/lib/libz/Makefile	Fri May 15 00:50:52 2020	(r361068)
+++ stable/11/lib/libz/Makefile	Fri May 15 00:51:30 2020	(r361069)
@@ -52,6 +52,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, at prefix@,/usr,g ; \
+		s, at exec_prefix@,$${prefix},g ; \
+		s, at libdir@,$${exec_prefix}/lib,g ; \
+		s, at sharedlibdir@,$${libdir},g ; \
+		s, at includedir@,$${prefix}/include,g ; \
+		s, at VERSION@,${ZLIB_VERSION},g ;' \
+		${.ALLSRC} > ${.TARGET}
+
 minigzip:	all minigzip.o
 	$(CC) -o minigzip minigzip.o -L. -lz
 


More information about the svn-src-all mailing list