source: trunk/dports/gis/grass/Portfile @ 106731

Last change on this file since 106731 was 106731, checked in by g5pw@…, 6 years ago

gis/grass:

fix build with tcl8.6 (#38054 #37578 #37376)
fix python build bug
add wxwidgets variant
add wxpython variant (#36904)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.2 KB
Line 
1# $Id: Portfile 106731 2013-06-06 21:05:42Z g5pw@macports.org $
2
3PortSystem 1.0
4
5name              grass
6epoch             1
7version           6.4.2
8revision          3
9maintainers       nomaintainer
10categories        gis
11license           GPL-2+
12platforms         darwin
13
14description       GRASS
15long_description  GRASS is a Geographic Information System (GIS) used for \
16                  geospatial data management and analysis.
17
18homepage          http://grass.osgeo.org/
19master_sites      ${homepage}grass[join [lrange [split ${version} .] 0 1] {}]/source/
20
21checksums         rmd160  2a8a2a63edf8e1cc53b7b26975087eef59c9a397 \
22                  sha256  670bb74d3000ea0932b7e988d3080d0c629f9eb22a8479bb2987ded473f7b4ca
23
24depends_build     port:pkgconfig
25depends_lib       port:fftw-3 \
26                  port:freetype \
27                  port:gdal \
28                  port:geos \
29                  port:jpeg \
30                  port:libpng \
31                  port:mesa \
32                  lib:libXm:openmotif \
33                  port:proj47 \
34                  port:tk \
35                  path:lib/pkgconfig/cairo.pc:cairo \
36                  port:readline
37
38use_parallel_build yes
39
40# https://trac.macports.org/ticket/32790
41# this should probably only apply to some Xcode versions
42compiler.blacklist  clang
43
44patchfiles \
45    patch-Makefile.diff \
46    patch-configure.diff \
47    patch-macosx_Makefile.diff \
48    patch-visualization_nviz_src-draw_c.diff
49
50# List of all python scripts. Used later to ensure usage of python27 (and not
51# the currently active python)
52# Work around bug http://trac.osgeo.org/grass/ticket/1758
53depends_build-append    port:python27
54set python_scripts [ list \
55    doc/python/example_ctypes.py \
56    general/g.parser/test.py \
57    gui/scripts/g.change.gui.py \
58    gui/scripts/g.extension.py \
59    gui/scripts/g.extension.rebuild.all.py \
60    gui/scripts/v.type_wrapper.py \
61    gui/wxpython/gui_modules/gmodeler.py \
62    gui/wxpython/gui_modules/menuform.py \
63    gui/wxpython/scripts/d.rast3d.py \
64    gui/wxpython/scripts/p.cmd.py \
65    gui/wxpython/scripts/p.db.py \
66    gui/wxpython/scripts/p.mon.py \
67    gui/wxpython/scripts/p.rast.py \
68    gui/wxpython/scripts/p.vect.py \
69    imagery/i.atcorr/create_iwave.py \
70    lib/python/ctypes/ctypesgen.py \
71    lib/python/ctypes/ctypesgencore/__init__.py \
72    lib/python/ctypes/ctypesgencore/ctypedescs.py \
73    lib/python/ctypes/ctypesgencore/descriptions.py \
74    lib/python/ctypes/ctypesgencore/expressions.py \
75    lib/python/ctypes/ctypesgencore/messages.py \
76    lib/python/ctypes/ctypesgencore/options.py \
77    lib/python/ctypes/ctypesgencore/parser/__init__.py \
78    lib/python/ctypes/ctypesgencore/parser/cdeclarations.py \
79    lib/python/ctypes/ctypesgencore/parser/cgrammar.py \
80    lib/python/ctypes/ctypesgencore/parser/cparser.py \
81    lib/python/ctypes/ctypesgencore/parser/ctypesparser.py \
82    lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py \
83    lib/python/ctypes/ctypesgencore/parser/pplexer.py \
84    lib/python/ctypes/ctypesgencore/parser/preprocessor.py \
85    lib/python/ctypes/ctypesgencore/printer/__init__.py \
86    lib/python/ctypes/ctypesgencore/printer/printer.py \
87    lib/python/ctypes/ctypesgencore/processor/__init__.py \
88    lib/python/ctypes/ctypesgencore/processor/dependencies.py \
89    lib/python/ctypes/ctypesgencore/processor/operations.py \
90    lib/python/ctypes/ctypesgencore/processor/pipeline.py ]
91
92post-patch {
93   reinplace "s|@@APPLICATIONS_DIR@@|${applications_dir}|" \
94      ${worksrcpath}/configure
95   foreach f $python_scripts {
96       reinplace "s|/usr/bin/env python|${prefix}/bin/python2.7|" $f
97   }
98}
99
100configure.ldflags-append -framework OpenGL -framework Accelerate
101configure.args \
102    --with-fftw-includes=${prefix}/include \
103    --with-fftw-libs=${prefix}/lib \
104    --with-freetype \
105    --with-freetype-includes=${prefix}/include/freetype2 \
106    --with-freetype-libs=${prefix}/lib \
107    --with-gdal=${prefix}/bin/gdal-config \
108    --with-jpeg-includes=${prefix}/include \
109    --with-jpeg-libs=${prefix}/lib \
110    --with-motif \
111    --with-motif-includes=${prefix}/include \
112    --with-motif-libs=${prefix}/lib \
113    --with-png-includes=${prefix}/include \
114    --with-png-libs=${prefix}/lib \
115    --with-proj-includes=${prefix}/lib/proj47/include \
116    --with-proj-libs=${prefix}/lib/proj47/lib \
117    --with-proj-share=${prefix}/lib/proj47/share/proj \
118    --with-tcltk-includes=${prefix}/include \
119    --with-tcltk-libs=${prefix}/lib \
120    --with-cxx \
121    --with-x \
122    --without-postgres \
123    --disable-python \
124    --disable-wxwidgets \
125    --enable-largefile \
126    --with-cairo \
127    --with-cairo-includes=${prefix}/include/cairo \
128    --with-cairo-libs=${prefix}/lib \
129    --with-blas \
130    --with-lapack \
131    --with-readline \
132    --with-readline-includes=${prefix}/include/readline \
133    --with-readline-libs=${prefix}/lib \
134    --with-regex-includes=/usr/include \
135    --with-regex-lib=/usr/lib
136
137build.target    default
138
139build.args-append PYTHON=${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7
140
141variant mysql5 description {Add MySQL 5 support} {
142    depends_lib-append    path:bin/mysql_config5:mysql5
143    configure.args-append --with-mysql
144    configure.args-append --with-mysql-includes=${prefix}/include/mysql5/mysql
145    configure.args-append --with-mysql-libs=${prefix}/lib/mysql5/mysql
146    configure.env-append MYSQLD_CONFIG=${prefix}/lib/mysql5/bin/mysql_config
147}
148
149variant postgresql83 conflicts postgresql84 postgresql90 postgresql91 description {Add PostgreSQL 8.3 support} {
150    depends_lib-append    port:postgresql83
151    configure.args-delete --without-postgres
152    configure.args-append --with-postgres
153    configure.args-append --with-postgres-includes=${prefix}/include/postgresql83
154    configure.args-append --with-postgres-libs=${prefix}/lib/postgresql83
155}
156
157variant postgresql84 conflicts postgresql83 postgresql90 postgresql91 description {Add PostgreSQL 8.4 support} {
158    depends_lib-append    port:postgresql84
159    configure.args-delete --without-postgres
160    configure.args-append --with-postgres
161    configure.args-append --with-postgres-includes=${prefix}/include/postgresql84
162    configure.args-append --with-postgres-libs=${prefix}/lib/postgresql84
163}
164
165variant postgresql90 conflicts postgresql83 postgresql84 postgresql91 description {Add PostgreSQL 9.0 support} {
166    depends_lib-append    port:postgresql90
167    configure.args-delete --without-postgres
168    configure.args-append --with-postgres
169    configure.args-append --with-postgres-includes=${prefix}/include/postgresql90
170    configure.args-append --with-postgres-libs=${prefix}/lib/postgresql90
171}
172
173variant postgresql91 conflicts postgresql83 postgresql84 postgresql90 description {Add PostgreSQL 9.1 support} {
174    depends_lib-append    port:postgresql91
175    configure.args-delete --without-postgres
176    configure.args-append --with-postgres
177    configure.args-append --with-postgres-includes=${prefix}/include/postgresql91
178    configure.args-append --with-postgres-libs=${prefix}/lib/postgresql91
179}
180
181variant sqlite3 description {Add SQLite 3 support} {
182    depends_lib-append    port:sqlite3
183    configure.args-append --with-sqlite
184    configure.args-append --with-sqlite-includes=${prefix}/include
185    configure.args-append --with-sqlite-libs=${prefix}/lib
186}
187
188variant ffmpeg description {Add ffmpeg support} {
189    depends_lib-append    path:lib/libavcodec.dylib:ffmpeg
190    configure.args-append --with-ffmpeg \
191                          --with-ffmpeg-includes=\"${prefix}/include/libavcodec  \
192                                                   ${prefix}/include/libavformat \
193                                                   ${prefix}/include/libswscale\" \
194                          --with-ffmpeglibs=${prefix}/lib
195}
196
197variant wxwidgets description {Add WXWidgets support} {
198    depends_lib-append    port:wxwidgets30
199    configure.args-delete --disable-wxwidgets
200    configure.args-append --with-wxwidgets=${prefix}/bin/wx-config
201}
202
203variant wxPython requires wxwidgets description {Enable support for wxGUI Python extensions} {
204    depends_lib                   port:py27-wxpython30
205    configure.args-delete --disable-python
206    configure.args-append --with-python=${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7-config
207}
208
209livecheck.type      regex
210livecheck.url       http://grass.osgeo.org/devel/svntags.php
211livecheck.regex     {GRASS ([0-9.]+):}
Note: See TracBrowser for help on using the repository browser.