toolchain: bump Codescape IMG MIPS version to 2016.05-06
[buildroot-gz.git] / package / x11r7 / xserver_xorg-server / xserver_xorg-server.mk
blob6444a206bcc66b86b87f080affb524b8483cb377
1 ################################################################################
3 # xserver_xorg-server
5 ################################################################################
7 XSERVER_XORG_SERVER_VERSION = $(call qstrip,$(BR2_PACKAGE_XSERVER_XORG_SERVER_VERSION))
8 XSERVER_XORG_SERVER_SOURCE = xorg-server-$(XSERVER_XORG_SERVER_VERSION).tar.bz2
9 XSERVER_XORG_SERVER_SITE = http://xorg.freedesktop.org/releases/individual/xserver
10 XSERVER_XORG_SERVER_LICENSE = MIT
11 XSERVER_XORG_SERVER_LICENSE_FILES = COPYING
12 XSERVER_XORG_SERVER_INSTALL_STAGING = YES
13 # xfont_font-util is needed only for autoreconf
14 XSERVER_XORG_SERVER_AUTORECONF = YES
15 XSERVER_XORG_SERVER_DEPENDENCIES = \
16 xfont_font-util \
17 xutil_util-macros \
18 xlib_libX11 \
19 xlib_libXau \
20 xlib_libXdmcp \
21 xlib_libXext \
22 xlib_libXfixes \
23 xlib_libXi \
24 xlib_libXrender \
25 xlib_libXres \
26 xlib_libXft \
27 xlib_libXcursor \
28 xlib_libXinerama \
29 xlib_libXrandr \
30 xlib_libXdamage \
31 xlib_libXxf86vm \
32 xlib_libxkbfile \
33 xlib_xtrans \
34 xdata_xbitmaps \
35 xproto_bigreqsproto \
36 xproto_compositeproto \
37 xproto_damageproto \
38 xproto_fixesproto \
39 xproto_fontsproto \
40 xproto_glproto \
41 xproto_inputproto \
42 xproto_kbproto \
43 xproto_randrproto \
44 xproto_renderproto \
45 xproto_resourceproto \
46 xproto_videoproto \
47 xproto_xcmiscproto \
48 xproto_xextproto \
49 xproto_xf86bigfontproto \
50 xproto_xf86dgaproto \
51 xproto_xf86vidmodeproto \
52 xproto_xproto \
53 xkeyboard-config \
54 pixman \
55 mcookie \
56 host-pkgconf
58 # We force -O2 regardless of the optimization level chosen by the
59 # user, as the X.org server is known to trigger some compiler bugs at
60 # -Os on several architectures.
61 XSERVER_XORG_SERVER_CONF_OPTS = \
62 --disable-config-hal \
63 --disable-xnest \
64 --disable-xephyr \
65 --disable-dmx \
66 --with-builder-addr=buildroot@buildroot.org \
67 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/pixman-1 -O2" \
68 --with-fontrootdir=/usr/share/fonts/X11/ \
69 --$(if $(BR2_PACKAGE_XSERVER_XORG_SERVER_XVFB),en,dis)able-xvfb
71 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
72 XSERVER_XORG_SERVER_CONF_OPTS += \
73 --with-systemd-daemon \
74 --enable-systemd-logind
75 XSERVER_XORG_SERVER_DEPENDENCIES += \
76 systemd \
77 xproto_dri2proto
78 else
79 XSERVER_XORG_SERVER_CONF_OPTS += \
80 --without-systemd-daemon \
81 --disable-systemd-logind
82 endif
84 # Xwayland support needs libdrm, libepoxy, wayland and libxcomposite
85 ifeq ($(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_LIBEPOXY)$(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),yyyy)
86 XSERVER_XORG_SERVER_CONF_OPTS += --enable-xwayland
87 XSERVER_XORG_SERVER_DEPENDENCIES += libdrm libepoxy wayland xlib_libXcomposite
88 else
89 XSERVER_XORG_SERVER_CONF_OPTS += --disable-xwayland
90 endif
92 # Present protocol only required for xserver 1.15+, but does not matter if
93 # enabled for older versions as they don't use it (not even optionally).
94 ifeq ($(BR2_PACKAGE_XPROTO_PRESENTPROTO),y)
95 XSERVER_XORG_SERVER_DEPENDENCIES += xproto_presentproto
96 endif
98 ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y)
99 XSERVER_XORG_SERVER_CONF_OPTS += --enable-xorg
100 XSERVER_XORG_SERVER_DEPENDENCIES += libpciaccess
101 ifeq ($(BR2_PACKAGE_LIBDRM),y)
102 XSERVER_XORG_SERVER_DEPENDENCIES += libdrm
103 XSERVER_XORG_SERVER_CONF_OPTS += --enable-libdrm
104 else
105 XSERVER_XORG_SERVER_CONF_OPTS += --disable-libdrm
106 endif
107 else
108 XSERVER_XORG_SERVER_CONF_OPTS += --disable-xorg
109 endif
111 ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE),y)
112 XSERVER_XORG_SERVER_CONF_OPTS += \
113 --enable-kdrive \
114 --enable-xfbdev \
115 --disable-glx \
116 --disable-dri \
117 --disable-xsdl
118 define XSERVER_CREATE_X_SYMLINK
119 ln -f -s Xfbdev $(TARGET_DIR)/usr/bin/X
120 endef
121 XSERVER_XORG_SERVER_POST_INSTALL_TARGET_HOOKS += XSERVER_CREATE_X_SYMLINK
123 ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_EVDEV),y)
124 XSERVER_XORG_SERVER_CONF_OPTS += --enable-kdrive-evdev
125 else
126 XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive-evdev
127 endif
129 ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_KBD),y)
130 XSERVER_XORG_SERVER_CONF_OPTS += --enable-kdrive-kbd
131 else
132 XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive-kbd
133 endif
135 ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_MOUSE),y)
136 XSERVER_XORG_SERVER_CONF_OPTS += --enable-kdrive-mouse
137 else
138 XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive-mouse
139 endif
141 else # modular
142 XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive --disable-xfbdev
143 endif
145 ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
146 XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri --enable-glx
147 XSERVER_XORG_SERVER_DEPENDENCIES += mesa3d xproto_xf86driproto
148 else
149 XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri --disable-glx
150 endif
152 ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_AIGLX),y)
153 XSERVER_XORG_SERVER_CONF_OPTS += --enable-aiglx
154 else
155 XSERVER_XORG_SERVER_CONF_OPTS += --disable-aiglx
156 endif
158 # Optional packages
159 ifeq ($(BR2_PACKAGE_TSLIB),y)
160 XSERVER_XORG_SERVER_DEPENDENCIES += tslib
161 XSERVER_XORG_SERVER_CONF_OPTS += --enable-tslib LDFLAGS="-lts"
162 endif
164 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
165 XSERVER_XORG_SERVER_DEPENDENCIES += udev
166 XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev
167 # udev kms support depends on libdrm and dri2
168 ifeq ($(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_XPROTO_DRI2PROTO),yy)
169 XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev-kms
170 else
171 XSERVER_XORG_SERVER_CONF_OPTS += --disable-config-udev-kms
172 endif
173 endif
175 ifeq ($(BR2_PACKAGE_DBUS),y)
176 XSERVER_XORG_SERVER_DEPENDENCIES += dbus
177 XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-dbus
178 endif
180 ifeq ($(BR2_PACKAGE_FREETYPE),y)
181 XSERVER_XORG_SERVER_DEPENDENCIES += freetype
182 endif
184 ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
185 XSERVER_XORG_SERVER_DEPENDENCIES += libunwind
186 XSERVER_XORG_SERVER_CONF_OPTS += --enable-libunwind
187 else
188 XSERVER_XORG_SERVER_CONF_OPTS += --disable-libunwind
189 endif
191 ifeq ($(BR2_PACKAGE_XPROTO_RECORDPROTO),y)
192 XSERVER_XORG_SERVER_DEPENDENCIES += xproto_recordproto
193 XSERVER_XORG_SERVER_CONF_OPTS += --enable-record
194 else
195 XSERVER_XORG_SERVER_CONF_OPTS += --disable-record
196 endif
198 ifeq ($(BR2_PACKAGE_XLIB_LIBXFONT2),y)
199 XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXfont2
200 endif
202 ifeq ($(BR2_PACKAGE_XLIB_LIBXFONT),y)
203 XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXfont
204 endif
206 ifneq ($(BR2_PACKAGE_XLIB_LIBXVMC),y)
207 XSERVER_XORG_SERVER_CONF_OPTS += --disable-xvmc
208 endif
210 ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
211 XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXcomposite
212 else
213 XSERVER_XORG_SERVER_CONF_OPTS += --disable-composite
214 endif
216 ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y)
217 ifeq ($(BR2_PACKAGE_XPROTO_DRI2PROTO),y)
218 XSERVER_XORG_SERVER_DEPENDENCIES += xproto_dri2proto
219 XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri2
220 else
221 XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri2
222 endif
223 ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO),y)
224 XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libxshmfence xproto_dri3proto
225 XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri3
226 ifeq ($(BR2_PACKAGE_HAS_LIBGL)$(BR2_PACKAGE_LIBEPOXY),yy)
227 XSERVER_XORG_SERVER_DEPENDENCIES += libepoxy
228 XSERVER_XORG_SERVER_CONF_OPTS += --enable-glamor
229 else
230 XSERVER_XORG_SERVER_CONF_OPTS += --disable-glamor
231 endif
232 else
233 XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri3 --disable-glamor
234 endif
235 else
236 XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri2 --disable-dri3 --disable-glamor
237 endif
239 ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER),y)
240 XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXScrnSaver
241 XSERVER_XORG_SERVER_CONF_OPTS += --enable-screensaver
242 else
243 XSERVER_XORG_SERVER_CONF_OPTS += --disable-screensaver
244 endif
246 ifneq ($(BR2_PACKAGE_XLIB_LIBDMX),y)
247 XSERVER_XORG_SERVER_CONF_OPTS += --disable-dmx
248 endif
250 ifeq ($(BR2_PACKAGE_OPENSSL),y)
251 XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libcrypto
252 XSERVER_XORG_SERVER_DEPENDENCIES += openssl
253 else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
254 XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libgcrypt
255 XSERVER_XORG_SERVER_DEPENDENCIES += libgcrypt
256 else
257 XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libsha1
258 XSERVER_XORG_SERVER_DEPENDENCIES += libsha1
259 endif
261 $(eval $(autotools-package))