Ticket #19114: Portfile.3

File Portfile.3, 4.2 KB (added by mf2k (Frank Schima), 16 years ago)

I'm attaching my version of the portfile with some fixes such as switching to bzip2 so it downloads.

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