aboutsummaryrefslogtreecommitdiffstats
path: root/ports-mgmt
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2020-06-21 05:23:02 +0800
committerXin LI <delphij@FreeBSD.org>2020-06-21 05:23:02 +0800
commit4b27270c14a9d2e438127070427a84298ed765cb (patch)
treef9e6548c33a9137979cc7b72a07a820bf1290779 /ports-mgmt
parent5321f236b37597497a962a3e70ab5b5b1044fff9 (diff)
downloadfreebsd-ports-gnome-4b27270c14a9d2e438127070427a84298ed765cb.tar.gz
freebsd-ports-gnome-4b27270c14a9d2e438127070427a84298ed765cb.tar.zst
freebsd-ports-gnome-4b27270c14a9d2e438127070427a84298ed765cb.zip
ports-mgmt/pkg-devel: 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/D25053
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/pkg-devel/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/ports-mgmt/pkg-devel/Makefile b/ports-mgmt/pkg-devel/Makefile
index 47e26a14f1d0..dbe374d65704 100644
--- a/ports-mgmt/pkg-devel/Makefile
+++ b/ports-mgmt/pkg-devel/Makefile
@@ -2,6 +2,7 @@
PORTNAME= pkg
DISTVERSION= 1.14.99.1
+PORTREVISION= 1
_PKG_VERSION= ${DISTVERSION}
CATEGORIES= ports-mgmt
PKGNAMESUFFIX= -devel
@@ -35,6 +36,13 @@ EXTRA_PATCHES= ${FILESDIR}/extra-patch-docs_pkg.8
.include <bsd.port.pre.mk>
+.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
+
.if defined(WITH_PKG)
.if ${WITH_PKG} != devel
. if !defined(PACKAGE_BUILDING)
@@ -52,6 +60,10 @@ PKG_DEPENDS=
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
@${MKDIR} ${STAGEDIR}${DOCSDIR}