2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
13 PKG_VERSION:=X11R7.2-1.2.0
14 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.2/src/xserver/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/server/xorg-server-$(PKG_VERSION)/
18 include $(INCLUDE_DIR)/package.mk
20 EXTRA_CFLAGS+= -I${STAGING_DIR}/usr/include/X11/GL -I${STAGING_DIR}/usr/include/X11/dri/ -I${STAGING_DIR}/usr/include/X11/ -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
22 CONFIGURE_ARGS_KDRIVE=--enable-composite --enable-kdrive \
23 --disable-dga --disable-dri --disable-xinerama \
24 --disable-xf86misc --disable-xf86vidmode \
25 --disable-xorg --disable-xorgcfg \
26 --disable-xkb --disable-xnest --disable-xvfb \
27 --disable-xevie --disable-xprint --disable-xtrap \
28 --disable-dmx --disable-w100 \
29 --with-default-font-path=built-ins \
30 --enable-tslib --enable-xcalibrate
32 CONFIGURE_VARS+=ac_cv_file__usr_share_sgml_X11_defs_ent=yes
33 CONFIGURE_ARGS+=$(if $(CONFIG_XORG_BUILD_KDRIVE), $(CONFIGURE_ARGS_KDRIVE))
35 DEPENDS_SERVER:=+calibrateproto \
58 +xproxymanagementprotocol \
79 DEPENDS_KDRIVE:=+calibrateproto \
97 define Package/xorg-server/config
98 config XORG_BUILD_KDRIVE
99 bool "Build kdrive instead of xserver"
100 depends PACKAGE_xorg-server
103 define Package/xorg-server/Default
106 URL:=http://xorg.freedesktop.org/
109 define Package/xorg-server
110 $(call Package/xorg-server/Default)
113 DEPENDS:=$(if $(CONFIG_XORG_BUILD_KDRIVE), $(DEPENDS_KDRIVE), $(DEPENDS_SERVER))
116 define Package/xorg-server-config
117 $(call Package/xorg-server/Default)
118 TITLE:=Xorg server configuration tools
122 define Build/Configure
123 (cd $(PKG_BUILD_DIR) \
124 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
127 $(CONFIGURE_ARGS_XTRA) \
129 --with-default-font-path=built-ins \
134 $(MAKE) -C $(PKG_BUILD_DIR)
135 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
139 define Package/xorg-server/install
140 $(INSTALL_DIR) $(1)/usr/bin
141 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/Xorg $(1)/usr/bin/
142 cd $(1)/usr/bin; ln -s Xorg X
143 $(INSTALL_DIR) $(1)/usr/share
144 $(CP) $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
145 $(INSTALL_DIR) $(1)/usr/lib/xserver
146 $(CP) $(PKG_INSTALL_DIR)/usr/lib/xserver/* $(1)/usr/lib/xserver
147 $(INSTALL_DIR) $(1)/usr/lib/xorg/
148 $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/xorg/* $(1)/usr/lib/xorg/
149 find $(1)/usr/lib/xorg/ -name *.la | xargs rm -rf
150 $(INSTALL_DIR) $(1)/usr/lib/X11/
151 $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/X11/* $(1)/usr/lib/X11/
152 rm -rf $(1)/usr/share/X11 $(1)/usr/lib/X11/xserver
153 $(INSTALL_DIR) $(1)/var/log/
154 $(INSTALL_DIR) $(1)/etc/X11/
155 $(CP) files/xorg.conf $(1)/etc/X11/
158 define Packages/xorg-server-config/install
159 $(INSTALL_DIR) $(1)/usr/bin
160 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xorgconfig $(1)/usr/bin/
163 define Build/InstallDev
164 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
165 $(CP) $(PKG_BUILD_DIR)/xorg-server.pc $(1)/usr/lib/pkgconfig/
168 $(eval $(call BuildPackage,xorg-server))
169 $(eval $(call BuildPackage,xorg-server-config))