summaryrefslogtreecommitdiff
path: root/x11/wrapper
diff options
context:
space:
mode:
authorTrevor Johnson <trevor@FreeBSD.org>2005-03-15 06:12:06 +0000
committerTrevor Johnson <trevor@FreeBSD.org>2005-03-15 06:12:06 +0000
commit25c66e3af2ef3772353708eaadbae6a1ddfd8753 (patch)
treeeab9df7ff67092817bdd4e8b0896805481f2d5ae /x11/wrapper
parentStefan Knoblauch reports that this no longer splits up streams into (diff)
Add x.org support.
Submitted by: Davide D'Amico
Notes
Notes: svn path=/head/; revision=131290
Diffstat (limited to 'x11/wrapper')
-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 0e66b66f32c3..a34dac809572 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 3e1ab5bb2c78..5632a8d11f9c 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 909a394f7307..cf0221c49627 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