###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see . #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include $(PKGROOT)/Include
PKG_NAME = xorg-x11-server
PKG_VER = 1.8.2
PKG_REL = 3
PKG_MAINTAINER = Stefan Schantl
PKG_GROUP = X/Server
PKG_URL = http://www.x.org
PKG_LICENSE = MIT
PKG_SUMMARY = X.Org X11 X server.
PKG_BUILD_DEPS+= audit-devel autoconf automake libcap libX11-devel libXau-devel \
libXdmcp-devel libXext-devel libXfixes-devel libXfont-devel libXmu-devel \
libXrender-devel libXres-devel libXt-devel libdrm-devel libfontenc-devel \
libpciaccess-devel libselinux-devel libtool libudev-devel libxcb-devel \
libxkbfile-devel mesa-devel openssl-devel pixman-devel pkg-config \
xorg-x11-font-utils-devel xorg-x11-util-macros xorg-x11-proto-devel \
xorg-x11-xtrans-devel
PKG_DEPS += mesa pixman udev xkeyboard-config xorg-x11-fonts xorg-x11-font-utils \
xorg-x11-xkb-utils
PKG_PACKAGES += $(PKG_NAME)-devel
PKG_DEPS-$(PKG_NAME)-devel += libpciaccess-devel pixman-devel
define PKG_DESCRIPTION
X.org X11 is an open source implementation of the X Window System. \
It provides the basic low level functionality which full fledged \
graphical user interfaces (GUIs) such as GNOME and KDE are designed \
upon.
endef
PKG_TARBALL = xorg-server-$(PKG_VER).tar.bz2
CFLAGS += -Wstrict-overflow -rdynamic
QUALITY_AGENT_PERMIT_NOT_FULL_RELRO = yes
DIR_APP = $(DIR_SRC)/xorg-server-$(PKG_VER)
CONFIGURE_OPTIONS += \
--enable-xvfb \
--enable-xsdl \
--enable-xfake \
--enable-xfbdev \
--enable-xorg \
--disable-static \
--disable-xnest \
--disable-xdmx \
--disable-xephyr \
--with-pic \
--enable-maintainer-mode \
--enable-xselinux \
--with-int10=x86emu \
--with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \
--with-module-dir=/usr/lib/xorg/modules \
--with-builderstring="Build ID: $(PKG_NAME) $(PKG_VER)-$(PKG_REL)" \
--with-os-name="$(hostname -s) $(uname -r)" \
--with-vendor-name="$(DISTRO_NAME) Project" \
--with-vendor-web="http://www.ipfire.org" \
--with-xkb-output=/var/lib/xkb \
--enable-install-libxf86config \
--localstatedir=/var \
--disable-screensaver \
--disable-config-dbus \
--disable-config-hal \
--enable-config-udev
define STAGE_PREPARE_CMDS
cd $(DIR_APP) && autoreconf -vfi
endef
# Remove BIND_NOW flag from server modules to provide autoloading of them if needed
# by the server itself.
define STAGE_CONFIGURE_CMDS
cd $(DIR_APP) && sed -i \
-e "s/^CFLAGS.*/& -Wl,-z,lazy/" \
-e "s/^CCASFLAGS.*/& -Wl,-z,lazy/" \
\
hw/xfree86/dixmods/Makefile \
hw/xfree86/dixmods/extmod/Makefile \
hw/xfree86/dri/Makefile \
hw/xfree86/dri2/Makefile \
hw/xfree86/exa/Makefile \
hw/xfree86/fbdevhw/Makefile \
hw/xfree86/i2c/Makefile \
hw/xfree86/int10/Makefile \
hw/xfree86/shadowfb/Makefile \
hw/xfree86/vbe/Makefile \
hw/xfree86/vgahw/Makefile \
hw/xfree86/xaa/Makefile
endef
define STAGE_INSTALL
cd $(DIR_APP) && make install DESTDIR=$(BUILDROOT) \
moduledir=/usr/lib/xorg/modules
rm -vf $(BUILDROOT)/usr/lib/xorg/modules/libxf8_16bpp.so
rm -vrf $(BUILDROOT)/var/log
-mkdir -pv $(BUILDROOT)/etc/X11/xorg.conf.d $(BUILDROOT)/usr/share/xorg
cd $(DIR_APP) && install -m 0444 hw/xfree86/common/{vesa,extra}modes \
$(BUILDROOT)/usr/share/xorg/
cd $(DIR_APP) && install -m 644 $(DIR_SOURCE)/10-quirks.conf \
$(BUILDROOT)/usr/share/X11/xorg.conf.d
endef
define STAGE_INSTALL_POST
# Capabilities
chmod u-s $(BUILDROOT)/usr/bin/Xorg
setcap cap_chown,cap_dac_override,cap_sys_rawio,cap_sys_admin+ep \
$(BUILDROOT)/usr/bin/Xorg
endef