# -*- 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-powerpc conflicts libsdl2-snowleopard github.setup libsdl-org SDL 2.30.9 release- revision 0 categories devel multimedia platforms {darwin < 11} supported_archs ppc ppc64 license zlib maintainers {@barracuda156 gmail.com:vital.had} 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. This port \ is aimed at supporting macOS PowerPC and uses X11 backend. homepage https://www.libsdl.org github.tarball_from releases distname SDL2-${version} checksums rmd160 7d0e295a967e93d159bc8563e98a44a5dee2677a \ sha256 24b574f71c87a763f50704bbb630cbe38298d544a1f890f099a4696b1d6beba4 \ size 7681555 depends_lib-append port:xorg-libX11 \ port:xorg-libXcursor \ port:xorg-libXfixes \ port:xorg-libXi \ port:xorg-libXinerama \ port:xorg-libXrandr \ port:xorg-libXScrnSaver \ port:xorg-libXxf86vm \ port:xrender # xorg-server does not build presently on any PowerPC macOS. depends_run-append port:xorg-server-legacy configure.args-append \ --disable-dbus \ --disable-esd \ --disable-libsamplerate \ --disable-pulseaudio \ --disable-video-cocoa \ --disable-video-opengl \ --disable-x11-shared \ --enable-video-x11 \ --x-includes=${prefix}/include \ --x-libraries=${prefix}/lib # Disable Jack until this is fixed: # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61759 configure.args-append \ --disable-jack # Should be fixable once this is backported: # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522 # Until then, disable it. configure.args-append \ --disable-joystick # FIXME: look into fixing CoreAudio module for Tiger. if {${os.platform} eq "darwin" && ${os.major} < 9} { configure.args-append \ --disable-audio \ --disable-haptic \ --disable-hidapi \ --disable-hidapi-joystick \ --disable-locale } build.args V=1 # Disable broken compilers: compiler.blacklist *clang* *gcc-4.* # Fix-ups for PowerPC systems: patchfiles-append 0001-Fixes-for-PowerPC.patch # Fix building against Macports X11. patchfiles-append 0002-fix-x11.diff # To be dropped once this is backported: # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522 patchfiles-append 0003-hidapi-revert-a-commit-that-triggers-ICE-with-GCC.patch # Config header hardcodes wrong paths. post-patch { reinplace "s|@PREFIX@|${prefix}|g" \ ${worksrcpath}/include/SDL_config_macosx.h \ ${worksrcpath}/src/video/x11/SDL_x11opengl.c } variant dbus description "Enable DBus support" { depends_lib-append \ port:dbus configure.args-replace \ --disable-dbus --enable-dbus } # Not clear why, but enabling OpenGL may lead to system freezes. # For now, do not enable by default. variant opengl description "Enable OpenGL support" { # Mesa dependency needed: https://trac.macports.org/ticket/61943 depends_lib-append \ port:mesa configure.args-replace \ --disable-video-opengl --enable-video-opengl } variant pulseaudio description "Build with PulseAudio support" { depends_lib-append \ port:pulseaudio configure.args-replace \ --disable-pulseaudio --enable-pulseaudio } variant samplerate description "Build with libsamplerate support" { depends_lib-append \ port:libsamplerate configure.args-replace \ --disable-libsamplerate --enable-libsamplerate } default_variants-append \ +opengl 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} }