- update to Xorg X11R7.4 and reorganization of the xorg-section
[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+= -I${STAGING_DIR}/usr/include/X11/GL -I${STAGING_DIR}/usr/include/X11/dri/ -I${STAGING_DIR}/usr/include/X11/ -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
21
22 CONFIGURE_ARGS+= --disable-dga \
23 --disable-xf86misc \
24 --disable-xf86vidmode \
25 --disable-xf86bigfont \
26 --disable-xorgcfg \
27 --disable-xkb \
28 --disable-xnest \
29 --disable-xvfb \
30 --disable-xevie \
31 --disable-xprint \
32 --disable-xtrap \
33 --disable-dmx \
34 --disable-w100 \
35 --disable-glx \
36 --enable-xfbdev \
37 --enable-kdrive \
38 --disable-xorg \
39 --disable-xephyr \
40 --enable-builtin-fonts \
41 --disable-kdrive-vesa \
42 --with-default-font-path=built-ins \
43
44 CONFIGURE_VARS+=ac_cv_file__usr_share_sgml_X11_defs_ent=yes
45
46 #FIXME: make full blowed xorg-xserver work
47
48 #DEPENDS_SERVER:=+calibrateproto \
49 # +compositeproto \
50 # +damageproto \
51 # +fixesproto \
52 # +recordproto \
53 # +resourceproto \
54 # +scrnsaverproto \
55 # +videoproto \
56 # +xextproto \
57 # +xproto \
58 # +libXext \
59 # +libXdmcp \
60 # +libXfont \
61 # +libXrandr \
62 # +xtrans \
63 # +libX11 \
64 # +glproto \
65 # +xf86driproto \
66 # +applewmproto \
67 # +dmxproto \
68 # +printproto \
69 # +windowswmproto \
70 # +xf86rushproto \
71 # +xproxymanagementprotocol \
72 # +libdrm \
73 # +xf86miscproto \
74 # +xf86vidmodeproto \
75 # +xf86dgaproto \
76 # +trapproto \
77 # +xineramaproto \
78 # +evieext \
79 # +libxkbfile \
80 # +libXt \
81 # +libSM \
82 # +libxkbui \
83 # +libXxf86misc \
84 # +libXxf86vm \
85 # +libXaw \
86 # +libXmu \
87 # +libXpm \
88 # +libnotimpl \
89 # +Mesa \
90 # +pixman \
91 # @DISPLAY_SUPPORT
92
93 define Package/xorg-server/config
94 menu "Configuration"
95 depends on PACKAGE_xorg-server
96 source "$(SOURCE)/Config.in"
97 endmenu
98 endef
99
100 X_BIN_FILE=Xfbdev # no Xorg-binary when xorg is disabled :)
101 #ifneq ($(CONFIG_X_KDRIVE),)
102 # CONFIGURE_ARGS+=--enable-kdrive --disable-xorg
103 # X_BIN_FILE=Xfbdev # no Xorg-binary when xorg is disabled :)
104 #else
105 # CONFIGURE_ARGS+=--disable-kdrive --enable-xorg
106 # X_BIN_FILE=Xorg
107 #endif
108
109 ifeq ($(CONFIG_TARGET_olpc),y)
110 #XORG_CONFIG_FILE=xorg-olpc.conf
111 X_CONFIG=olpc
112 endif
113 ifeq ($(CONFIG_TARGET_om_gta02),y)
114 #XORG_CONFIG_FILE=xorg-om_gta02.conf
115 X_CONFIG=om_gta02
116 endif
117
118 define Package/xorg-server/Default
119 SECTION:=xorg-server
120 CATEGORY:=Xorg
121 URL:=http://xorg.freedesktop.org/
122 endef
123
124 define Package/xorg-server
125 $(call Package/xorg-server/Default)
126 TITLE:=Xorg server
127 MENU:=1
128 DEPENDS:=+X_TSLIB:tslib \
129 +X_DRI:xf86driproto \
130 +X_DRI:libdrm \
131 +X_XCALIBRATE:calibrateproto \
132 +X_COMPOSITE:compositeproto \
133 +X_XINERAMA:xineramaproto \
134 +libpthread \
135 +randrproto \
136 +renderproto \
137 +fixesproto \
138 +damageproto \
139 +xcmiscproto \
140 +xextproto \
141 +xproto \
142 +scrnsaverproto \
143 +bigreqsproto \
144 +resourceproto \
145 +fontsproto \
146 +inputproto \
147 +kbproto \
148 +videoproto \
149 +resourceproto \
150 +xtrans \
151 +libxkbfile \
152 +libXfont \
153 +libXau \
154 +libfontenc \
155 +pixman \
156 +libopenssl \
157 @DISPLAY_SUPPORT
158 endef
159
160 define Package/xorg-server-config
161 $(call Package/xorg-server/Default)
162 TITLE:=Xorg server configuration tools
163 DEPENDS:=xorg-server
164 endef
165
166 define Build/Configure
167 (cd $(PKG_BUILD_DIR) \
168 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
169 $(CONFIGURE_VARS) \
170 $(CONFIGURE_CMD) \
171 $(CONFIGURE_ARGS_XTRA) \
172 $(CONFIGURE_ARGS) \
173 $(if $(CONFIG_X_TSLIB),--enable-tslib) \
174 $(if $(CONFIG_X_COMPOSITE),,--disable-composite) \
175 $(if $(CONFIG_X_XINERAMA),,--disable-xinerama) \
176 $(if $(CONFIG_X_DRI),,--disable-dri) \
177 $(if $(CONFIG_X_XCALIBRATE),--enable-xcalibrate) \
178 );
179 endef
180
181 define Build/Compile
182 DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE) -C $(PKG_BUILD_DIR) install
183 endef
184
185 define Package/xorg-server/install
186 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/etc/init.d $(1)/etc/config
187 #$(CP) $(PKG_INSTALL_DIR)/usr/bin/$(X_BIN_FILE) $(1)/usr/bin/
188 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
189 $(CP) ./files/x.init $(1)/etc/init.d/x11
190 $(if $(X_CONFIG),$(CP) ./files/config/$(X_CONFIG) $(1)/etc/config/x11)
191 cd $(1)/usr/bin; ln -sf $(X_BIN_FILE) X
192 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
193 endef
194
195 #define Package/xorg-server/install
196 # $(INSTALL_DIR) $(1)/usr/bin
197 # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(XORG_BIN_FILE) $(1)/usr/bin/
198 # cd $(1)/usr/bin; ln -sf $(XORG_BIN_FILE) X
199 # $(INSTALL_DIR) $(1)/usr/share
200 # $(CP) $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
201 # $(INSTALL_DIR) $(1)/usr/lib/xserver
202 # $(CP) $(PKG_INSTALL_DIR)/usr/lib/xserver/* $(1)/usr/lib/xserver
203 # $(INSTALL_DIR) $(1)/usr/lib/xorg/
204 # $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/xorg/* $(1)/usr/lib/xorg/
205 # find $(1)/usr/lib/xorg/ -name *.la | xargs rm -rf
206 # $(INSTALL_DIR) $(1)/usr/lib/X11/
207 # $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/X11/* $(1)/usr/lib/X11/
208 # rm -rf $(1)/usr/share/X11 $(1)/usr/lib/X11/xserver
209 # $(INSTALL_DIR) $(1)/var/log/
210 # $(INSTALL_DIR) $(1)/etc/X11/
211 # $(CP) files/$(XORG_CONFIG_FILE) $(1)/etc/X11/xorg.conf
212 #endef
213
214 define Packages/xorg-server-config/install
215 $(INSTALL_DIR) $(1)/usr/bin
216 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xorgconfig $(1)/usr/bin/
217 endef
218
219 define Build/InstallDev
220 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
221 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
222 endef
223
224 $(eval $(call BuildPackage,xorg-server))
225 $(eval $(call BuildPackage,xorg-server-config))