# $Id$ PNAME="xorg-server" PVER="1.7.1" PBUILD="r1" PCATEGORIE="x11-base" STATE="unstable" DESCRIPTION="Modular X.Org X Server." HOMEPAGE="http://xorg.freedesktop.org" sminclude xorg mtools # mesa sources are needed to compile opengl extensions MESA_PVER="7.6" MESA_SRCFILE="MesaLib-${MESA_PVER/_/-}.tar.gz" MESA_SRCDIR="${BUILDDIR}/MesaLib-${MESA_PVER/_/-}" PROVIDE="virtual/x11" DEPEND=">= x11-libs/libXfont-1.4.1 >= x11-libs/libXau-1.0.5 >= x11-libs/libXext-1.1 >= x11-libs/libX11-1.3.1 >= x11-libs/libxkbfile-1.0.6 >= x11-libs/libXdmcp-1.0.3 >= x11-libs/libXmu-1.0.5 >= x11-libs/libXrender-0.9.5 >= x11-libs/libXi-1.3 >= media-libs/freetype-2.3.9 == media-libs/mesa-${MESA_PVER} >= media-fonts/font-misc-misc-1 >= media-fonts/font-cursor-misc-1 >= x11-misc/xbitmaps-1.1.0 >= x11-misc/xkeyboard-config-1.7 >= x11-apps/iceauth-1.0.3 >= x11-apps/rgb-1.0.3 >= x11-apps/xauth-1.0.4 >= x11-apps/xinit-1.1.1 >= x11-libs/libXaw-1.0.7 >= x11-libs/libXpm-3.5.8 >= x11-libs/libXxf86misc-1.0.2 >= x11-libs/libXxf86vm-1.1.0 >= x11-libs/libdmx-1.1.0 >= x11-libs/libXtst-1.1.0 >= x11-libs/libXres-1.0.4 >= x11-libs/libxkbui-1.0.2 >= x11-libs/libXinerama-1.1 >= x11-base/opengl-update-magellan-2.2.10 >= sys-apps/dbus-1.3 >= sys-apps/hal-0.5.13 >= x11-libs/pixman-0.16.2 >= x11-libs/libpciaccess-0.10.9 >= dev-libs/openssl-0.9.8k" SDEPEND=">= x11-libs/xtrans-1.2.5 >= x11-proto/randrproto-1.3.1 >= x11-proto/renderproto-0.11 >= x11-proto/fixesproto-4.1.1 >= x11-proto/damageproto-1.2.0 >= x11-proto/xextproto-7.1.1 >= x11-proto/xproto-7.0.16 >= x11-proto/xf86dgaproto-2.1 >= x11-proto/xf86miscproto-0.9.3 >= x11-proto/xf86vidmodeproto-2.3 >= x11-proto/xf86bigfontproto-1.2.0 >= x11-proto/compositeproto-0.4.1 >= x11-proto/recordproto-1.14 >= x11-proto/resourceproto-1.1.0 >= x11-proto/videoproto-2.3.0 >= x11-proto/scrnsaverproto-1.2.0 >= x11-proto/evieext-1.1.0 >= x11-proto/xineramaproto-1.2 >= x11-proto/fontsproto-2.1.0 >= x11-proto/kbproto-1.0.4 >= x11-proto/inputproto-2.0 >= x11-proto/bigreqsproto-1.1.0 >= x11-proto/xcmiscproto-1.2.0 >= x11-proto/glproto-1.4.10 >= x11-proto/dmxproto-2.3 >= x11-proto/xf86driproto-2.1.0 >= x11-proto/dri2proto-2.1 >= x11-libs/libdrm-2.4.15 >= x11-apps/mkfontdir-1.0.5 >= x11-apps/mkfontscale-1.0.7" SRC_URI=( ${SRC_URI[*]} mirror://${PNAME}/${SRCFILE} ftp://ftp.freedesktop.org/pub/mesa/${MESA_PVER}/${MESA_SRCFILE} sourceforge://mesa3d/${MESA_SRCFILE} mirror://mesa/${MESA_SRCFILE} mirror://${PNAME}/${PNAME}-1.4-fpic-libxf86config.patch mirror://${PNAME}/${PNAME}-1.2.0-die-ugly-pattern-die-die-die.patch ) UP2SUBDIR="xserver" UP2DATE="updatecmd_xorg ${PNAME}" src_prepare() { # must use mesa as opengl-headers! [[ $(opengl-update --get-implementation) != xorg ]] && die "please change to xorg opengl-headers: opengl-update xorg" munpack ${SRCFILE} || die munpack ${MESA_SRCFILE} || die cd ${SRCDIR} # fixes fpic issues with libxf86config on 64bit systems mpatch ${PNAME}-1.4-fpic-libxf86config.patch || die # adopted from redhat; use a black background mpatch ${PNAME}-1.2.0-die-ugly-pattern-die-die-die.patch || die # fix build issues, some wrapper files which should be generated # at build time exist and the makefile doesn't whipe them. we patch # the makefile to clean them and whipe these wrapper files rm -f ${SRCDIR}/hw/xprint/*-wrapper.c || die autoreconf --verbose --install --force || die } src_compile() { cd ${SRCDIR} xorg_src_configure \ --with-mesa-source=${MESA_SRCDIR} \ --sysconfdir=/etc/X11 \ --localstatedir=/var \ --with-xkb-output=/var/lib/xkb \ --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \ --enable-install-setuid \ --enable-ipv6 \ --enable-dmx \ --enable-xvfb \ --enable-xnest \ --enable-dri \ --enable-dri2 \ --enable-xorg \ --enable-xtrap \ --enable-xevie \ --disable-xprint \ --enable-glx-tls \ --disable-static \ --enable-config-dbus \ --enable-config-hal \ || die mmake || die } src_install() { xorg_src_install || die # needed directories minstalldir /usr/bin || die minstalldir /usr/$(mlibdir)/opengl/xorg/extensions || die # dynamic opengl setup local i for i in ${BINDIR}/usr/$(mlibdir)/xorg/modules/libglx* \ ${BINDIR}/usr/$(mlibdir)/xorg/modules/libdri* do if [ -f ${i} -o -L ${i} ] then mv -f ${i} ${BINDIR}/usr/$(mlibdir)/opengl/xorg/extensions || die "${i}" fi done # missing symlink mlink Xorg /usr/bin/X || die # fix dbus rules locations # (must reside in /etc/dbus-1 not /etc/X11/dbus-1) mv ${BINDIR}/etc/{X11/,}dbus-1 || die } postinstall() { ${MROOT}/usr/sbin/opengl-update --use-old xorg } postremove() { # get rid of module dir to ensure opengl-update works properbly if [ -e ${MROOT}/usr/$(mlibdir)/xorg/modules ] then if [[ -z $(magequery -n xorg-server) ]] then rm -rf ${MROOT}/usr/$(mlibdir)/xorg/modules fi fi }