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