Date: Sat, 20 Jun 2020 21:26:47 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r539752 - in branches/2020Q2/ports-mgmt: pkg pkg-devel Message-ID: <202006202126.05KLQlPq065915@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Sat Jun 20 21:26:46 2020 New Revision: 539752 URL: https://svnweb.freebsd.org/changeset/ports/539752 Log: MFH: r539750 r539751 ports-mgmt/pkg: Respect liblzma.pc if available. 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 Approved by: portmgr (bapt over IRC) Modified: branches/2020Q2/ports-mgmt/pkg-devel/Makefile branches/2020Q2/ports-mgmt/pkg/Makefile Directory Properties: branches/2020Q2/ (props changed) Modified: branches/2020Q2/ports-mgmt/pkg-devel/Makefile ============================================================================== --- branches/2020Q2/ports-mgmt/pkg-devel/Makefile Sat Jun 20 21:23:02 2020 (r539751) +++ branches/2020Q2/ports-mgmt/pkg-devel/Makefile Sat Jun 20 21:26:46 2020 (r539752) @@ -2,6 +2,7 @@ PORTNAME= pkg DISTVERSION= 1.13.99.7 +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 Modified: branches/2020Q2/ports-mgmt/pkg/Makefile ============================================================================== --- branches/2020Q2/ports-mgmt/pkg/Makefile Sat Jun 20 21:23:02 2020 (r539751) +++ branches/2020Q2/ports-mgmt/pkg/Makefile Sat Jun 20 21:26:46 2020 (r539752) @@ -2,6 +2,7 @@ PORTNAME= pkg DISTVERSION= 1.13.2 +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-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006202126.05KLQlPq065915>