# $Id: Portfile,v 1.9 2005/06/07 22:12:14 rshaw Exp $ PortSystem 1.0 name libsdl_image version 1.2.4 revision 4 categories devel graphics maintainers rshaw@opendarwin.org description Add on library for libSDL handling several image formats long_description This is a simple library to load images of various \ formats as SDL surfaces. This library supports BMP, \ PPM, PCX, GIF, JPEG, PNG, TGA, and TIFF formats. platforms darwin master_sites http://www.libsdl.org/projects/SDL_image/release/ homepage http://www.libsdl.org/ distname SDL_image-${version} checksums md5 70bf617f99e51a2c94550fc79d542f0b depends_lib bin:sdl-config:libsdl \ lib:libpng:libpng \ lib:libjpeg:jpeg configure.env CFLAGS="-I${prefix}/include" \ LDFLAGS="-L${prefix}/lib" configure.args --disable-sdltest build.env ${configure.env} post-destroot { xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name} xinstall -m 0644 -W ${worksrcpath} CHANGES COPYING README \ ${destroot}${prefix}/share/doc/${name} } platform darwin { post-extract { system "cd ${worksrcpath} && tar -xvzf PBProjects.tar.gz" } post-patch { reinplace "s|~/Library/Frameworks|./build/Frameworks|g" \ ${worksrcpath}/PBProjects/SDL_image.pbproj/project.pbxproj reinplace "s|\$(HOME)/Library/Frameworks|/Library/Frameworks|g" \ ${worksrcpath}/PBProjects/SDL_image.pbproj/project.pbxproj reinplace "s|\$HOME/Library/Frameworks|/Library/Frameworks|g" \ ${worksrcpath}/PBProjects/SDL_image.pbproj/project.pbxproj } post-build { build.dir "${worksrcpath}/PBProjects" build.type pbx build.target -buildstyle Deployment -target Framework system "[command build]" cd ${worksrcpath}/PBProjects system "install_name_tool -id /Library/Frameworks/SDL_image.framework/SDL_image \ build/Frameworks/SDL_image.framework/SDL_image" } destroot.dir ${worksrcpath} destroot.cmd make post-destroot { cd "${worksrcpath}/PBProjects/build/Frameworks" xinstall -d -m 0755 ${destroot}/Library/Frameworks system "cp -R SDL_image.framework ${destroot}/Library/Frameworks" } } platform darwin 6 { depends_lib-append lib:libdl:dlcompat }