packages: move Xorg category to its own feed, move X-related packages as well
[openwrt/svn-archive/feeds.git] / xorg / xorg / xserver / xorg-server / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=xorg-server
11 PKG_VERSION:=1.7.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/xserver/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_MD5SUM:=dda7842467cda6018fdc87e6002e4db1
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/xserver/$(PKG_NAME)-$(PKG_VERSION)/
19 PKG_BUILD_DEPENDS:=randrproto renderproto fixesproto damageproto xcmiscproto \
20 xextproto xproto scrnsaverproto bigreqsproto resourceproto \
21 fontsproto inputproto kbproto videoproto resourceproto \
22 compositeproto xf86dgaproto xtrans xf86driproto dri2proto
23
24 PKG_INSTALL:=1
25 PKG_FIXUP:=libtool
26 PKG_BUILD_PARALLEL:=1
27
28 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_xserver-xorg CONFIG_PACKAGE_xserver-common
29
30 include $(INCLUDE_DIR)/package.mk
31
32 X_CONFIG=generic
33 ifeq ($(CONFIG_TARGET_olpc),y)
34 X_CONFIG=olpc
35 endif
36 ifeq ($(CONFIG_TARGET_s3c24xx),y)
37 X_CONFIG=om_gta02
38 endif
39 ifeq ($(CONFIG_TARGET_omap24xx_n810-gui),y)
40 X_CONFIG=nokia_n810
41 endif
42
43 define Package/xorg/Default
44 SECTION:=xorg-server
45 CATEGORY:=Xorg
46 SUBMENU:=server
47 DEPENDS:=@!avr32
48 URL:=http://xorg.freedesktop.org/
49 endef
50
51 define Package/xserver-xorg
52 $(call Package/xorg/Default)
53 PROVIDES:=xserver
54 TITLE:=Xorg xserver
55 DEPENDS:=+xserver-common \
56 +libpthread \
57 +xkbcomp \
58 +libxkbfile \
59 +libXfont \
60 +libXau \
61 +libXv \
62 +libfontenc \
63 +pixman \
64 +libopenssl \
65 +libpciaccess \
66 +libdrm \
67 +libgl-mesa \
68 @DISPLAY_SUPPORT
69 endef
70
71 define Package/xserver-common
72 $(call Package/xorg/Default)
73 TITLE:=meta-package
74 endef
75
76 EXTRA_LDFLAGS:=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
77
78 define Build/Configure
79 $(call Build/Configure/Default, \
80 --disable-dependency-tracking \
81 --disable-debug \
82 --disable-unit-tests \
83 --disable-builddocs \
84 --disable-glx-tls \
85 --disable-composite \
86 --disable-shm \
87 --disable-xres \
88 --disable-record \
89 --enable-xv \
90 --enable-xvmc \
91 --disable-dga \
92 --disable-screensaver \
93 --disable-xdmcp \
94 --disable-xdm-auth-1 \
95 --disable-glx \
96 --enable-dri \
97 --enable-dri2 \
98 --disable-xinerama \
99 --disable-xf86vidmode \
100 --disable-xace \
101 --disable-xselinux \
102 --disable-xsecurity \
103 --disable-xcalibrate \
104 --disable-tslib \
105 --disable-multibuffer \
106 --disable-dbe \
107 --disable-xf86bigfont \
108 --enable-dpms \
109 --disable-config-dbus \
110 --disable-config-hal \
111 --disable-xfree86-utils \
112 --disable-xaa \
113 --enable-vgahw \
114 --disable-vbe \
115 --enable-int10-module \
116 --enable-xorg \
117 --disable-dmx \
118 --disable-xvfb \
119 --disable-xnest \
120 --disable-xquartz \
121 --disable-standalone-xpbproxy \
122 --disable-xwin \
123 --disable-kdrive \
124 --disable-xfake \
125 --disable-xfbdev \
126 --disable-installsetuid \
127 --disable-secure-rpc \
128 --enable-silent-rules \
129 --disable-shave \
130 )
131 endef
132
133 define Package/xserver-common/install
134 $(INSTALL_DIR) $(1)/etc/{init.d,config,X11}
135 $(INSTALL_BIN) \
136 ./files/x.init \
137 $(1)/etc/init.d/x11
138 $(INSTALL_DATA) ./files/tmp/x11.uci \
139 $(1)/etc/config/x11
140 test -f ./files/config.xorg/$(X_CONFIG) && \
141 $(INSTALL_DATA) \
142 ./files/config.xorg/$(X_CONFIG) \
143 $(1)/etc/X11/xorg.conf
144 # test -f ./files/config.uci/$(X_CONFIG) && \
145 # $(INSTALL_DATA) \
146 # ./files/config.uci/$(X_CONFIG) \
147 # $(1)/etc/config/x11
148 endef
149
150 define Package/xserver-xorg/install
151 $(INSTALL_DIR) $(1)/usr/bin
152 $(INSTALL_BIN) \
153 $(PKG_INSTALL_DIR)/usr/bin/Xorg \
154 $(1)/usr/bin/
155
156 $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/{extensions,fonts,linux,multimedia}
157 $(INSTALL_DATA) \
158 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/*.so \
159 $(1)/usr/lib/xorg/modules/
160
161 $(foreach d,extensions fonts linux multimedia, \
162 $(INSTALL_DATA) \
163 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/$(d)/*.so \
164 $(1)/usr/lib/xorg/modules/$(d)/; \
165 )
166 endef
167
168 define Build/InstallDev
169 $(INSTALL_DIR) $(1)/usr/share/aclocal/
170 $(INSTALL_DATA) \
171 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
172 $(1)/usr/share/aclocal/
173
174 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
175 $(INSTALL_DATA) \
176 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
177 $(1)/usr/lib/pkgconfig/
178
179 $(if $(CONFIG_PACKAGE_xserver-xorg), \
180 $(INSTALL_DIR) $(1)/usr/include/xorg; \
181 $(INSTALL_DATA) \
182 $(PKG_INSTALL_DIR)/usr/include/xorg/*.h \
183 $(1)/usr/include/xorg/; \
184 )
185 $(INSTALL_DIR) $(1)/mk
186 $(INSTALL_DATA) \
187 ./files/xorg-driver.mk \
188 $(1)/mk/
189 $(SED) 's,@VERSION@,$(PKG_VERSION),' $(1)/mk/xorg-driver.mk
190 endef
191
192 $(eval $(call BuildPackage,xserver-common))
193 $(eval $(call BuildPackage,xserver-xorg))