source: trunk/dports/devel/libsdl_image/Portfile @ 12573

Last change on this file since 12573 was 12573, checked in by rshaw, 14 years ago

Compile fix.

Bug: 3033
Submitted by: James Shiell
Approved by: rshaw

  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1# $Id: Portfile,v 1.9 2005/06/07 22:12:14 rshaw Exp $
2PortSystem              1.0
3name                    libsdl_image
4version                 1.2.4
5revision                4
6categories              devel graphics
7maintainers             rshaw@opendarwin.org
8description             Add on library for libSDL handling several image formats
9long_description        This is a simple library to load images of various \
10                                        formats as SDL surfaces. This library supports BMP, \
11                                        PPM, PCX, GIF, JPEG, PNG, TGA, and TIFF formats.
12platforms               darwin
13master_sites    http://www.libsdl.org/projects/SDL_image/release/
14homepage        http://www.libsdl.org/
15distname                SDL_image-${version}
16checksums               md5 70bf617f99e51a2c94550fc79d542f0b
17depends_lib             bin:sdl-config:libsdl \
18                                lib:libpng:libpng \
19                                lib:libjpeg:jpeg
20
21configure.env   CFLAGS="-I${prefix}/include" \
22                                LDFLAGS="-L${prefix}/lib"
23configure.args  --disable-sdltest
24
25build.env               ${configure.env}
26
27post-destroot   {
28        xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
29        xinstall -m 0644 -W ${worksrcpath} CHANGES COPYING README \
30                ${destroot}${prefix}/share/doc/${name}
31}
32
33platform darwin {
34        post-extract {
35                system "cd ${worksrcpath} && tar -xvzf PBProjects.tar.gz"
36        }
37        post-patch {
38                reinplace "s|~/Library/Frameworks|./build/Frameworks|g" \
39                        ${worksrcpath}/PBProjects/SDL_image.pbproj/project.pbxproj
40                reinplace "s|\$(HOME)/Library/Frameworks|/Library/Frameworks|g" \
41                        ${worksrcpath}/PBProjects/SDL_image.pbproj/project.pbxproj
42                reinplace "s|\$HOME/Library/Frameworks|/Library/Frameworks|g" \
43                        ${worksrcpath}/PBProjects/SDL_image.pbproj/project.pbxproj
44        }
45        post-build {
46                build.dir               "${worksrcpath}/PBProjects"
47                build.type              pbx
48                build.target    -buildstyle Deployment -target Framework
49                system "[command build]"
50                cd ${worksrcpath}/PBProjects
51                system "install_name_tool -id /Library/Frameworks/SDL_image.framework/SDL_image \
52                        build/Frameworks/SDL_image.framework/SDL_image"
53        }
54        destroot.dir    ${worksrcpath}
55        destroot.cmd    make
56        post-destroot {
57                cd "${worksrcpath}/PBProjects/build/Frameworks"
58                xinstall -d -m 0755 ${destroot}/Library/Frameworks
59                system "cp -R SDL_image.framework ${destroot}/Library/Frameworks"
60        }
61}
62
63platform darwin 6 {
64        depends_lib-append      lib:libdl:dlcompat
65}
66
Note: See TracBrowser for help on using the repository browser.