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
This commit is contained in:
parent
5321f236b3
commit
4b27270c14
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=539751
1 changed files with 12 additions and 0 deletions
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue