# $Id: Portfile 30546 2007-10-31 03:44:59Z ryandesign@macports.org $ PortSystem 1.0 name libsdl set my_name SDL version 1.2.12 categories devel multimedia platforms macosx freebsd 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, Mac OS, Solaris, IRIX, and FreeBSD. homepage http://www.libsdl.org/ master_sites ${homepage}release/ distname ${my_name}-${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 -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 -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 if {[rpm-vercomp ${qt_ver} 7.0.3] > 0} { 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 } } platform darwin 9 { patchfiles-append patch-AudioFilePlayer.h patch-SDL_coreaudio.c } livecheck.check regex livecheck.url ${homepage}download.php livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)