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

Last change on this file since 89205 was 89205, checked in by jmr@…, 7 years ago

libsdl: update to 1.2.15 (fixes crash on Lion, #30478)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 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 89205 2012-01-21 06:39:05Z jmr@macports.org $
3
4PortSystem 1.0
5PortGroup xcodeversion 1.0
6
7conflicts       libsdl-devel
8
9name            libsdl
10set my_name     SDL
11version         1.2.15
12categories      devel multimedia
13platforms       macosx freebsd
14license         LGPL-2.1+
15maintainers     jmr openmaintainer
16description     Cross-platform multi-media development API
17
18long_description \
19    Simple DirectMedia Layer is a cross-platform multimedia library designed \
20    to provide fast access to the graphics framebuffer and audio device. It is \
21    used by MPEG playback software, emulators, and many popular games, including \
22    the award winning Linux port of \"Civilization: Call To Power.\" Simple \
23    DirectMedia Layer supports Linux, Win32, BeOS, Mac OS, Solaris, IRIX, and FreeBSD.
24
25homepage        http://www.libsdl.org/
26master_sites    ${homepage}release/
27distname        ${my_name}-${version}
28
29checksums       rmd160 d4802a090cb4a24eeb0c8ce5690802f596d394c3 \
30                sha256 d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00
31
32minimum_xcodeversions {8 2.4.1}
33if {[vercmp $xcodeversion 4.2] >= 0 && [vercmp $xcodeversion 4.2.1] <= 0 && ($build_arch == "i386" || [variant_isset universal])} {
34    # clang crashes with -O2, ticket #31649
35    configure.optflags -Os
36}
37
38configure.args  --disable-nasm \
39                --without-x
40
41variant x11 conflicts no_x11 {
42    configure.args-delete --without-x
43    configure.args-append --x-includes=${prefix}/include \
44                          --x-libraries=${prefix}/lib \
45                          --disable-x11-shared
46    depends_lib-append \
47        port:xorg-libXext \
48        port:xorg-libXrandr \
49        port:xrender
50}
51variant no_x11 conflicts x11 description {Legacy compatibility variant} {}
52if {[variant_isset no_x11]} {
53    default_variants -x11
54} else {
55    default_variants +x11
56}
57
58post-configure {
59    if {[variant_isset universal]} {
60        system -W ${worksrcpath}/include "ed - ./SDL_config.h < ${filespath}/include_SDL_config.h.ed"
61    }
62}
63
64post-destroot {
65    set docdir  ${prefix}/share/doc/${name}
66   
67    xinstall -d ${destroot}${docdir}/html
68
69    xinstall -m 0644 -W ${worksrcpath} BUGS COPYING CREDITS INSTALL README README-SDL.txt \
70        README.MacOSX TODO ${destroot}${docdir}
71
72    xinstall -m 0644 -W ${worksrcpath} docs.html docs/index.html ${destroot}${docdir}/html
73    reinplace {s@docs/@@g} ${destroot}${docdir}/html/docs.html
74
75    foreach {dir} {html images} {
76        xinstall -d ${destroot}${docdir}/html/${dir}
77        eval xinstall -m 0644 [glob ${worksrcpath}/docs/${dir}/*] ${destroot}${docdir}/html/${dir}
78    }
79}
80
81livecheck.type  regex
82livecheck.url   ${homepage}download.php
83livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)
Note: See TracBrowser for help on using the repository browser.