pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/pkg



Module Name:    pkgsrc
Committed By:   khorben
Date:           Thu Oct 27 00:24:58 UTC 2016

Modified Files:
        pkgsrc/pkgtools/pkg: Makefile PLIST

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


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/pkgtools/pkg/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/pkgtools/pkg/PLIST

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/pkg/Makefile
diff -u pkgsrc/pkgtools/pkg/Makefile:1.7 pkgsrc/pkgtools/pkg/Makefile:1.8
--- pkgsrc/pkgtools/pkg/Makefile:1.7    Thu Oct 27 00:06:54 2016
+++ pkgsrc/pkgtools/pkg/Makefile        Thu Oct 27 00:24:58 2016
@@ -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
 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"

Index: pkgsrc/pkgtools/pkg/PLIST
diff -u pkgsrc/pkgtools/pkg/PLIST:1.4 pkgsrc/pkgtools/pkg/PLIST:1.5
--- pkgsrc/pkgtools/pkg/PLIST:1.4       Thu Oct 27 00:06:54 2016
+++ pkgsrc/pkgtools/pkg/PLIST   Thu Oct 27 00:24:58 2016
@@ -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



Home | Main Index | Thread Index | Old Index