diff options
-rw-r--r-- | ports-mgmt/pkg_install-devel/pkg-req | 13 | ||||
-rw-r--r-- | ports-mgmt/portaudit/Makefile | 7 | ||||
-rw-r--r-- | security/portaudit/Makefile | 7 | ||||
-rw-r--r-- | sysutils/pkg_install-devel/pkg-req | 13 |
4 files changed, 22 insertions, 18 deletions
diff --git a/ports-mgmt/pkg_install-devel/pkg-req b/ports-mgmt/pkg_install-devel/pkg-req index c7d1b7507722..b57ba6f2ca2d 100644 --- a/ports-mgmt/pkg_install-devel/pkg-req +++ b/ports-mgmt/pkg_install-devel/pkg-req @@ -3,13 +3,18 @@ # $FreeBSD$ # -PKG_INFO=/usr/sbin/pkg_info +if [ -z "$OSVERSION" ]; then + if [ -x /sbin/sysctl ]; then + OSVERSION=`/sbin/sysctl -n kern.osreldate` + else + OSVERSION=`/usr/sbin/sysctl -n kern.osreldate` + fi +fi case $2 in INSTALL) - PKG_INSTALL_VER=`${PKG_INFO} -qP 2>/dev/null` - if [ -n "${PKG_INSTALL_VER}" -a "${PKG_INSTALL_VER}" -ge %%PORTVERSION%% ]; then - echo "Your base pkg_install tools are already up-to-date" + if [ "$OSVERSION" -ge 492000 -a "$OSVERSION" -lt 500000 -o "$OSVERSION" -ge 502120 ]; then + echo "$1: Your base pkg_install tools are already up-to-date." exit 1 fi ;; diff --git a/ports-mgmt/portaudit/Makefile b/ports-mgmt/portaudit/Makefile index c09209369902..330c0b3c9080 100644 --- a/ports-mgmt/portaudit/Makefile +++ b/ports-mgmt/portaudit/Makefile @@ -36,15 +36,12 @@ SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \ -e "s|%%REQPKGVER%%|${REQPKGVER}|g" \ -e "s|%%BZIP2_CMD%%|${BZIP2_CMD}|g" \ -PKG_INFO_BASE?= /usr/sbin/pkg_info -BASEPKGVER!= ${PKG_INFO_BASE} -qP 2>/dev/null || ${TRUE} +.include <bsd.port.pre.mk> -.if ${BASEPKGVER} < ${REQPKGVER} +.if ${OSVERSION} < 492000 || ${OSVERSION} >= 500000 && ${OSVERSION} < 502120 RUN_DEPENDS= ${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install-devel .endif -.include <bsd.port.pre.mk> - .if defined(BZIP2DEPENDS) RUN_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2 .endif diff --git a/security/portaudit/Makefile b/security/portaudit/Makefile index c09209369902..330c0b3c9080 100644 --- a/security/portaudit/Makefile +++ b/security/portaudit/Makefile @@ -36,15 +36,12 @@ SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \ -e "s|%%REQPKGVER%%|${REQPKGVER}|g" \ -e "s|%%BZIP2_CMD%%|${BZIP2_CMD}|g" \ -PKG_INFO_BASE?= /usr/sbin/pkg_info -BASEPKGVER!= ${PKG_INFO_BASE} -qP 2>/dev/null || ${TRUE} +.include <bsd.port.pre.mk> -.if ${BASEPKGVER} < ${REQPKGVER} +.if ${OSVERSION} < 492000 || ${OSVERSION} >= 500000 && ${OSVERSION} < 502120 RUN_DEPENDS= ${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install-devel .endif -.include <bsd.port.pre.mk> - .if defined(BZIP2DEPENDS) RUN_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2 .endif diff --git a/sysutils/pkg_install-devel/pkg-req b/sysutils/pkg_install-devel/pkg-req index c7d1b7507722..b57ba6f2ca2d 100644 --- a/sysutils/pkg_install-devel/pkg-req +++ b/sysutils/pkg_install-devel/pkg-req @@ -3,13 +3,18 @@ # $FreeBSD$ # -PKG_INFO=/usr/sbin/pkg_info +if [ -z "$OSVERSION" ]; then + if [ -x /sbin/sysctl ]; then + OSVERSION=`/sbin/sysctl -n kern.osreldate` + else + OSVERSION=`/usr/sbin/sysctl -n kern.osreldate` + fi +fi case $2 in INSTALL) - PKG_INSTALL_VER=`${PKG_INFO} -qP 2>/dev/null` - if [ -n "${PKG_INSTALL_VER}" -a "${PKG_INSTALL_VER}" -ge %%PORTVERSION%% ]; then - echo "Your base pkg_install tools are already up-to-date" + if [ "$OSVERSION" -ge 492000 -a "$OSVERSION" -lt 500000 -o "$OSVERSION" -ge 502120 ]; then + echo "$1: Your base pkg_install tools are already up-to-date." exit 1 fi ;; |