The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / wine / wine.mk
1 ################################################################################
2 #
3 # wine
4 #
5 ################################################################################
6
7 WINE_VERSION = 1.6.2
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
14 WINE_AUTORECONF = YES
15
16 # Wine needs its own directory structure and tools for cross compiling
17 WINE_CONF_OPTS = \
18         --with-wine-tools=../host-wine-$(WINE_VERSION) \
19         --disable-tests \
20         --disable-win64 \
21         --without-capi \
22         --without-coreaudio \
23         --without-gettext \
24         --without-gettextpo \
25         --without-gphoto \
26         --without-gsm \
27         --without-hal \
28         --without-openal \
29         --without-opencl \
30         --without-osmesa \
31         --without-oss
32
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))"
42 endif
43
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
47 else
48 WINE_CONF_OPTS += --without-alsa
49 endif
50
51 ifeq ($(BR2_PACKAGE_CUPS),y)
52 WINE_CONF_OPTS += --with-cups
53 WINE_DEPENDENCIES += cups
54 else
55 WINE_CONF_OPTS += --without-cups
56 endif
57
58 ifeq ($(BR2_PACKAGE_DBUS),y)
59 WINE_CONF_OPTS += --with-dbus
60 WINE_DEPENDENCIES += dbus
61 else
62 WINE_CONF_OPTS += --without-dbus
63 endif
64
65 ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
66 WINE_CONF_OPTS += --with-fontconfig
67 WINE_DEPENDENCIES += fontconfig
68 else
69 WINE_CONF_OPTS += --without-fontconfig
70 endif
71
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
78 else
79 WINE_CONF_OPTS += --without-freetype
80 HOST_WINE_CONF_OPTS += --without-freetype
81 endif
82
83 ifeq ($(BR2_PACKAGE_GNUTLS),y)
84 WINE_CONF_OPTS += --with-gnutls
85 WINE_DEPENDENCIES += gnutls
86 else
87 WINE_CONF_OPTS += --without-gnutls
88 endif
89
90 ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE),y)
91 WINE_CONF_OPTS += --with-gstreamer
92 WINE_DEPENDENCIES += gst-plugins-base
93 else
94 WINE_CONF_OPTS += --without-gstreamer
95 endif
96
97 ifeq ($(BR2_PACKAGE_JPEG),y)
98 WINE_CONF_OPTS += --with-jpeg
99 WINE_DEPENDENCIES += jpeg
100 else
101 WINE_CONF_OPTS += --without-jpeg
102 endif
103
104 ifeq ($(BR2_PACKAGE_LCMS2),y)
105 WINE_CONF_OPTS += --with-cms
106 WINE_DEPENDENCIES += lcms2
107 else
108 WINE_CONF_OPTS += --without-cms
109 endif
110
111 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
112 WINE_CONF_OPTS += --with-opengl
113 WINE_DEPENDENCIES += libgl
114 else
115 WINE_CONF_OPTS += --without-opengl
116 endif
117
118 ifeq ($(BR2_PACKAGE_LIBGLU),y)
119 WINE_CONF_OPTS += --with-glu
120 WINE_DEPENDENCIES += libglu
121 else
122 WINE_CONF_OPTS += --without-glu
123 endif
124
125 ifeq ($(BR2_PACKAGE_LIBPNG),y)
126 WINE_CONF_OPTS += --with-png
127 WINE_DEPENDENCIES += libpng
128 else
129 WINE_CONF_OPTS += --without-png
130 endif
131
132 ifeq ($(BR2_PACKAGE_LIBV4L),y)
133 WINE_CONF_OPTS += --with-v4l
134 WINE_DEPENDENCIES += libv4l
135 else
136 WINE_CONF_OPTS += --without-v4l
137 endif
138
139 ifeq ($(BR2_PACKAGE_LIBXML2),y)
140 WINE_CONF_OPTS += --with-xml
141 WINE_DEPENDENCIES += libxml2
142 else
143 WINE_CONF_OPTS += --without-xml
144 endif
145
146 ifeq ($(BR2_PACKAGE_LIBXSLT),y)
147 WINE_CONF_OPTS += --with-xslt
148 WINE_DEPENDENCIES += libxslt
149 else
150 WINE_CONF_OPTS += --without-xslt
151 endif
152
153 ifeq ($(BR2_PACKAGE_MPG123),y)
154 WINE_CONF_OPTS += --with-mpg123
155 WINE_DEPENDENCIES += mpg123
156 else
157 WINE_CONF_OPTS += --without-mpg123
158 endif
159
160 ifeq ($(BR2_PACKAGE_NCURSES),y)
161 WINE_CONF_OPTS += --with-curses
162 WINE_DEPENDENCIES += ncurses
163 else
164 WINE_CONF_OPTS += --without-curses
165 endif
166
167 ifeq ($(BR2_PACKAGE_OPENLDAP),y)
168 WINE_CONF_OPTS += --with-ldap
169 WINE_DEPENDENCIES += openldap
170 else
171 WINE_CONF_OPTS += --without-ldap
172 endif
173
174 ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y)
175 WINE_CONF_OPTS += --with-sane
176 WINE_DEPENDENCIES += sane-backends
177 else
178 WINE_CONF_OPTS += --without-sane
179 endif
180
181 ifeq ($(BR2_PACKAGE_TIFF),y)
182 WINE_CONF_OPTS += --with-tiff
183 WINE_DEPENDENCIES += tiff
184 else
185 WINE_CONF_OPTS += --without-tiff
186 endif
187
188 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
189 WINE_CONF_OPTS += --with-x
190 WINE_DEPENDENCIES += xlib_libX11
191 else
192 WINE_CONF_OPTS += --without-x
193 endif
194
195 ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
196 WINE_CONF_OPTS += --with-xcomposite
197 WINE_DEPENDENCIES += xlib_libXcomposite
198 else
199 WINE_CONF_OPTS += --without-xcomposite
200 endif
201
202 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
203 WINE_CONF_OPTS += --with-xcursor
204 WINE_DEPENDENCIES += xlib_libXcursor
205 else
206 WINE_CONF_OPTS += --without-xcursor
207 endif
208
209 ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y)
210 WINE_CONF_OPTS += --with-xshape --with-xshm
211 WINE_DEPENDENCIES += xlib_libXext
212 else
213 WINE_CONF_OPTS += --without-xshape --without-xshm
214 endif
215
216 ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
217 WINE_CONF_OPTS += --with-xinput --with-xinput2
218 WINE_DEPENDENCIES += xlib_libXi
219 else
220 WINE_CONF_OPTS += --without-xinput --without-xinput2
221 endif
222
223 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
224 WINE_CONF_OPTS += --with-xinerama
225 WINE_DEPENDENCIES += xlib_libXinerama
226 else
227 WINE_CONF_OPTS += --without-xinerama
228 endif
229
230 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
231 WINE_CONF_OPTS += --with-xrandr
232 WINE_DEPENDENCIES += xlib_libXrandr
233 else
234 WINE_CONF_OPTS += --without-xrandr
235 endif
236
237 ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y)
238 WINE_CONF_OPTS += --with-xrender
239 WINE_DEPENDENCIES += xlib_libXrender
240 else
241 WINE_CONF_OPTS += --without-xrender
242 endif
243
244 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
245 WINE_CONF_OPTS += --with-xxf86vm
246 WINE_DEPENDENCIES += xlib_libXxf86vm
247 else
248 WINE_CONF_OPTS += --without-xxf86vm
249 endif
250
251 ifeq ($(BR2_PACKAGE_ZLIB),y)
252 WINE_CONF_OPTS += --with-zlib
253 WINE_DEPENDENCIES += zlib
254 else
255 WINE_CONF_OPTS += --without-zlib
256 endif
257
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
261
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
265 endif
266
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) \
271           tools \
272           tools/widl \
273           tools/winebuild \
274           tools/winegcc \
275           tools/wmc \
276           tools/wrc
277 endef
278
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
284         :
285 endef
286
287 # We are focused on the cross compiling tools, disable everything else
288 HOST_WINE_CONF_OPTS += \
289         --disable-tests \
290         --disable-win16 \
291         --without-alsa \
292         --without-capi \
293         --without-cms \
294         --without-coreaudio \
295         --without-cups \
296         --without-curses \
297         --without-dbus \
298         --without-fontconfig \
299         --without-gphoto \
300         --without-glu \
301         --without-gnutls \
302         --without-gsm \
303         --without-gstreamer \
304         --without-hal \
305         --without-jpeg \
306         --without-ldap \
307         --without-mpg123 \
308         --without-openal \
309         --without-opencl \
310         --without-opengl \
311         --without-osmesa \
312         --without-oss \
313         --without-png \
314         --without-sane \
315         --without-tiff \
316         --without-v4l \
317         --without-x \
318         --without-xcomposite \
319         --without-xcursor \
320         --without-xinerama \
321         --without-xinput \
322         --without-xinput2 \
323         --without-xml \
324         --without-xrandr \
325         --without-xrender \
326         --without-xshape \
327         --without-xshm \
328         --without-xslt \
329         --without-xxf86vm \
330         --without-zlib
331
332 $(eval $(autotools-package))
333 $(eval $(host-autotools-package))