Changeset View
Changeset View
Standalone View
Standalone View
x11-servers/xorg-server/Makefile
# Created by: Eric Anholt <anholt@FreeBSD.org> | # Created by: Eric Anholt <anholt@FreeBSD.org> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME?= xorg-server | PORTNAME?= xorg-server | ||||
PORTVERSION?= 1.18.4 | PORTVERSION?= 1.19.3 | ||||
PORTREVISION?= 0 | PORTREVISION?= 0 | ||||
PORTEPOCH?= 1 | PORTEPOCH?= 1 | ||||
CATEGORIES= x11-servers | CATEGORIES= x11-servers | ||||
MASTER_SITES= XORG/individual/xserver | MASTER_SITES= XORG/individual/xserver | ||||
DISTNAME= xorg-server-${PORTVERSION} | DISTNAME= xorg-server-${PORTVERSION} | ||||
MAINTAINER= x11@FreeBSD.org | MAINTAINER= x11@FreeBSD.org | ||||
COMMENT?= X.Org X server and related programs | COMMENT?= X.Org X server and related programs | ||||
LICENSE= MIT | LICENSE= MIT | ||||
RUN_DEPENDS+= xkeyboard-config>=2.5:x11/xkeyboard-config \ | RUN_DEPENDS+= xkeyboard-config>=2.5:x11/xkeyboard-config \ | ||||
xkbcomp:x11/xkbcomp | xkbcomp:x11/xkbcomp | ||||
XORG_CAT= xserver | XORG_CAT= xserver | ||||
SLAVE_PORT?= no | SLAVE_PORT?= no | ||||
OPTIONS_SUB= yes | OPTIONS_SUB= yes | ||||
OPTIONS_DEFINE= SUID | OPTIONS_DEFINE= SUID | ||||
OPTIONS_RADIO= CONF | OPTIONS_RADIO= CONF | ||||
OPTIONS_RADIO_CONF= DEVD HAL | OPTIONS_RADIO_CONF= DEVD HAL UDEV | ||||
DEVD_DESC= Use devd for autoconfiguration of input devices | |||||
HAL_DESC= Use hald for autoconfiguration of input devices | |||||
SUID_DESC= Install the Xorg server with setuid bit set | |||||
OPTIONS_DEFAULT=DEVD SUID | OPTIONS_DEFAULT= DEVD SUID | ||||
SUID_DESC= Install setuid wrapper to allow startx as non-root | |||||
CONF_DESC= Backend to use for input device configuration | |||||
DEVD_DESC= Use devd (native) | |||||
HAL_DESC= Use HAL (deprecated) | |||||
UDEV_DESC= Use udev via libudev-devd (experimental) | |||||
OPTIONS_EXCLUDE_sparc64= HAL | OPTIONS_EXCLUDE_sparc64= HAL | ||||
.include <bsd.port.options.mk> | DEVD_CONFIGURE_ENABLE= config-devd | ||||
HAL_CONFIGURE_ENABLE= config-hal | |||||
HAL_LIB_DEPENDS= libhal.so:sysutils/hal \ | |||||
libdbus-1.so:devel/dbus | |||||
SUID_CONFIGURE_ENABLE= suid-wrapper | |||||
SUID_CONFIGURE_ON= --libexecdir=${PREFIX}/bin # set SUID_WRAPPER_DIR | |||||
UDEV_CONFIGURE_ENABLE= config-udev | |||||
UDEV_CONFIGURE_ON= --disable-config-udev-kms | |||||
UDEV_LIB_DEPENDS= libudev.so:devel/libudev-devd | |||||
USES= gmake libtool perl5 ssl tar:bzip2 | USES= gmake perl5 ssl | ||||
USE_PERL5= build | USE_PERL5= build | ||||
USE_GL+= gl | USE_GL+= gl | ||||
USE_XORG+= bigreqsproto compositeproto damageproto dri2proto dri3proto \ | USE_XORG+= bigreqsproto compositeproto damageproto dri2proto dri3proto \ | ||||
fixesproto fontsproto glproto inputproto kbproto pixman \ | fixesproto fontsproto glproto inputproto kbproto pixman \ | ||||
presentproto randrproto recordproto renderproto \ | presentproto randrproto recordproto renderproto \ | ||||
resourceproto scrnsaverproto videoproto xau \ | resourceproto scrnsaverproto videoproto xau \ | ||||
xcmiscproto xdmcp xextproto xf86driproto xfont \ | xcmiscproto xdmcp xextproto xf86driproto xfont2 \ | ||||
xineramaproto xkbfile xproto xshmfence xtrans | xineramaproto xkbfile xproto xshmfence xtrans | ||||
CONFIGURE_ARGS+=--without-doxygen --without-xmlto --without-fop \ | CONFIGURE_ARGS+=--without-doxygen --without-xmlto --without-fop \ | ||||
--localstatedir=/var --with-shared-memory-dir=/tmp \ | --without-dtrace --with-shared-memory-dir=/tmp \ | ||||
--disable-config-udev --disable-config-udev-kms \ | --disable-install-setuid | ||||
--without-dtrace --enable-glamor | |||||
INSTALL_TARGET= install-strip | INSTALL_TARGET= install-strip | ||||
.if ${SLAVE_PORT} == "no" || ${PORTNAME} == "xephyr" || ${PORTNAME} == "xwayland" | .if ${SLAVE_PORT} == "no" || ${PORTNAME} == "xephyr" || ${PORTNAME} == "xwayland" | ||||
LIB_DEPENDS+= libdrm.so:graphics/libdrm \ | LIB_DEPENDS+= libdrm.so:graphics/libdrm \ | ||||
libepoxy.so:graphics/libepoxy | libepoxy.so:graphics/libepoxy | ||||
.else | .else | ||||
BUILD_DEPENDS+= libepoxy>0:graphics/libepoxy # only for configure | BUILD_DEPENDS+= libepoxy>0:graphics/libepoxy # only for configure | ||||
.endif | .endif | ||||
.if ${SLAVE_PORT} == "no" | .if ${SLAVE_PORT} == "no" | ||||
USE_GL+= gbm | USE_GL+= gbm | ||||
USE_XORG+= pciaccess xf86dgaproto xf86vidmodeproto | USE_XORG+= pciaccess xf86dgaproto xf86vidmodeproto | ||||
CONFIGURE_ARGS+=--disable-dmx --disable-xephyr --disable-xnest --disable-xvfb \ | CONFIGURE_ARGS+=--disable-dmx --disable-xephyr --disable-xnest --disable-xvfb \ | ||||
--disable-xwayland | --disable-xwayland | ||||
SUB_FILES= pkg-install pkg-deinstall | SUB_FILES= pkg-install pkg-deinstall | ||||
.else | .else | ||||
CONFIGURE_ARGS+=--disable-xorg | CONFIGURE_ARGS+= --disable-xorg | ||||
# for slave ports we need to overwrite PLIST, so it doesn't overwrite | OPTIONS_EXCLUDE= DEVD HAL UDEV SUID | ||||
# PLIST_FILES, with the masterport plist. | # Set PLIST for slave ports so they only need to set PLIST_FILES | ||||
PLIST= ${.CURDIR}/pkg-plist | PLIST= ${.CURDIR}/pkg-plist | ||||
.endif | .endif | ||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
.if ${SSL_DEFAULT} == base | .if ${SSL_DEFAULT} == base | ||||
# The reason why I use this is cause openssl from base doesn't install a .pc file | # The reason why I use this is cause openssl from base doesn't install a .pc file | ||||
# and configure will fail trying to find it. Setting both of those variables to | # and configure will fail trying to find it. Setting both of those variables to | ||||
# a *non-empty* value by-passes the pkg-config check. | # a *non-empty* value by-passes the pkg-config check. | ||||
CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include" | CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include" | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MHAL} | |||||
LIB_DEPENDS+= libhal.so:sysutils/hal | |||||
CONFIGURE_ARGS+= --enable-config-hal | |||||
.else | |||||
CONFIGURE_ARGS+= --disable-config-hal | |||||
.endif | |||||
# We handle Xorg setuid in the plist. This allows to build xorg-server as a user. | |||||
CONFIGURE_ARGS+=--disable-install-setuid | |||||
.if ${ARCH} == "i386" || ${ARCH} == "amd64" | .if ${ARCH} == "i386" || ${ARCH} == "amd64" | ||||
LIB_DEPENDS+= libunwind.so:devel/libunwind | LIB_DEPENDS+= libunwind.so:devel/libunwind | ||||
.endif | .endif | ||||
.if ${ARCH} == "sparc64" | .if ${ARCH} == "sparc64" | ||||
PLIST_SUB+= SPARC64="" | PLIST_SUB+= SPARC64="" | ||||
.else | .else | ||||
PLIST_SUB+= SPARC64="@comment " | PLIST_SUB+= SPARC64="@comment " | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MSUID} | |||||
pre-everything:: | |||||
@${ECHO_MSG} "By default, the X Server installs as a set-user-id root binary. When run by" | |||||
@${ECHO_MSG} "a normal user, it checks arguments and environment as done in the x11/wrapper" | |||||
@${ECHO_MSG} "port before handling them normally. If you are concerned about the security" | |||||
@${ECHO_MSG} "of this, but still want to run an X Server (for example using xdm/kdm/gdm," | |||||
@${ECHO_MSG} "which will still run the server as root), you can cancel the build and set" | |||||
@${ECHO_MSG} "xorg-server_UNSET=SUID in /etc/make.conf." | |||||
.endif | |||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' \ | @${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' \ | ||||
${WRKSRC}/configure | ${WRKSRC}/configure | ||||
# build libglx.so but don't install it yet. which is done in pre-install. | |||||
@${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \ | |||||
-e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \ | |||||
${WRKSRC}/hw/xfree86/dixmods/Makefile.in | |||||
post-configure: | |||||
.if ${PORT_OPTIONS:MDEVD} | |||||
@${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \ | |||||
-e 's|config\.lo|config.lo devd.lo|g' \ | |||||
${WRKSRC}/config/Makefile | |||||
@${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \ | |||||
${WRKSRC}/include/dix-config.h | |||||
.endif | |||||
.if ${SLAVE_PORT} == "no" | .if ${SLAVE_PORT} == "no" | ||||
post-install: | post-install: | ||||
# The .xorg dir because else the xorg-server might not load the correct | # Avoid conflict with nvidia-driver, move libglx.so into .xorg directory | ||||
# libglx module. | |||||
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg | @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg | ||||
${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \ | ${MV} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/libglx.so \ | ||||
${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/ | ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/ | ||||
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d | @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d | ||||
.endif # ! SLAVE_PORT | .endif # ! SLAVE_PORT | ||||
.include <bsd.port.post.mk> | .include <bsd.port.post.mk> |