diff options
author | khorben <khorben@pkgsrc.org> | 2016-10-27 00:24:58 +0000 |
---|---|---|
committer | khorben <khorben@pkgsrc.org> | 2016-10-27 00:24:58 +0000 |
commit | 91ca37ea39409539eff5895d0d3318677da023f3 (patch) | |
tree | 25b18af308318159ac3b8ebcf8ac1075116bc17d | |
parent | f789e925fd74bb61547375cd8e8d9978c20f1caa (diff) | |
download | pkgsrc-91ca37ea39409539eff5895d0d3318677da023f3.tar.gz |
Import the second part of a patch from John Marino
This:
- fixes the "/usr/ports" paths in code and man pages to
${PKGSRCDIR} (normal) or hardcoded to "/usr/pkgsrc" (future, its for
builders like Synth and poudriere)
- changes default DB path from "/var/db/pkg" to "/var/db/pkgng". It
seems the original default was too ambiguous as "pkg" is used
everywhere in pkgsrc and it's the default format (not pkgng format)
- similarly, changes default CACHE patch from "/var/cache/pkg" to
"/var/cache/pkgng"
- bumps PKGREVISION again
Another relevant comment from John and reworded by myself for context:
(all misquotings mine)
« Importantly, FreeBSD, NetBSD, and DragonFly all provide libarchive
in base. Therefore, this changes the port to use the base version when
available because the libarchive requirement is considered heavy. The
OpenSSL dependency brings a lot with, including perl. When trying to
update the bootstrap to build pkgng instead of pkg_* tools, it is
critical that the dependencies remain low. Other platforms will have
to suffer with the libarchive requirement if they want to use pkgng.
Following this, special linking code is needed for DragonFly since the
SSL libraries are now private. In fact, the only userland program
allowed to link with them is pkg(8) for bootstrapping reasons listed
above. »
Thanks again!
-rw-r--r-- | pkgtools/pkg/Makefile | 49 | ||||
-rw-r--r-- | pkgtools/pkg/PLIST | 2 |
2 files changed, 48 insertions, 3 deletions
diff --git a/pkgtools/pkg/Makefile b/pkgtools/pkg/Makefile index a4b9c79b4ba..57af0bb3ac1 100644 --- a/pkgtools/pkg/Makefile +++ b/pkgtools/pkg/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.7 2016/10/27 00:06:54 khorben Exp $ +# $NetBSD: Makefile,v 1.8 2016/10/27 00:24:58 khorben Exp $ DISTNAME= pkg-1.8.7 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= pkgtools MASTER_SITES= http://files.etoilebsd.net/pkg/ EXTRACT_SUFX= .tar.xz @@ -51,10 +51,52 @@ SUBST_FILES.pkgconf-prefix= src/pkg.conf.sample SUBST_SED.pkgconf-prefix+= -e "s|/usr/local|${PREFIX}|g" SUBST_MESSAGE.pkgconf-prefix= Correct the installation prefix in pkg.conf(5). +SUBST_CLASSES+= portsdir +SUBST_STAGE.portsdir= pre-install +SUBST_FILES.portsdir= libpkg/pkg_config.c \ + src/pkg.conf.sample \ + docs/pkg-create.8 \ + docs/pkg-set.8 \ + docs/pkg-repo.8 \ + docs/pkg.conf.5 \ + docs/pkg-version.8 \ + docs/pkg.8 +SUBST_SED.portsdir= -e "s|/usr/ports|${PORTSDIR}|g" \ + -e "s|/var/db/pkg|/var/db/pkgng|g" \ + -e "s|/var/cache/pkg|/var/cache/pkgng|g" +SUBST_MESSAGE.portsdir= Correct reference to FreeBSD portsdir. + +.if defined(PACKAGE_BUILDING) # set by Synth which has custom location, so use default path +PORTSDIR= /usr/pkgsrc +.else +PORTSDIR= ${PKGSRCDIR} +.endif + +# DragonFly SSL libraries are private. pkg(8) is the one exception of a userland +# program that is allowed to link to them due to bootstrap reasons +.if exists(/usr/lib/priv/libprivate_ssl.so) +BUILDLINK_PASSTHRU_RPATHDIRS= /lib/priv +.endif + post-patch: ${CP} ${FILESDIR}/readpassphrase_compat.h \ ${WRKSRC}/src/ +# DragonFly SSL libraries are private. +.if exists(/usr/lib/priv/libprivate_ssl.so) + ${SED} -i.bak \ + -e 's|lssl|lprivate_ssl|' \ + -e 's|lcrypto|lprivate_crypto|' \ + -e 's|la_rpath = |la_rpath = -R/lib/priv |' \ + ${WRKSRC}/libpkg/Makefile.in \ + ${WRKSRC}/src/Makefile.in \ + ${WRKSRC}/tests/Makefile.in + ${SED} -i.bak \ + -e '/OS_CFLAGS=/ s|SOURCE|SOURCE -I/usr/include/priv|' \ + -e '/OS_LDFLAGS=/ s|=|="-L/usr/lib/priv -R/lib/priv"|' \ + ${WRKSRC}/configure +.endif + post-install: ${RM} ${DESTDIR}${PREFIX}/sbin/pkg2ng ${MV} ${DESTDIR}${PREFIX}/etc/bash_completion.d/_pkg.bash \ @@ -76,5 +118,8 @@ post-install: ${MV} ${DESTDIR}${PREFIX}/etc/pkg.conf.sample \ ${DESTDIR}${EGDIR}/pkg.conf.sample +.include "../../mk/bsd.prefs.mk" +.if ${OPSYS} != "FreeBSD" && ${OPSYS} != "DragonFly" && ${OPSYS} != "NetBSD" .include "../../archivers/libarchive/buildlink3.mk" +.endif .include "../../mk/bsd.pkg.mk" diff --git a/pkgtools/pkg/PLIST b/pkgtools/pkg/PLIST index 0e500cc26db..202cde62557 100644 --- a/pkgtools/pkg/PLIST +++ b/pkgtools/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.4 2016/10/27 00:06:54 khorben Exp $ +@comment $NetBSD: PLIST,v 1.5 2016/10/27 00:24:58 khorben Exp $ include/pkg.h lib/libpkg.la lib/libpkg_static.la |