fix if-target-condition
[openwrt/svn-archive/archive.git] / Xorg / xorg / xserver / xorg-server / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
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/$(PKG_NAME)-$(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 xtrans xf86driproto
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 X_CONFIG=generic
27 ifeq ($(CONFIG_TARGET_olpc),y)
28 X_CONFIG=olpc
29 endif
30 ifeq ($(CONFIG_TARGET_s3c24xx),y)
31 X_CONFIG=om_gta02
32 endif
33
34 define Package/xorg/Default
35 SECTION:=xorg-server
36 CATEGORY:=Xorg
37 SUBMENU:=server
38 DEPENDS:=@!avr32
39 URL:=http://xorg.freedesktop.org/
40 endef
41
42 define Package/xserver-xorg
43 $(call Package/xorg/Default)
44 PROVIDES:=xserver
45 TITLE:=Xorg xserver
46 DEPENDS:=+xserver-common \
47 +libpthread \
48 +libxkbfile \
49 +libXfont \
50 +libXau \
51 +libXv \
52 +libfontenc \
53 +pixman \
54 +libopenssl \
55 +libpciaccess \
56 +libdrm \
57 +libgl-mesa \
58 @DISPLAY_SUPPORT
59 endef
60
61 define Package/xserver-xorg-config
62 $(call Package/xorg/Default)
63 TITLE:=Xorg server configuration tools
64 DEPENDS:=xserver-xorg
65 endef
66
67 define Package/xserver-common
68 $(call Package/xorg/Default)
69 TITLE:=meta-package
70 endef
71
72 define Build/Configure
73 $(call Build/Configure/Default, \
74 --enable-xorg \
75 --enable-dri \
76 --disable-kdrive \
77 --disable-cfb \
78 --disable-afb \
79 --disable-mfb \
80 --disable-aiglx \
81 --disable-glx-tls \
82 --disable-dga \
83 --disable-xdmcp \
84 --disable-xdm-auth-1 \
85 --disable-config-hal \
86 --disable-xf86misc \
87 --disable-xf86vidmode \
88 --disable-xf86bigfont \
89 --disable-xorgcfg \
90 --disable-xkb \
91 --disable-xnest \
92 --disable-xquartz \
93 --disable-xwin \
94 --disable-x11app \
95 --disable-xsdl \
96 --disable-xfake \
97 --disable-install-setuid \
98 --disable-kbd_mode \
99 --disable-xvfb \
100 --disable-xprint \
101 --disable-xtrap \
102 --disable-dmx \
103 --disable-glx \
104 --disable-xinerama \
105 --disable-xfree86-utils \
106 --disable-cup \
107 --disable-xevie \
108 --disable-evi \
109 --disable-screensaver \
110 --enable-builtin-fonts \
111 )
112 endef
113
114 define Package/xserver-common/install
115 $(INSTALL_DIR) $(1)/etc/{init.d,config}
116 $(INSTALL_BIN) \
117 ./files/x.init \
118 $(1)/etc/init.d/x11
119 $(if $(X_CONFIG), \
120 $(INSTALL_DATA) \
121 ./files/config/$(X_CONFIG) \
122 $(1)/etc/config/x11 \
123 )
124 endef
125
126 define Package/xserver-xorg/install
127 $(INSTALL_DIR) $(1)/usr/bin
128 $(INSTALL_BIN) \
129 $(PKG_INSTALL_DIR)/usr/bin/Xorg \
130 $(1)/usr/bin/
131
132 $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/{extensions,fonts,linux,multimedia}
133 $(INSTALL_DATA) \
134 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/*.so \
135 $(1)/usr/lib/xorg/modules/
136
137 $(foreach d,extensions fonts linux multimedia, \
138 $(INSTALL_DATA) \
139 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/$(d)/*.so \
140 $(1)/usr/lib/xorg/modules/$(d)/; \
141 )
142 endef
143
144 define Build/InstallDev
145 $(INSTALL_DIR) $(1)/usr/share/aclocal/
146 $(INSTALL_DATA) \
147 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
148 $(1)/usr/share/aclocal/
149
150 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
151 $(INSTALL_DATA) \
152 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
153 $(1)/usr/lib/pkgconfig/
154 $(if $(CONFIG_PACKAGE_xserver-xorg), \
155 $(INSTALL_DIR) $(1)/usr/include/xorg; \
156 $(INSTALL_DATA) \
157 $(PKG_INSTALL_DIR)/usr/include/xorg/*.h \
158 $(1)/usr/include/xorg/; \
159 )
160 endef
161
162 $(eval $(call BuildPackage,xserver-common))
163 $(eval $(call BuildPackage,xserver-xorg))