Ticket #23804: Portfile

File Portfile, 2.2 KB (added by jwhowse4, 14 years ago)
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$
3
4PortSystem          1.0
5
6name                libproj4
7version             3_20081120
8revision            1
9categories          gis
10maintainers         takeshi
11description         Cartographic projections C libary
12homepage            http://home.comcast.net/~gevenden56/proj/index.html
13platforms           darwin
14master_sites        http://home.comcast.net/~gevenden56/proj/
15long_description    a comprehensive library of cartographic projection functions \
16                    and lproj that performs cartographic projections on tabular data
17
18distname            ${name}.${version}
19worksrcdir          ${name}
20checksums           md5     fd3f085f5f772be6f0831c538ae4f70e \
21                    sha1    d66bc9de0a5612c5efe9172c76e11a9b1a655d61 \
22                    rmd160  97d82a408e9e8fd1994477a9591bf6b6bfda3a76
23
24use_bzip2           yes
25
26depends_lib         port:gsl
27use_configure       no
28
29patch {
30    reinplace "s|\$T -L./ -lproj4 \$(gsll) \$(thrl) -lm|\$(LDFLAGS)|" ${worksrcpath}/Makefile
31}
32
33variant universal {}
34use_parallel_build  no
35build.args-append   -e
36build.target        libproj4 lproj
37if {![variant_isset universal]} {
38    build.env-append    CC=${configure.cc} \
39                        CFLAGS=\"-I./ -I${prefix}/include -DPROJ_HAVE_GSL=1 -DPROJ_HAVE_THREADS=1 \
40                                 ${configure.cflags} ${configure.cc_archflags}\" \
41                        LDFLAGS=\"-L./ -L${prefix}/lib -lproj4 ${configure.ldflags} -lgsl -lgslcblas\"
42} else {
43    build.env-append    CC=${configure.cc} \
44                        CFLAGS=\"-I./ -I${prefix}/include -DPROJ_HAVE_GSL=1 -DPROJ_HAVE_THREADS=1 \
45                                 ${configure.cflags} ${configure.universal_cflags}\" \
46                        LDFLAGS=\"-L./ -L${prefix}/lib -lproj4 ${configure.ldflags} ${configure.universal_ldflags} -lgsl -lgslcblas\"
47}
48
49destroot {
50    xinstall -m 644 ${worksrcpath}/libproj4.a ${destroot}${prefix}/lib/
51    xinstall -m 644 ${worksrcpath}/lib_proj.h ${destroot}${prefix}/include/
52    xinstall -m 755 ${worksrcpath}/lproj ${destroot}${prefix}/bin/
53}