# $Id: Portfile 27597 2007-08-10 11:39:38Z nox@macports.org $ PortSystem 1.0 name libsdl version 1.2.12 categories devel multimedia maintainers nox openmaintainer description Cross-platform multi-media development API long_description Simple DirectMedia Layer is a cross-platform \ multimedia library designed to provide fast access \ to the graphics framebuffer and audio device. It is \ used by MPEG playback software, emulators, and many \ popular games, including the award winning Linux \ port of \"Civilization: Call To Power.\" Simple \ DirectMedia Layer supports Linux, Win32, BeOS, \ MacOS, Solaris, IRIX, and FreeBSD. platforms macosx freebsd homepage http://www.libsdl.org/ master_sites ${homepage}release/ distname SDL-${version} checksums md5 544b4554986e51eed6d34435cf9c5f3f \ sha1 2c37ff1683368369c0f555d4a742f0544153610d \ rmd160 3871023c63ea056eba43ce4f55ee8d3a73ff3022 depends_lib lib:libX11.6:XFree86 configure.args --enable-shared \ --mandir=${prefix}/share/man set docdir ${prefix}/share/doc/${name}-${version} post-destroot { xinstall -m 0755 -d ${destroot}${docdir}/html xinstall -m 0644 -W ${worksrcpath} BUGS COPYING CREDITS INSTALL README README-SDL.txt \ README.MacOSX TODO ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} docs.html docs/index.html ${destroot}${docdir}/html reinplace {s@docs/@@g} ${destroot}${docdir}/html/docs.html foreach {dir} {html images} { xinstall -m 0755 -d ${destroot}${docdir}/html/${dir} eval xinstall -m 0644 [glob ${worksrcpath}/docs/${dir}/*] ${destroot}${docdir}/html/${dir} } } platform darwin 7 { pre-fetch { set qt_header [open /System/Library/Frameworks/QuickTime.framework/Headers/QuickTime.h r] while {[gets $qt_header line] != -1} { if {[regexp {Version:} $line]} { regexp {(\d+)\.(\d+)(?:\.(\d+))?$} $line qt_ver qt_maj qt_min qt_rev if {$qt_maj > 7 || $qt_min > 0 || $qt_rev > 3} { ui_error "" ui_error "Installation of libSDL is exiting because it believes you have" ui_error "QuickTime version ${qt_ver} installed." ui_error "" ui_error "On Mac OS 10.3/XCode 1.5, you must have QuickTime 7.0.3 or lower if" ui_error "you want to install the libSDL port." ui_error "" ui_error "If you actually have QuickTime 7.0.3 or below and you think you should not be" ui_error "receiving this error message, you can report the problem here:" ui_error "http://trac.macports.org/projects/macports/ticket/6533" return -code 1 "${name} cannot build on Panther with QuickTime 7.0.4 or later." } break } } close $qt_header } } platform darwin 8 { post-patch { reinplace -E {/archivecmds=/s/CC/CXX/} ${worksrcpath}/configure } configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0 build.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0 } platform darwin 9 { patchfiles-append patch-AudioFilePlayer.h patch-SDL_coreaudio.c }