update Sun Jan 17 06:37:00 PST 2010
[pkgsrc.git] / wip / grass / Makefile
1 # $NetBSD$
2
3 DISTNAME=               grass-${GRASS_VERSION}
4 PKGREVISION=            1
5 CATEGORIES=             geography
6 MASTER_SITES=           http://grass.itc.it/grass64/source/
7
8 MAINTAINER=             brook@nmsu.edu
9 HOMEPAGE=               http://grass.itc.it/
10 COMMENT=                Open source geographical information system (GIS)
11
12 USE_LANGUAGES=          c c++
13 USE_PKGLOCALEDIR=       yes
14 USE_TOOLS+=             autoconf bash gm4 gmake perl
15 USE_X11=                yes
16 GNU_CONFIGURE=          yes
17
18 BUILDLINK_PASSTHRU_RPATHDIRS+=  ${GRASS_HOME}/lib
19
20 .include "options.mk"
21
22 PLIST_VARS+=            fftw freetype iodbc motif mysql
23 PLIST_VARS+=            opengl pgsql sqlite unixodbc
24
25 CONFIGURE_ARGS+=        --with-cairo
26 CONFIGURE_ARGS+=        --with-cxx
27 CONFIGURE_ARGS+=        --with-nls
28 CONFIGURE_ARGS+=        --without-opendwg
29 CONFIGURE_ARGS+=        --with-proj-share=${PREFIX}/share/proj
30 CONFIGURE_ARGS+=        --with-readline
31
32 REPLACE_BASH+=          scripts/i.spectral/i.spectral
33 REPLACE_BASH+=          scripts/r.tileset/r.tileset
34 REPLACE_BASH+=          scripts/v.in.gpsbabel/v.in.gpsbabel
35
36 REPLACE_PYTHON+=        gui/wxpython/gui_modules/menuform.py
37
38 REPLACE_INTERPRETER+=   nviz
39 REPLACE.nviz.old=       .*nviz
40 REPLACE.nviz.new=       ${PREFIX}/${PKGNAME}/bin/nviz
41 REPLACE_FILES.nviz+=    visualization/nviz/scripts/nviz2.2_script
42 REPLACE_FILES.nviz+=    visualization/nviz/scripts/script_file_tools
43 REPLACE_FILES.nviz+=    visualization/nviz/scripts/script_get_line
44 REPLACE_FILES.nviz+=    visualization/nviz/scripts/script_play
45 REPLACE_FILES.nviz+=    visualization/nviz/scripts/script_tools
46
47 BUILD_TARGET=           default
48
49 # Note - the following is because the grass build process involves
50 # installing compiled objects into a directory within ${WRKSRC};
51 # during installation, files are installed from there into ${PREFIX}.
52 # However, because the install command changes ownership (even during
53 # the build phase), the package cannot be built by a non-root user.
54 pre-extract:
55         if [ `${ID} -u` != 0 ]; then \
56           ${ECHO} "${PKGNAME} must be built as root because it uses install during build." ; \
57           ${FALSE}; fi
58
59 post-install:
60         ${LN} -s grass${GRASS_VERSION:C/\.[0-9]+\$$//:S/.//g} \
61                 ${PREFIX}/bin/grass
62
63 .include "Makefile.common"
64 .include "../../devel/ncurses/buildlink3.mk"
65 .include "../../devel/readline/buildlink3.mk"
66 .include "../../devel/swig/buildlink3.mk"
67 .include "../../geography/gdal-lib/buildlink3.mk"
68 .include "../../graphics/cairo/buildlink3.mk"
69 .include "../../graphics/gd/buildlink3.mk"
70 .include "../../graphics/jpeg/buildlink3.mk"
71 .include "../../graphics/png/buildlink3.mk"
72 .include "../../graphics/tiff/buildlink3.mk"
73 .include "../../lang/tcl/buildlink3.mk"
74 .include "../../misc/proj/buildlink3.mk"
75 .include "../../mk/pthread.buildlink3.mk"
76 .include "../../x11/tk/buildlink3.mk"
77 .include "../../mk/bsd.pkg.mk"