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