source: trunk/dports/math/gts/Portfile

Last change on this file was 138433, checked in by ryandesign@…, 2 years ago

gts: use the right MACOSX_DEPLOYMENT_TARGET when building predicates_init

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 138433 2015-07-08 06:31:25Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           muniversal 1.0
6
7name                gts
8version             0.7.6
9revision            3
10categories          math
11platforms           darwin
12maintainers         ryandesign openmaintainer
13license             LGPL-2+
14
15description         The GNU Triangulated Surface library
16
17long_description    GTS stands for the GNU Triangulated Surface Library. \
18                    It is an Open Source Free Software Library intended \
19                    to provide a set of useful functions to deal with \
20                    3D surfaces meshed with interconnected triangles.
21
22homepage            http://gts.sourceforge.net/
23master_sites        sourceforge:project/${name}/${name}/${version}
24
25checksums           sha1    000720bebecf0b153eb28260bd30fbd979dcc040 \
26                    rmd160  2bfd4121412c16d63ee0aca65ccbc2601d6a7d51
27
28depends_build       port:pkgconfig
29
30depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
31                    port:libnetpbm
32
33patchfiles          patch-examples-happrox.c.diff
34
35if {[variant_isset universal]} {
36    # Find architectures which will not run on build platform.
37    if {${os.major} >= 9 && [sysctl hw.cpu64bit_capable] == 1} {
38        set cpu64bit_capable yes
39    } else {
40        set cpu64bit_capable no
41    }
42    if {${os.arch} eq "i386"} {
43        set cross_archs "ppc64"
44        if {${os.major} >= 11} {
45            set cross_archs "ppc ${cross_archs}"
46        }
47        if {!${cpu64bit_capable}} {
48            set cross_archs "x86_64 ${cross_archs}"
49        }
50    } else {
51        set cross_archs "i386 x86_64"
52        if {!${cpu64bit_capable}} {
53            set cross_archs "ppc64 ${cross_archs}"
54        }
55    }
56   
57    post-configure {
58        system -W ${worksrcpath}-${build_arch}/src "MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target} ${build.cmd} predicates_init"
59        foreach arch ${cross_archs} {
60            if {[file exists ${worksrcpath}-${arch}/src/Makefile]} {
61                reinplace "s|\\./predicates_init|${worksrcpath}-${build_arch}/src/predicates_init|" \
62                    ${worksrcpath}-${arch}/src/Makefile
63            }
64        }
65    }
66}
67
68livecheck.type      sourceforge
69livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.