source: trunk/dports/devel/libsdl/Portfile

Last change on this file was 152391, checked in by jmr@…, 11 months ago

libsdl: fix build failure on ppc tiger (#50032)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 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 152391 2016-09-07 05:53:28Z ryandesign@macports.org $
3
4PortSystem 1.0
5PortGroup xcodeversion 1.0
6
7name            libsdl
8set my_name     SDL
9version         1.2.15
10revision        3
11categories      devel multimedia
12platforms       macosx freebsd
13license         LGPL-2.1+
14maintainers     jmr openmaintainer
15description     Cross-platform multi-media development API
16
17long_description \
18    Simple DirectMedia Layer is a cross-platform multimedia library designed \
19    to provide fast access to the graphics framebuffer and audio device. It is \
20    used by MPEG playback software, emulators, and many popular games, including \
21    the award winning Linux port of \"Civilization: Call To Power.\" Simple \
22    DirectMedia Layer supports Linux, Win32, BeOS, Mac OS, Solaris, IRIX, and FreeBSD.
23
24homepage        http://www.libsdl.org/
25master_sites    ${homepage}release/
26distname        ${my_name}-${version}
27
28checksums       rmd160 d4802a090cb4a24eeb0c8ce5690802f596d394c3 \
29                sha256 d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00
30
31minimum_xcodeversions {8 2.4.1}
32
33configure.args  --disable-nasm \
34                --without-x
35
36patchfiles \
37    no-CGDirectPaletteRef.patch
38
39platform darwin {
40    configure.ldflags-append -framework Carbon
41
42    post-destroot {
43        reinplace "/Libs:/s/-lSDLmain/-lSDLmain -Wl,-framework,AppKit/" ${destroot}${prefix}/lib/pkgconfig/sdl.pc
44        reinplace "s/SDLmain.a/SDLmain.a -Wl,-framework,AppKit/" ${destroot}${prefix}/bin/sdl-config
45        reinplace "s/-lSDLmain/-lSDLmain -Wl,-framework,AppKit/" ${destroot}${prefix}/bin/sdl-config
46    }
47}
48
49platform darwin 8 powerpc {
50    if {![catch {sysctl hw.vectorunit} result] && $result > 0} {
51        # Work around buggy header. https://trac.macports.org/ticket/50032
52        configure.cflags-append -faltivec
53    }
54}
55
56variant x11 {
57    configure.args-delete --without-x
58    configure.args-append --x-includes=${prefix}/include \
59                          --x-libraries=${prefix}/lib \
60                          --disable-x11-shared
61    depends_lib-append \
62        port:xorg-libXext \
63        port:xorg-libXrandr \
64        port:xrender
65}
66default_variants +x11
67
68post-configure {
69    if {[variant_isset universal]} {
70        system -W ${worksrcpath}/include "ed - ./SDL_config.h < ${filespath}/include_SDL_config.h.ed"
71    }
72}
73
74post-destroot {
75    set docdir  ${prefix}/share/doc/${name}
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        xinstall -m 0644 {*}[glob ${worksrcpath}/docs/${dir}/*] ${destroot}${docdir}/html/${dir}
88    }
89}
90
91livecheck.type  regex
92livecheck.url   ${homepage}download-1.2.php
93livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)
Note: See TracBrowser for help on using the repository browser.