Update science/R-cran-snow to version 0.3.13_3
[dports.git] / science / v_sim / Makefile
1 # Created by: Thierry Thomas <thierry@pompo.net>
2 # $FreeBSD$
3
4 PORTNAME=       v_sim
5 PORTVERSION=    3.6.1.1
6 PORTREVISION=   2
7 CATEGORIES=     science
8 MASTER_SITES=   http://www-drfmc.cea.fr/sp2m/L_Sim/V_Sim/download/
9
10 MAINTAINER=     thierry@FreeBSD.org
11 COMMENT=        Visualization of atomic structures
12
13 LICENSE=        CeCILL
14 LICENSE_NAME=   CeCILL
15 LICENSE_FILE=   ${WRKSRC}/COPYING
16 LICENSE_PERMS=  dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
17
18 LIB_DEPENDS=    cairo:${PORTSDIR}/graphics/cairo
19
20 USES=           fortran gmake pkgconfig
21 USE_BZIP2=      yes
22 USE_GNOME=      gtk20
23 USE_GL=         yes
24 GNU_CONFIGURE=  yes
25 CONFIGURE_ARGS= --disable-gtk-doc --with-html-dir=${PREFIX}/share/doc
26 CPPFLAGS+=      ${CFLAGS} -I${LOCALBASE}/include
27 LDFLAGS+=       -L${LOCALBASE}/lib
28 USE_LDCONFIG=   yes
29 INSTALLS_ICONS= yes
30
31 NO_STAGE=       yes
32
33 OPTIONS_DEFINE= DOCS NLS EXAMPLES
34
35 .include <bsd.port.options.mk>
36
37 .if ${PORT_OPTIONS:MDOCS}
38 MAN1=           v_sim.1
39 .endif
40
41 .if ${PORT_OPTIONS:MNLS}
42 USES+=          gettext
43 PLIST_SUB+=     NLS=""
44 .else
45 PLIST_SUB+=     NLS="@comment "
46 .endif
47
48 .if !defined(WITHOUT_CDF)
49 LIB_DEPENDS+=   netcdf.4:${PORTSDIR}/science/netcdf
50 CONFIGURE_ARGS+=--with-netcdf=${LOCALBASE}
51 PLIST_SUB+=     CDF=""
52 .else
53 CONFIGURE_ARGS+=--without-netcdf
54 PLIST_SUB+=     CDF="@comment "
55 .endif
56
57 .if !defined(WITHOUT_BABEL)
58 LIB_DEPENDS+=   openbabel:${PORTSDIR}/science/openbabel
59 CONFIGURE_ARGS+=--with-openbabel
60 PLIST_SUB+=     BABEL=""
61 .else
62 CONFIGURE_ARGS+=--without-openbabel
63 PLIST_SUB+=     BABEL="@comment "
64 .endif
65
66 pre-configure:
67         ${REINPLACE_CMD} -e 's|$$datadir/doc/$$PACKAGE/examples|${EXAMPLESDIR}|'        \
68                 -e 's|CFLAGS="-O2"|#CFLAGS="-O2"|;s|Werror ansi pedantic-errors||'      \
69                 -e 's|$${docdir}/examples|${EXAMPLESDIR}|'                              \
70                 ${WRKSRC}/${CONFIGURE_SCRIPT}
71 .if ! ${PORT_OPTIONS:MNLS}
72         ${REINPLACE_CMD} -e 's| po ||'  \
73                 ${WRKSRC}/Makefile.in
74 .endif
75 .if ! ${PORT_OPTIONS:MDOCS}
76         ${REINPLACE_CMD} -e 's|Documentation||' \
77                 ${WRKSRC}/Makefile.in
78 .endif
79 .if ! ${PORT_OPTIONS:MEXAMPLES}
80         ${REINPLACE_CMD} -e 's|pixmaps \\|pixmaps|;s|examples$$||'      \
81                 ${WRKSRC}/Makefile.in
82         ${FIND} ${WRKSRC}/lib/plug-ins -name Makefile.in | ${XARGS} \
83         ${REINPLACE_CMD} -e     \
84         's|install-v_simexamplesDATA install-v_simpixmapsDATA|install-v_simpixmapsDATA|'
85         ${REINPLACE_CMD} -e 's|: install-v_simexamplesDATA|:|'  \
86                 ${WRKSRC}/lib/python/Makefile.in
87 .endif
88
89 .include <bsd.port.mk>