# -*- 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 # $Id: Portfile 153912 2016-10-15 19:38:15Z jwa@macports.org $ PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 # Please keep the wine, wine-devel and wine-crossover ports as similar as possible. # When updating the version of wine, update wine_gecko to a compatible version # per the table at http://wiki.winehq.org/Gecko and update wine-mono as well; # see http://wiki.winehq.org/Mono and http://sourceforge.net/projects/wine/files/Wine%20Mono/ name wine-devel conflicts wine wine-crossover set my_name wine version 1.9.21 set branch [join [lrange [split ${version} .] 0 1] .] license LGPL-2.1+ categories x11 maintainers ryandesign jwa openmaintainer homepage http://www.winehq.org/ platforms darwin use_bzip2 yes distname ${my_name}-${version} dist_subdir ${my_name} set wine_distfile ${distname}${extract.suffix} set wine_gecko_version 2.47 set wine_gecko_distfile wine_gecko-${wine_gecko_version}-x86.msi set wine_mono_version 4.6.3 set wine_mono_distfile wine-mono-${wine_mono_version}.msi build.target depend all use_parallel_build yes description Wine Is Not an Emulator long_description Wine is an implementation of the Windows APIs on top of X11. master_sites http://mirrors.ibiblio.org/wine/source/${branch}/:winesource \ http://dl.winehq.org/wine/source/${branch}/:winesource \ sourceforge:project/wine/Source/:winesource \ http://dl.winehq.org/wine/wine-gecko/${wine_gecko_version}/:winegecko \ sourceforge:project/wine/Wine%20Gecko/${wine_gecko_version}/:winegecko \ http://dl.winehq.org/wine/wine-mono/${wine_mono_version}/:winemono \ sourceforge:project/wine/Wine%20Mono/${wine_mono_version}/:winemono extract.only ${wine_distfile} distfiles ${wine_distfile}:winesource \ ${wine_gecko_distfile}:winegecko \ ${wine_mono_distfile}:winemono checksums ${wine_distfile} \ rmd160 47ac32022d1e51c76172a7e28b9d0631470896a1 \ sha256 8b6dd027021be9dd646d65bd19c0334c36dcf9403d8ed4a6e9460b6703efade1 \ ${wine_gecko_distfile} \ rmd160 abf7cc78b49dd0623bc8fe87ae0e32bb8694e13d \ sha256 3b8a361f5d63952d21caafd74e849a774994822fb96c5922b01d554f1677643a \ ${wine_mono_distfile} \ rmd160 2dff4296d74c29838219dcd50aaf928f1eb8c8ab \ sha256 f883e88ae78c7ea3d887c24023aa1ed03bb71a83f717c6595abf18b31fef28b9 # Note: Most of the X11 libs are dlopen()'d depends_lib port:expat \ port:fontconfig \ port:freetype \ port:gstreamer1 \ port:gstreamer1-gst-plugins-base \ port:jpeg \ port:lcms2 \ port:libiconv \ port:libpcap \ port:libpng \ port:libxml2 \ port:libxslt \ port:ncurses \ port:gnutls \ port:tiff \ port:zlib \ port:xorg-libsm \ port:xorg-libXcomposite \ port:xorg-libXcursor \ port:xorg-libXi \ port:xorg-libXinerama \ port:xorg-libXrandr \ port:xorg-libXxf86vm \ port:xrender \ port:libGLU \ port:mesa depends_build port:bison \ port:flex \ port:pkgconfig patchfiles BOOL.patch \ cups_headers.patch \ mach_machine.patch \ tiger-shell.patch # 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.ldflags-append -framework CoreServices \ -lz configure.args --without-alsa \ --without-capi \ --with-cms \ --with-coreaudio \ --with-cups \ --with-curses \ --with-fontconfig \ --with-freetype \ --without-gphoto \ --with-glu \ --with-gnutls \ --without-gsm \ --without-hal \ --with-jpeg \ --without-ldap \ --without-mpg123 \ --without-openal \ --with-opengl \ --without-oss \ --with-png \ --with-pthread \ --without-sane \ --with-tiff \ --without-v4l \ --with-xcomposite \ --with-xcursor \ --with-xinerama \ --with-xinput \ --with-xml \ --with-xrandr \ --with-xrender \ --with-xshape \ --with-xslt \ --with-xxf86vm \ --with-x \ --x-include=${prefix}/include \ --x-lib=${prefix}/lib # 64-bit Wine exists for Linux, but does not work on OS X. # http://www.winehq.org/pipermail/wine-devel/2014-February/103074.html supported_archs i386 # llvm-gcc-4.2 doesn't respect force_align_arg_pointer; wine builds but fails to run # http://bugs.winehq.org/show_bug.cgi?id=28030 compiler.blacklist-append *llvm-gcc-4.2 # clang < 3.1 fails to build wine with "error: invalid operand for instruction lretw" # http://bugs.winehq.org/show_bug.cgi?id=32872 # clang < 3.2 have code generation problems: # http://llvm.org/bugs/show_bug.cgi?id=9707 compiler.blacklist-append {clang < 500} # FSF GCC cannot compile code using Apple's "blocks" language extensions compiler.blacklist-append macports-gcc-* platform darwin { if {${os.major} == 9} { # Fix "Xcode 3.x cannot build 16-bit code correctly. Use --disable-win16 if you don't need 16-bit support." # Only affects Xcode 3.0.x and 3.1.x, not 3.2.x. # See http://bugs.winehq.org/show_bug.cgi?id=14920 configure.args-append --disable-win16 } if {${os.major} >= 11} { # Needed or wine will SIGBUS configure.ldflags-append -Wl,-no_pie } } pre-fetch { if {${os.endian} eq "big"} { ui_error "${name} can only be used on an Intel Mac or other computer with a little-endian processor." return -code error "incompatible processor" } if {${os.platform} eq "darwin" && ${os.major} < 9} { ui_error "${name} ${version} requires OS X 10.5 or greater." return -code error "incompatible OS X version" } } post-destroot { xinstall -d ${destroot}${prefix}/libexec/wine file rename ${destroot}${prefix}/bin/wine ${destroot}${prefix}/libexec/wine/wine xinstall ${filespath}/wine.in ${destroot}${prefix}/bin/wine reinplace s|@PREFIX@|${prefix}|g ${destroot}${prefix}/bin/wine xinstall -d ${destroot}${prefix}/share/wine/gecko xinstall -m 644 ${distpath}/${wine_gecko_distfile} ${destroot}${prefix}/share/wine/gecko xinstall -d ${destroot}${prefix}/share/wine/mono xinstall -m 644 ${distpath}/${wine_mono_distfile} ${destroot}${prefix}/share/wine/mono set docdir ${prefix}/share/doc/${my_name} xinstall -d ${destroot}${docdir} xinstall -m 644 -W ${worksrcpath} \ ANNOUNCE \ AUTHORS \ COPYING.LIB \ LICENSE \ README \ ${destroot}${docdir} } livecheck.type regex livecheck.regex {"/announce/([0-9]+\.[0-9]*([13579]|[02468]-rc\d+)(\.[0-9]+)*)"}