ed0b5de0e8ba4ec51f2d44cdc21fa04c6c3c74db
[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-vesa, \
196 --disable-kdrive-vesa) \
197 $(if $(CONFIG_PACKAGE_xserver-kdrive-xfbdev), \
198 --enable-xfbdev, \
199 --disable-xfbdev) \
200 $(if $(CONFIG_PACKAGE_xserver-kdrive-xephyr), \
201 --enable-xephyr, \
202 --disable-xephyr) \
203 $(if $(CONFIG_X_TSLIB),--enable-tslib,--disable-tslib) \
204 $(if $(CONFIG_X_COMPOSITE),--enable-composite,--disable-composite) \
205 $(if $(CONFIG_X_XINERAMA),--enable-xinerama,--disable-xinerama) \
206 $(if $(CONFIG_X_XCALIBRATE),--enable-xcalibrate,--disable-xcalibrate) \
207 )
208 endef
209
210 define Build/Compile
211 DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE) -C $(PKG_BUILD_DIR) install
212 endef
213
214 define Package/xserver-common/install
215 $(INSTALL_DIR) $(1)/etc/{init.d,config}
216 $(INSTALL_BIN) \
217 ./files/x.init \
218 $(1)/etc/init.d/x11
219 $(if $(X_CONFIG), \
220 $(INSTALL_DATA) \
221 ./files/config/$(X_CONFIG) \
222 $(1)/etc/config/x11 \
223 )
224
225 $(INSTALL_DIR) $(1)/usr/lib/xorg
226 $(INSTALL_DATA) \
227 $(PKG_INSTALL_DIR)/usr/lib/xorg/protocol.txt \
228 $(1)/usr/lib/xorg/
229 endef
230
231 define Package/xserver-kdrive-xfbdev/install
232 $(INSTALL_DIR) $(1)/usr/bin
233 $(INSTALL_BIN) \
234 $(PKG_INSTALL_DIR)/usr/bin/Xfbdev \
235 $(1)/usr/bin/
236 endef
237
238 define Package/xserver-kdrive-xvesa/install
239 $(INSTALL_DIR) $(1)/usr/bin
240 $(INSTALL_BIN) \
241 $(PKG_INSTALL_DIR)/usr/bin/Xvesa \
242 $(1)/usr/bin/
243 endef
244
245 define Package/xserver-kdrive-xephyr/install
246 $(INSTALL_DIR) $(1)/usr/bin
247 $(INSTALL_BIN) \
248 $(PKG_INSTALL_DIR)/usr/bin/Xephyr \
249 $(1)/usr/bin/
250 endef
251
252 define Package/xserver-xorg/install
253 $(INSTALL_DIR) $(1)/usr/bin
254 $(INSTALL_BIN) \
255 $(PKG_INSTALL_DIR)/usr/bin/Xorg \
256 $(1)/usr/bin/
257
258 $(INSTALL_DIR) $(1)/usr/lib/X11
259 $(INSTALL_DATA) \
260 $(PKG_INSTALL_DIR)/usr/lib/X11/* \
261 $(1)/usr/lib/X11/
262
263 $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/{extensions,fonts,linux,multimedia}
264 $(INSTALL_DATA) \
265 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/*.so \
266 $(1)/usr/lib/xorg/modules/
267
268 $(for dir,extensions fonts linux multimedia, \
269 $(INSTALL_DATA) \
270 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/$(d)/*.so \
271 $(1)/usr/lib/xorg/modules/$(d) \
272 )
273 endef
274
275 define Packages/xorg-server-config/install
276 $(INSTALL_DIR) $(1)/usr/bin
277 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xorgconfig $(1)/usr/bin/
278 endef
279
280 define Build/InstallDev
281 $(INSTALL_DIR) $(1)/usr/share/aclocal/
282 $(INSTALL_DATA) \
283 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
284 $(1)/usr/share/aclocal/
285
286 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
287 $(INSTALL_DATA) \
288 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
289 $(1)/usr/lib/pkgconfig/
290 $(if $(CONFIG_PACKAGE_xserver-xorg), \
291 $(INSTALL_DIR) $(1)/usr/include/xorg; \
292 $(INSTALL_DATA) \
293 $(PKG_INSTALL_DIR)/usr/include/xorg/*.h \
294 $(1)/usr/include/xorg/; \
295 )
296 endef
297
298 $(eval $(call BuildPackage,xserver-common))
299 $(eval $(call BuildPackage,xserver-xorg))
300 $(eval $(call BuildPackage,xserver-kdrive-xvesa))
301 $(eval $(call BuildPackage,xserver-kdrive-xfbdev))
302 $(eval $(call BuildPackage,xserver-kdrive-xephyr))
303 $(eval $(call BuildPackage,xserver-xorg-config))