source: trunk/dports/devel/libsdl/Portfile @ 53861

Last change on this file since 53861 was 53861, checked in by toby@…, 10 years ago

nuke darwin 7 section

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 53861 2009-07-15 23:24:32Z toby@macports.org $
3
4PortSystem      1.0
5PortGroup       muniversal 1.0
6
7name            libsdl
8set my_name     SDL
9version         1.2.13
10revision        6
11categories      devel multimedia
12platforms       macosx freebsd
13maintainers     nox openmaintainer
14description     Cross-platform multi-media development API
15
16long_description \
17    Simple DirectMedia Layer is a cross-platform multimedia library designed \
18    to provide fast access to the graphics framebuffer and audio device. It is \
19    used by MPEG playback software, emulators, and many popular games, including \
20    the award winning Linux port of \"Civilization: Call To Power.\" Simple \
21    DirectMedia Layer supports Linux, Win32, BeOS, Mac OS, Solaris, IRIX, and FreeBSD.
22
23homepage        http://www.libsdl.org/
24master_sites    ${homepage}release/
25distname        ${my_name}-${version}
26
27checksums       md5 c6660feea2a6834de10bc71b2f8e4d88 \
28                sha1 51fcaa3e1d5c01fd813ea08688780f86b19cf539 \
29                rmd160 ed8825fc98f4b3759cf9e5cf8357d71c50df9925
30
31depends_lib \
32    port:xorg-libXext \
33    port:xorg-libXrandr \
34    port:xrender
35
36patchfiles      patch-SDL_x11gl_c.h.diff
37
38configure.args  --enable-shared \
39                --mandir=${prefix}/share/man
40
41variant no_x11 {
42        configure.args-append --without-x
43        depends_lib-delete \
44            port:xorg-libXext \
45            port:xorg-libXrandr \
46            port:xrender
47}
48
49use_parallel_build  yes
50
51set docdir      ${prefix}/share/doc/${name}-${version}
52
53pre-extract {
54    if {"darwin" == ${os.platform} && 8 == ${os.major}} {
55        set minimum_xcodeversion 2.4.1
56        set current_xcodeversion [exec defaults read /Developer/Applications/Xcode.app/Contents/Info CFBundleShortVersionString]
57        if {[rpm-vercomp ${current_xcodeversion} ${minimum_xcodeversion}] < 0} {
58            ui_error "On Mac OS X ${macosx_version}, ${name} ${version} requires Xcode ${minimum_xcodeversion} or later but you have Xcode ${current_xcodeversion}."
59            return -code error "incompatible Xcode version"
60        }
61    }
62}
63
64post-configure {
65    set sdl_config_h "${worksrcpath}/include/SDL_config.h"
66
67    if {![variant_isset no_x11]} {
68        if {[file exists "${prefix}/lib/libX11.6.dylib"]} {
69            reinplace "/libX11.6.dylib/s|\".*\"|\"${prefix}/lib/libX11.6.dylib\"|" ${sdl_config_h}
70        }
71
72        if {[file exists "${prefix}/lib/libXext.6.dylib"]} {
73            reinplace "/libXext.6.dylib/s|\".*\"|\"${prefix}/lib/libXext.6.dylib\"|" ${sdl_config_h}
74        }
75
76        if {[file exists "${prefix}/lib/libXrandr.2.dylib"]} {
77            reinplace "/libXrandr.2.dylib/s|\".*\"|\"${prefix}/lib/libXrandr.2.dylib\"|" ${sdl_config_h}
78        }
79
80        if {[file exists "${prefix}/lib/libXrender.1.dylib"]} {
81            reinplace "/libXrender.1.dylib/s|\".*\"|\"${prefix}/lib/libXrender.1.dylib\"|" ${sdl_config_h}
82        }
83    }
84}
85
86post-destroot {
87    xinstall -d ${destroot}${docdir}/html
88
89    xinstall -m 0644 -W ${worksrcpath} BUGS COPYING CREDITS INSTALL README README-SDL.txt \
90        README.MacOSX TODO ${destroot}${docdir}
91
92    xinstall -m 0644 -W ${worksrcpath} docs.html docs/index.html ${destroot}${docdir}/html
93    reinplace {s@docs/@@g} ${destroot}${docdir}/html/docs.html
94
95    foreach {dir} {html images} {
96        xinstall -d ${destroot}${docdir}/html/${dir}
97        eval xinstall -m 0644 [glob ${worksrcpath}/docs/${dir}/*] ${destroot}${docdir}/html/${dir}
98    }
99}
100
101livecheck.check regex
102livecheck.url   ${homepage}download.php
103livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)
Note: See TracBrowser for help on using the repository browser.