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

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

wxPython and its dependencies: use the new wxWidgets ports (some ports lack proper testing) #38375

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