xorg depends on libpciaccess.
[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 +xtrans \
143 +libxkbfile \
144 +libXfont \
145 +libXau \
146 +libfontenc \
147 +pixman \
148 +libopenssl \
149 +libpciaccess \
150 @DISPLAY_SUPPORT
151 endef
152
153 define Package/xserver-xorg
154 $(call Package/xserver/Default)
155 PROVIDES:=xserver
156 TITLE:=Xorg xserver
157 endef
158
159 define Package/xserver-kdrive-xvesa
160 $(call Package/xserver/Default)
161 PROVIDES:=xserver
162 TITLE:=Kdrive vesa xserver
163 DEPENDS+=+X_TSLIB:tslib \
164 +X_DRI:xf86driproto \
165 +X_DRI:libdrm \
166 +X_XCALIBRATE:calibrateproto \
167 +X_COMPOSITE:compositeproto \
168 +X_XINERAMA:xineramaproto
169 endef
170
171 define Package/xserver-kdrive-xfbdev
172 $(call Package/xserver/Default)
173 PROVIDES:=xserver
174 TITLE:=Kdrive framebuffer xserver
175 DEPENDS+=+X_TSLIB:tslib \
176 +X_DRI:xf86driproto \
177 +X_DRI:libdrm \
178 +X_XCALIBRATE:calibrateproto \
179 +X_COMPOSITE:compositeproto \
180 +X_XINERAMA:xineramaproto
181 endef
182
183 define Package/xserver-kdrive-xephyr
184 $(call Package/xserver/Default)
185 PROVIDES:=xserver
186 TITLE:=Kdrive ephyr xserver
187 DEPENDS+=+X_TSLIB:tslib \
188 +X_DRI:xf86driproto \
189 +X_DRI:libdrm \
190 +X_XCALIBRATE:calibrateproto \
191 +X_COMPOSITE:compositeproto \
192 +X_XINERAMA:xineramaproto
193 endef
194
195 define Package/xserver-xorg-config
196 $(call Package/xorg/Default)
197 TITLE:=Xorg server configuration tools
198 DEPENDS:=xserver-xorg
199 endef
200
201 define Package/xserver-common
202 $(call Package/xorg/Default)
203 TITLE:=meta-package
204 endef
205
206 define Build/Configure
207 $(call Build/Configure/Default, \
208 $(if $(CONFIG_PACKAGE_xserver-xorg),--enable-xorg --disable-kdrive,--disable-xorg --enable-kdrive) \
209 $(if $(CONFIG_PACKAGE_xserver-kdrive-xvesa), \
210 --enable-kdrive-vesa, \
211 --disable-kdrive-vesa) \
212 $(if $(CONFIG_PACKAGE_xserver-kdrive-xfbdev), \
213 --enable-xfbdev, \
214 --disable-xfbdev) \
215 $(if $(CONFIG_PACKAGE_xserver-kdrive-xephyr), \
216 --enable-xephyr, \
217 --disable-xephyr) \
218 $(if $(CONFIG_X_TSLIB),--enable-tslib,--disable-tslib) \
219 $(if $(CONFIG_X_COMPOSITE),--enable-composite,--disable-composite) \
220 $(if $(CONFIG_X_XINERAMA),--enable-xinerama,--disable-xinerama) \
221 $(if $(CONFIG_X_DRI),--enable-dri,--disable-dri) \
222 $(if $(CONFIG_X_XCALIBRATE),--enable-xcalibrate,--disable-xcalibrate) \
223 )
224 endef
225
226 define Build/Compile
227 DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE) -C $(PKG_BUILD_DIR) install
228 endef
229
230 define Package/xserver-common/install
231 $(INSTALL_DIR) $(1)/etc/{init.d,config}
232 $(INSTALL_DATA) \
233 ./files/x.init \
234 $(1)/etc/init.d/x11
235 $(if $(X_CONFIG), \
236 $(INSTALL_DATA) \
237 ./files/config/$(X_CONFIG) \
238 $(1)/etc/config/x11 \
239 )
240
241 $(INSTALL_DIR) $(1)/usr/lib/xorg
242 $(INSTALL_DATA) \
243 $(PKG_INSTALL_DIR)/usr/lib/xorg/protocol.txt \
244 $(1)/usr/lib/xorg/
245 endef
246
247 define Package/xserver-xfdev/install
248 $(INSTALL_DIR) $(1)/usr/bin
249 $(INSTALL_BIN) \
250 $(1)/usr/bin/Xfbdev \
251 $(PKG_INSTALL_DIR)/usr/bin/Xfbdev
252 endef
253
254 define Package/xserver-xvesa/install
255 $(INSTALL_DIR) $(1)/usr/bin
256 $(INSTALL_BIN) \
257 $(1)/usr/bin/Xvesa \
258 $(PKG_INSTALL_DIR)/usr/bin/Xvesa
259 endef
260
261 define Package/xserver-xorg/install
262 $(INSTALL_DIR) $(1)/usr/bin
263 $(INSTALL_BIN) \
264 $(PKG_INSTALL_DIR)/usr/bin/Xorg \
265 $(1)/usr/bin/
266
267 $(INSTALL_DIR) $(1)/usr/lib/X11
268 $(INSTALL_DATA) \
269 $(PKG_INSTALL_DIR)/usr/lib/X11/* \
270 $(1)/usr/lib/X11/
271
272 $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/{extensions,fonts,linux,multimedia}
273 $(INSTALL_DATA) \
274 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/*.so \
275 $(1)/usr/lib/xorg/modules/
276
277 $(for dir,extensions fonts linux multimedia, \
278 $(INSTALL_DATA) \
279 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/$(d)/*.so \
280 $(1)/usr/lib/xorg/modules/$(d) \
281 )
282 endef
283
284 define Packages/xorg-server-config/install
285 $(INSTALL_DIR) $(1)/usr/bin
286 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xorgconfig $(1)/usr/bin/
287 endef
288
289 define Build/InstallDev
290 $(INSTALL_DIR) $(1)/usr/share/aclocal/
291 $(INSTALL_DATA) \
292 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
293 $(1)/usr/share/aclocal/
294
295 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
296 $(INSTALL_DATA) \
297 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
298 $(1)/usr/lib/pkgconfig/
299 $(if $(CONFIG_PACKAGE_xserver-xorg), \
300 $(INSTALL_DIR) $(1)/usr/include/xorg; \
301 $(INSTALL_DATA) \
302 $(PKG_INSTALL_DIR)/usr/include/xorg/*.h \
303 $(1)/usr/include/xorg/; \
304 )
305 endef
306
307 $(eval $(call BuildPackage,xserver-common))
308 $(eval $(call BuildPackage,xserver-xorg))
309 $(eval $(call BuildPackage,xserver-kdrive-xvesa))
310 $(eval $(call BuildPackage,xserver-kdrive-xfbdev))
311 $(eval $(call BuildPackage,xserver-xorg-config))