Ignore:
Timestamp:
Jan 23, 2005, 5:21:08 PM (14 years ago)
Author:
rshaw
Message:

Adds building of SDL.framework and test apps on Darwin/MacOSX.
Bumped revision.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/libsdl/Portfile

    r10484 r10572  
    1 # $Id: Portfile,v 1.7 2005/01/19 19:24:06 rshaw Exp $
    2 
    3 PortSystem 1.0
    4 name            libsdl
    5 version         1.2.8
    6 categories      devel multimedia
    7 maintainers     rshaw@opendarwin.org
    8 description     Cross-platform multi-media development API
    9 platforms       darwin freebsd
     1# $Id: Portfile,v 1.8 2005/01/23 17:21:08 rshaw Exp $
     2PortSystem              1.0
     3name                    libsdl
     4version                 1.2.8
     5revision                1
     6categories              devel multimedia
     7maintainers             rshaw@opendarwin.org
     8description             Cross-platform multi-media development API
     9long_description        Simple DirectMedia Layer is a cross-platform \
     10                                        multimedia library designed to provide fast access \
     11                                        to the graphics framebuffer and audio device. It is \
     12                                        used by MPEG playback software, emulators, and many \
     13                                        popular games, including the award winning Linux \
     14                                        port of "Civilization: Call To Power." Simple \
     15                                        DirectMedia Layer supports Linux, Win32, BeOS, \
     16                                        MacOS, Solaris, IRIX, and FreeBSD.
     17platforms               darwin freebsd
    1018master_sites    http://www.libsdl.org/release/
    11 distname        SDL-${portversion}
    12 checksums       md5 37aaf9f069f9c2c18856022f35de9f8c
    13 configure.args  --enable-shared \
    14                 --mandir=${prefix}/share/man
    15 
    16 long_description \
    17 Simple DirectMedia Layer is a cross-platform multimedia library designed to provide \
    18 fast access to the graphics framebuffer and audio device. It is used by MPEG \
    19 playback software, emulators, and many popular games, including the award winning \
    20 Linux port of "Civilization: Call To Power." Simple DirectMedia Layer supports \
    21 Linux, Win32, BeOS, MacOS, Solaris, IRIX, and FreeBSD.
     19distname                SDL-${version}
     20checksums               md5 37aaf9f069f9c2c18856022f35de9f8c
    2221
    2322post-patch {
     
    2625}
    2726
     27configure.args  --enable-shared \
     28                                --mandir=${prefix}/share/man
     29
    2830variant nostatic {
    2931        configure.args-append   --disable-static
     32}
     33
     34platform darwin {
     35        post-extract {
     36                system "cd ${worksrcpath} && tar -xvzf Xcode.tar.gz"
     37        }
     38        post-patch {
     39                reinplace "s|~/Library/Frameworks|./build/Frameworks|g" \
     40                        ${worksrcpath}/Xcode/SDL/SDL.pbproj/project.pbxproj
     41                reinplace "s|/Library/Frameworks|../SDL/build/Frameworks|g" \
     42                        ${worksrcpath}/Xcode/SDLTest/SDLTest.pbproj/project.pbxproj
     43        }
     44        post-build {
     45                build.dir               "${worksrcpath}/Xcode/SDL"
     46                build.type              pbx
     47                build.target    -buildstyle Deployment -target Framework
     48                system "[command build]"
     49                cd ${worksrcpath}/Xcode/SDL
     50                system "install_name_tool -id /Library/Frameworks/SDL.framework/SDL \
     51                        build/Frameworks/SDL.framework/SDL"
     52                build.dir               "${worksrcpath}/Xcode/SDLTest"
     53                build.type              pbx
     54                build.target    -buildstyle Deployment -target All
     55                system "[command build]"
     56                cd ${worksrcpath}/Xcode/SDLTest
     57                foreach exe [glob build/*.app/Contents/MacOS/*] {
     58                        system "install_name_tool -change @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \
     59                                /Library/Frameworks/SDL.framework/SDL ${exe}"
     60                }
     61        }
     62        destroot.dir    ${worksrcpath}
     63        destroot.cmd    make
     64        post-destroot {
     65                cd "${worksrcpath}/Xcode/SDL/build/Frameworks"
     66                xinstall -d -m 0755 ${destroot}/Library/Frameworks
     67                system "cp -R SDL.framework ${destroot}/Library/Frameworks"
     68                cd "${worksrcpath}/Xcode/SDLTest/build"
     69                xinstall -d -m 0755 ${destroot}/Developer/Examples/SDL/Tests
     70                foreach app [glob *.app] {
     71                        system "cp -R ${app} ${destroot}/Developer/Examples/SDL/Tests"
     72                }
     73                cd "${worksrcpath}/Xcode/Project Stationary"
     74                xinstall -d -m 0755 ${destroot}/Developer/Examples/SDL
     75                system "cp -R * ${destroot}/Developer/Examples/SDL"
     76        }
    3077}
    3178
     
    3380        depends_lib-append      lib:libdl:dlcompat
    3481        configure.env           CPPFLAGS="-I${prefix}/include" \
    35                                 LDFLAGS="-L${prefix}/lib"
     82                                                LDFLAGS="-L${prefix}/lib"
    3683}
     84
Note: See TracChangeset for help on using the changeset viewer.