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