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