Ticket #19114: Portfile.2

File Portfile.2, 4.2 KB (added by dbsgeo@…, 15 years ago)

Updated portfile that fetches from tarred release

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                 py25-mapnik
7version              0.6.0
8categories           graphics gis
9platforms            darwin
10maintainers          gmail.com:dbsgeo
11description          Open Source C++/Python mapping toolkit.
12homepage             http://mapnik.org/
13platforms            darwin
14
15master_sites         http://download.berlios.de/mapnik/ \
16                     http://download2.berlios.de/mapnik/
17                     
18distname             mapnik-${version}
19checksums           md5     f854378749bfebdbacedcda2d18f1c19 \
20                    sha1    051e9c7d409fbadda0d09dfa0feba826126a9fa1 \
21                    rmd160  0109f5dd9bfb0cb7f99f1482c46d01b3cf7cc8d5
22
23
24long_description \
25    Mapnik is a Open Source tookit for developing mapping \
26    applications. It's written in C++ and there are \
27    Python bindings to facilitate fast-paced agile \
28    development. It can comfortably be used for both \
29    desktop and web development. \
30    \
31    Mapnik is about making beautiful maps. It uses the \
32    AGG library and offers world class anti-aliasing \
33    rendering with subpixel accuracy for geographic \
34    data. It is written from scratch in modern C++ and \
35    doesn't suffer from design decisions made a decade \
36    ago. When it comes to handling common software tasks \
37    such as memory management, filesystem access, \
38    regular expressions, parsing and so on, Mapnik \
39    doesn't re-invent the wheel, but utilises best of \
40    breed industry standard libraries from boost.org. \
41
42depends_lib         port:boost \
43                    port:libpng \
44                    port:jpeg \
45                    port:tiff \
46                    port:icu \
47                    port:zlib \
48                    port:freetype \
49                    port:proj \
50                    port:libxml2 \
51                    port:python25 \
52                    port:py25-hashlib
53
54set python  "${prefix}/bin/python2.5"
55
56variant cairo description {Builds port with Cairo Support} {
57    depends_lib-append port:cairo
58    depends_lib-append port:cairomm
59    depends_lib-append port:py25-cairo
60    build.args-delete  CAIRO=False
61    build.args-append  CAIRO=True
62}
63
64variant postgis description {Builds port with PostGIS plugin} {
65    depends_lib-append port:postgis
66    build.args-append  PG_CONFIG=${prefix}/bin/pg_config
67}
68
69variant gdal description {Builds port with GDAL/OGR plugin} {
70    depends_lib-append port:gdal
71    build.args-append  GDAL_CONFIG=${prefix}/bin/gdal-config
72}
73
74variant sqlite description {Builds port with SQLite3 plugin} {
75    depends_lib-append port:sqlite3
76    build.args-append  SQLITE_INCLUDES=${prefix}/include \
77                       SQLITE_LIBS=${prefix}/lib
78}
79
80worksrcdir           mapnik-${version}
81use_configure        no
82
83
84build.args      PREFIX=${prefix} \
85                     CAIRO=False \
86                     INPUT_PLUGINS=all \
87                     PYTHON_PREFIX=${prefix} \
88                     USE_CONFIG=False \
89                     FREETYPE_CONFIG=${prefix}/bin/freetype-config \
90                     XML2_CONFIG=${prefix}/bin/xml2-config \
91                     BOOST_INCLUDES=${prefix}/include \
92                     BOOST_LIBS=${prefix}/lib \
93                     SQLITE_INCLUDES=${prefix}/include \
94                     SQLITE_LIBS=${prefix}/lib \
95                     ICU_INCLUDES=${prefix}/include \
96                     ICU_LIBS=${prefix}/lib \
97                     PNG_INCLUDES=${prefix}/include \
98                     PNG_LIBS=${prefix}/lib \
99                     JPEG_INCLUDES=${prefix}/include \
100                     JPEG_LIBS=${prefix}/lib \
101                     TIFF_INCLUDES=${prefix}/include \
102                     TIFF_LIBS=${prefix}/lib \
103                     PROJ_INCLUDES=${prefix}/include \
104                     PROJ_LIBS=${prefix}/lib \
105                     PYTHON=${python} \
106                     LIB_DIR_NAME=/mapnik/0.6 \
107                     FRAMEWORK_PYTHON=False \
108                     DESTDIR=${destroot}
109
110build {
111    system "cd ${worksrcpath} && ${python} scons/scons.py ${build.args}"
112}
113
114destroot {
115    system "cd ${worksrcpath} && ${python} scons/scons.py install"
116}