Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jun 2020 21:23:02 +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: r539751 - head/ports-mgmt/pkg-devel
Message-ID:  <202006202123.05KLN2ek065536@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Sat Jun 20 21:23:02 2020
New Revision: 539751
URL: https://svnweb.freebsd.org/changeset/ports/539751

Log:
  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

Modified:
  head/ports-mgmt/pkg-devel/Makefile   (contents, props changed)

Modified: head/ports-mgmt/pkg-devel/Makefile
==============================================================================
--- head/ports-mgmt/pkg-devel/Makefile	Sat Jun 20 21:22:55 2020	(r539750)
+++ head/ports-mgmt/pkg-devel/Makefile	Sat Jun 20 21:23:02 2020	(r539751)
@@ -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)
@@ -51,6 +59,10 @@ PKG_DEPENDS=
 .if !exists(${LOCALBASE}/sbin/pkg) && !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?202006202123.05KLN2ek065536>