python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / wine / wine.mk
blobf9b2e1a3ff2711e92e0e50f1f1973922a767b905
1 ################################################################################
3 # wine
5 ################################################################################
7 WINE_VERSION = 2.0
8 WINE_SOURCE = wine-$(WINE_VERSION).tar.bz2
9 WINE_SITE = https://dl.winehq.org/wine/source/2.0
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 $(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_GST1_PLUGINS_BASE),y)
89 WINE_CONF_OPTS += --with-gstreamer
90 WINE_DEPENDENCIES += gst1-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_HAS_UDEV),y)
225 WINE_CONF_OPTS += --with-udev
226 WINE_DEPENDENCIES += udev
227 else
228 WINE_CONF_OPTS += --without-udev
229 endif
231 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
232 WINE_CONF_OPTS += --with-x
233 WINE_DEPENDENCIES += xlib_libX11
234 else
235 WINE_CONF_OPTS += --without-x
236 endif
238 ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
239 WINE_CONF_OPTS += --with-xcomposite
240 WINE_DEPENDENCIES += xlib_libXcomposite
241 else
242 WINE_CONF_OPTS += --without-xcomposite
243 endif
245 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
246 WINE_CONF_OPTS += --with-xcursor
247 WINE_DEPENDENCIES += xlib_libXcursor
248 else
249 WINE_CONF_OPTS += --without-xcursor
250 endif
252 ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y)
253 WINE_CONF_OPTS += --with-xshape --with-xshm
254 WINE_DEPENDENCIES += xlib_libXext
255 else
256 WINE_CONF_OPTS += --without-xshape --without-xshm
257 endif
259 ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
260 WINE_CONF_OPTS += --with-xinput --with-xinput2
261 WINE_DEPENDENCIES += xlib_libXi
262 else
263 WINE_CONF_OPTS += --without-xinput --without-xinput2
264 endif
266 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
267 WINE_CONF_OPTS += --with-xinerama
268 WINE_DEPENDENCIES += xlib_libXinerama
269 else
270 WINE_CONF_OPTS += --without-xinerama
271 endif
273 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
274 WINE_CONF_OPTS += --with-xrandr
275 WINE_DEPENDENCIES += xlib_libXrandr
276 else
277 WINE_CONF_OPTS += --without-xrandr
278 endif
280 ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y)
281 WINE_CONF_OPTS += --with-xrender
282 WINE_DEPENDENCIES += xlib_libXrender
283 else
284 WINE_CONF_OPTS += --without-xrender
285 endif
287 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
288 WINE_CONF_OPTS += --with-xxf86vm
289 WINE_DEPENDENCIES += xlib_libXxf86vm
290 else
291 WINE_CONF_OPTS += --without-xxf86vm
292 endif
294 ifeq ($(BR2_PACKAGE_ZLIB),y)
295 WINE_CONF_OPTS += --with-zlib
296 WINE_DEPENDENCIES += zlib
297 else
298 WINE_CONF_OPTS += --without-zlib
299 endif
301 # host-gettext is essential for .po file support in host-wine wrc
302 HOST_WINE_DEPENDENCIES += host-gettext
303 HOST_WINE_CONF_OPTS += --with-gettext --with-gettextpo
305 # Wine needs to enable 64-bit build tools on 64-bit host
306 ifeq ($(HOSTARCH),x86_64)
307 HOST_WINE_CONF_OPTS += --enable-win64
308 endif
310 # Wine only needs the host tools to be built, so cut-down the
311 # build time by building just what we need.
312 define HOST_WINE_BUILD_CMDS
313 $(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
314 tools \
315 tools/sfnt2fon \
316 tools/widl \
317 tools/winebuild \
318 tools/winegcc \
319 tools/wmc \
320 tools/wrc
321 endef
323 # Wine only needs its host variant to be built, not that it is
324 # installed, as it uses the tools from the build directory. But
325 # we have no way in Buildroot to state that a host package should
326 # not be installed. So, just provide an noop install command.
327 define HOST_WINE_INSTALL_CMDS
329 endef
331 # We are focused on the cross compiling tools, disable everything else
332 HOST_WINE_CONF_OPTS += \
333 --disable-tests \
334 --disable-win16 \
335 --without-alsa \
336 --without-capi \
337 --without-cms \
338 --without-coreaudio \
339 --without-cups \
340 --without-curses \
341 --without-dbus \
342 --without-fontconfig \
343 --without-gphoto \
344 --without-glu \
345 --without-gnutls \
346 --without-gsm \
347 --without-gstreamer \
348 --without-hal \
349 --without-jpeg \
350 --without-ldap \
351 --without-mpg123 \
352 --without-netapi \
353 --without-openal \
354 --without-opencl \
355 --without-opengl \
356 --without-osmesa \
357 --without-oss \
358 --without-pcap \
359 --without-pulse \
360 --without-png \
361 --without-sane \
362 --without-tiff \
363 --without-v4l \
364 --without-x \
365 --without-xcomposite \
366 --without-xcursor \
367 --without-xinerama \
368 --without-xinput \
369 --without-xinput2 \
370 --without-xml \
371 --without-xrandr \
372 --without-xrender \
373 --without-xshape \
374 --without-xshm \
375 --without-xslt \
376 --without-xxf86vm \
377 --without-zlib
379 $(eval $(autotools-package))
380 $(eval $(host-autotools-package))