# -*- 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 name libsdl2 github.setup libsdl-org SDL 2.30.3 release- categories devel multimedia platforms macosx freebsd license zlib maintainers {jmr @jmroot} openmaintainer description Cross-platform multi-media development API long_description \ Simple DirectMedia Layer is a cross-platform development library \ designed to provide low level access to audio, keyboard, mouse, \ joystick, and graphics hardware via OpenGL and Direct3D. homepage https://www.libsdl.org/ github.tarball_from releases distname SDL2-${version} checksums rmd160 e71dd4ba0ccf517375e2f8dc7732b2396e985dc2 \ sha256 820440072f8f5b50188c1dae104f2ad25984de268785be40c41a099a510f0aec depends_lib port:libiconv configure.args --without-x \ --disable-jack \ --disable-esd \ --disable-pulseaudio \ --disable-libsamplerate \ --disable-dbus build.args V=1 if {${os.subplatform} eq "macosx" && ${os.major} <= 10} { if {${configure.build_arch} in [list ppc ppc64]} { depends_lib port:libsdl2-powerpc } else { depends_lib port:libsdl2-snowleopard } distfiles patchfiles use_configure no build {} destroot { xinstall -d ${destroot}${prefix}/share/doc/${name} system "echo $name is a stub port > ${destroot}${prefix}/share/doc/${name}/README" } } else { conflicts libsdl2-powerpc libsdl2-snowleopard platform macosx { if {${os.major} <= 12} { # Patch to revert fix for issue: https://github.com/libsdl-org/SDL/issues/6948 # Necessary to fix builds for 10.7/10.8 patchfiles-append patch-revert-issue-6948.diff } # Uses ObjC ARC, which can't be used with the legacy runtime (as # used on 32-bit) before LLVM 3.8, which is roughly Xcode 7.3. compiler.blacklist *gcc* if {(!($universal_possible && [variant_isset universal]) && ${configure.build_arch} eq "i386") || (($universal_possible && [variant_isset universal]) && "i386" in ${configure.universal_archs})} { compiler.blacklist-append {clang < 703} } else { compiler.blacklist-append {clang < 211} } } variant x11 { configure.args-delete --without-x configure.args-append --x-includes=${prefix}/include \ --x-libraries=${prefix}/lib \ --disable-x11-shared depends_lib-append \ port:xorg-libX11 \ port:xorg-libXcursor \ port:xorg-libXext \ port:xorg-libXi \ port:xorg-libXinerama \ port:xorg-libXrandr \ port:xorg-libXScrnSaver \ port:xorg-libXxf86vm \ port:xrender } if {${os.subplatform} ne "macosx"} { default_variants +x11 } post-destroot { set docdir ${prefix}/share/doc/${name} xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} BUGS.txt CREDITS.txt LICENSE.txt \ README-SDL.txt TODO.txt WhatsNew.txt \ {*}[glob ${worksrcpath}/docs/*.md] ${destroot}${docdir} } }