Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jun 2020 21:22:55 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r539750 - head/ports-mgmt/pkg
Message-ID:  <202006202122.05KLMtMo065412@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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