added dgaproto as dependency for xorg-xserver
[openwrt/svn-archive/archive.git] / Xorg / xserver / xorg-xserver / 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:=1.5.1
14 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.4/src/xserver/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/xserver/xorg-server-$(PKG_VERSION)/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 EXTRA_CFLAGS+= \
21 -I$(STAGING_DIR)/usr/include/X11/GL \
22 -I$(STAGING_DIR)/usr/include/X11/dri/ \
23 -I$(STAGING_DIR)/usr/include/X11/ \
24 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
25
26 CONFIGURE_ARGS+= \
27 --disable-aiglx \
28 --disable-glx-tls \
29 --disable-dga \
30 --disable-xdmcp \
31 --disable-xdm-auth-1 \
32 --disable-config-hal \
33 --disable-xf86misc \
34 --disable-xf86vidmode \
35 --disable-xf86bigfont \
36 --disable-xorgcfg \
37 --disable-xkb \
38 --disable-xnest \
39 --disable-xquartz \
40 --disable-xwin \
41 --disable-x11app \
42 --disable-xsdl \
43 --disable-xfake \
44 --disable-install-setuid \
45 --disable-kbd_mode \
46 --disable-xvfb \
47 --disable-xevie \
48 --disable-xprint \
49 --disable-xtrap \
50 --disable-dmx \
51 --disable-glx \
52 --enable-builtin-fonts \
53 --with-default-font-path=built-ins \
54
55 CONFIGURE_VARS+=ac_cv_file__usr_share_sgml_X11_defs_ent=yes
56
57 #FIXME: make full blowed xorg-xserver work
58
59 #DEPENDS_SERVER:=+calibrateproto \
60 # +compositeproto \
61 # +damageproto \
62 # +fixesproto \
63 # +recordproto \
64 # +resourceproto \
65 # +scrnsaverproto \
66 # +videoproto \
67 # +xextproto \
68 # +xproto \
69 # +libXext \
70 # +libXdmcp \
71 # +libXfont \
72 # +libXrandr \
73 # +xtrans \
74 # +libX11 \
75 # +glproto \
76 # +xf86driproto \
77 # +applewmproto \
78 # +dmxproto \
79 # +printproto \
80 # +windowswmproto \
81 # +xf86rushproto \
82 # +xproxymanagementprotocol \
83 # +libdrm \
84 # +xf86miscproto \
85 # +xf86vidmodeproto \
86 # +xf86dgaproto \
87 # +trapproto \
88 # +xineramaproto \
89 # +evieext \
90 # +libxkbfile \
91 # +libXt \
92 # +libSM \
93 # +libxkbui \
94 # +libXxf86misc \
95 # +libXxf86vm \
96 # +libXaw \
97 # +libXmu \
98 # +libXpm \
99 # +libnotimpl \
100 # +Mesa \
101 # +pixman \
102 # @DISPLAY_SUPPORT
103
104 define Package/xserver-common/config
105 source "$(SOURCE)/Config.in"
106 endef
107
108 X_CONFIG=generic
109 ifeq ($(CONFIG_TARGET_olpc),y)
110 X_CONFIG=olpc
111 endif
112 ifeq ($(CONFIG_TARGET_om_gta02),y)
113 X_CONFIG=om_gta02
114 endif
115
116 define Package/xorg/Default
117 SECTION:=xorg-server
118 CATEGORY:=Xorg
119 SUBMENU:=server
120 URL:=http://xorg.freedesktop.org/
121 endef
122
123 define Package/xserver/Default
124 $(call Package/xorg/Default)
125 DEPENDS:=+xserver-common \
126 +libpthread \
127 +randrproto \
128 +renderproto \
129 +fixesproto \
130 +damageproto \
131 +xcmiscproto \
132 +xextproto \
133 +xproto \
134 +scrnsaverproto \
135 +bigreqsproto \
136 +resourceproto \
137 +fontsproto \
138 +inputproto \
139 +kbproto \
140 +videoproto \
141 +resourceproto \
142 +xf86dgaproto \
143 +xtrans \
144 +libxkbfile \
145 +libXfont \
146 +libXau \
147 +libfontenc \
148 +pixman \
149 +libopenssl \
150 +libpciaccess \
151 @DISPLAY_SUPPORT
152 endef
153
154 define Package/xserver-xorg
155 $(call Package/xserver/Default)
156 PROVIDES:=xserver
157 TITLE:=Xorg xserver
158 endef
159
160 define Package/xserver-kdrive-xvesa
161 $(call Package/xserver/Default)
162 PROVIDES:=xserver
163 TITLE:=Kdrive vesa xserver
164 DEPENDS+=+X_TSLIB:tslib \
165 +X_DRI:xf86driproto \
166 +X_DRI:libdrm \
167 +X_XCALIBRATE:calibrateproto \
168 +X_COMPOSITE:compositeproto \
169 +X_XINERAMA:xineramaproto
170 endef
171
172 define Package/xserver-kdrive-xfbdev
173 $(call Package/xserver/Default)
174 PROVIDES:=xserver
175 TITLE:=Kdrive framebuffer xserver
176 DEPENDS+=+X_TSLIB:tslib \
177 +X_DRI:xf86driproto \
178 +X_DRI:libdrm \
179 +X_XCALIBRATE:calibrateproto \
180 +X_COMPOSITE:compositeproto \
181 +X_XINERAMA:xineramaproto
182 endef
183
184 define Package/xserver-kdrive-xephyr
185 $(call Package/xserver/Default)
186 PROVIDES:=xserver
187 TITLE:=Kdrive ephyr xserver
188 DEPENDS+=+X_TSLIB:tslib \
189 +X_DRI:xf86driproto \
190 +X_DRI:libdrm \
191 +X_XCALIBRATE:calibrateproto \
192 +X_COMPOSITE:compositeproto \
193 +X_XINERAMA:xineramaproto
194 endef
195
196 define Package/xserver-xorg-config
197 $(call Package/xorg/Default)
198 TITLE:=Xorg server configuration tools
199 DEPENDS:=xserver-xorg
200 endef
201
202 define Package/xserver-common
203 $(call Package/xorg/Default)
204 TITLE:=meta-package
205 endef
206
207 define Build/Configure
208 $(call Build/Configure/Default, \
209 $(if $(CONFIG_PACKAGE_xserver-xorg),--enable-xorg --disable-kdrive,--disable-xorg --enable-kdrive) \
210 $(if $(CONFIG_PACKAGE_xserver-kdrive-xvesa), \
211 --enable-kdrive-vesa, \
212 --disable-kdrive-vesa) \
213 $(if $(CONFIG_PACKAGE_xserver-kdrive-xfbdev), \
214 --enable-xfbdev, \
215 --disable-xfbdev) \
216 $(if $(CONFIG_PACKAGE_xserver-kdrive-xephyr), \
217 --enable-xephyr, \
218 --disable-xephyr) \
219 $(if $(CONFIG_X_TSLIB),--enable-tslib,--disable-tslib) \
220 $(if $(CONFIG_X_COMPOSITE),--enable-composite,--disable-composite) \
221 $(if $(CONFIG_X_XINERAMA),--enable-xinerama,--disable-xinerama) \
222 $(if $(CONFIG_X_DRI),--enable-dri,--disable-dri) \
223 $(if $(CONFIG_X_XCALIBRATE),--enable-xcalibrate,--disable-xcalibrate) \
224 )
225 endef
226
227 define Build/Compile
228 DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE) -C $(PKG_BUILD_DIR) install
229 endef
230
231 define Package/xserver-common/install
232 $(INSTALL_DIR) $(1)/etc/{init.d,config}
233 $(INSTALL_DATA) \
234 ./files/x.init \
235 $(1)/etc/init.d/x11
236 $(if $(X_CONFIG), \
237 $(INSTALL_DATA) \
238 ./files/config/$(X_CONFIG) \
239 $(1)/etc/config/x11 \
240 )
241
242 $(INSTALL_DIR) $(1)/usr/lib/xorg
243 $(INSTALL_DATA) \
244 $(PKG_INSTALL_DIR)/usr/lib/xorg/protocol.txt \
245 $(1)/usr/lib/xorg/
246 endef
247
248 define Package/xserver-kdrive-xfbdev/install
249 $(INSTALL_DIR) $(1)/usr/bin
250 $(INSTALL_BIN) \
251 $(PKG_INSTALL_DIR)/usr/bin/Xfbdev \
252 $(1)/usr/bin/Xfbdev
253 endef
254
255 define Package/xserver-kdrive-xvesa/install
256 $(INSTALL_DIR) $(1)/usr/bin
257 $(INSTALL_BIN) \
258 $(PKG_INSTALL_DIR)/usr/bin/Xvesa \
259 $(1)/usr/bin/Xvesa
260 endef
261
262 define Package/xserver-xorg/install
263 $(INSTALL_DIR) $(1)/usr/bin
264 $(INSTALL_BIN) \
265 $(PKG_INSTALL_DIR)/usr/bin/Xorg \
266 $(1)/usr/bin/
267
268 $(INSTALL_DIR) $(1)/usr/lib/X11
269 $(INSTALL_DATA) \
270 $(PKG_INSTALL_DIR)/usr/lib/X11/* \
271 $(1)/usr/lib/X11/
272
273 $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/{extensions,fonts,linux,multimedia}
274 $(INSTALL_DATA) \
275 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/*.so \
276 $(1)/usr/lib/xorg/modules/
277
278 $(for dir,extensions fonts linux multimedia, \
279 $(INSTALL_DATA) \
280 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/$(d)/*.so \
281 $(1)/usr/lib/xorg/modules/$(d) \
282 )
283 endef
284
285 define Packages/xorg-server-config/install
286 $(INSTALL_DIR) $(1)/usr/bin
287 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xorgconfig $(1)/usr/bin/
288 endef
289
290 define Build/InstallDev
291 $(INSTALL_DIR) $(1)/usr/share/aclocal/
292 $(INSTALL_DATA) \
293 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
294 $(1)/usr/share/aclocal/
295
296 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
297 $(INSTALL_DATA) \
298 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
299 $(1)/usr/lib/pkgconfig/
300 $(if $(CONFIG_PACKAGE_xserver-xorg), \
301 $(INSTALL_DIR) $(1)/usr/include/xorg; \
302 $(INSTALL_DATA) \
303 $(PKG_INSTALL_DIR)/usr/include/xorg/*.h \
304 $(1)/usr/include/xorg/; \
305 )
306 endef
307
308 $(eval $(call BuildPackage,xserver-common))
309 $(eval $(call BuildPackage,xserver-xorg))
310 $(eval $(call BuildPackage,xserver-kdrive-xvesa))
311 $(eval $(call BuildPackage,xserver-kdrive-xfbdev))
312 $(eval $(call BuildPackage,xserver-xorg-config))