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

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

libsdl: clang crash workaround is still needed with Xcode 4.2.1

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