# -*- 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 compiler_blacklist_versions 1.0 PortGroup github 1.0 PortGroup muniversal 1.1 # Keep the wine-stable, wine-devel and wine-crossover portfiles as similar as possible. github.setup wine-mirror wine 9.0 wine- github.tarball_from archive name wine-stable conflicts wine-devel wine-staging wine-crossover set my_name wine revision 1 platforms {darwin >= 19} set branch [lindex [split ${version} .] 0].0 license LGPL-2.1+ categories emulators supported_archs x86_64 maintainers {@Gcenx gmail.com:gcenx83} homepage https://www.winehq.org dist_subdir ${my_name} 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. checksums \ rmd160 8a74032d3612e613ef5b97e9d2908ac612fa8d93 \ sha256 90cd86d1203a7b1d304ae15461bbe0cbf1fd24feb407b551d011cc6d2967eb3f \ size 48912704 depends_build \ port:bison \ bin:flex:flex \ port:gettext \ port:mingw-w64 \ path:bin/pkg-config:pkgconfig depends_lib \ port:freetype \ port:gettext-runtime \ path:lib/pkgconfig/gnutls.pc:gnutls \ path:lib/libMoltenVK.dylib:MoltenVK-latest \ port:libpcap \ port:libsdl2 depends_run \ port:mingw-w64-wine-gecko-2.47.4 \ port:mingw-w64-wine-mono-8.1.0 patch.pre_args-replace -p0 -p1 patchfiles-append \ 0001-winemac.drv-no-flicker.diff \ 0002-ntdll-workarond-sendmsg-bug-on-macos.diff \ 0003-winemac.drv-fix_use-after-free_in_macdrv_copy_pasteboard_types.diff # Some required hacks to make wine work better on macOS & Rosetta2 patchfiles-append \ macos_hacks.diff # ntdll: Fix macOS build errors with Xcode 16. # https://gitlab.winehq.org/wine/wine/-/merge_requests/5871 patchfiles-append \ 5871.diff # 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.x86_64 \ --enable-archs=i386,x86_64 \ --enable-win64 configure.args \ --disable-tests \ --without-alsa \ --without-capi \ --with-coreaudio \ --with-cups \ --without-dbus \ --without-fontconfig \ --with-freetype \ --with-gettext \ --without-gettextpo \ --without-gphoto \ --with-gnutls \ --without-gssapi \ --without-gstreamer \ --without-inotify \ --without-krb5 \ --with-mingw \ --without-netapi \ --with-opencl \ --with-opengl \ --without-oss \ --with-pcap \ --with-pcsclite \ --with-pthread \ --without-pulse \ --without-sane \ --with-sdl \ --without-udev \ --with-unwind \ --without-usb \ --without-v4l2 \ --with-vulkan \ --without-wayland \ --without-x configure.env.x86_64-append ac_cv_lib_soname_vulkan= # We need to tell the linker to add MacPorts to the rpath stack. configure.ldflags-append -Wl,-rpath,${compiler.library_path} # 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.*} if {${os.major} > 23} { # Xcode16 default SDK causes the build to fail so fallback to a working SDK configure.sdk_version 14 if {${configure.sdkroot} != "${developer_dir}/SDKs/MacOSX${configure.sdk_version}.sdk"} { pre-fetch { error "Building ${name} requires the MacOSX${configure.sdk_version}.sdk to be present in ${developer_dir}/SDKs/" } } } # Makes destroot take significantly longer variant dev description "Install ${subport} development environment" { build.target all destroot.target-append install-dev } variant gphoto description "Build ${subport} with support for digital cameras" { depends_lib-append port:libgphoto2 configure.args-replace --without-gphoto --with-gphoto } variant gstreamer description "Build ${subport} with GStreamer, for multimedia support" { depends_lib-append port:gstreamer1 port:gstreamer1-gst-plugins-base port:gstreamer1-gst-plugins-good \ port:gstreamer1-gst-plugins-bad port:gstreamer1-gst-plugins-ugly port:gstreamer1-gst-libav configure.args-replace --without-gstreamer --with-gstreamer } variant kerberos description "Build ${subport} with Kerberos, for network authentication protocol support" { depends_lib-append port:kerberos5 configure.args-replace --without-krb5 --with-krb5 } default_variants +gstreamer triplet.add_build cross triplet.add_host none # macports-base injects a number of flags that now propagate to mingw-gcc this causes the build to fail since, wine-7.21 # https://gitlab.winehq.org/wine/wine/-/commit/b1f59bc679a8c2dea18a6789a5b9b1a1ae825129 compiler.limit_flags yes muniversal.arch_flag no muniversal.arch_compiler yes configure.ldflags-delete -L${compiler.library_path} configure.optflags -g -O2 configure.env-append "CROSSCFLAGS=${configure.optflags}" # Were only installing wine not the development files destroot.target install-lib post-destroot { set docdir ${prefix}/share/doc/${my_name} xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} \ ANNOUNCE.md \ AUTHORS \ COPYING.LIB \ LICENSE \ README.md \ ${destroot}${docdir} } pre-activate { if {${os.major} == 19 && ${os.minor} < 4 && ${os.platform} eq "darwin"} { ui_error "You must first update to macOS 10.15.4." return -code error "You must first update to macOS 10.15.4." } } livecheck.url ${homepage} livecheck.type regex livecheck.regex {"/announce/([0-9]+\.0(\.[0-9]+)*)"}