svn commit: r539750 - head/ports-mgmt/pkg
Xin LI
delphij at FreeBSD.org
Sat Jun 20 21:22:55 UTC 2020
Author: delphij
Date: Sat Jun 20 21:22:55 2020
New Revision: 539750
URL: https://svnweb.freebsd.org/changeset/ports/539750
Log:
ports-mgmt/pkg: Respect liblzma.pc if available.
Note that this is meant to be a temporary hack and will be reverted once the
freebsd/pkg have solved this in the build infrastructure.
PR: 200142
MFH: 2020Q2
Approved by: portmgr (bapt over IRC)
Differential Revision: https://reviews.freebsd.org/D24972
Modified:
head/ports-mgmt/pkg/Makefile (contents, props changed)
Modified: head/ports-mgmt/pkg/Makefile
==============================================================================
--- head/ports-mgmt/pkg/Makefile Sat Jun 20 20:17:25 2020 (r539749)
+++ head/ports-mgmt/pkg/Makefile Sat Jun 20 21:22:55 2020 (r539750)
@@ -2,6 +2,7 @@
PORTNAME= pkg
DISTVERSION= 1.14.4
+PORTREVISION= 1
_PKG_VERSION= ${DISTVERSION}
CATEGORIES= ports-mgmt
#MASTER_SITES= \
@@ -71,6 +72,13 @@ pre-everything::
.endif
.endif
+.if !exists(/usr/libdata/pkgconfig/liblzma.pc)
+LIBLZMA_LIBS= -llzma
+.else
+LIBLZMA_PC!= ${EGREP} ^Libs /usr/libdata/pkgconfig/liblzma.pc
+LIBLZMA_LIBS= ${LIBLZMA_PC:M-l*}
+.endif
+
#define PKG_DEPENDS to nothing to avoid infinite loop looking for pkg :)
PKG_DEPENDS=
.undef INSTALLS_DEPENDS
@@ -80,6 +88,10 @@ PKG_DEPENDS=
.if !defined(CROSS_TOOLCHAIN)
PKG_BIN= ${WRKSRC}/src/pkg-static
.endif
+
+post-patch:
+ ${REINPLACE_CMD} -e "s|-llzma|${LIBLZMA_LIBS}|g" ${WRKSRC}/auto.def \
+ ${WRKSRC}/src/Makefile.autosetup ${WRKSRC}/tests/Makefile.autosetup
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/compat/pkg
More information about the svn-ports-all
mailing list