Ticket #16238: Portfile.2.grass

File Portfile.2.grass, 3.7 KB (added by mf2k (Frank Schima), 16 years ago)

My latest version of the grass portfile based on blb's changes. Fixed variants. Fixed dependencies.

Line 
1# $Id$
2
3PortSystem 1.0
4
5name              grass
6version           6.3.0
7maintainers       nomaintainer
8categories        gis
9platforms         darwin
10
11description       GRASS
12long_description  GRASS is a Geographic Information System (GIS) used for \
13                  geospatial data management and analysis.
14
15homepage          http://grass.osgeo.org
16master_sites      http://grass.osgeo.org/grass63/source/
17
18checksums         md5 7dce50a076e2481733148ba34cbebc07
19
20depends_lib       port:fftw \
21                  port:freetype \
22                  port:geos \
23                  port:jpeg \
24                  port:libpng \
25                  port:openmotif \
26                  port:proj \
27                  port:gdal
28
29use_parallel_build yes
30
31# Can be removed once MacPorts 1.7 is released
32if {![info exists applications_dir]} {
33    set applications_dir /Applications/MacPorts
34}
35
36patchfiles        patch-Makefile.diff patch-configure.diff \
37                  patch-macosx_Makefile.diff
38post-patch {
39   reinplace "s|@@APPLICATIONS_DIR@@|${applications_dir}|" \
40      ${worksrcpath}/configure
41}
42
43configure.ldflags -framework OpenGL
44configure.args \
45    --prefix=${prefix} \
46    --with-gdal=${prefix}/bin/gdal-config \
47    --without-postgres \
48    --with-proj-includes=${prefix}/include \
49    --with-proj-libs=${prefix}/lib \
50    --with-proj-share=${prefix}/share/proj \
51    --with-jpeg-includes=${prefix}/include \
52    --with-jpeg-libs=${prefix}/lib \
53    --with-png-includes=${prefix}/include \
54    --with-png-libs=${prefix}/lib \
55    --with-fftw-includes=${prefix}/include \
56    --with-fftw-libs=${prefix}/lib \
57    --with-freetype \
58    --with-freetype-includes=${prefix}/include/freetype2 \
59    --with-freetype-libs=${prefix}/lib \
60    --with-tcltk-includes=${prefix}/include \
61    --with-tcltk-libs=${prefix}/lib \
62    --with-motif \
63    --with-motif-includes=${prefix}/include \
64    --with-motif-libs=${prefix}/lib \
65    --with-cxx \
66    --with-x \
67    --enable-largefile
68#    --enable-macosx-app
69
70#--with-glw \
71#--with-glw-includes=/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include \
72#--with-glw-libs=/Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib
73#-Wl,-dylib_file,/Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libGLw.dylib:\
74#                /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libGLw.dylib
75
76platform darwin 9 {
77configure.ldflags-append \
78    -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
79    /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
80}
81build.target    default
82
83# Can be removed once MacPorts 1.7.0 is released
84if {![info exists applications_dir]} {
85    set applications_dir /Applications/MacPorts
86}
87
88# installs into /opt/local/grass-6.3.0
89#destroot.violate_mtree  yes
90
91variant mysql5 description "Install grass with mysql 5 support" {
92  depends_lib-append    port:mysql5
93  configure.args-append --with-mysql
94  configure.args-append --with-mysql-includes=${prefix}/include/mysql5/mysql
95  configure.args-append --with-mysql-libs=${prefix}/lib/mysql5/mysql
96  configure.env-append MYSQLD_CONFIG=${prefix}/lib/mysql5/bin/mysql_config
97}
98
99variant postgresql83 description "Install grass with postgresql 8.3 support" {
100  depends_lib-append    port:postgresql83
101  configure.args-delete --without-postgres
102  configure.args-append --with-postgres
103  configure.args-append --with-postgres-includes=${prefix}/include/postgresql83
104  configure.args-append --with-postgres-libs=${prefix}/lib/postgresql83
105}
106
107variant sqlite3 description "Install grass with sqlite 3 support" {
108  depends_lib-append    port:sqlite3
109  configure.args-append --with-sqlite
110  configure.args-append --with-sqlite-includes=${prefix}/include
111  configure.args-append --with-sqlite-libs=${prefix}/lib
112}
113