aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrevor <trevor@FreeBSD.org>2002-03-11 21:04:28 +0800
committertrevor <trevor@FreeBSD.org>2002-03-11 21:04:28 +0800
commit66e0519f27145a01678b2b2dbc5252051b4fcd27 (patch)
tree5942a58d245c70145736134fb585f5e85b915317
parentb3e566646a83622bcf1a5678d497ad34b6470a95 (diff)
downloadfreebsd-ports-gnome-66e0519f27145a01678b2b2dbc5252051b4fcd27.tar.gz
freebsd-ports-gnome-66e0519f27145a01678b2b2dbc5252051b4fcd27.tar.zst
freebsd-ports-gnome-66e0519f27145a01678b2b2dbc5252051b4fcd27.zip
Add precautions so this won't damage an installation of XFree86 3.X.
-rw-r--r--x11/wrapper/Makefile6
-rw-r--r--x11/wrapper/pkg-deinstall2
-rw-r--r--x11/wrapper/pkg-install7
3 files changed, 9 insertions, 6 deletions
diff --git a/x11/wrapper/Makefile b/x11/wrapper/Makefile
index 9f228ad65092..42e5c8027109 100644
--- a/x11/wrapper/Makefile
+++ b/x11/wrapper/Makefile
@@ -12,16 +12,18 @@ CATEGORIES= x11
MAINTAINER= trevor@FreeBSD.org
+RUN_DEPENDS= XFree86:${PORTSDIR}/x11-servers/XFree86-4-Server
+
NO_WRKSUBDIR= yes
USE_X_PREFIX= yes
do-fetch:
do-build:
- ${CC} ${CFLAGS} -o ${WRKSRC}/Xwrapper ${FILESDIR}/wrapper.c
+ ${CC} ${CFLAGS} -o ${WRKSRC}/Xwrapper-4 ${FILESDIR}/wrapper.c
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/Xwrapper ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/Xwrapper-4 ${PREFIX}/bin
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>
diff --git a/x11/wrapper/pkg-deinstall b/x11/wrapper/pkg-deinstall
index eac97e189897..c6760606424c 100644
--- a/x11/wrapper/pkg-deinstall
+++ b/x11/wrapper/pkg-deinstall
@@ -1,2 +1,2 @@
#!/bin/sh
-ln -sf ${PKG_PREFIX}/bin/XFree86 ${PKG_PREFIX}/bin/X
+mv -f ${PKG_PREFIX}/bin/X.bck ${PKG_PREFIX}/bin/X
diff --git a/x11/wrapper/pkg-install b/x11/wrapper/pkg-install
index 3bbe62675378..a31ebc58082c 100644
--- a/x11/wrapper/pkg-install
+++ b/x11/wrapper/pkg-install
@@ -4,6 +4,7 @@ if [ "X$2" != "XPOST-INSTALL" ]; then
exit 0
fi
-/bin/ln -sf ${PKG_PREFIX}/bin/Xwrapper ${PKG_PREFIX}/bin/X
-[ -x ${PKG_PREFIX}/bin/XFree86 ] && /bin/chmod -s ${PKG_PREFIX}/bin/XFree86
-/bin/chmod +s ${PKG_PREFIX}/bin/Xwrapper
+[ -e ${PKG_PREFIX}/bin/X ] && mv ${PKG_PREFIX}/bin/X ${PKG_PREFIX}/bin/X.bck
+ln -sf ${PKG_PREFIX}/bin/Xwrapper-4 ${PKG_PREFIX}/bin/X
+[ -x ${PKG_PREFIX}/bin/XFree86 ] && chmod -s ${PKG_PREFIX}/bin/XFree86
+chmod +s ${PKG_PREFIX}/bin/Xwrapper-4