summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--x11/wrapper/Makefile26
-rw-r--r--x11/wrapper/pkg-descr10
-rw-r--r--x11/wrapper/pkg-install5
3 files changed, 24 insertions, 17 deletions
diff --git a/x11/wrapper/Makefile b/x11/wrapper/Makefile
index 0e66b66..a34dac8 100644
--- a/x11/wrapper/Makefile
+++ b/x11/wrapper/Makefile
@@ -13,25 +13,31 @@ DISTNAME= # intentionally left blank
EXTRACT_SUFX= # intentionally left blank
MAINTAINER= trevor@FreeBSD.org
-COMMENT= Wrapper for XFree86-4 server
-
-RUN_DEPENDS= XFree86:${PORTSDIR}/x11-servers/XFree86-4-Server
+CONFLICTS= XFree86-3.3.6*
NO_WRKSUBDIR= yes
-PLIST_FILES= bin/Xwrapper-4
+PLIST_FILES= bin/Xwrapper
USE_X_PREFIX= yes
+.include <bsd.port.pre.mk>
+.if ${X_WINDOW_SYSTEM:L} == xorg
+XSERVER= -DXSERVER_PATH=\"/usr/X11R6/bin/Xorg\"
+PKGNAMEPREFIX= xorg-
+COMMENT= Wrapper for X.org X11 server
+.elif ${X_WINDOW_SYSTEM:L} == xfree86-4
+XSERVER= -DXSERVER_PATH=\"/usr/X11R6/bin/XFree86\"
+RUN_DEPENDS= XFree86:${PORTSDIR}/x11-servers/XFree86-4-Server
+PKGNAMEPREFIX= XFree86-4-
+COMMENT= Wrapper for XFree86-4 server
+.endif
+
do-fetch:
do-build:
- ${CC} ${CFLAGS} -DXSERVER_PATH=\"${X11BASE}/bin/XFree86\" -o ${WRKSRC}/Xwrapper-4 ${FILESDIR}/wrapper.c
+ ${CC} ${CFLAGS} ${XSERVER} -o ${WRKSRC}/Xwrapper ${FILESDIR}/wrapper.c
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/Xwrapper-4 ${PREFIX}/bin
+ @${INSTALL_PROGRAM} ${WRKSRC}/Xwrapper ${PREFIX}/bin
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-.include <bsd.port.pre.mk>
-.if ${X_WINDOW_SYSTEM:L} != xfree86-4
-IGNORE= is part of XFree86-4
-.endif
.include <bsd.port.post.mk>
diff --git a/x11/wrapper/pkg-descr b/x11/wrapper/pkg-descr
index 3e1ab5b..5632a8d 100644
--- a/x11/wrapper/pkg-descr
+++ b/x11/wrapper/pkg-descr
@@ -1,9 +1,9 @@
This program runs an X server after sanity-checking the environment
and any options passed to it. It is meant to enhance security on
-multi-user systems running XFree86 4, where the ability to use a
-startx script is needed. If you have XFree86 3, do not install
-this: you do not need it and it will not work. If you have no
-untrusted users or always run the X server from xdm, you do not
-need this.
+multi-user systems running XFree86 4 or the X11 server from x.org,
+where the ability to use a startx script is needed. If you have
+XFree86 3, do not install this: you do not need it and it will not
+work. If you have no untrusted users or always run the X server
+from xdm, you do not need this.
Trevor Johnson
diff --git a/x11/wrapper/pkg-install b/x11/wrapper/pkg-install
index 909a394..cf0221c 100644
--- a/x11/wrapper/pkg-install
+++ b/x11/wrapper/pkg-install
@@ -5,6 +5,7 @@ if [ "X$2" != "XPOST-INSTALL" ]; then
fi
[ -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
+ln -sf ${PKG_PREFIX}/bin/Xwrapper ${PKG_PREFIX}/bin/X
[ -x ${PKG_PREFIX}/bin/XFree86 ] && chmod -s ${PKG_PREFIX}/bin/XFree86
-chmod u+s ${PKG_PREFIX}/bin/Xwrapper-4
+[ -x ${PKG_PREFIX}/bin/Xorg ] && chmod -s ${PKG_PREFIX}/bin/Xorg
+chmod u+s ${PKG_PREFIX}/bin/Xwrapper
OpenPOWER on IntegriCloud