# -*- 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.3 release- 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 e71dd4ba0ccf517375e2f8dc7732b2396e985dc2 \ sha256 820440072f8f5b50188c1dae104f2ad25984de268785be40c41a099a510f0aec \ size 7425677 # Mesa dependency needed: https://trac.macports.org/ticket/61943 depends_lib-append port:mesa \ port:xorg-libX11 \ port:xorg-libXcursor \ 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-libsamplerate \ --disable-dbus \ --disable-esd \ --disable-pulseaudio \ --disable-video-cocoa \ --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 } 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} }