Ticket #19114: Portfile.6

File Portfile.6, 4.6 KB (added by dbsgeo@…, 15 years ago)

Mapnik Portfile working with boost 1.38 and python26

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