aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES9
-rw-r--r--Keywords/pkg_install.awk111
-rw-r--r--Mk/Scripts/check-stagedir.sh39
-rw-r--r--Mk/Uses/ncurses.mk18
-rw-r--r--Mk/bsd.commands.mk16
-rw-r--r--Mk/bsd.openssl.mk14
-rw-r--r--Mk/bsd.pkgng.mk291
-rw-r--r--Mk/bsd.port.mk584
-rw-r--r--Mk/bsd.port.subdir.mk7
-rw-r--r--astro/google-earth/Makefile5
-rw-r--r--emulators/i386-wine-devel/Makefile.i38616
-rw-r--r--emulators/i386-wine/Makefile.i38616
-rw-r--r--lang/python/Makefile5
-rw-r--r--lang/python2/Makefile5
-rw-r--r--lang/python3/Makefile5
-rw-r--r--net-mgmt/nagios-check_ports/Makefile8
-rw-r--r--net-mgmt/net-snmp/Makefile5
-rw-r--r--ports-mgmt/pkg-devel/Makefile23
-rw-r--r--ports-mgmt/pkg/Makefile23
-rw-r--r--ports-mgmt/portrac/Makefile2
-rw-r--r--security/bro/Makefile3
-rw-r--r--security/broccoli/Makefile7
-rw-r--r--sysutils/freesbie/Makefile6
23 files changed, 249 insertions, 969 deletions
diff --git a/CHANGES b/CHANGES
index aab5a4f1a2c8..fb7d87f45db3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -13,6 +13,15 @@ All ports committers are allowed to commit to this file.
20140901:
AUTHOR: bapt@FreeBSD.org
+ Support for pkg_install has been removed
+ Note that WITH_PKGNG is now WITH_PKG (still used to define 'devel')
+ WITH_PKGNG remains for compatibility
+ @stopdaemon support has gone, pkg(8) has a generic mechanism to
+ provide the same functionnality
+
+20140901:
+AUTHOR: bapt@FreeBSD.org
+
Support for NO_STAGE has been removed
20140825:
diff --git a/Keywords/pkg_install.awk b/Keywords/pkg_install.awk
deleted file mode 100644
index 120a7ffefa77..000000000000
--- a/Keywords/pkg_install.awk
+++ /dev/null
@@ -1,111 +0,0 @@
-# $FreeBSD$
-#
-# MAINTAINER: portmgr@FreeBSD.org
-#
-# This file handles converting keywords to pkg_install compatible format.
-# It will be removed once pkg_install is EOL.
-#
-
-# @sample somefile.conf.sample
-# ->
-# @comment begin @sample somefile.conf.sample
-# @unexec if cmp -s %D/etc/somefile.conf %D/etc/somefile.conf.sample; then rm -f %D/etc/somefile.conf; fi
-# etc/somefile.conf.sample
-# @exec if ! [ -f %D/etc/somefile.conf ]; then cp %D/etc/somefile.conf.sample %D/etc/somefile.conf; fi
-# @comment end @sample somefile.conf.sample
-#
-##
-# @shell bin/shell
-# ->
-# @comment begin @shell bin/shell
-# @exec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
-# @unexec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
-# @comment end @shell bin/shell
-
-$1 == "@sample" {
- sample_file=$2
- # Take out .sample
- target_file=substr(sample_file, 0, length(sample_file) - 7)
- print "@comment begin " $0
- print "@unexec if cmp -s '%D/" target_file "' '%D/" sample_file "'; then rm -f '%D/" target_file "'; fi"
- print sample_file
- print "@exec if ! [ -f '%D/" target_file "' ]; then /bin/cp -p '%D/" sample_file "' '%D/" target_file "'; fi"
- print "@comment end " $0
- next
-}
-
-$1 == "@shell" {
- shell_file=$2
- print "@comment begin " $0
- print shell_file
- print "@exec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak"
- print "@unexec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak"
- print "@comment end " $0
- next
-}
-
-$1 == "@fc" {
- font_dir=$2
- print "@comment begin " $0
- print "@exec fc-cache -s %D/" font_dir " 2>/dev/null || true"
- print "@unexec fc-cache -s %D/" font_dir " 2>/dev/null || true"
- print "@unexec rmdir %D/"font_dir" 2>/dev/null || true"
- print "@comment end " $0
- next
-}
-
-$1 == "@fcfontsdir" {
- font_dir=$2
- print "@comment begin " $0
- print "@exec fc-cache -s %D/" font_dir " 2>/dev/null || true"
- print "@exec mkfontscale %D/" font_dir " 2>/dev/null || true"
- print "@exec mkfontdir %D/" font_dir " 2>/dev/null || true"
- print "@unexec fc-cache -s %D/" font_dir " 2>/dev/null || true"
- print "@unexec mkfontscale %D/" font_dir " 2>/dev/null || true"
- print "@unexec if [ -e %D/%@/fonts.scale -a \"`stat -f '%%z' %D/" font_dir "/fonts.scale 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.scale ; fi"
- print "@unexec mkfontdir %D/" font_dir " 2>/dev/null || true"
- print "@unexec if [ -e %D/" font_dir "/fonts.dir -a \"`stat -f '%%z' %D/" font_dir "/fonts.dir 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.dir ; fi"
- print "@unexec rmdir %D/"font_dir" 2>/dev/null || true"
- print "@comment end " $0
- next
-}
-
-$1 == "@fontsdir" {
- font_dir=$2
- print "@comment begin " $0
- print "@exec mkfontscale %D/" font_dir " 2>/dev/null || true"
- print "@exec mkfontdir %D/" font_dir " 2>/dev/null || true"
- print "@unexec mkfontscale %D/" font_dir " 2>/dev/null || true"
- print "@unexec if [ -e %D/%@/fonts.scale -a \"`stat -f '%%z' %D/" font_dir "/fonts.scale 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.scale ; fi"
- print "@unexec mkfontdir %D/" font_dir " 2>/dev/null || true"
- print "@unexec if [ -e %D/" font_dir "/fonts.dir -a \"`stat -f '%%z' %D/" font_dir "/fonts.dir 2>/dev/null`\" = '2' ]; then rm %D/" font_dir "/fonts.dir ; fi"
- print "@unexec rmdir %D/"font_dir" 2>/dev/null || true"
- print "@comment end " $0
- next
-}
-
-$1 == "@dirrmtry" {
- directory=substr($0, 11, length($0) - 10)
- print "@comment begin " $0
- if ($2 ~ /^\//) {
- print "@unexec rmdir \"" directory "\" 2>/dev/null || true"
- } else {
- print "@unexec rmdir \"%D/" directory "\" 2>/dev/null || true"
- }
- print "@comment end " $0
- next
-}
-
-$1 == "@fmtutil" {
- print "@comment begin " $0
- print "@exec fmtutil-sys --missing >/dev/null"
- for (i = 2; i <= NF; i++)
- print "@unexec rm -f "$i"; rmdir -p `dirname "$1"` 2>/dev/null"
- print "@comment end " $0
- next
-}
-
-# Print everything else as-is
-{
- print $0
-}
diff --git a/Mk/Scripts/check-stagedir.sh b/Mk/Scripts/check-stagedir.sh
index 940cce24e80d..d7bb5f566f4c 100644
--- a/Mk/Scripts/check-stagedir.sh
+++ b/Mk/Scripts/check-stagedir.sh
@@ -192,37 +192,12 @@ pkg_get_recursive_deps() {
### GATHER DIRS OWNED BY RUN-DEPENDS. WHY ARE WE SCREAMING?
lookup_dependency_dirs() {
: >${WRKDIR}/.run-depends-dirs
- if [ -n "${WITH_PKGNG}" ]; then
- if [ -n "${PACKAGE_DEPENDS}" ]; then
- echo "${PACKAGE_DEPENDS}" | while read pkg; do \
- PKG_CHECKED= pkg_get_recursive_deps "${pkg}"; \
- done | sort -u | xargs ${PKG_QUERY} "%D" | \
- sed -e 's,/$,,' | sort -u \
- >>${WRKDIR}/.run-depends-dirs
- fi
- else
- # Evaluate ACTUAL-PACKAGE-DEPENDS
- packagelist=
- package_depends=$(eval ${PACKAGE_DEPENDS})
- if [ -n "${package_depends}" ]; then
- # This ugly mess can go away with pkg_install EOL
- awk_script=$(cat <<'EOF'
- /Deinstall directory remove:/ {print $4}
- /UNEXEC 'rmdir "[^"]*" 2>\/dev\/null \|\| true'/ {
- gsub(/"%D\//, "\"", $0)
- match($0, /"[^"]*"/)
- dir=substr($0, RSTART+1, RLENGTH-2)
- print dir
- }
-EOF
-)
- echo "${package_depends}" | tr ' ' '\n' | \
- cut -d : -f 1 | sort -u | \
- xargs -n 1 ${PKG_QUERY} -f | \
- awk "${awk_script}" | \
- sed -e "/^[^/]/s,^,${LOCALBASE}/," | sort -u \
- >>${WRKDIR}/.run-depends-dirs
- fi
+ if [ -n "${PACKAGE_DEPENDS}" ]; then
+ echo "${PACKAGE_DEPENDS}" | while read pkg; do \
+ PKG_CHECKED= pkg_get_recursive_deps "${pkg}"; \
+ done | sort -u | xargs ${PKG_QUERY} "%D" | \
+ sed -e 's,/$,,' | sort -u \
+ >>${WRKDIR}/.run-depends-dirs
fi
}
@@ -438,7 +413,7 @@ esac
# validate environment
envfault=
for i in STAGEDIR PREFIX LOCALBASE WRKDIR WRKSRC MTREE_FILE GNOME_MTREE_FILE \
- TMPPLIST PLIST_SUB_SED SCRIPTSDIR PACKAGE_DEPENDS WITH_PKGNG PKG_QUERY \
+ TMPPLIST PLIST_SUB_SED SCRIPTSDIR PACKAGE_DEPENDS PKG_QUERY \
PORT_OPTIONS NO_PREFIX_RMDIR
do
if ! ( eval ": \${${i}?}" ) 2>/dev/null ; then
diff --git a/Mk/Uses/ncurses.mk b/Mk/Uses/ncurses.mk
index 000f4d623a05..af7421de9ee0 100644
--- a/Mk/Uses/ncurses.mk
+++ b/Mk/Uses/ncurses.mk
@@ -54,31 +54,17 @@ NCURSESINC= ${LOCALBASE}/include/ncurses
. if !defined(NCURSES_PORT) && exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so)
PKG_DBDIR?= ${DESTDIR}/var/db/pkg
-. if defined(WITH_PKGNG)
-. if defined(DESTDIR)
+. if defined(DESTDIR)
PKGARGS= -c ${DESTDIR}
-. endif
+. endif
PKGARGS?=
NCURSES_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libncurses.so || :
-. else
-NCURSES_INSTALLED!= find "${PKG_DBDIR}/" -type f -name "+CONTENTS" -print0 | \
- xargs -0 grep -l "^lib/libncurses.so." | \
- while read contents; do \
- ncursesprefix=`grep "^@cwd " "$${contents}" | ${HEAD} -n 1`; \
- if test "$${ncursesprefix}" = "@cwd ${LOCALBASE}" ; then \
- echo "$${contents}"; break; fi; done
-. endif
. endif
NCURSES_INSTALLED?=
.if ${NCURSES_INSTALLED} != ""
-. if defined(WITH_PKGNG)
NCURSES_PORT= ${NCURSES_INSTALLED}
NCURSES_SHLIBFILE!= ${PKG_INFO} -ql ${NCURSES_INSTALLED} | grep -m 1 "^`pkg query "%p" ${NCURSES_INSTALLED}`/lib/libncurses.so."
-. else
-NCURSES_PORT!= grep "^@comment ORIGIN:" "${NCURSES_INSTALLED}" | ${CUT} -d : -f 2
-NCURSES_SHLIBFILE!= grep -m 1 "^lib/libncurses.so." "${NCURSES_INSTALLED}"
-. endif
NCURSES_SHLIBVER?= ${NCURSES_SHLIBFILE:E}
.endif
diff --git a/Mk/bsd.commands.mk b/Mk/bsd.commands.mk
index 25608575f20e..e07cbc78a658 100644
--- a/Mk/bsd.commands.mk
+++ b/Mk/bsd.commands.mk
@@ -115,7 +115,6 @@ ECHO_MSG?= ${ECHO_CMD}
.elif !defined(_PKGTOOLSDEFINED)
_PKGTOOLSDEFINED= yes
-.if defined(WITH_PKGNG)
PKG_BIN?= ${LOCALBASE}/sbin/pkg-static
PKG_CMD?= ${PKG_BIN} register
PKG_DELETE?= ${PKG_BIN} delete -y
@@ -124,20 +123,5 @@ PKG_VERSION?= ${PKG_BIN} version
PKG_CREATE?= ${PKG_BIN} create
PKG_ADD?= ${PKG_BIN} add
PKG_QUERY?= ${PKG_BIN} query
-.else
-.if exists(${LOCALBASE}/sbin/pkg_info)
-PKG_CMD?= ${LOCALBASE}/sbin/pkg_create
-PKG_ADD?= ${LOCALBASE}/sbin/pkg_add
-PKG_DELETE?= ${LOCALBASE}/sbin/pkg_delete
-PKG_INFO?= ${LOCALBASE}/sbin/pkg_info
-PKG_VERSION?= ${LOCALBASE}/sbin/pkg_version
-.else
-PKG_CMD?= /usr/sbin/pkg_create
-PKG_ADD?= /usr/sbin/pkg_add
-PKG_DELETE?= /usr/sbin/pkg_delete
-PKG_INFO?= /usr/sbin/pkg_info
-PKG_VERSION?= /usr/sbin/pkg_version
-.endif
-.endif
.endif
diff --git a/Mk/bsd.openssl.mk b/Mk/bsd.openssl.mk
index a9361fe7efbb..e5a1af73f53e 100644
--- a/Mk/bsd.openssl.mk
+++ b/Mk/bsd.openssl.mk
@@ -90,30 +90,16 @@ OPENSSLBASE= ${LOCALBASE}
# find installed port and use it for dependency
PKG_DBDIR?= ${DESTDIR}/var/db/pkg
.if !defined(OPENSSL_INSTALLED)
-.if defined(WITH_PKGNG)
.if defined(DESTDIR)
PKGARGS= -c ${DESTDIR}
.else
PKGARGS=
.endif
OPENSSL_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so || :
-.else
-OPENSSL_INSTALLED!= find "${PKG_DBDIR}/" -type f -name "+CONTENTS" -print0 | \
- xargs -0 grep -l "^lib/libcrypto.so.[0-9]*$$" | \
- while read contents; do \
- sslprefix=`grep "^@cwd " "$${contents}" | ${HEAD} -n 1`; \
- if test "$${sslprefix}" = "@cwd ${LOCALBASE}" ; then \
- echo "$${contents}"; break; fi; done
-.endif
.endif
.if defined(OPENSSL_INSTALLED) && ${OPENSSL_INSTALLED} != ""
-.if defined(WITH_PKGNG)
OPENSSL_PORT= ${OPENSSL_INSTALLED}
OPENSSL_SHLIBFILE!= ${PKG_INFO} -ql ${OPENSSL_INSTALLED} | grep "^`pkg query "%p" ${OPENSSL_INSTALLED}`/lib/libcrypto.so.[0-9]*$$"
-.else
-OPENSSL_PORT!= grep "^@comment ORIGIN:" "${OPENSSL_INSTALLED}" | ${CUT} -d : -f 2
-OPENSSL_SHLIBFILE!= grep "^lib/libcrypto.so.[0-9]*$$" "${OPENSSL_INSTALLED}"
-.endif
OPENSSL_SHLIBVER?= ${OPENSSL_SHLIBFILE:E}
.else
# PKG_DBDIR was not found
diff --git a/Mk/bsd.pkgng.mk b/Mk/bsd.pkgng.mk
deleted file mode 100644
index e16f38405e45..000000000000
--- a/Mk/bsd.pkgng.mk
+++ /dev/null
@@ -1,291 +0,0 @@
-# $FreeBSD$
-#
-
-.if defined(_POSTMKINCLUDED)
-PKGNG_Include_MAINTAINER= portmgr@FreeBSD.org
-
-METADIR= ${WRKDIR}/.metadir
-MANIFESTF= ${METADIR}/+MANIFEST
-
-PKGPREINSTALL?= ${PKGDIR}/pkg-pre-install
-PKGPOSTINSTALL?= ${PKGDIR}/pkg-post-install
-PKGPREDEINSTALL?= ${PKGDIR}/pkg-pre-deinstall
-PKGPOSTDEINSTALL?= ${PKGDIR}/pkg-post-deinstall
-PKGPREUPGRADE?= ${PKGDIR}/pkg-pre-upgrade
-PKGPOSTUPGRADE?= ${PKGDIR}/pkg-post-upgrade
-PKGUPGRADE?= ${PKGDIR}/pkg-upgrade
-_FORCE_POST_PATTERNS= rmdir kldxref mkfontscale mkfontdir fc-cache \
- fonts.dir fonts.scale gtk-update-icon-cache \
- gio-querymodules \
- gtk-query-immodules \
- ldconfig \
- load-octave-pkg \
- ocamlfind \
- update-desktop-database update-mime-database \
- gdk-pixbuf-query-loaders catalog.ports \
- glib-compile-schemas \
- ccache-update-links
-
-PLIST_REINPLACE:= ${PLIST_REINPLACE:Ndirrmtry}
-PLIST_REINPLACE:= ${PLIST_REINPLACE:Nstopdaemon}
-
-ACTUAL-PACKAGE-DEPENDS?= \
- if [ "${_LIB_RUN_DEPENDS}" != " " ]; then \
- ${PKG_QUERY} "\"%n\": {origin: %o, version: \"%v\"}" " " ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,:C,${PORTSDIR}/,,} 2>/dev/null || : ; \
- fi
-
-create-manifest:
- @${MKDIR} ${METADIR}; \
- (\
- echo "name: \"${PKGBASE}\"" ; \
- echo "version: \"${PKGVERSION}\"" ; \
- echo "origin: ${PKGORIGIN}" ; \
- echo "comment: <<EOD" ; \
- echo ${COMMENT:Q} ; \
- echo "EOD" ; \
- echo "maintainer: ${MAINTAINER}" ; \
- echo "prefix: ${PREFIX}" ; \
- [ -z "${WWW}" ] || echo "www: ${WWW}" ; \
- echo "deps: { "; \
- ${ACTUAL-PACKAGE-DEPENDS} | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | ${SORT} -u ; \
- echo "}" ; \
- echo "categories: [ ${CATEGORIES:u:S/$/,/} ]" ; \
- l=${LICENSE_COMB} ; \
- [ -n "${NO_ARCH}" ] && echo "arch : `${PKG_BIN} config abi | ${CUT} -d: -f1,2`:*" ; \
- echo "licenselogic: $${l:-single}" ; \
- [ -z "${LICENSE}" ] || echo "licenses: [ ${LICENSE:u:S/$/,/} ]" ; \
- [ -z "${USERS}" ] || echo "users: [ ${USERS:u:S/$/,/} ]" ; \
- [ -z "${GROUPS}" ] || echo "groups: [ ${GROUPS:u:S/$/,/} ]" ; \
- ) > ${MANIFESTF}
- @${ECHO_CMD} -n "options: {" >> ${MANIFESTF}
-.for opt in ${COMPLETE_OPTIONS_LIST}
- @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}: $${match:-off}," >> ${MANIFESTF}
-.endfor
- @${ECHO_CMD} "}" >> ${MANIFESTF}
-.if defined(PKG_NOTES)
- @${ECHO_CMD} -n "annotations: {" >> ${MANIFESTF}
-.for note in ${PKG_NOTES}
- @${ECHO_CMD} -n ' ${note}: "${PKG_NOTE_${note}:S/"/\"/g}",' >> ${MANIFESTF}
-.endfor
- @${ECHO_CMD} " }" >> ${MANIFESTF}
-.endif
- @[ -f ${PKGINSTALL} ] && ${CP} ${PKGINSTALL} ${METADIR}/+INSTALL; \
- ${RM} -f ${METADIR}/+PRE_INSTALL ; \
- for a in ${PKGPREINSTALL}; do \
- [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+PRE_INSTALL ; \
- done ; \
- ${RM} -f ${METADIR}/+POST_INSTALL ; \
- for a in ${PKGPOSTINSTALL}; do \
- [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+POST_INSTALL ; \
- done ; \
- [ -f ${PKGDEINSTALL} ] && ${CP} ${PKGDEINSTALL} ${METADIR}/+DEINSTALL; \
- ${RM} -f ${METADIR}/+PRE_DEINSTALL ; \
- for a in ${PKGPREDEINSTALL}; do \
- [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+PRE_DEINSTALL ; \
- done ; \
- ${RM} -f ${METADIR}/+POST_DEINSTALL ; \
- for a in ${PKGPOSTDEINSTALL}; do \
- [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+POST_DEINSTALL ; \
- done ; \
- [ -f ${PKGPOSTDEINSTALL} ] && ${CP} ${PKGPOSTDEINSTALL} ${METADIR}/+POST_DEINSTALL; \
- [ -f ${PKGUPGRADE} ] && ${CP} ${PKGUPGRADE} ${METADIR}/+UPGRADE; \
- [ -f ${PKGPREUPGRADE} ] && ${CP} ${PKGPREUPGRADE} ${METADIR}/+PRE_UPGRADE; \
- [ -f ${PKGPOSTUPGRADE} ] && ${CP} ${PKGPOSTUPGRADE} ${METADIR}/+POST_UPGRADE; \
- ${CP} ${DESCR} ${METADIR}/+DESC; \
- [ -f ${PKGMESSAGE} ] && ${CP} ${PKGMESSAGE} ${METADIR}/+DISPLAY || return 0
-.if !defined(NO_MTREE)
- @[ -f ${MTREE_FILE} ] && ${CP} ${MTREE_FILE} ${METADIR}/+MTREE_DIRS || return 0
-.endif
-
-
-.if !target(fake-pkg)
-STAGE_ARGS= -i ${STAGEDIR}
-
-.if !defined(NO_PKG_REGISTER)
-fake-pkg: create-manifest
-.if defined(INSTALLS_DEPENDS)
- @${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic"
-.else
- @${ECHO_MSG} "===> Registering installation for ${PKGNAME}"
-.endif
-.if defined(INSTALLS_DEPENDS)
- @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
-.else
- @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
-.endif
- @${RM} -rf ${METADIR}
-.endif
-.endif
-
-.if !target(check-build-conflicts)
-check-build-conflicts:
-.if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK)
- @conflicts_with=$$( \
- { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} 2>/dev/null || : ; } \
- | while read pkgname prfx orgn; do \
- if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
- ${ECHO_CMD} -n " $${pkgname}"; \
- fi; \
- done); \
- if [ -n "$${conflicts_with}" ]; then \
- ${ECHO_MSG}; \
- ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
- for entry in $${conflicts_with}; do \
- ${ECHO_MSG} " $${entry}"; \
- done; \
- ${ECHO_MSG}; \
- ${ECHO_MSG} " They will not build together."; \
- ${ECHO_MSG} " Please remove them first with pkg delete."; \
- exit 1;\
- fi
-.endif
-.endif
-
-.if !target(identify-install-conflicts)
-identify-install-conflicts:
-.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS)
- @conflicts_with=$$( \
- { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \
- | while read pkgname prfx orgn; do \
- if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
- ${ECHO_CMD} -n " $${pkgname}"; \
- fi; \
- done); \
- if [ -n "$${conflicts_with}" ]; then \
- ${ECHO_MSG}; \
- ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
- for entry in $${conflicts_with}; do \
- ${ECHO_MSG} " $${entry}"; \
- done; \
- ${ECHO_MSG}; \
- ${ECHO_MSG} " They install files into the same place."; \
- ${ECHO_MSG} " You may want to stop build with Ctrl + C."; \
- sleep 10; \
- fi
-.endif
-.endif
-
-.if !target(check-install-conflicts)
-check-install-conflicts:
-.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) || ( defined(CONFLICTS_BUILD) && defined(DEFER_CONFLICTS_CHECK) ) ) && !defined(DISABLE_CONFLICTS)
-.if defined(DEFER_CONFLICTS_CHECK)
- @conflicts_with=$$( \
- { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \
- | while read pkgname prfx orgn; do \
- if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
- ${ECHO_CMD} -n " $${pkgname}"; \
- fi; \
- done); \
- if [ -n "$${conflicts_with}" ]; then \
- ${ECHO_MSG}; \
- ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
- for entry in $${conflicts_with}; do \
- ${ECHO_MSG} " $${entry}"; \
- done; \
- ${ECHO_MSG}; \
- ${ECHO_MSG} " Please remove them first with pkg delete."; \
- exit 1; \
- fi
-.else
- @conflicts_with=$$( \
- { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \
- | while read pkgname prfx orgn; do \
- if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
- ${ECHO_CMD} -n " $${pkgname}"; \
- fi; \
- done); \
- if [ -n "$${conflicts_with}" ]; then \
- ${ECHO_MSG}; \
- ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
- for entry in $${conflicts_with}; do \
- ${ECHO_MSG} " $${entry}"; \
- done; \
- ${ECHO_MSG}; \
- ${ECHO_MSG} " They install files into the same place."; \
- ${ECHO_MSG} " Please remove them first with pkg delete."; \
- exit 1; \
- fi
-.endif # defined(DEFER_CONFLICTS_CHECK)
-.endif
-.endif
-
-.if !target(do-package)
-PKG_CREATE_ARGS= -r ${STAGEDIR} -m ${METADIR} -p ${TMPPLIST}
-do-package: create-manifest
-do-package: ${TMPPLIST}
- @if [ -d ${PACKAGES} ]; then \
- if [ ! -d ${PKGREPOSITORY} ]; then \
- if ! ${MKDIR} ${PKGREPOSITORY}; then \
- ${ECHO_MSG} "=> Can't create directory ${PKGREPOSITORY}."; \
- exit 1; \
- fi; \
- fi; \
- fi
- @for cat in ${CATEGORIES}; do \
- ${RM} -f ${PACKAGES}/$$cat/${PKGNAMEPREFIX}${PORTNAME}*${PKG_SUFX} ; \
- done
- @${MKDIR} ${WRKDIR}/pkg
- @if ${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -f ${PKG_SUFX:S/.//} -o ${WRKDIR}/pkg ${PKGNAME}; then \
- if [ -d ${PKGREPOSITORY} -a -w ${PKGREPOSITORY} ]; then \
- ${LN} -f ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE} 2>/dev/null \
- || ${CP} -af ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
- if [ "${PKGORIGIN}" = "ports-mgmt/pkg" -o "${PKGORIGIN}" = "ports-mgmt/pkg-devel" ]; then \
- if [ ! -d ${PKGLATESTREPOSITORY} ]; then \
- if ! ${MKDIR} ${PKGLATESTREPOSITORY}; then \
- ${ECHO_MSG} "=> Can't create directory ${PKGLATESTREPOSITORY}."; \
- exit 1; \
- fi; \
- fi ; \
- ${LN} -sf ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE} ; \
- fi; \
- fi; \
- else \
- cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \
- exit 1; \
- fi
-.endif
-
-.if !target(check-already-installed)
-.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
-check-already-installed:
- @${ECHO_MSG} "===> Checking if ${PKGBASE} already installed"; \
- pkgname=`${PKG_INFO} -q -O ${PKGBASE}`; \
- if [ -n "$${pkgname}" ]; then \
- v=`${PKG_VERSION} -t $${pkgname} ${PKGNAME}`; \
- if [ "$${v}" = "<" ]; then \
- ${ECHO_CMD} "===> An older version of ${PKGBASE} is already installed ($${pkgname})"; \
- else \
- ${ECHO_CMD} "===> ${PKGNAME} is already installed"; \
- fi; \
- ${ECHO_MSG} " You may wish to \`\`make deinstall'' and install this port again"; \
- ${ECHO_MSG} " by \`\`make reinstall'' to upgrade it properly."; \
- ${ECHO_MSG} " If you really wish to overwrite the old port of ${PKGBASE}"; \
- ${ECHO_MSG} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \
- ${ECHO_MSG} " in your environment or the \"make install\" command line."; \
- exit 1; \
- fi
-.endif
-.endif
-
-
-.if !target(deinstall)
-deinstall:
-.if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER)
- @${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target"
- @cd ${.CURDIR} && \
- ${SU_CMD} "${MAKE} ${.TARGET}"
- @${ECHO_MSG} "===> Returning to user credentials"
-.else
- @${ECHO_MSG} "===> Deinstalling for ${PKGBASE}"
- @if ${PKG_INFO} -e ${PKGBASE}; then \
- p=`${PKG_INFO} -q -O ${PKGBASE}`; \
- ${ECHO_MSG} "===> Deinstalling $${p}"; \
- ${PKG_DELETE} -f ${PKGBASE} ; \
- else \
- ${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \
- fi
- @${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
-.endif
-.endif
-
-.endif # defined(_POSTMKINCLUDED)
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 711244d154e0..dbbbffe9b30e 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1133,7 +1133,6 @@ CO_ENV+= STAGEDIR=${STAGEDIR} \
GNOME_MTREE_FILE=${GNOME_MTREE_FILE} \
TMPPLIST=${TMPPLIST} \
SCRIPTSDIR=${SCRIPTSDIR} \
- WITH_PKGNG=${WITH_PKGNG} \
PLIST_SUB_SED="${PLIST_SUB_SED}" \
PORT_OPTIONS="${PORT_OPTIONS}" \
PORTSDIR="${PORTSDIR}"
@@ -1241,20 +1240,6 @@ OSVERSION!= ${SYSCTL} -n kern.osreldate
.endif
.endif
-.if ${OSVERSION} >= 1000017
-.if !defined(WITHOUT_PKGNG)
-WITH_PKGNG?= yes
-.else
-.undef WITH_PKGNG
-.endif
-.endif
-
-.if !defined(WITH_PKGNG) && !defined(NO_WARNING_PKG_INSTALL_EOL)
-WARNING+= "pkg_install EOL is scheduled for 2014-09-01. Please migrate to pkgng"
-WARNING+= "http://blogs.freebsdish.org/portmgr/2014/02/03/time-to-bid-farewell-to-the-old-pkg_-tools/"
-WARNING+= "If you do not want to see this message again set NO_WARNING_PKG_INSTALL_EOL=yes in your make.conf"
-.endif
-
# Enable new xorg for FreeBSD versions after Radeon KMS was imported unless
# WITHOUT_NEW_XORG is set.
.if (${OSVERSION} >= 902510 && ${OSVERSION} < 1000000) || ${OSVERSION} >= 1000704
@@ -1614,9 +1599,8 @@ SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \
PLIST_SUB_SED_MIN?= 2
PLIST_SUB_SED?= ${PLIST_SUB:C/.*=.{1,${PLIST_SUB_SED_MIN}}$//g:NEXTRACT_SUFX=*:NOSREL=*:NLIB32DIR=*:NPREFIX=*:NLOCALBASE=*:NRESETPREFIX=*:N*="":N*="@comment*:C/([^=]*)="?([^"]*)"?/s!\2!%%\1%%!g;/g:C/\./\\./g}
-PLIST_REINPLACE+= stopdaemon rmtry
+PLIST_REINPLACE+= rmtry
PLIST_REINPLACE_RMTRY=s!^@rmtry \(.*\)!@unexec rm -f %D/\1 2>/dev/null || true!
-PLIST_REINPLACE_STOPDAEMON=s!^@stopdaemon \(.*\)!@unexec %D/etc/rc.d/\1 forcestop 2>/dev/null || true!
# kludge to strip trailing whitespace from CFLAGS;
# sub-configure will not # survive double space
@@ -1717,16 +1701,17 @@ LIB32DIR= lib
.endif
PLIST_SUB+= LIB32DIR=${LIB32DIR}
-PKGNG_ORIGIN?= ports-mgmt/pkg
-.if defined(WITH_PKGNG)
-.if ${WITH_PKGNG} == devel
-PKGNG_ORIGIN= ports-mgmt/pkg-devel
-.endif
-.if !defined(PKG_DEPENDS)
-.if !defined(CLEAN_FETCH_ENV)
-PKG_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PORTSDIR}/${PKGNG_ORIGIN}
-.endif
+PKG_ORIGIN?= ports-mgmt/pkg
+# Keep WITH_PKGNG for compat with scripts which are looking for it
+WITH_PKGNG?= yes
+WITH_PKG?= ${WITH_PKGNG}
+
+.if ${WITH_PKG} == devel
+PKG_ORIGIN= ports-mgmt/pkg-devel
.endif
+
+.if !defined(PKG_DEPENDS) && !defined(CLEAN_FETCH_ENV)
+PKG_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PORTSDIR}/${PKG_ORIGIN}
.endif
.if defined(USE_GCC)
@@ -1845,22 +1830,38 @@ MAKE_ENV+= ${DESTDIRNAME}=${STAGEDIR}
MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR}
.endif
-.if defined(WITH_PKGNG)
CO_ENV+= PACKAGE_DEPENDS="${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,:C,${PORTSDIR}/,,}" \
PKG_QUERY="${PKG_QUERY}"
-.else
-CO_ENV+= PACKAGE_DEPENDS=${ACTUAL-PACKAGE-DEPENDS:Q} \
- PKG_QUERY="${PKG_INFO}"
-.endif
+
.if defined(NO_PREFIX_RMDIR)
CO_ENV+= NO_PREFIX_RMDIR=1
.else
CO_ENV+= NO_PREFIX_RMDIR=0
.endif
-.if defined(WITH_PKGNG)
-.include "${PORTSDIR}/Mk/bsd.pkgng.mk"
-.endif
+
+METADIR= ${WRKDIR}/.metadir
+MANIFESTF= ${METADIR}/+MANIFEST
+
+PKGPREINSTALL?= ${PKGDIR}/pkg-pre-install
+PKGPOSTINSTALL?= ${PKGDIR}/pkg-post-install
+PKGPREDEINSTALL?= ${PKGDIR}/pkg-pre-deinstall
+PKGPOSTDEINSTALL?= ${PKGDIR}/pkg-post-deinstall
+PKGPREUPGRADE?= ${PKGDIR}/pkg-pre-upgrade
+PKGPOSTUPGRADE?= ${PKGDIR}/pkg-post-upgrade
+PKGUPGRADE?= ${PKGDIR}/pkg-upgrade
+
+_FORCE_POST_PATTERNS= rmdir kldxref mkfontscale mkfontdir fc-cache \
+ fonts.dir fonts.scale gtk-update-icon-cache \
+ gio-querymodules \
+ gtk-query-immodules \
+ ldconfig \
+ load-octave-pkg \
+ ocamlfind \
+ update-desktop-database update-mime-database \
+ gdk-pixbuf-query-loaders catalog.ports \
+ glib-compile-schemas \
+ ccache-update-links
.if defined(USE_LOCAL_MK)
.include "${PORTSDIR}/Mk/bsd.local.mk"
@@ -2318,11 +2319,7 @@ PKG_ARGS+= -C "${CONFLICTS_INSTALL}"
.if defined(PKG_NOCOMPRESS)
PKG_SUFX?= .tar
.else
-.if defined(WITH_PKGNG)
PKG_SUFX?= .txz
-.else
-PKG_SUFX?= .tbz
-.endif
.endif
# where pkg_add records its dirty deeds.
PKG_DBDIR?= /var/db/pkg
@@ -3286,37 +3283,19 @@ check-deprecated:
# Check if the port is listed in the vulnerability database
-.if defined(WITH_PKGNG)
AUDITFILE?= ${PKG_DBDIR}/vuln.xml
_EXTRACT_AUDITFILE= ${CAT} "${AUDITFILE}"
-.else
-AUDITFILE?= /var/db/portaudit/auditfile.tbz
-_EXTRACT_AUDITFILE= ${TAR} -jxOf "${AUDITFILE}" auditfile
-.endif
check-vulnerable:
.if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING)
@if [ -f "${AUDITFILE}" ]; then \
- if [ -n "${WITH_PKGNG}" ]; then \
- if [ -x "${PKG_BIN}" ]; then \
- vlist=`${PKG_BIN} audit "${PKGNAME}"`; \
- if [ "$${vlist}" = "0 problem(s) in the installed packages found." ]; then \
- vlist=""; \
- fi; \
- elif [ "${PORTNAME}" = "pkg" ]; then \
+ if [ -x "${PKG_BIN}" ]; then \
+ vlist=`${PKG_BIN} audit "${PKGNAME}"`; \
+ if [ "$${vlist}" = "0 problem(s) in the installed packages found." ]; then \
vlist=""; \
fi; \
- elif [ -x "${LOCALBASE}/sbin/portaudit" ]; then \
- vlist=`${LOCALBASE}/sbin/portaudit -X 14 "${PKGNAME}" \
- 2>&1 | grep -vE '^[0-9]+ problem\(s\) found.' \
- || true`; \
- if [ -n "$$vlist" ]; then \
- vlist=`${LOCALBASE}/sbin/portaudit -X 14 "${PKGNAME}" \
- 2>&1 | grep -vE '^[0-9]+ problem\(s\) found.' \
- || true`; \
- fi ; \
- else \
- ${ECHO_MSG} "===> portaudit database exists, however, portaudit is not installed!"; \
+ elif [ "${PORTNAME}" = "pkg" ]; then \
+ vlist=""; \
fi; \
if [ -n "$$vlist" ]; then \
${ECHO_MSG} "===> ${PKGNAME} has known vulnerabilities:"; \
@@ -3667,17 +3646,13 @@ check-conflicts: check-build-conflicts check-install-conflicts
.if !target(check-build-conflicts)
check-build-conflicts:
.if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK)
- @found=`${PKG_INFO} -I ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} 2>/dev/null | ${AWK} '{print $$1}'`; \
- conflicts_with=; \
- for entry in $${found}; do \
- if ${PKG_INFO} -e $${entry} ; then \
- prfx=`${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \
- orgn=`${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \
- if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
- conflicts_with="$${conflicts_with} $${entry}"; \
- fi; \
+ @conflicts_with=$$( \
+ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} 2>/dev/null || : ; } \
+ | while read pkgname prfx orgn; do \
+ if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
+ ${ECHO_CMD} -n " $${pkgname}"; \
fi; \
- done; \
+ done); \
if [ -n "$${conflicts_with}" ]; then \
${ECHO_MSG}; \
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
@@ -3686,8 +3661,8 @@ check-build-conflicts:
done; \
${ECHO_MSG}; \
${ECHO_MSG} " They will not build together."; \
- ${ECHO_MSG} " Please remove them first with pkg_delete(1)."; \
- exit 1; \
+ ${ECHO_MSG} " Please remove them first with pkg delete."; \
+ exit 1;\
fi
.endif
.endif
@@ -3695,17 +3670,13 @@ check-build-conflicts:
.if !target(identify-install-conflicts)
identify-install-conflicts:
.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS)
- @found=`${PKG_INFO} -I ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null | ${AWK} '{print $$1}'`; \
- conflicts_with=; \
- for entry in $${found}; do \
- if ${PKG_INFO} -e $${entry} ; then \
- prfx=`${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \
- orgn=`${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \
- if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
- conflicts_with="$${conflicts_with} $${entry}"; \
- fi; \
+ @conflicts_with=$$( \
+ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \
+ | while read pkgname prfx orgn; do \
+ if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
+ ${ECHO_CMD} -n " $${pkgname}"; \
fi; \
- done; \
+ done); \
if [ -n "$${conflicts_with}" ]; then \
${ECHO_MSG}; \
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
@@ -3724,17 +3695,13 @@ identify-install-conflicts:
check-install-conflicts:
.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) || ( defined(CONFLICTS_BUILD) && defined(DEFER_CONFLICTS_CHECK) ) ) && !defined(DISABLE_CONFLICTS)
.if defined(DEFER_CONFLICTS_CHECK)
- @found=`${PKG_INFO} -I ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null | ${AWK} '{print $$1}'`; \
- conflicts_with=; \
- for entry in $${found}; do \
- if ${PKG_INFO} -e $${entry} ; then \
- prfx=`${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \
- orgn=`${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \
- if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
- conflicts_with="$${conflicts_with} $${entry}"; \
- fi; \
+ @conflicts_with=$$( \
+ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \
+ | while read pkgname prfx orgn; do \
+ if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
+ ${ECHO_CMD} -n " $${pkgname}"; \
fi; \
- done; \
+ done); \
if [ -n "$${conflicts_with}" ]; then \
${ECHO_MSG}; \
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
@@ -3742,21 +3709,17 @@ check-install-conflicts:
${ECHO_MSG} " $${entry}"; \
done; \
${ECHO_MSG}; \
- ${ECHO_MSG} " Please remove them first with pkg_delete(1)."; \
+ ${ECHO_MSG} " Please remove them first with pkg delete."; \
exit 1; \
fi
.else
- @found=`${PKG_INFO} -I ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null | ${AWK} '{print $$1}'`; \
- conflicts_with=; \
- for entry in $${found}; do \
- if ${PKG_INFO} -e $${entry} ; then \
- prfx=`${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \
- orgn=`${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \
- if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
- conflicts_with="$${conflicts_with} $${entry}"; \
- fi; \
+ @conflicts_with=$$( \
+ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \
+ | while read pkgname prfx orgn; do \
+ if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
+ ${ECHO_CMD} -n " $${pkgname}"; \
fi; \
- done; \
+ done); \
if [ -n "$${conflicts_with}" ]; then \
${ECHO_MSG}; \
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
@@ -3765,7 +3728,7 @@ check-install-conflicts:
done; \
${ECHO_MSG}; \
${ECHO_MSG} " They install files into the same place."; \
- ${ECHO_MSG} " Please remove them first with pkg_delete(1)."; \
+ ${ECHO_MSG} " Please remove them first with pkg delete."; \
exit 1; \
fi
.endif # defined(DEFER_CONFLICTS_CHECK)
@@ -3782,6 +3745,8 @@ do-install:
# Package
.if !target(do-package)
+PKG_CREATE_ARGS= -r ${STAGEDIR} -m ${METADIR} -p ${TMPPLIST}
+do-package: create-manifest
do-package: ${TMPPLIST}
@if [ -d ${PACKAGES} ]; then \
if [ ! -d ${PKGREPOSITORY} ]; then \
@@ -3790,77 +3755,32 @@ do-package: ${TMPPLIST}
exit 1; \
fi; \
fi; \
- fi ; \
- _LATE_PKG_ARGS=""; \
- if [ -f ${PKGINSTALL} ]; then \
- _LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -i ${PKGINSTALL}"; \
- fi; \
- if [ -f ${PKGDEINSTALL} ]; then \
- _LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -k ${PKGDEINSTALL}"; \
- fi; \
- if [ -f ${PKGREQ} ]; then \
- _LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -r ${PKGREQ}"; \
- fi; \
- if [ -f ${PKGMESSAGE} ]; then \
- _LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -D ${PKGMESSAGE}"; \
- fi; \
- ${MKDIR} ${WRKDIR}/pkg; \
- if ! [ -d "${PREFIX}" ]; then \
- if ! ${MKDIR} ${PREFIX}; then \
- ${ECHO_MSG} "=> Unable to create PREFIX. PREFIX must exist to create a package with pkg_install." >&2; \
- ${ECHO_MSG} "=> Manually create ${PREFIX} first." >&2; \
- exit 1; \
- fi; \
- made_prefix=1; \
- fi; \
- if ${PKG_CMD} -S ${STAGEDIR} ${PKG_ARGS} ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}; then \
- [ -n "$${made_prefix}" ] && ${RMDIR} ${PREFIX}; \
+ fi
+ @for cat in ${CATEGORIES}; do \
+ ${RM} -f ${PACKAGES}/$$cat/${PKGNAMEPREFIX}${PORTNAME}*${PKG_SUFX} ; \
+ done
+ @${MKDIR} ${WRKDIR}/pkg
+ @if ${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -f ${PKG_SUFX:S/.//} -o ${WRKDIR}/pkg ${PKGNAME}; then \
if [ -d ${PKGREPOSITORY} -a -w ${PKGREPOSITORY} ]; then \
- ${LN} -f ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE} 2>/dev/null || \
- ${CP} -af ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
- cd ${.CURDIR} && eval ${MAKE} package-links; \
+ ${LN} -f ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE} 2>/dev/null \
+ || ${CP} -af ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
+ if [ "${PKGORIGIN}" = "ports-mgmt/pkg" -o "${PKGORIGIN}" = "ports-mgmt/pkg-devel" ]; then \
+ if [ ! -d ${PKGLATESTREPOSITORY} ]; then \
+ if ! ${MKDIR} ${PKGLATESTREPOSITORY}; then \
+ ${ECHO_MSG} "=> Can't create directory ${PKGLATESTREPOSITORY}."; \
+ exit 1; \
+ fi; \
+ fi ; \
+ ${LN} -sf ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE} ; \
+ fi; \
fi; \
else \
- [ -n "$${made_prefix}" ] && ${RMDIR} ${PREFIX}; \
cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \
exit 1; \
fi
.endif
-
# Some support rules for do-package
-.if !target(package-links)
-package-links: delete-package-links
- @for cat in ${CATEGORIES}; do \
- if [ ! -d ${PACKAGES}/$$cat ]; then \
- if ! ${MKDIR} ${PACKAGES}/$$cat; then \
- ${ECHO_MSG} "=> Can't create directory ${PACKAGES}/$$cat."; \
- exit 1; \
- fi; \
- fi; \
- ${LN} -sf `${ECHO_CMD} $$cat | ${SED} -e 'sa[^/]*a..ag'`/${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \
- done
-.if !defined(NO_LATEST_LINK)
- @if [ ! -d ${PKGLATESTREPOSITORY} ]; then \
- if ! ${MKDIR} ${PKGLATESTREPOSITORY}; then \
- ${ECHO_MSG} "=> Can't create directory ${PKGLATESTREPOSITORY}."; \
- exit 1; \
- fi; \
- fi
- @${LN} -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE}
-.endif
-.endif
-
-.if !target(delete-package-links)
-delete-package-links:
- @for cat in ${CATEGORIES}; do \
- ${RM} -f ${PACKAGES}/$$cat/${PKGNAME}${PKG_SUFX}; \
- done
-.if !defined(NO_LATEST_LINK)
- @${RM} -f ${PKGLATESTFILE}
-.endif
-.endif
-
.if !target(delete-package)
delete-package: delete-package-links
@${ECHO_MSG} "===> Deleting package for ${PKGNAME}"
@@ -3889,7 +3809,7 @@ delete-package-list: delete-package-links-list
.if defined(FORCE_PKG_REGISTER)
_INSTALL_PKG_ARGS= -f
.endif
-.if defined(INSTALLS_DEPENDS) && defined(WITH_PKGNG)
+.if defined(INSTALLS_DEPENDS)
_INSTALL_PKG_ARGS+= -A
.endif
install-package:
@@ -3906,33 +3826,22 @@ install-package:
.if !target(check-already-installed)
.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
-check-already-installed: ${TMPPLIST_SORT} ${PKG_DBDIR}
- @${ECHO_MSG} "===> Checking if ${PKGORIGIN} already installed"; \
- already_installed=`${PKG_INFO} -q -O ${PKGORIGIN}`; \
- if [ -n "$${already_installed}" ]; then \
- for p in $${already_installed}; do \
- prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
- if [ "x${PREFIX}" = "x$${prfx}" ]; then \
- df=`${PKG_INFO} -q -f $${p} 2> /dev/null | ${GREP} -v "^@" | ${SORT} -u | ${COMM} -12 - ${TMPPLIST_SORT}`; \
- if [ -n "$${df}" ]; then \
- found_package=$${p}; \
- break; \
- fi; \
- fi; \
- done; \
- fi; \
- if [ -d ${PKG_DBDIR}/${PKGNAME} -o -n "$${found_package}" ]; then \
- if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \
- ${ECHO_CMD} "===> ${PKGNAME} is already installed"; \
- else \
- ${ECHO_CMD} "===> An older version of ${PKGORIGIN} is already installed ($${found_package})"; \
- fi; \
- ${ECHO_MSG} " You may wish to \`\`make deinstall'' and install this port again"; \
- ${ECHO_MSG} " by \`\`make reinstall'' to upgrade it properly."; \
- ${ECHO_MSG} " If you really wish to overwrite the old port of ${PKGORIGIN}"; \
- ${ECHO_MSG} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \
- ${ECHO_MSG} " in your environment or the \"make install\" command line."; \
- exit 1; \
+check-already-installed:
+ @${ECHO_MSG} "===> Checking if ${PKGBASE} already installed"; \
+ pkgname=`${PKG_INFO} -q -O ${PKGBASE}`; \
+ if [ -n "$${pkgname}" ]; then \
+ v=`${PKG_VERSION} -t $${pkgname} ${PKGNAME}`; \
+ if [ "$${v}" = "<" ]; then \
+ ${ECHO_CMD} "===> An older version of ${PKGBASE} is already installed ($${pkgname})"; \
+ else \
+ ${ECHO_CMD} "===> ${PKGNAME} is already installed"; \
+ fi; \
+ ${ECHO_MSG} " You may wish to \`\`make deinstall'' and install this port again"; \
+ ${ECHO_MSG} " by \`\`make reinstall'' to upgrade it properly."; \
+ ${ECHO_MSG} " If you really wish to overwrite the old port of ${PKGBASE}"; \
+ ${ECHO_MSG} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \
+ ${ECHO_MSG} " in your environment or the \"make install\" command line."; \
+ exit 1; \
fi
.endif
.endif
@@ -4022,14 +3931,8 @@ install-ldconfig-file:
.if !target(create-users-groups)
.if defined(GROUPS) || defined(USERS)
-.if defined(WITH_PKGNG)
_UG_OUTPUT= ${WRKDIR}/users-groups.sh
PKGPREINSTALL+= ${_UG_OUTPUT}
-.else
-_UG_OUTPUT= /dev/null
-.endif
-.endif
-.if defined(GROUPS) || defined(USERS)
create-users-groups:
.if defined(GROUPS)
.for _file in ${GID_FILES}
@@ -4037,15 +3940,9 @@ create-users-groups:
@${ECHO_CMD} "** ${_file} doesn't exist. Exiting."; exit 1
.endif
.endfor
-.if defined(WITH_PKGNG)
- @${RM} -f ${_UG_OUTPUT} || ${TRUE}
-.endif
+ @${RM} -f ${_UG_OUTPUT} || ${TRUE}
@${ECHO_MSG} "===> Creating users and/or groups."
-.if defined(WITH_PKGNG)
@${ECHO_CMD} "echo \"===> Creating users and/or groups.\"" >> ${_UG_OUTPUT}
-.else
- @${ECHO_CMD} "@exec echo \"===> Creating users and/or groups.\"" >> ${TMPPLIST}
-.endif
.for _group in ${GROUPS}
# _bgpd:*:130:
@if ! ${GREP} -h ^${_group}: ${GID_FILES} >/dev/null 2>&1; then \
@@ -4054,15 +3951,9 @@ create-users-groups:
fi
@IFS=":"; ${GREP} -h ^${_group}: ${GID_FILES} | head -n 1 | while read group foo gid members; do \
gid=$$(($$gid+${GID_OFFSET})); \
- if [ -z "${WITH_PKGNG}" ]; then \
- ${ECHO_CMD} "@exec if ! ${PW} groupshow $$group >/dev/null 2>&1; then \
- echo \"Creating group '$$group' with gid '$$gid'.\"; \
- ${PW} groupadd $$group -g $$gid; else echo \"Using existing group '$$group'.\"; fi" >> ${TMPPLIST}; \
- else \
- ${ECHO_CMD} -e "if ! ${PW} groupshow $$group >/dev/null 2>&1; then \n \
- echo \"Creating group '$$group' with gid '$$gid'.\" \n \
- ${PW} groupadd $$group -g $$gid; else echo \"Using existing group '$$group'.\"\nfi" >> ${_UG_OUTPUT}; \
- fi ; \
+ ${ECHO_CMD} -e "if ! ${PW} groupshow $$group >/dev/null 2>&1; then \n \
+ echo \"Creating group '$$group' with gid '$$gid'.\" \n \
+ ${PW} groupadd $$group -g $$gid; else echo \"Using existing group '$$group'.\"\nfi" >> ${_UG_OUTPUT}; \
done
.endfor
.endif
@@ -4083,17 +3974,10 @@ create-users-groups:
gid=$$(($$gid+${GID_OFFSET})); \
class="$${class:+-L }$$class"; \
homedir=$$(echo $$homedir | sed "s|^/usr/local|${PREFIX}|"); \
- if [ -z "${WITH_PKGNG}" ]; then \
- ${ECHO_CMD} "@exec if ! ${PW} usershow $$login >/dev/null 2>&1; then \
- echo \"Creating user '$$login' with uid '$$uid'.\"; \
- ${PW} useradd $$login -u $$uid -g $$gid $$class -c \"$$gecos\" -d $$homedir -s $$shell; \
- else echo \"Using existing user '$$login'.\"; fi" >> ${TMPPLIST}; \
- else \
- ${ECHO_CMD} -e "if ! ${PW} usershow $$login >/dev/null 2>&1; then \n \
- echo \"Creating user '$$login' with uid '$$uid'.\" \n \
- ${PW} useradd $$login -u $$uid -g $$gid $$class -c \"$$gecos\" -d $$homedir -s $$shell \n \
- else \necho \"Using existing user '$$login'.\" \nfi" >> ${_UG_OUTPUT}; \
- fi ; \
+ ${ECHO_CMD} -e "if ! ${PW} usershow $$login >/dev/null 2>&1; then \n \
+ echo \"Creating user '$$login' with uid '$$uid'.\" \n \
+ ${PW} useradd $$login -u $$uid -g $$gid $$class -c \"$$gecos\" -d $$homedir -s $$shell \n \
+ else \necho \"Using existing user '$$login'.\" \nfi" >> ${_UG_OUTPUT}; \
case $$homedir in /|/nonexistent|/var/empty) ;; *) ${ECHO_CMD} "@exec ${INSTALL} -d -g $$gid -o $$uid $$homedir" >> ${TMPPLIST};; esac; \
done
.endfor
@@ -4105,15 +3989,9 @@ create-users-groups:
IFS=","; for _login in $$members; do \
for _user in ${USERS}; do \
if [ "x$${_user}" = "x$${_login}" ]; then \
- if [ -z "${WITH_PKGNG}" ]; then \
- ${ECHO_CMD} "@exec if ! ${PW} groupshow ${_group} | ${GREP} -qw $${_login}; then \
- echo \"Adding user '$${_login}' to group '${_group}'.\"; \
- ${PW} groupmod ${_group} -m $${_login}; fi" >> ${TMPPLIST}; \
- else \
- ${ECHO_CMD} -e "if ! ${PW} groupshow ${_group} | ${GREP} -qw $${_login}; then \n \
- echo \"Adding user '$${_login}' to group '${_group}'.\" \n \
- ${PW} groupmod ${_group} -m $${_login} \nfi" >> ${_UG_OUTPUT}; \
- fi ; \
+ ${ECHO_CMD} -e "if ! ${PW} groupshow ${_group} | ${GREP} -qw $${_login}; then \n \
+ echo \"Adding user '$${_login}' to group '${_group}'.\" \n \
+ ${PW} groupmod ${_group} -m $${_login} \nfi" >> ${_UG_OUTPUT}; \
fi; \
done; \
done; \
@@ -4132,26 +4010,6 @@ create-users-groups:
.endif
.endif
-# PR ports/152498
-# XXX Make sure the commands to create group(s)
-# and user(s) are the first in pkg-plist
-.if !target(fix-plist-sequence)
-fix-plist-sequence: ${TMPPLIST}
-.if !defined(WITH_PKGNG) && (defined(GROUPS) || defined(USERS))
- @${ECHO_CMD} "===> Correct pkg-plist sequence to create group(s) and user(s)"
- @${EGREP} -e '^@exec echo.*Creating users and' -e '^@exec.*${PW}' -e '^@exec ${INSTALL} -d -g' ${TMPPLIST} > ${TMPGUCMD}
- @${EGREP} -v -e '^@exec echo.*Creating users and' -e '^@exec.*${PW}' -e '^@exec ${INSTALL} -d -g' ${TMPPLIST} >> ${TMPGUCMD}
- @${MV} -f ${TMPGUCMD} ${TMPPLIST}
-.endif
-.if !defined(WITH_PKGNG)
- @cd ${.CURDIR} && { ${MAKE} pretty-print-config | fold -sw 120 | ${SED} -e 's/^/@comment OPTIONS:/'; } >> ${TMPPLIST}
- @${AWK} -f ${KEYWORDS}/pkg_install.awk ${TMPPLIST} > ${TMPPLIST}.keyword && \
- ${MV} -f ${TMPPLIST}.keyword ${TMPPLIST}
- @${ECHO_CMD} "@exec echo pkg_install EOL is scheduled for 2014-09-01. Please migrate to pkgng" >> ${TMPPLIST}
- @${ECHO_CMD} "@exec echo http://blogs.freebsdish.org/portmgr/2014/02/03/time-to-bid-farewell-to-the-old-pkg_-tools/" >> ${TMPPLIST}
-.endif
-.endif
-
.if !defined(DISABLE_SECURITY_CHECK)
.if !target(security-check)
security-check: ${TMPPLIST}
@@ -4279,27 +4137,18 @@ restage:
.if !target(deinstall)
deinstall:
-.if ${UID} != 0 && !defined(INSTALL_AS_USER)
+.if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER)
@${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target"
@cd ${.CURDIR} && \
${SU_CMD} "${MAKE} ${.TARGET}"
@${ECHO_MSG} "===> Returning to user credentials"
.else
- @${ECHO_MSG} "===> Deinstalling for ${PKGORIGIN}"
- @found_names=`${PKG_INFO} -q -O ${PKGORIGIN}`; \
- for p in $${found_names}; do \
- check_name=`${ECHO_CMD} $${p} | ${SED} -e 's/-[^-]*$$//'`; \
- if [ "$${check_name}" = "${PKGBASE}" ]; then \
- prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
- if [ "x${PREFIX}" = "x$${prfx}" ]; then \
- ${ECHO_MSG} "===> Deinstalling $${p}"; \
- ${PKG_DELETE} -f $${p}; \
- else \
- ${ECHO_MSG} "===> $${p} has a different PREFIX: $${prfx}, skipping"; \
- fi; \
- fi; \
- done; \
- if [ -z "$${found_names}" ]; then \
+ @${ECHO_MSG} "===> Deinstalling for ${PKGBASE}"
+ @if ${PKG_INFO} -e ${PKGBASE}; then \
+ p=`${PKG_INFO} -q -O ${PKGBASE}`; \
+ ${ECHO_MSG} "===> Deinstalling $${p}"; \
+ ${PKG_DELETE} -f ${PKGBASE} ; \
+ else \
${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \
fi
@${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
@@ -4750,16 +4599,13 @@ _INSTALL_DEPENDS= \
subpkgname=$${subpkgname\#\#*/} ; \
if [ -r "$${subpkgfile}" -a "$$target" = "${DEPENDS_TARGET}" ]; then \
${ECHO_MSG} "===> Installing existing package $${subpkgfile}"; \
- if [ -n "${WITH_PKGNG}" -a $${subpkgname} = "pkg" ]; then \
+ if [ $${subpkgname} = "pkg" ]; then \
[ -d ${WRKDIR} ] || ${MKDIR} ${WRKDIR} ; \
${TAR} xf $${subpkgfile} -C ${WRKDIR} -s ",/.*/,,g" "*/pkg-static" ; \
${WRKDIR}/pkg-static add $${subpkgfile}; \
${RM} -f ${WRKDIR}/pkg-static; \
else \
- if [ -n "${WITH_PKGNG}" ]; then \
- _pkg_add_a="-A"; \
- fi; \
- ${PKG_ADD} $${_pkg_add_a} $${subpkgfile}; \
+ ${PKG_ADD} -A $${subpkgfile}; \
fi; \
elif [ -n "${USE_PACKAGE_DEPENDS_ONLY}" -a "$${target}" = "${DEPENDS_TARGET}" ]; then \
${ECHO_MSG} "===> ${PKGNAME} depends on package: $${subpkgfile} - not found"; \
@@ -5211,39 +5057,72 @@ PACKAGE-DEPENDS-LIST?= \
ACTUAL-PACKAGE-DEPENDS?= \
if [ "${_LIB_RUN_DEPENDS}" != " " ]; then \
- origins=$$(for pkgname in ${PKG_DBDIR}/*; do \
- if [ -e $$pkgname/+CONTENTS ]; then \
- ${ECHO_CMD} $${pkgname\#\#*/}; \
- ${SED} -n -e "s/@comment ORIGIN://p" $$pkgname/+CONTENTS; \
- fi; \
- done); \
- for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \
- tmp=$${dir\#${PORTSDIR}/}; \
- if [ "$$tmp" = "$$dir" ]; then \
- tmp=$${dir%/*}; \
- dir=$${tmp\#\#*/}/$${dir\#\#*/}; \
- else \
- dir=$$tmp; \
- fi; \
- set -- $$origins; \
- while [ $$\# -gt 1 ]; do \
- if [ ! -d "${PORTSDIR}/$$2" ]; then \
- shift; \
- continue; \
- fi; \
- if [ "$$dir" = "$$2" ]; then \
- ${ECHO_CMD} $$1:$$dir; \
- if [ -e ${PKG_DBDIR}/$$1/+CONTENTS -a -z "${EXPLICIT_PACKAGE_DEPENDS}" ]; then \
- packagelist="$$packagelist ${PKG_DBDIR}/$$1/+CONTENTS"; \
- fi; \
- break; \
- fi; \
- shift 2; \
- done; \
- done; \
- [ -z "$$packagelist" ] || ${AWK} -F '( |:)' 'BEGIN { pkgname="broken_contents" } /@pkgdep / { pkgname=$$2 } /@comment DEPORIGIN:/ { printf "%s:%s\n", pkgname, $$3; pkgname="broken_contents" }' $$packagelist; \
+ ${PKG_QUERY} "\"%n\": {origin: %o, version: \"%v\"}" " " ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,:C,${PORTSDIR}/,,} 2>/dev/null || : ; \
fi
+create-manifest:
+ @${MKDIR} ${METADIR}; \
+ (\
+ echo "name: \"${PKGBASE}\"" ; \
+ echo "version: \"${PKGVERSION}\"" ; \
+ echo "origin: ${PKGORIGIN}" ; \
+ echo "comment: <<EOD" ; \
+ echo ${COMMENT:Q} ; \
+ echo "EOD" ; \
+ echo "maintainer: ${MAINTAINER}" ; \
+ echo "prefix: ${PREFIX}" ; \
+ [ -z "${WWW}" ] || echo "www: ${WWW}" ; \
+ echo "deps: { "; \
+ ${ACTUAL-PACKAGE-DEPENDS} | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | ${SORT} -u ; \
+ echo "}" ; \
+ echo "categories: [ ${CATEGORIES:u:S/$/,/} ]" ; \
+ l=${LICENSE_COMB} ; \
+ [ -n "${NO_ARCH}" ] && echo "arch : `${PKG_BIN} config abi | ${CUT} -d: -f1,2`:*" ; \
+ echo "licenselogic: $${l:-single}" ; \
+ [ -z "${LICENSE}" ] || echo "licenses: [ ${LICENSE:u:S/$/,/} ]" ; \
+ [ -z "${USERS}" ] || echo "users: [ ${USERS:u:S/$/,/} ]" ; \
+ [ -z "${GROUPS}" ] || echo "groups: [ ${GROUPS:u:S/$/,/} ]" ; \
+ ) > ${MANIFESTF}
+ @${ECHO_CMD} -n "options: {" >> ${MANIFESTF}
+.for opt in ${COMPLETE_OPTIONS_LIST}
+ @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}: $${match:-off}," >> ${MANIFESTF}
+.endfor
+ @${ECHO_CMD} "}" >> ${MANIFESTF}
+.if defined(PKG_NOTES)
+ @${ECHO_CMD} -n "annotations: {" >> ${MANIFESTF}
+.for note in ${PKG_NOTES}
+ @${ECHO_CMD} -n ' ${note}: "${PKG_NOTE_${note}:S/"/\"/g}",' >> ${MANIFESTF}
+.endfor
+ @${ECHO_CMD} " }" >> ${MANIFESTF}
+.endif
+ @[ -f ${PKGINSTALL} ] && ${CP} ${PKGINSTALL} ${METADIR}/+INSTALL; \
+ ${RM} -f ${METADIR}/+PRE_INSTALL ; \
+ for a in ${PKGPREINSTALL}; do \
+ [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+PRE_INSTALL ; \
+ done ; \
+ ${RM} -f ${METADIR}/+POST_INSTALL ; \
+ for a in ${PKGPOSTINSTALL}; do \
+ [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+POST_INSTALL ; \
+ done ; \
+ [ -f ${PKGDEINSTALL} ] && ${CP} ${PKGDEINSTALL} ${METADIR}/+DEINSTALL; \
+ ${RM} -f ${METADIR}/+PRE_DEINSTALL ; \
+ for a in ${PKGPREDEINSTALL}; do \
+ [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+PRE_DEINSTALL ; \
+ done ; \
+ ${RM} -f ${METADIR}/+POST_DEINSTALL ; \
+ for a in ${PKGPOSTDEINSTALL}; do \
+ [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+POST_DEINSTALL ; \
+ done ; \
+ [ -f ${PKGPOSTDEINSTALL} ] && ${CP} ${PKGPOSTDEINSTALL} ${METADIR}/+POST_DEINSTALL; \
+ [ -f ${PKGUPGRADE} ] && ${CP} ${PKGUPGRADE} ${METADIR}/+UPGRADE; \
+ [ -f ${PKGPREUPGRADE} ] && ${CP} ${PKGPREUPGRADE} ${METADIR}/+PRE_UPGRADE; \
+ [ -f ${PKGPOSTUPGRADE} ] && ${CP} ${PKGPOSTUPGRADE} ${METADIR}/+POST_UPGRADE; \
+ ${CP} ${DESCR} ${METADIR}/+DESC; \
+ [ -f ${PKGMESSAGE} ] && ${CP} ${PKGMESSAGE} ${METADIR}/+DISPLAY || return 0
+.if !defined(NO_MTREE)
+ @[ -f ${MTREE_FILE} ] && ${CP} ${MTREE_FILE} ${METADIR}/+MTREE_DIRS || return 0
+.endif
+
# Print out package names.
package-depends:
@@ -5560,21 +5439,11 @@ add-plist-info:
fi
# Process GNU INFO files at package install/deinstall time
.for i in ${INFO}
-.if !defined(WITH_PKGNG)
- @${ECHO_CMD} "@unexec indexinfo %D/${INFO_PATH}" >> ${TMPPLIST}
- @${LS} ${STAGEDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${STAGEDIR}${PREFIX}/::g >> ${TMPPLIST}
- @${ECHO_CMD} "@exec indexinfo %D/${INFO_PATH}" >> ${TMPPLIST}
-.else
@${LS} ${STAGEDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${STAGEDIR}${PREFIX}/:@info\ :g >> ${TMPPLIST}
-.endif
.endfor
.if defined(INFO_SUBDIR)
-.if !defined(WITH_PKGNG)
- @${ECHO_CMD} "@unexec ${RMDIR} %D/${INFO_PATH}/${INFO_SUBDIR} 2> /dev/null || true" >> ${TMPPLIST}
-.else
@${ECHO_CMD} "@dirrmtry ${INFO_PATH}/${INFO_SUBDIR}" >> ${TMPPLIST}
.endif
-.endif
.if (${PREFIX} != "/usr")
@${ECHO_CMD} "@unexec indexinfo %D/${INFO_PATH}" >> ${TMPPLIST}
.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE})
@@ -5678,58 +5547,24 @@ stage-qa:
@${ECHO_MSG} "====> Running Q/A tests (stage-qa)"
@${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh
.endif
-# Fake installation of package so that user can pkg_delete it later.
-# Also, make sure that an installed port is recognized correctly in
-# accordance to the @pkgdep directive in the packing lists
+# Fake installation of package so that user can pkg delete it later.
.if !target(fake-pkg)
+STAGE_ARGS= -i ${STAGEDIR}
+
.if !defined(NO_PKG_REGISTER)
-fake-pkg:
- @if [ ! -d ${PKG_DBDIR} ]; then ${RM} -f ${PKG_DBDIR}; ${MKDIR} ${PKG_DBDIR}; fi
- @${RM} -f /tmp/${PKGNAME}-required-by
-.if defined(FORCE_PKG_REGISTER)
- @if [ -e ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY ]; then \
- ${CP} ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY /tmp/${PKGNAME}-required-by; \
- fi
- @${RM} -rf ${PKG_DBDIR}/${PKGNAME}
-.endif
- @if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \
- ${ECHO_MSG} "===> Registering installation for ${PKGNAME}"; \
- ${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \
- ${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \
- ${CP} ${DESCR} ${PKG_DBDIR}/${PKGNAME}/+DESC; \
- ${ECHO_CMD} ${COMMENT:Q} > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \
- if [ -f ${PKGINSTALL} ]; then \
- ${CP} ${PKGINSTALL} ${PKG_DBDIR}/${PKGNAME}/+INSTALL; \
- fi; \
- if [ -f ${PKGDEINSTALL} ]; then \
- ${CP} ${PKGDEINSTALL} ${PKG_DBDIR}/${PKGNAME}/+DEINSTALL; \
- fi; \
- if [ -f ${PKGREQ} ]; then \
- ${CP} ${PKGREQ} ${PKG_DBDIR}/${PKGNAME}/+REQUIRE; \
- fi; \
- if [ -f ${PKGMESSAGE} ]; then \
- ${CP} ${PKGMESSAGE} ${PKG_DBDIR}/${PKGNAME}/+DISPLAY; \
- ${ECHO_CMD} "@display +DISPLAY" >> ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \
- fi; \
- for dep in `${PKG_INFO} -qf ${PKGNAME} | ${AWK} '/^@pkgdep / {print $$2}' | ${SORT} -u`; do \
- if [ -d ${PKG_DBDIR}/$$dep -a -z `${ECHO_CMD} $$dep | ${GREP} -E ${PKG_IGNORE_DEPENDS}` ]; then \
- if ! ${GREP} ^${PKGNAME}$$ ${PKG_DBDIR}/$$dep/+REQUIRED_BY \
- >/dev/null 2>&1; then \
- ${ECHO_CMD} ${PKGNAME} >> ${PKG_DBDIR}/$$dep/+REQUIRED_BY; \
- fi; \
- fi; \
- done; \
- fi
-.if !defined(NO_MTREE)
- @if [ -f ${MTREE_FILE} ]; then \
- ${CP} ${MTREE_FILE} ${PKG_DBDIR}/${PKGNAME}/+MTREE_DIRS; \
- fi
+fake-pkg: create-manifest
+.if defined(INSTALLS_DEPENDS)
+ @${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic"
+.else
+ @${ECHO_MSG} "===> Registering installation for ${PKGNAME}"
.endif
- @if [ -e /tmp/${PKGNAME}-required-by ]; then \
- ${CAT} /tmp/${PKGNAME}-required-by >> ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY; \
- ${RM} -f /tmp/${PKGNAME}-required-by; \
- fi
+.if defined(INSTALLS_DEPENDS)
+ @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
+.else
+ @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
+.endif
+ @${RM} -rf ${METADIR}
.endif
.endif
@@ -6385,7 +6220,7 @@ _STAGE_SUSEQ= create-users-groups do-install \
install-rc-script install-ldconfig-file install-license \
install-desktop-entries add-plist-info add-plist-docs \
add-plist-examples add-plist-data add-plist-post \
- move-uniquefiles-plist fix-plist-sequence fix-packlist fix-perl-bs
+ move-uniquefiles-plist fix-packlist fix-perl-bs
.if defined(DEVELOPER)
_STAGE_SUSEQ+= stage-qa
.endif
@@ -6398,12 +6233,11 @@ _STAGE_SEQ+= create-users-groups do-install \
install-rc-script install-ldconfig-file install-license \
install-desktop-entries add-plist-info add-plist-docs \
add-plist-examples add-plist-data add-plist-post \
- move-uniquefiles-plist fix-plist-sequence fix-packlist fix-perl-bs
+ move-uniquefiles-plist fix-packlist fix-perl-bs
.if defined(DEVELOPER)
_STAGE_SEQ+= stage-qa
.endif
.endif
-.if defined(WITH_PKGNG)
_INSTALL_DEP= stage
_INSTALL_SEQ= install-message run-depends lib-depends check-already-installed
_INSTALL_SUSEQ= fake-pkg security-check
@@ -6411,16 +6245,6 @@ _INSTALL_SUSEQ= fake-pkg security-check
_PACKAGE_DEP= stage
_PACKAGE_SEQ= package-message pre-package pre-package-script do-package post-package-script
-.else # pkg_install
-
-_PACKAGE_DEP= stage
-_PACKAGE_SEQ= package-message pre-package pre-package-script do-package post-package-script
-
-_INSTALL_DEP= package
-_INSTALL_SEQ= install-message run-depends lib-depends check-already-installed
-_INSTALL_SUSEQ= install-package security-check
-.endif
-
# Enforce order for -jN builds
.for _t in ${_TARGETS_STAGES}
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index cb2ecd4f16ea..3c1bec1836f8 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -74,13 +74,8 @@ OSVERSION!= ${SYSCTL} -n kern.osreldate
.endif
.endif
-.if ${OSVERSION} >= 1000017
-.if !defined(WITHOUT_PKGNG)
+WITH_PKG= yes
WITH_PKGNG= yes
-.else
-.undef WITH_PKGNG
-.endif
-.endif
.if !defined(_OSRELEASE)
_OSRELEASE!= ${UNAME} -r
diff --git a/astro/google-earth/Makefile b/astro/google-earth/Makefile
index fea40c7b1d66..8b4a1001e2d8 100644
--- a/astro/google-earth/Makefile
+++ b/astro/google-earth/Makefile
@@ -62,11 +62,6 @@ do-build:
@cd ${WRKSRC} && ${RM} -rf setup.* preuninstall.sh postinstall.sh \
bin/googleearth.orig
-.if !defined(WITH_PKGNG)
-pre-su-install:
- @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${WRKSRC}
-.endif
-
do-install:
${MKDIR} ${STAGEDIR}${DATADIR}
${MKDIR} ${STAGEDIR}${PREFIX}/share/mime/packages
diff --git a/emulators/i386-wine-devel/Makefile.i386 b/emulators/i386-wine-devel/Makefile.i386
index 6d5be147f031..e6a29c6fc1ff 100644
--- a/emulators/i386-wine-devel/Makefile.i386
+++ b/emulators/i386-wine-devel/Makefile.i386
@@ -70,11 +70,7 @@ post-install-script:
done
echo '@dirrm lib32/.libGL/dri' >> ${TMPPLIST}
echo '@dirrm lib32/.libGL' >> ${TMPPLIST}
- if [ -n "${WITH_PKGNG}" ]; then \
- echo '@dirrmtry lib32' >> ${TMPPLIST}; \
- else \
- echo '@unexec rmdir %D/lib32 2>/dev/null || true' >> ${TMPPLIST}; \
- fi
+ echo '@dirrmtry lib32' >> ${TMPPLIST}; \
echo '@dirrm bin32' >> ${TMPPLIST}
# Install nvidia patching script
${INSTALL_SCRIPT} ${SLAVEDIR}/files/nvidia.sh ${STAGEDIR}${DATADIR}/patch-nvidia.sh
@@ -82,11 +78,9 @@ post-install-script:
@${CAT} ${PKGMESSAGE}
post-package-script:
- if [ -n "${WITH_PKGNG}" -a -z "${PACKAGE_BUILDING}" ]; then \
- ${XZ_CMD} -dc ${PKGFILE} | \
- ${SED} -e 's/\(freebsd:.*:x86\):32/\1:64/' -e 's/\(freebsd:.*:x86\):32/\1:64/' | \
- ${XZ_CMD} > ${WRKDIR}/${PKGNAME}${PKG_SUFX}; \
- ${MV} ${WRKDIR}/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
- fi
+ ${XZ_CMD} -dc ${PKGFILE} | \
+ ${SED} -e 's/\(freebsd:.*:x86\):32/\1:64/' -e 's/\(freebsd:.*:x86\):32/\1:64/' | \
+ ${XZ_CMD} > ${WRKDIR}/${PKGNAME}${PKG_SUFX}; \
+ ${MV} ${WRKDIR}/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
.include "${MASTERDIR}/Makefile"
diff --git a/emulators/i386-wine/Makefile.i386 b/emulators/i386-wine/Makefile.i386
index b8fc2628fb90..becf581c03b6 100644
--- a/emulators/i386-wine/Makefile.i386
+++ b/emulators/i386-wine/Makefile.i386
@@ -69,11 +69,7 @@ post-install-script:
done
echo '@dirrm lib32/.libGL/dri' >> ${TMPPLIST}
echo '@dirrm lib32/.libGL' >> ${TMPPLIST}
- if [ -n "${WITH_PKGNG}" ]; then \
- echo '@dirrmtry lib32' >> ${TMPPLIST}; \
- else \
- echo '@unexec rmdir %D/lib32 2>/dev/null || true' >> ${TMPPLIST}; \
- fi
+ echo '@dirrmtry lib32' >> ${TMPPLIST}; \
echo '@dirrm bin32' >> ${TMPPLIST}
# Install nvidia patching script
${INSTALL_SCRIPT} ${.CURDIR}/files/nvidia.sh ${STAGEDIR}${DATADIR}/patch-nvidia.sh
@@ -81,11 +77,9 @@ post-install-script:
@${CAT} ${PKGMESSAGE}
post-package-script:
- if [ -n "${WITH_PKGNG}" -a -z "${PACKAGE_BUILDING}" ]; then \
- ${XZ_CMD} -dc ${PKGFILE} | \
- ${SED} -e 's/\(freebsd:.*:x86\):32/\1:64/' -e 's/\(freebsd:.*:x86\):32/\1:64/' | \
- ${XZ_CMD} > ${WRKDIR}/${PKGNAME}${PKG_SUFX}; \
- ${MV} ${WRKDIR}/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
- fi
+ ${XZ_CMD} -dc ${PKGFILE} | \
+ ${SED} -e 's/\(freebsd:.*:x86\):32/\1:64/' -e 's/\(freebsd:.*:x86\):32/\1:64/' | \
+ ${XZ_CMD} > ${WRKDIR}/${PKGNAME}${PKG_SUFX}; \
+ ${MV} ${WRKDIR}/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
.include "${MASTERDIR}/Makefile"
diff --git a/lang/python/Makefile b/lang/python/Makefile
index 2100e7455d64..30357ebf55fd 100644
--- a/lang/python/Makefile
+++ b/lang/python/Makefile
@@ -54,13 +54,8 @@ PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade
PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portmaster
.endif
-.if defined(WITH_PKGNG)
PKG_LIST= ${PKG_BIN} query -a '%n-%v'
PKG_LIST_FILES= ${PKG_INFO} -l
-.else
-PKG_LIST= ${PKG_INFO} -Ea
-PKG_LIST_FILES= ${PKG_INFO} -L
-.endif
upgrade-site-packages:
@if [ ! -x ${PORTUPGRADE_CMD} ]; then \
diff --git a/lang/python2/Makefile b/lang/python2/Makefile
index 7cb83c9fedd4..6b0e31e0d1b0 100644
--- a/lang/python2/Makefile
+++ b/lang/python2/Makefile
@@ -46,12 +46,7 @@ PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade
PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portmaster
.endif
-.if defined(WITH_PKGNG)
PKG_LIST= ${PKG_BIN} query -a '%n-%v'
PKG_LIST_FILES= ${PKG_INFO} -l
-.else
-PKG_LIST= ${PKG_INFO} -Ea
-PKG_LIST_FILES= ${PKG_INFO} -L
-.endif
.include <bsd.port.post.mk>
diff --git a/lang/python3/Makefile b/lang/python3/Makefile
index 652ebce8c5d8..f5e0b35f9685 100644
--- a/lang/python3/Makefile
+++ b/lang/python3/Makefile
@@ -48,12 +48,7 @@ PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade
PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portmaster
.endif
-.if defined(WITH_PKGNG)
PKG_LIST= ${PKG_BIN} query -a '%n-%v'
PKG_LIST_FILES= ${PKG_INFO} -l
-.else
-PKG_LIST= ${PKG_INFO} -Ea
-PKG_LIST_FILES= ${PKG_INFO} -L
-.endif
.include <bsd.port.post.mk>
diff --git a/net-mgmt/nagios-check_ports/Makefile b/net-mgmt/nagios-check_ports/Makefile
index f61fc374ac5e..4fa472ad900e 100644
--- a/net-mgmt/nagios-check_ports/Makefile
+++ b/net-mgmt/nagios-check_ports/Makefile
@@ -17,14 +17,8 @@ GH_COMMIT= 4e039d7
NO_BUILD= yes
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 1000000 && ! defined(WITH_PKGNG)
-RUN_DEPENDS= portaudit:${PORTSDIR}/ports-mgmt/portaudit
-.endif
-
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nagios
${INSTALL_SCRIPT} ${WRKSRC}/check_ports ${STAGEDIR}${PREFIX}/libexec/nagios/
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index 4f6cb86f5ca5..dfc0532fa2fa 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -15,11 +15,6 @@ COMMENT= Extendable SNMP implementation
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
-# pkg-1.2 cannot handle this dependency well.
-.if !defined(WITH_PKGNG)
-LIB_DEPENDS= libpkg.so:${PORTSDIR}/ports-mgmt/pkg
-.endif
-
OPTIONS_DEFINE= IPV6 MFD_REWRITES PERL PERL_EMBEDDED PYTHON DUMMY TKMIB \
DMALLOC MYSQL AX_SOCKONLY UNPRIVILEGED SMUX DOCS
OPTIONS_DEFAULT=IPV6 PERL PERL_EMBEDDED DUMMY SMUX
diff --git a/ports-mgmt/pkg-devel/Makefile b/ports-mgmt/pkg-devel/Makefile
index f6ecb41d659d..375386e70cab 100644
--- a/ports-mgmt/pkg-devel/Makefile
+++ b/ports-mgmt/pkg-devel/Makefile
@@ -35,11 +35,11 @@ EXTRA_PATCHES= ${FILESDIR}/extra-patch-docs_pkg.8
.include <bsd.port.pre.mk>
-.if defined(WITH_PKGNG)
-.if ${WITH_PKGNG} != devel
+.if defined(WITH_PKG)
+.if ${WITH_PKG} != devel
NO_LATEST_LINK= yes
. if !defined(PACKAGE_BUILDING)
-IGNORE= WITH_PKGNG is not defined to 'devel', this version is the devel one
+IGNORE= WITH_PKG is not defined to 'devel', this version is the devel one
. endif
.else
LATEST_LINK= pkg
@@ -57,19 +57,12 @@ NB_NEWPKGS= 0
.if ${NB_OLDPKGS} > 0 && ${NB_NEWPKGS} == 0
pre-everything::
- @${ECHO_CMD} "You are about to convert your system to pkgng while you have ports/packages"; \
+ @${ECHO_CMD} "You are about to convert your system to pkg while you have ports/packages"; \
${ECHO_CMD} "installed with the old pkg_install tools."; \
${ECHO_CMD} ""; \
- ${ECHO_CMD} "You can choose to: "; \
- ${ECHO_CMD} "- keep pkg_install as the package management system by adding this line to /etc/make.conf:"; \
- ${ECHO_CMD} ""; \
- ${ECHO_CMD} " WITHOUT_PKGNG=yes" ; \
- ${ECHO_CMD} ""; \
- ${ECHO_CMD} "- switch to pkgng:"; \
- ${ECHO_CMD} " 1) Add WITHOUT_PKGNG to /etc/make.conf"; \
- ${ECHO_CMD} " 2) Install ports-mgmt/pkg"; \
- ${ECHO_CMD} " 3) Convert your package database by running pkg2ng"; \
- ${ECHO_CMD} " 4) Remove WITHOUT_PKGNG from /etc/make.conf"; \
+ ${ECHO_CMD} "To switch to pkg:"; \
+ ${ECHO_CMD} " 1) Install ports-mgmt/pkg"; \
+ ${ECHO_CMD} " 2) Convert your package database by running pkg2ng"; \
${ECHO_CMD} ""; \
exit 1
@@ -80,13 +73,11 @@ LATEST_LINK= pkg-devel
.endif
#define PKG_DEPENDS to nothing to avoid infinite loop looking for pkg :)
-.if defined(WITH_PKGNG)
PKG_DEPENDS=
.undef INSTALLS_DEPENDS
.if !exists(${LOCALBASE}/sbin/pkg)
PKG_BIN= ${WRKSRC}/src/pkg-static
.endif
-.endif
post-install:
@${MV} ${STAGEDIR}${PREFIX}/lib/libpkg_static.a \
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index bd23e443332e..133020557034 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -38,10 +38,10 @@ EXTRA_PATCHES= ${FILESDIR}/extra-patch-docs_pkg.8
MAKE_ARGS+= DEBUG_FLAGS="${DEBUG_FLAGS}"
.endif
-.if defined(WITH_PKGNG)
-.if ${WITH_PKGNG} == devel
+.if defined(WITH_PKG)
+.if ${WITH_PKG} == devel
NO_LATEST_LINK= yes
-IGNORE= WITH_PKGNG is defined to 'devel', this version is the stable one
+IGNORE= WITH_PKG is defined to 'devel', this version is the stable one
.endif
.if exists(${LOCALBASE}/sbin/pkg_info) || exists(/usr/sbin/pkg_info)
NB_OLDPKGS!= pkg_info 2>/dev/null | wc -l
@@ -55,19 +55,12 @@ NB_NEWPKGS= 0
.if ${NB_OLDPKGS} > 0 && ${NB_NEWPKGS} == 0
pre-everything::
- @${ECHO_CMD} "You are about to convert your system to pkgng while you have ports/packages"; \
+ @${ECHO_CMD} "You are about to convert your system to pkg while you have ports/packages"; \
${ECHO_CMD} "installed with the old pkg_install tools."; \
${ECHO_CMD} ""; \
- ${ECHO_CMD} "You can choose to: "; \
- ${ECHO_CMD} "- keep pkg_install as the package management system by adding this line to /etc/make.conf:"; \
- ${ECHO_CMD} ""; \
- ${ECHO_CMD} " WITHOUT_PKGNG=yes" ; \
- ${ECHO_CMD} ""; \
- ${ECHO_CMD} "- switch to pkgng:"; \
- ${ECHO_CMD} " 1) Add WITHOUT_PKGNG to /etc/make.conf"; \
- ${ECHO_CMD} " 2) Install ports-mgmt/pkg"; \
- ${ECHO_CMD} " 3) Convert your package database by running pkg2ng"; \
- ${ECHO_CMD} " 4) Remove WITHOUT_PKGNG from /etc/make.conf"; \
+ ${ECHO_CMD} "To switch to pkg:"; \
+ ${ECHO_CMD} " 1) Install ports-mgmt/pkg"; \
+ ${ECHO_CMD} " 2) Convert your package database by running pkg2ng"; \
${ECHO_CMD} ""; \
exit 1
@@ -76,11 +69,9 @@ pre-everything::
.endif
#define PKG_DEPENDS to nothing to avoid infinite loop looking for pkg :)
-.if defined(WITH_PKGNG)
PKG_DEPENDS=
.undef INSTALLS_DEPENDS
PKG_BIN= ${WRKSRC}/src/pkg-static
-.endif
post-install:
@${MV} ${STAGEDIR}${PREFIX}/lib/libpkg_static.a \
diff --git a/ports-mgmt/portrac/Makefile b/ports-mgmt/portrac/Makefile
index f44819a9aaf6..b2ad8eb658b9 100644
--- a/ports-mgmt/portrac/Makefile
+++ b/ports-mgmt/portrac/Makefile
@@ -22,9 +22,7 @@ PLIST_DIRS= share/portrac
USES= qmake tar:bzip2
USE_QT4= gui moc_build
-.if defined(WITH_PKGNG)
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-PortChecker.cc
-.endif
do-install:
${INSTALL_PROGRAM} ${WRKDIR}/${DISTNAME}/portrac ${STAGEDIR}${PREFIX}/bin && \
diff --git a/security/bro/Makefile b/security/bro/Makefile
index df3a9573443e..cd6c16342146 100644
--- a/security/bro/Makefile
+++ b/security/bro/Makefile
@@ -26,9 +26,6 @@ NO_MTREE= yes
.if defined(BRO_PREFIX)
PREFIX=${BRO_PREFIX}
PLIST_SUB+= CLEANUP_PREFIX=""
-.if ! defined(WITH_PKGNG) && ! exists(${BRO_PREFIX})
-NEED_ROOT= yes
-.endif
.else
PLIST_SUB+= CLEANUP_PREFIX="@comment "
.endif
diff --git a/security/broccoli/Makefile b/security/broccoli/Makefile
index 515a0bb501d2..2a32d9d3176a 100644
--- a/security/broccoli/Makefile
+++ b/security/broccoli/Makefile
@@ -26,9 +26,6 @@ CMAKE_SOURCE_PATH= ${WRKSRC}/aux/broccoli
.if defined(BRO_PREFIX)
PREFIX= ${BRO_PREFIX}
PLIST_SUB+= CLEANUP_PREFIX=""
-.if ! defined(WITH_PKGNG) && ! exists(${BRO_PREFIX})
-NEED_ROOT= yes
-.endif
NO_MTREE= yes
.else
PLIST_SUB+= CLEANUP_PREFIX="@comment "
@@ -53,10 +50,6 @@ RUBY_CMAKE_ON= -D RB_INSTALL_DIR:PATH=${RUBY_SITELIBDIR} \
RUBY_CMAKE_OFF= -D DISABLE_RUBY_BINDINGS:BOOL=true
post-install::
-.if defined(BRO_PREFIX) && ! defined(WITH_PKGNG) && ! exists(${BRO_PREFIX})
- # pkg_install needs PREFIX in order to make a package from STAGEDIR/PREFIX.
- @${MKDIR} ${PREFIX}
-.endif
.if defined(BRO_PREFIX) && empty(${PORT_OPTIONS:MPYTHON})
# Move lib/pythonX.X tree into BRO_PREFIX
${MV} ${STAGEDIR}${PYTHON_LIBDIR} ${STAGEDIR}${PREFIX}/lib
diff --git a/sysutils/freesbie/Makefile b/sysutils/freesbie/Makefile
index 86e9d773a62a..5c6385721781 100644
--- a/sysutils/freesbie/Makefile
+++ b/sysutils/freesbie/Makefile
@@ -24,11 +24,7 @@ WRKSRC= ${WRKDIR}/${PORTNAME}2
ONLY_FOR_ARCHS= amd64 i386 powerpc
ONLY_FOR_ARCHS_REASON= FreeSBIE build system only supports amd64, i386 and powerpc
-.include <bsd.port.pre.mk>
-
-.if defined(WITH_PKGNG)
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-pkgng
-.endif
pre-configure:
@${SED} -e "s:%%ARCH%%:${ARCH}:g" ${FILESDIR}/conf-arch-FREESBIE.in > ${WRKSRC}/conf/${ARCH}/FREESBIE
@@ -41,4 +37,4 @@ do-install:
@ cd ${WRKSRC} && ${FIND} . -type f -print | tar -cf - -T - | \
tar -xf - -C ${STAGEDIR}${DATADIR}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>