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