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

Last change on this file since 80183 was 80183, checked in by jeremyhu@…, 6 years ago

misc: Annotate required clang/llvm-gcc build fixes for easy grepping

  • 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 80183 2011-07-06 08:34:33Z jeremyhu@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}
36
37patchfiles      cpuinfo.diff patch-SDL_x11gl_c.h.diff
38
39configure.args  --enable-shared \
40                --mandir=${prefix}/share/man \
41                --disable-nasm \
42                --without-x
43
44variant x11 conflicts no_x11 {
45    configure.args-delete --without-x
46    configure.args-append --x-include=${prefix}/include \
47                          --x-lib=${prefix}/lib
48    depends_lib-append \
49        port:xorg-libXext \
50        port:xorg-libXrandr \
51        port:xrender
52
53    post-configure {
54        foreach lib {libX11.6 libXext.6 libXrandr.2 libXrender.1} {
55            reinplace "/${lib}.dylib/s|\".*\"|\"${prefix}/lib/${lib}.dylib\"|" \
56                ${worksrcpath}/include/SDL_config.h
57        }
58    }
59}
60variant no_x11 conflicts x11 description {Legacy compatibility variant} {} 
61if {[variant_isset no_x11]} {
62    default_variants -x11
63} else {
64    default_variants +x11
65}
66
67use_parallel_build  yes
68
69post-configure {
70    # not just for universal, ppc endianness detection is also broken
71    system "cd ${worksrcpath} && ed - ./include/SDL_config.h < ${filespath}/include_SDL_config.h.ed"
72}
73
74post-destroot {
75    set docdir  ${prefix}/share/doc/${name}-${version}
76   
77    xinstall -d ${destroot}${docdir}/html
78
79    xinstall -m 0644 -W ${worksrcpath} BUGS COPYING CREDITS INSTALL README README-SDL.txt \
80        README.MacOSX TODO ${destroot}${docdir}
81
82    xinstall -m 0644 -W ${worksrcpath} docs.html docs/index.html ${destroot}${docdir}/html
83    reinplace {s@docs/@@g} ${destroot}${docdir}/html/docs.html
84
85    foreach {dir} {html images} {
86        xinstall -d ${destroot}${docdir}/html/${dir}
87        eval xinstall -m 0644 [glob ${worksrcpath}/docs/${dir}/*] ${destroot}${docdir}/html/${dir}
88    }
89}
90
91# BUILD FIX TODO: llvm-gcc-4.2, clang
92# llvm-gcc-4.2 and clang fail to build as of 2011.06.15
93# This looks like an error in the package.
94if {${configure.compiler} == "llvm-gcc-4.2" ||
95    ${configure.compiler} == "clang"} {
96    configure.compiler gcc-4.2
97}
98
99livecheck.type  regex
100livecheck.url   ${homepage}download.php
101livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)
Note: See TracBrowser for help on using the repository browser.