1 ################################################################################
5 ################################################################################
8 WINE_SOURCE = wine-$(WINE_VERSION).tar.bz2
9 WINE_SITE = http://downloads.sourceforge.net/project/wine/Source
10 WINE_LICENSE = LGPLv2.1+
11 WINE_LICENSE_FILES = COPYING.LIB LICENSE
12 WINE_DEPENDENCIES = host-bison host-flex host-wine
13 # For 0002-detect-ncursesw.patch
16 # Wine needs its own directory structure and tools for cross compiling
18 --with-wine-tools=../host-wine-$(WINE_VERSION) \
33 # Wine uses a wrapper around gcc, and uses the value of --host to
34 # construct the filename of the gcc to call. But for external
35 # toolchains, the GNU_TARGET_NAME tuple that we construct from our
36 # internal variables may differ from the actual gcc prefix for the
37 # external toolchains. So, we have to override whatever the gcc
38 # wrapper believes what the real gcc is named, and force the tuple of
39 # the external toolchain, not the one we compute in GNU_TARGET_NAME.
40 ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
41 WINE_CONF_OPTS += TARGETFLAGS="-b $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))"
44 ifeq ($(BR2_PACKAGE_ALSA_LIB)$(BR2_PACKAGE_ALSA_LIB_SEQ)$(BR2_PACKAGE_ALSA_LIB_RAWMIDI),yyy)
45 WINE_CONF_OPTS += --with-alsa
46 WINE_DEPENDENCIES += alsa-lib
48 WINE_CONF_OPTS += --without-alsa
51 ifeq ($(BR2_PACKAGE_CUPS),y)
52 WINE_CONF_OPTS += --with-cups
53 WINE_DEPENDENCIES += cups
55 WINE_CONF_OPTS += --without-cups
58 ifeq ($(BR2_PACKAGE_DBUS),y)
59 WINE_CONF_OPTS += --with-dbus
60 WINE_DEPENDENCIES += dbus
62 WINE_CONF_OPTS += --without-dbus
65 ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
66 WINE_CONF_OPTS += --with-fontconfig
67 WINE_DEPENDENCIES += fontconfig
69 WINE_CONF_OPTS += --without-fontconfig
72 # To support freetype in wine we also need freetype in host-wine for the cross compiling tools
73 ifeq ($(BR2_PACKAGE_FREETYPE),y)
74 WINE_CONF_OPTS += --with-freetype
75 HOST_WINE_CONF_OPTS += --with-freetype
76 WINE_DEPENDENCIES += freetype
77 HOST_WINE_DEPENDENCIES += host-freetype
79 WINE_CONF_OPTS += --without-freetype
80 HOST_WINE_CONF_OPTS += --without-freetype
83 ifeq ($(BR2_PACKAGE_GNUTLS),y)
84 WINE_CONF_OPTS += --with-gnutls
85 WINE_DEPENDENCIES += gnutls
87 WINE_CONF_OPTS += --without-gnutls
90 ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE),y)
91 WINE_CONF_OPTS += --with-gstreamer
92 WINE_DEPENDENCIES += gst-plugins-base
94 WINE_CONF_OPTS += --without-gstreamer
97 ifeq ($(BR2_PACKAGE_JPEG),y)
98 WINE_CONF_OPTS += --with-jpeg
99 WINE_DEPENDENCIES += jpeg
101 WINE_CONF_OPTS += --without-jpeg
104 ifeq ($(BR2_PACKAGE_LCMS2),y)
105 WINE_CONF_OPTS += --with-cms
106 WINE_DEPENDENCIES += lcms2
108 WINE_CONF_OPTS += --without-cms
111 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
112 WINE_CONF_OPTS += --with-opengl
113 WINE_DEPENDENCIES += libgl
115 WINE_CONF_OPTS += --without-opengl
118 ifeq ($(BR2_PACKAGE_LIBGLU),y)
119 WINE_CONF_OPTS += --with-glu
120 WINE_DEPENDENCIES += libglu
122 WINE_CONF_OPTS += --without-glu
125 ifeq ($(BR2_PACKAGE_LIBPNG),y)
126 WINE_CONF_OPTS += --with-png
127 WINE_DEPENDENCIES += libpng
129 WINE_CONF_OPTS += --without-png
132 ifeq ($(BR2_PACKAGE_LIBV4L),y)
133 WINE_CONF_OPTS += --with-v4l
134 WINE_DEPENDENCIES += libv4l
136 WINE_CONF_OPTS += --without-v4l
139 ifeq ($(BR2_PACKAGE_LIBXML2),y)
140 WINE_CONF_OPTS += --with-xml
141 WINE_DEPENDENCIES += libxml2
143 WINE_CONF_OPTS += --without-xml
146 ifeq ($(BR2_PACKAGE_LIBXSLT),y)
147 WINE_CONF_OPTS += --with-xslt
148 WINE_DEPENDENCIES += libxslt
150 WINE_CONF_OPTS += --without-xslt
153 ifeq ($(BR2_PACKAGE_MPG123),y)
154 WINE_CONF_OPTS += --with-mpg123
155 WINE_DEPENDENCIES += mpg123
157 WINE_CONF_OPTS += --without-mpg123
160 ifeq ($(BR2_PACKAGE_NCURSES),y)
161 WINE_CONF_OPTS += --with-curses
162 WINE_DEPENDENCIES += ncurses
164 WINE_CONF_OPTS += --without-curses
167 ifeq ($(BR2_PACKAGE_OPENLDAP),y)
168 WINE_CONF_OPTS += --with-ldap
169 WINE_DEPENDENCIES += openldap
171 WINE_CONF_OPTS += --without-ldap
174 ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y)
175 WINE_CONF_OPTS += --with-sane
176 WINE_DEPENDENCIES += sane-backends
178 WINE_CONF_OPTS += --without-sane
181 ifeq ($(BR2_PACKAGE_TIFF),y)
182 WINE_CONF_OPTS += --with-tiff
183 WINE_DEPENDENCIES += tiff
185 WINE_CONF_OPTS += --without-tiff
188 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
189 WINE_CONF_OPTS += --with-x
190 WINE_DEPENDENCIES += xlib_libX11
192 WINE_CONF_OPTS += --without-x
195 ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
196 WINE_CONF_OPTS += --with-xcomposite
197 WINE_DEPENDENCIES += xlib_libXcomposite
199 WINE_CONF_OPTS += --without-xcomposite
202 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
203 WINE_CONF_OPTS += --with-xcursor
204 WINE_DEPENDENCIES += xlib_libXcursor
206 WINE_CONF_OPTS += --without-xcursor
209 ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y)
210 WINE_CONF_OPTS += --with-xshape --with-xshm
211 WINE_DEPENDENCIES += xlib_libXext
213 WINE_CONF_OPTS += --without-xshape --without-xshm
216 ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
217 WINE_CONF_OPTS += --with-xinput --with-xinput2
218 WINE_DEPENDENCIES += xlib_libXi
220 WINE_CONF_OPTS += --without-xinput --without-xinput2
223 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
224 WINE_CONF_OPTS += --with-xinerama
225 WINE_DEPENDENCIES += xlib_libXinerama
227 WINE_CONF_OPTS += --without-xinerama
230 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
231 WINE_CONF_OPTS += --with-xrandr
232 WINE_DEPENDENCIES += xlib_libXrandr
234 WINE_CONF_OPTS += --without-xrandr
237 ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y)
238 WINE_CONF_OPTS += --with-xrender
239 WINE_DEPENDENCIES += xlib_libXrender
241 WINE_CONF_OPTS += --without-xrender
244 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
245 WINE_CONF_OPTS += --with-xxf86vm
246 WINE_DEPENDENCIES += xlib_libXxf86vm
248 WINE_CONF_OPTS += --without-xxf86vm
251 ifeq ($(BR2_PACKAGE_ZLIB),y)
252 WINE_CONF_OPTS += --with-zlib
253 WINE_DEPENDENCIES += zlib
255 WINE_CONF_OPTS += --without-zlib
258 # host-gettext is essential for .po file support in host-wine wrc
259 HOST_WINE_DEPENDENCIES += host-gettext
260 HOST_WINE_CONF_OPTS += --with-gettext --with-gettextpo
262 # Wine needs to enable 64-bit build tools on 64-bit host
263 ifeq ($(HOSTARCH),x86_64)
264 HOST_WINE_CONF_OPTS += --enable-win64
267 # Wine only needs the host tools to be built, so cut-down the
268 # build time by building just what we need.
269 define HOST_WINE_BUILD_CMDS
270 $(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
279 # Wine only needs its host variant to be built, not that it is
280 # installed, as it uses the tools from the build directory. But
281 # we have no way in Buildroot to state that a host package should
282 # not be installed. So, just provide an noop install command.
283 define HOST_WINE_INSTALL_CMDS
287 # We are focused on the cross compiling tools, disable everything else
288 HOST_WINE_CONF_OPTS += \
294 --without-coreaudio \
298 --without-fontconfig \
303 --without-gstreamer \
318 --without-xcomposite \
332 $(eval $(autotools-package))
333 $(eval $(host-autotools-package))