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