configs: atmel: at91sam9260eknf: update defconfig
[buildroot-gz.git] / package / wine / wine.mk
blobd9a0ecf8510932a2de24fe10843d7ef110295aa6
1 ################################################################################
3 # wine
5 ################################################################################
7 WINE_VERSION = 1.8.5
8 WINE_SOURCE = wine-$(WINE_VERSION).tar.bz2
9 WINE_SITE = https://dl.winehq.org/wine/source/1.8
10 WINE_LICENSE = LGPLv2.1+
11 WINE_LICENSE_FILES = COPYING.LIB LICENSE
12 WINE_DEPENDENCIES = host-bison host-flex host-wine
14 # Wine needs its own directory structure and tools for cross compiling
15 WINE_CONF_OPTS = \
16 --with-wine-tools=../host-wine-$(WINE_VERSION) \
17 --disable-tests \
18 --disable-win64 \
19 --without-capi \
20 --without-coreaudio \
21 --without-gettext \
22 --without-gettextpo \
23 --without-gphoto \
24 --without-gsm \
25 --without-hal \
26 --without-opencl \
27 --without-oss
29 # Wine uses a wrapper around gcc, and uses the value of --host to
30 # construct the filename of the gcc to call. But for external
31 # toolchains, the GNU_TARGET_NAME tuple that we construct from our
32 # internal variables may differ from the actual gcc prefix for the
33 # external toolchains. So, we have to override whatever the gcc
34 # wrapper believes what the real gcc is named, and force the tuple of
35 # the external toolchain, not the one we compute in GNU_TARGET_NAME.
36 ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
37 WINE_CONF_OPTS += TARGETFLAGS="-b $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))"
38 endif
40 ifeq ($(BR2_PACKAGE_ALSA_LIB)$(BR2_PACKAGE_ALSA_LIB_SEQ)$(BR2_PACKAGE_ALSA_LIB_RAWMIDI),yyy)
41 WINE_CONF_OPTS += --with-alsa
42 WINE_DEPENDENCIES += alsa-lib
43 else
44 WINE_CONF_OPTS += --without-alsa
45 endif
47 ifeq ($(BR2_PACKAGE_CUPS),y)
48 WINE_CONF_OPTS += --with-cups
49 WINE_DEPENDENCIES += cups
50 WINE_CONF_ENV += CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config
51 else
52 WINE_CONF_OPTS += --without-cups
53 endif
55 ifeq ($(BR2_PACKAGE_DBUS),y)
56 WINE_CONF_OPTS += --with-dbus
57 WINE_DEPENDENCIES += dbus
58 else
59 WINE_CONF_OPTS += --without-dbus
60 endif
62 ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
63 WINE_CONF_OPTS += --with-fontconfig
64 WINE_DEPENDENCIES += fontconfig
65 else
66 WINE_CONF_OPTS += --without-fontconfig
67 endif
69 # To support freetype in wine we also need freetype in host-wine for the cross compiling tools
70 ifeq ($(BR2_PACKAGE_FREETYPE),y)
71 WINE_CONF_OPTS += --with-freetype
72 HOST_WINE_CONF_OPTS += --with-freetype
73 WINE_DEPENDENCIES += freetype
74 HOST_WINE_DEPENDENCIES += host-freetype
75 WINE_CONF_ENV += FREETYPE_CONFIG=$(STAGING_DIR)/usr/bin/freetype-config
76 else
77 WINE_CONF_OPTS += --without-freetype
78 HOST_WINE_CONF_OPTS += --without-freetype
79 endif
81 ifeq ($(BR2_PACKAGE_GNUTLS),y)
82 WINE_CONF_OPTS += --with-gnutls
83 WINE_DEPENDENCIES += gnutls
84 else
85 WINE_CONF_OPTS += --without-gnutls
86 endif
88 ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE),y)
89 WINE_CONF_OPTS += --with-gstreamer
90 WINE_DEPENDENCIES += gst-plugins-base
91 else
92 WINE_CONF_OPTS += --without-gstreamer
93 endif
95 ifeq ($(BR2_PACKAGE_JPEG),y)
96 WINE_CONF_OPTS += --with-jpeg
97 WINE_DEPENDENCIES += jpeg
98 else
99 WINE_CONF_OPTS += --without-jpeg
100 endif
102 ifeq ($(BR2_PACKAGE_LCMS2),y)
103 WINE_CONF_OPTS += --with-cms
104 WINE_DEPENDENCIES += lcms2
105 else
106 WINE_CONF_OPTS += --without-cms
107 endif
109 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
110 WINE_CONF_OPTS += --with-opengl
111 WINE_DEPENDENCIES += libgl
112 else
113 WINE_CONF_OPTS += --without-opengl
114 endif
116 ifeq ($(BR2_PACKAGE_LIBGLU),y)
117 WINE_CONF_OPTS += --with-glu
118 WINE_DEPENDENCIES += libglu
119 else
120 WINE_CONF_OPTS += --without-glu
121 endif
123 ifeq ($(BR2_PACKAGE_LIBPCAP),y)
124 WINE_CONF_OPTS += --with-pcap
125 WINE_DEPENDENCIES += libpcap
126 else
127 WINE_CONF_OPTS += --without-pcap
128 endif
130 ifeq ($(BR2_PACKAGE_LIBPNG),y)
131 WINE_CONF_OPTS += --with-png
132 WINE_DEPENDENCIES += libpng
133 else
134 WINE_CONF_OPTS += --without-png
135 endif
137 ifeq ($(BR2_PACKAGE_LIBV4L),y)
138 WINE_CONF_OPTS += --with-v4l
139 WINE_DEPENDENCIES += libv4l
140 else
141 WINE_CONF_OPTS += --without-v4l
142 endif
144 ifeq ($(BR2_PACKAGE_LIBXML2),y)
145 WINE_CONF_OPTS += --with-xml
146 WINE_DEPENDENCIES += libxml2
147 WINE_CONF_ENV += XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config
148 else
149 WINE_CONF_OPTS += --without-xml
150 endif
152 ifeq ($(BR2_PACKAGE_LIBXSLT),y)
153 WINE_CONF_OPTS += --with-xslt
154 WINE_DEPENDENCIES += libxslt
155 WINE_CONF_ENV += XSLT_CONFIG=$(STAGING_DIR)/usr/bin/xslt-config
156 else
157 WINE_CONF_OPTS += --without-xslt
158 endif
160 ifeq ($(BR2_PACKAGE_MPG123),y)
161 WINE_CONF_OPTS += --with-mpg123
162 WINE_DEPENDENCIES += mpg123
163 else
164 WINE_CONF_OPTS += --without-mpg123
165 endif
167 ifeq ($(BR2_PACKAGE_NCURSES),y)
168 WINE_CONF_OPTS += --with-curses
169 WINE_DEPENDENCIES += ncurses
170 else
171 WINE_CONF_OPTS += --without-curses
172 endif
174 ifeq ($(BR2_PACKAGE_OPENAL),y)
175 WINE_CONF_OPTS += --with-openal
176 WINE_DEPENDENCIES += openal
177 else
178 WINE_CONF_OPTS += --without-openal
179 endif
181 ifeq ($(BR2_PACKAGE_OPENLDAP),y)
182 WINE_CONF_OPTS += --with-ldap
183 WINE_DEPENDENCIES += openldap
184 else
185 WINE_CONF_OPTS += --without-ldap
186 endif
188 ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y)
189 WINE_CONF_OPTS += --with-osmesa
190 WINE_DEPENDENCIES += mesa3d
191 else
192 WINE_CONF_OPTS += --without-osmesa
193 endif
195 ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
196 WINE_CONF_OPTS += --with-pulse
197 WINE_DEPENDENCIES += pulseaudio
198 else
199 WINE_CONF_OPTS += --without-pulse
200 endif
202 ifeq ($(BR2_PACKAGE_SAMBA4),y)
203 WINE_CONF_OPTS += --with-netapi
204 WINE_DEPENDENCIES += samba4
205 else
206 WINE_CONF_OPTS += --without-netapi
207 endif
209 ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y)
210 WINE_CONF_OPTS += --with-sane
211 WINE_DEPENDENCIES += sane-backends
212 WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config
213 else
214 WINE_CONF_OPTS += --without-sane
215 endif
217 ifeq ($(BR2_PACKAGE_TIFF),y)
218 WINE_CONF_OPTS += --with-tiff
219 WINE_DEPENDENCIES += tiff
220 else
221 WINE_CONF_OPTS += --without-tiff
222 endif
224 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
225 WINE_CONF_OPTS += --with-x
226 WINE_DEPENDENCIES += xlib_libX11
227 else
228 WINE_CONF_OPTS += --without-x
229 endif
231 ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
232 WINE_CONF_OPTS += --with-xcomposite
233 WINE_DEPENDENCIES += xlib_libXcomposite
234 else
235 WINE_CONF_OPTS += --without-xcomposite
236 endif
238 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
239 WINE_CONF_OPTS += --with-xcursor
240 WINE_DEPENDENCIES += xlib_libXcursor
241 else
242 WINE_CONF_OPTS += --without-xcursor
243 endif
245 ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y)
246 WINE_CONF_OPTS += --with-xshape --with-xshm
247 WINE_DEPENDENCIES += xlib_libXext
248 else
249 WINE_CONF_OPTS += --without-xshape --without-xshm
250 endif
252 ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
253 WINE_CONF_OPTS += --with-xinput --with-xinput2
254 WINE_DEPENDENCIES += xlib_libXi
255 else
256 WINE_CONF_OPTS += --without-xinput --without-xinput2
257 endif
259 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
260 WINE_CONF_OPTS += --with-xinerama
261 WINE_DEPENDENCIES += xlib_libXinerama
262 else
263 WINE_CONF_OPTS += --without-xinerama
264 endif
266 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
267 WINE_CONF_OPTS += --with-xrandr
268 WINE_DEPENDENCIES += xlib_libXrandr
269 else
270 WINE_CONF_OPTS += --without-xrandr
271 endif
273 ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y)
274 WINE_CONF_OPTS += --with-xrender
275 WINE_DEPENDENCIES += xlib_libXrender
276 else
277 WINE_CONF_OPTS += --without-xrender
278 endif
280 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
281 WINE_CONF_OPTS += --with-xxf86vm
282 WINE_DEPENDENCIES += xlib_libXxf86vm
283 else
284 WINE_CONF_OPTS += --without-xxf86vm
285 endif
287 ifeq ($(BR2_PACKAGE_ZLIB),y)
288 WINE_CONF_OPTS += --with-zlib
289 WINE_DEPENDENCIES += zlib
290 else
291 WINE_CONF_OPTS += --without-zlib
292 endif
294 # host-gettext is essential for .po file support in host-wine wrc
295 HOST_WINE_DEPENDENCIES += host-gettext
296 HOST_WINE_CONF_OPTS += --with-gettext --with-gettextpo
298 # Wine needs to enable 64-bit build tools on 64-bit host
299 ifeq ($(HOSTARCH),x86_64)
300 HOST_WINE_CONF_OPTS += --enable-win64
301 endif
303 # Wine only needs the host tools to be built, so cut-down the
304 # build time by building just what we need.
305 define HOST_WINE_BUILD_CMDS
306 $(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
307 tools \
308 tools/sfnt2fon \
309 tools/widl \
310 tools/winebuild \
311 tools/winegcc \
312 tools/wmc \
313 tools/wrc
314 endef
316 # Wine only needs its host variant to be built, not that it is
317 # installed, as it uses the tools from the build directory. But
318 # we have no way in Buildroot to state that a host package should
319 # not be installed. So, just provide an noop install command.
320 define HOST_WINE_INSTALL_CMDS
322 endef
324 # We are focused on the cross compiling tools, disable everything else
325 HOST_WINE_CONF_OPTS += \
326 --disable-tests \
327 --disable-win16 \
328 --without-alsa \
329 --without-capi \
330 --without-cms \
331 --without-coreaudio \
332 --without-cups \
333 --without-curses \
334 --without-dbus \
335 --without-fontconfig \
336 --without-gphoto \
337 --without-glu \
338 --without-gnutls \
339 --without-gsm \
340 --without-gstreamer \
341 --without-hal \
342 --without-jpeg \
343 --without-ldap \
344 --without-mpg123 \
345 --without-netapi \
346 --without-openal \
347 --without-opencl \
348 --without-opengl \
349 --without-osmesa \
350 --without-oss \
351 --without-pcap \
352 --without-pulse \
353 --without-png \
354 --without-sane \
355 --without-tiff \
356 --without-v4l \
357 --without-x \
358 --without-xcomposite \
359 --without-xcursor \
360 --without-xinerama \
361 --without-xinput \
362 --without-xinput2 \
363 --without-xml \
364 --without-xrandr \
365 --without-xrender \
366 --without-xshape \
367 --without-xshm \
368 --without-xslt \
369 --without-xxf86vm \
370 --without-zlib
372 $(eval $(autotools-package))
373 $(eval $(host-autotools-package))