source: trunk/dports/devel/libsdl2/Portfile

Last change on this file was 154162, checked in by jmr@…, 9 months ago

libsdl2: update to 2.0.5

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.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 154162 2016-10-23 07:23:00Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name            libsdl2
7set my_name     SDL2
8version         2.0.5
9categories      devel multimedia
10platforms       macosx freebsd
11license         zlib
12maintainers     jmr openmaintainer
13description     Cross-platform multi-media development API
14
15long_description \
16    Simple DirectMedia Layer is a cross-platform development library \
17    designed to provide low level access to audio, keyboard, mouse, \
18    joystick, and graphics hardware via OpenGL and Direct3D.
19
20homepage        http://www.libsdl.org/
21master_sites    ${homepage}release/
22distname        ${my_name}-${version}
23
24checksums       rmd160 91283ce74bd451e83651910259cf226cae70e4bb \
25                sha256 442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785
26
27configure.args  --without-x
28
29platform macosx {
30    if {${os.major} <= 10} {
31        # Build requires at least 10.7 SDK, even when targeting 10.6
32        set lion_sdkpath ${developer_dir}/SDKs/MacOSX10.7.sdk
33        if {[file exists $lion_sdkpath]} {
34            configure.sdkroot $lion_sdkpath
35        } else {
36            pre-fetch {
37                error "Building $name requires OS X 10.7 SDK or later"
38            }
39        }
40    }
41}
42
43variant x11 {
44    configure.args-delete --without-x
45    configure.args-append --x-includes=${prefix}/include \
46                          --x-libraries=${prefix}/lib \
47                          --disable-x11-shared
48    depends_lib-append \
49        port:xorg-libXext \
50        port:xorg-libXrandr \
51        port:xrender
52}
53if {${os.subplatform} ne "macosx"} {
54    default_variants +x11
55}
56
57post-destroot {
58    set docdir ${prefix}/share/doc/${name}
59    xinstall -d ${destroot}${docdir}
60    xinstall -m 0644 -W ${worksrcpath} BUGS.txt COPYING.txt CREDITS.txt \
61        README.txt README-SDL.txt TODO.txt WhatsNew.txt \
62        {*}[glob ${worksrcpath}/docs/*.md] ${destroot}${docdir}
63}
64
65livecheck.type  regex
66livecheck.url   ${homepage}download-2.0.php
67livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)
Note: See TracBrowser for help on using the repository browser.