Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 May 2020 00:50:52 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r361068 - stable/12/lib/libz
Message-ID:  <202005150050.04F0oqqW037827@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Fri May 15 00:50:52 2020
New Revision: 361068
URL: https://svnweb.freebsd.org/changeset/base/361068

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

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

Modified: stable/12/lib/libz/Makefile
==============================================================================
--- stable/12/lib/libz/Makefile	Fri May 15 00:02:24 2020	(r361067)
+++ stable/12/lib/libz/Makefile	Fri May 15 00:50:52 2020	(r361068)
@@ -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,@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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005150050.04F0oqqW037827>