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