Make the GNOME 1.x warning package-safe.

Suggested by:	Cyrille Lefevre <cyrille.lefevre@laposte.net>
This commit is contained in:
Joe Marcus Clarke 2002-06-20 23:57:18 +00:00
parent 59868d5c45
commit 66aed70188
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=61654
2 changed files with 24 additions and 13 deletions

View file

@ -43,20 +43,10 @@ NO_BUILD= yes
USE_PYTHON= yes
GNOME_ONE_DESKTOP= gnomecore gnomeapplets gnomemedia gnomeutils \
gnomecontrolcenter gtop libgtop sawfish \
nautilus glade gedit xalf bugbuddy gnomegames
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
pre-everything::
@for package in ${GNOME_ONE_DESKTOP}; do \
if ${PKG_INFO} | ${GREP} "^$$package-[0-9]" >/dev/null 2>&1; then \
${ECHO_MSG} "$$package was detected on the system. This package is part of the GNOME 1.x"; \
${ECHO_MSG} "desktop, and cannot coexist with the GNOME 2.0 desktop."; \
${ECHO_MSG} ""; \
${ECHO_MSG} "Please deinstall the GNOME 1.x desktop before installing this port."; \
${FALSE}; \
fi; \
done
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.endif
do-install: # empty

21
x11/gnome2/pkg-install Normal file
View file

@ -0,0 +1,21 @@
#!/bin/sh
if [ -n "${PACKAGE_BUILDING}" ]; then
exit 0
fi
PATH=/bin:/usr/bin:/sbin:/usr/sbin:${PATH}
export PATH
if [ "$2" = "PRE-INSTALL" ]; then
GNOME_ONE_DESKTOP="gnomecore gnomeapplets gnomemedia gnomeutils gnomecontrolcenter gtop libgtop sawfish nautilus glade gedit xalf bugbuddy gnomegames"
for package in ${GNOME_ONE_DESKTOP}; do
if pkg_info | grep "^${package}-[0-9]" >/dev/null 2>&1; then
echo "${package} was detected on the system. This package is part of the GNOME 1.x"
echo "desktop, and cannot coexist with the GNOME 2.0 desktop."
echo ""
echo "Please deinstall the GNOME 1.x desktop before installing this package."
false
fi
done
fi