svn commit: r360952 - head/lib/libz

Xin LI delphij at FreeBSD.org
Tue May 12 01:47:34 UTC 2020


Author: delphij
Date: Tue May 12 01:47:33 2020
New Revision: 360952
URL: https://svnweb.freebsd.org/changeset/base/360952

Log:
  Generate zlib.pc from source.
  
  Reviewed by:		bapt
  MFC after:		3 days
  Differential Revision:	https://reviews.freebsd.org/D24806

Deleted:
  head/lib/libz/zlib.pc
Modified:
  head/lib/libz/Makefile

Modified: head/lib/libz/Makefile
==============================================================================
--- head/lib/libz/Makefile	Tue May 12 01:40:48 2020	(r360951)
+++ head/lib/libz/Makefile	Tue May 12 01:47:33 2020	(r360952)
@@ -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, 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