# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup muniversal 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup active_variants 1.1 # Please keep the wine-stable, wine-devel, wine-staging and wine-crossover ports as similar as possible. # When updating the version of wine, update wine_gecko and wine_mono to compatible versions # as referenced in the source code. Check here by replacing X.Y with the version: # https://source.winehq.org/git/wine.git/blob/refs/tags/wine-X.Y:/dlls/appwiz.cpl/addons.c # see also http://wiki.winehq.org/Gecko and http://wiki.winehq.org/Mono name wine-devel conflicts wine wine-stable wine-staging wine-crossover set my_name wine version 6.14 revision 0 set branch [lindex [split ${version} .] 0].x license LGPL-2.1+ categories x11 maintainers {gcenx @gcenx} homepage https://www.winehq.org platforms darwin distname ${my_name}-${version} dist_subdir ${my_name} set wine_distfile ${distname}${extract.suffix} worksrcdir wine-${distname} use_parallel_build yes description A Windows API implementation long_description Wine is a compatibility layer capable of running \ Windows applications. \ Instead of simulating internal Windows logic like \ a virtual machine or emulator, Wine translates \ Windows API calls into POSIX calls on-the-fly, \ eliminating the performance and memory penalties \ of other methods and allowing you to cleanly \ integrate Windows applications into your desktop. # GitHub requires TLS v1.2 if {${os.major} > 15} { master_sites https://github.com/wine-mirror/wine/archive/:winesource } else { depends_build-append port:curl fetch { # Manually download the file(s) if they don't exist if {![file exists ${portdbpath}/distfiles/${dist_subdir}/${wine_distfile} ]} { system -W /bin "cd ${portdbpath}/distfiles/${dist_subdir}/ && ${prefix}/bin/curl -LO https://github.com/wine-mirror/wine/archive/${wine_distfile}" } } } extract.only ${wine_distfile} distfiles ${wine_distfile}:winesource checksums ${wine_distfile} \ rmd160 adbf871abaa06bccf6603e372a57f9f910f41b02 \ sha256 34a275d8981262a0e7643f0f8b0543cf20461512c4384c0bde7b1aa0cedf1d56 \ size 41401215 # Note: Most of the X11 libs are dlopen()'d depends_lib port:fontconfig \ port:freetype \ port:FAudio \ port:gnutls \ port:gstreamer1 \ port:gstreamer1-gst-plugins-base \ path:include/turbojpeg.h:libjpeg-turbo \ port:jxrlib \ port:lcms2 \ port:libiconv \ port:libpcap \ port:libpng \ port:libusb \ port:libunwind \ port:libxml2 \ port:libxslt \ port:mpg123 \ port:openal-soft \ port:tiff \ port:wine-gecko \ port:wine-mono depends_build port:bison \ port:flex \ port:mingw-w64 \ port:pkgconfig patch.pre_args -p1 # https://bugs.winehq.org/show_bug.cgi?id=34166#c103 patchfiles-append noflicker.diff pre-configure { if {[variant_exists universal] && [variant_isset universal]} { foreach arch ${universal_archs_to_use} { file mkdir ${worksrcpath}-${arch} } configure.cmd ${worksrcpath}/configure } } # Wine requires the program specified in INSTALL to create intermediate # directories; /usr/bin/install doesn't. # http://bugs.winehq.org/show_bug.cgi?id=35310 configure.install ${worksrcpath}/tools/install-sh configure.args --without-alsa \ --without-capi \ --with-cms \ --with-coreaudio \ --with-cups \ --without-dbus \ --with-faudio \ --with-fontconfig \ --with-freetype \ --with-gettext \ --without-gettextpo \ --without-gphoto \ --with-gnutls \ --without-gsm \ --without-gssapi \ --with-gstreamer \ --without-hal \ --without-inotify \ --with-jpeg \ --with-jxrlib \ --without-krb5 \ --with-ldap \ --with-mingw \ --with-mpg123 \ --without-netapi \ --with-openal \ --with-opencl \ --with-opengl \ --without-osmesa \ --without-oss \ --with-pcap \ --with-png \ --with-pthread \ --without-pulse \ --without-quicktime \ --without-sane \ --with-sdl \ --with-tiff \ --without-udev \ --with-unwind \ --with-usb \ --without-v4l2 \ --without-vkd3d \ --without-xcomposite \ --without-xcursor \ --without-xfixes \ --without-xinerama \ --without-xinput \ --without-xinput2 \ --with-xml \ --without-xrandr \ --without-xrender \ --without-xshape \ --without-xshm \ --with-xslt \ --without-xxf86vm \ --without-x # Wine has a native macOS driver since 1.5.26 so X11 is optional variant x11 { depends_lib-append port:libGLU \ port:mesa \ port:xorg-libX11 \ port:xorg-libXcomposite \ port:xorg-libXcursor \ port:xorg-libXext \ port:xorg-libXi \ port:xorg-libXinerama \ port:xorg-libXrandr \ port:xorg-libXxf86vm \ port:xorg-libsm \ port:xorg-xorgproto \ port:xrender configure.args-delete --without-osmesa \ --without-xcomposite \ --without-xcursor \ --without-xfixes \ --without-xinerama \ --without-xinput \ --without-xinput2 \ --without-xrandr \ --without-xrender \ --without-xshape \ --without-xxf86vm \ --without-x configure.args-append --with-osmesa \ --with-xcomposite \ --with-xcursor \ --with-xfixes \ --with-xinerama \ --with-xinput \ --with-xinput2 \ --with-xrandr \ --with-xrender \ --with-xshape \ --with-xxf86vm \ --with-x \ --x-include=${prefix}/include \ --x-lib=${prefix}/lib } # ffmpeg takes forever to build plus would cause a license change variant ffmpeg { depends_lib-append port:gstreamer1-gst-plugins-good \ port:gstreamer1-gst-plugins-bad \ port:gstreamer1-gst-plugins-ugly \ port:gstreamer1-gst-libav configure.args-delete --without-dbus \ --without-krb5 configure.args-append --with-dbus \ --with-krb5 require_active_variants port:FAudio wma } if {${os.platform} ne "darwin" && (${os.major} >= 9 && ${os.major} <= 18)} { default_variants +x11 } # Standard dlopen is used within wine since 5.6, wine(64) no longer finds dylibs # https://bugs.winehq.org/show_bug.cgi?id=49199 configure.ldflags-append -Wl,-rpath,@loader_path/../../ configure.universal_args set merger_configure_args(x86_64) "--enable-win64" set merger_configure_args(i386) --with-wine64=${workpath}/${worksrcdir}-x86_64 if {${build_arch} eq "x86_64" && ${os.major} >= 19} { macosx_deployment_target "10.14" configure.args-append "--enable-win64" } if {${build_arch} eq "x86_64" && ${os.major} <= 18} { default_variants-append +universal } if {![info exists universal_possible]} { set universal_possible [expr {${os.universal_supported} && [llength ${configure.universal_archs}] >= 2}] } if {${universal_possible} && [variant_isset universal]} { supported_archs i386 x86_64 } elseif {${build_arch} eq "x86_64" && ${os.major} >= 19} { supported_archs x86_64 } else { supported_archs i386 } # wine requires clang >= 3.8 # FSF GCC cannot compile code using Apple's "blocks" language extensions compiler.blacklist-append {*gcc*} {clang < 800} {macports-clang-3.*} compiler.fallback-append macports-clang-5.0 platform darwin { # On macOS, Core Text is used instead of fontconfig since Wine 1.5.10 depends_lib-delete port:fontconfig configure.args-delete --with-fontconfig configure.args-append --without-fontconfig # Vulkan is supported on macOS through MoltenVK since Wine 3.13, but because # it uses Metal it only works on 64-bit if {${os.major} >= 15 && ${universal_possible} && [variant_isset universal]} { depends_lib-append path:lib/libMoltenVK.dylib:MoltenVK depends_skip_archcheck-append MoltenVK \ CX-MoltenVK \ VulkanSDK lappend merger_configure_args(x86_64) --with-vulkan \ ac_cv_lib_soname_MoltenVK=libMoltenVK.dylib \ ac_cv_lib_soname_vulkan= lappend merger_configure_args(i386) --without-vulkan } elseif {${os.major} >= 19} { depends_lib-append path:lib/libMoltenVK.dylib:MoltenVK configure.args-append --with-vulkan \ ac_cv_lib_soname_MoltenVK=libMoltenVK.dylib \ ac_cv_lib_soname_vulkan= } else { configure.args-append --without-vulkan } # ntdll requires "_fstatat" that's not avalible until the 10.10 SDK, since wine-5.9 # https://github.com/wine-staging/wine-staging/commit/762c0e704003f802a5f3470aedd80799cb18c9ef if {${os.major} == 12 || ${os.major} == 13} { depends_build-append port:MacOSX10.11.sdk configure.sdkroot ${prefix}/Developer/SDKs/MacOSX10.11.sdk # Support GPU initialization via Metal, since wine-4.15 # https://github.com/wine-mirror/wine/commit/0699089f0ea65c8d66b2cdcdb0731c432720969e configure.args-append ac_cv_header_Metal_Metal_h= } notes { When using the Mac Driver, it might be useful to enable RetinaMode\ when you're using a high DPI monitor. To do that, open up Wine's\ Registry Editor: wine regedit and then navigate to: [HKEY_CURRENT_USER\Software\Wine\Mac Driver] and then set "RetinaMode" to "y". You may also want to adjust your\ DPI under the Graphics tab in winecfg.} # Even using MacOSX10.11.sdk wine-preloader has issue reserve memory causing crashes if {${os.major} < 12} { known_fail yes archive_sites distfiles depends_build depends_lib pre-fetch { ui_error "${name} @${version} requires Mac OS X 10.8 or later." return -code error "incompatible Mac OS X version" } } elseif {${os.major} > 18} { notes-append { Only wine64 will be available on macOS 10.15 and above} } } if {${os.endian} eq "big"} { known_fail yes archive_sites distfiles depends_build depends_lib pre-fetch { ui_error "${name} can only be used on an Intel Mac or other computer with a little-endian processor." return -code error "incompatible processor" } } post-destroot { # Add custom tool for easy launching explorer xinstall ${worksrcpath}/tools/wineapploader.in ${destroot}${prefix}/bin/explorer set docdir ${prefix}/share/doc/${my_name} xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} \ ANNOUNCE \ AUTHORS \ COPYING.LIB \ LICENSE \ README \ ${destroot}${docdir} } if {${universal_possible} && [variant_isset universal]} { notes-append " \n Wine supports both 32-bit and 64-bit now. It is compatible with your\ existing 32-bit wine prefix, but it will now default to 64-bit when you\ create a new wine prefix. The architecture can be selected using the\ WINEARCH environment variable which can be set to either \"win32\" or\ \"win64\". To create a new pure 32-bit prefix, you can run: \$ WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg See the Wine FAQ for details: https://wiki.winehq.org/FAQ#Wineprefixes " } livecheck.type regex livecheck.regex {"/announce/([^"]+)"}