ddc0e3eed758aee2fb9d4ba66debb87447330469
[openwrt/svn-archive/archive.git] / XOrg / server / xorg-server-X11R7.2 / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # blogic@openwrt.org
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=xorg-server
12 PKG_RELEASE:=1
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)/
17
18 include $(INCLUDE_DIR)/package.mk
19
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
21
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
31
32 CONFIGURE_VARS+=ac_cv_file__usr_share_sgml_X11_defs_ent=yes
33 CONFIGURE_ARGS+=$(if $(CONFIG_XORG_BUILD_KDRIVE), $(CONFIGURE_ARGS_KDRIVE))
34
35 DEPENDS_SERVER:=+calibrateproto \
36 +compositeproto \
37 +damageproto \
38 +fixesproto \
39 +recordproto \
40 +resourceproto \
41 +scrnsaverproto \
42 +videoproto \
43 +xextproto \
44 +xproto \
45 +libXext \
46 +libXdmcp \
47 +libXfont \
48 +libXrandr \
49 +xtrans \
50 +libX11 \
51 +glproto \
52 +xf86driproto \
53 +applewmproto \
54 +dmxproto \
55 +printproto \
56 +windowswmproto \
57 +xf86rushproto \
58 +xproxymanagementprotocol \
59 +libdrm \
60 +xf86miscproto \
61 +xf86vidmodeproto \
62 +xf86dgaproto \
63 +trapproto \
64 +xineramaproto \
65 +evieext \
66 +libxkbfile \
67 +libXt \
68 +libSM \
69 +libxkbui \
70 +libXxf86misc \
71 +libXxf86vm \
72 +libXaw \
73 +libXmu \
74 +libXpm \
75 +libnotimpl \
76 +Mesa \
77 @DISPLAY_SUPPORT
78
79 DEPENDS_KDRIVE:=+calibrateproto \
80 +compositeproto \
81 +damageproto \
82 +fixesproto \
83 +recordproto \
84 +resourceproto \
85 +scrnsaverproto \
86 +videoproto \
87 +xextproto \
88 +xproto \
89 +libXext \
90 +libXdmcp \
91 +libXfont \
92 +libXrandr \
93 +xtrans \
94 +libX11 \
95 @DISPLAY_SUPPORT
96
97
98 ifneq ($(CONFIG_TARGET_olpc),)
99 XORG_CONFIG_FILE=xorg-olpc.conf
100 else
101 XORG_CONFIG_FILE=xorg.conf
102 endif
103
104 define Package/xorg-server/config
105 config XORG_BUILD_KDRIVE
106 bool "Build kdrive instead of xserver"
107 depends PACKAGE_xorg-server
108 endef
109
110 define Package/xorg-server/Default
111 SECTION:=xorg-server
112 CATEGORY:=Xorg
113 URL:=http://xorg.freedesktop.org/
114 endef
115
116 define Package/xorg-server
117 $(call Package/xorg-server/Default)
118 TITLE:=Xorg server
119 MENU:=1
120 DEPENDS:=$(if $(CONFIG_XORG_BUILD_KDRIVE), $(DEPENDS_KDRIVE), $(DEPENDS_SERVER))
121 endef
122
123 define Package/xorg-server-config
124 $(call Package/xorg-server/Default)
125 TITLE:=Xorg server configuration tools
126 DEPENDS:=xorg-server
127 endef
128
129 define Build/Configure
130 (cd $(PKG_BUILD_DIR) \
131 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
132 $(CONFIGURE_VARS) \
133 $(CONFIGURE_CMD) \
134 $(CONFIGURE_ARGS_XTRA) \
135 $(CONFIGURE_ARGS) \
136 --with-default-font-path=built-ins \
137 );
138 endef
139
140 define Build/Compile
141 $(MAKE) -C $(PKG_BUILD_DIR)
142 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
143
144 endef
145
146 define Package/xorg-server/install
147 $(INSTALL_DIR) $(1)/usr/bin
148 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/Xorg $(1)/usr/bin/
149 cd $(1)/usr/bin; ln -sf Xorg X
150 $(INSTALL_DIR) $(1)/usr/share
151 $(CP) $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
152 $(INSTALL_DIR) $(1)/usr/lib/xserver
153 $(CP) $(PKG_INSTALL_DIR)/usr/lib/xserver/* $(1)/usr/lib/xserver
154 $(INSTALL_DIR) $(1)/usr/lib/xorg/
155 $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/xorg/* $(1)/usr/lib/xorg/
156 find $(1)/usr/lib/xorg/ -name *.la | xargs rm -rf
157 $(INSTALL_DIR) $(1)/usr/lib/X11/
158 $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/X11/* $(1)/usr/lib/X11/
159 rm -rf $(1)/usr/share/X11 $(1)/usr/lib/X11/xserver
160 $(INSTALL_DIR) $(1)/var/log/
161 $(INSTALL_DIR) $(1)/etc/X11/
162 $(CP) files/$(XORG_CONFIG_FILE) $(1)/etc/X11/
163 endef
164
165 define Packages/xorg-server-config/install
166 $(INSTALL_DIR) $(1)/usr/bin
167 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xorgconfig $(1)/usr/bin/
168 endef
169
170 define Build/InstallDev
171 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
172 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
173 $(CP) $(PKG_BUILD_DIR)/xorg-server.pc $(1)/usr/lib/pkgconfig/
174 endef
175
176 $(eval $(call BuildPackage,xorg-server))
177 $(eval $(call BuildPackage,xorg-server-config))