# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortGroup compiler_blacklist_versions 1.0
PortGroup xcodeversion 1.0
categories devel multimedia
maintainers {jmr @jmroot} openmaintainer
description Cross-platform multi-media development API
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 http://www.libsdl.org/
master_sites ${homepage}release/
distname ${my_name}-${version}
checksums rmd160 b35818cbf8eaf0c9c4d3b6d7a293c05a368366b2 \
sha256 b4656c13a1f0d0023ae2f4a9cf08ec92fffb464e0f24238337784159b8b91d57
# use of undeclared identifier 'NSEventSubtypeMouseEvent'
patchfiles 10.11-fix.patch
configure.args --without-x
compiler.blacklist *gcc* { clang < 211 }
minimum_xcodeversions {11 4.3}
# Build requires at least 10.7.3 SDK, even when targeting 10.6
set lion_sdkpath ${developer_dir}/SDKs/MacOSX10.7.sdk
if {[file exists $lion_sdkpath]} {
configure.sdkroot $lion_sdkpath
error "Building $name @${version} on Mac OS X 10.6 requires the MacOSX10.7.sdk to be present in ${developer_dir}/SDKs/"
configure.args-delete --without-x
configure.args-append --x-includes=${prefix}/include \
--x-libraries=${prefix}/lib \
port:xorg-libXScrnSaver \
if {${os.subplatform} ne "macosx"} {
set docdir ${prefix}/share/doc/${name}
xinstall -d ${destroot}${docdir}
xinstall -m 0644 -W ${worksrcpath} BUGS.txt COPYING.txt CREDITS.txt \
README.txt README-SDL.txt TODO.txt WhatsNew.txt \
{*}[glob ${worksrcpath}/docs/*.md] ${destroot}${docdir}
livecheck.url ${homepage}download-2.0.php
livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)