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