1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-17 19:39:43 +00:00

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)
This commit is contained in:
Xin LI 2020-06-20 21:26:46 +00:00
parent b5927dc684
commit 26501ed514
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q2/; revision=539752
2 changed files with 24 additions and 0 deletions

View File

@ -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)
@ -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}

View File

@ -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
@ -81,6 +89,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-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/NEWS ${STAGEDIR}${DOCSDIR}/NEWS