1 # Created by: Thierry Thomas <thierry@pompo.net>
8 MASTER_SITES= http://www-drfmc.cea.fr/sp2m/L_Sim/V_Sim/download/
10 MAINTAINER= thierry@FreeBSD.org
11 COMMENT= Visualization of atomic structures
15 LICENSE_FILE= ${WRKSRC}/COPYING
16 LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
18 LIB_DEPENDS= cairo:${PORTSDIR}/graphics/cairo
20 USES= fortran gmake pkgconfig
25 CONFIGURE_ARGS= --disable-gtk-doc --with-html-dir=${PREFIX}/share/doc
26 CPPFLAGS+= ${CFLAGS} -I${LOCALBASE}/include
27 LDFLAGS+= -L${LOCALBASE}/lib
33 OPTIONS_DEFINE= DOCS NLS EXAMPLES
35 .include <bsd.port.options.mk>
37 .if ${PORT_OPTIONS:MDOCS}
41 .if ${PORT_OPTIONS:MNLS}
45 PLIST_SUB+= NLS="@comment "
48 .if !defined(WITHOUT_CDF)
49 LIB_DEPENDS+= netcdf.4:${PORTSDIR}/science/netcdf
50 CONFIGURE_ARGS+=--with-netcdf=${LOCALBASE}
53 CONFIGURE_ARGS+=--without-netcdf
54 PLIST_SUB+= CDF="@comment "
57 .if !defined(WITHOUT_BABEL)
58 LIB_DEPENDS+= openbabel:${PORTSDIR}/science/openbabel
59 CONFIGURE_ARGS+=--with-openbabel
62 CONFIGURE_ARGS+=--without-openbabel
63 PLIST_SUB+= BABEL="@comment "
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 ||' \
75 .if ! ${PORT_OPTIONS:MDOCS}
76 ${REINPLACE_CMD} -e 's|Documentation||' \
79 .if ! ${PORT_OPTIONS:MEXAMPLES}
80 ${REINPLACE_CMD} -e 's|pixmaps \\|pixmaps|;s|examples$$||' \
82 ${FIND} ${WRKSRC}/lib/plug-ins -name Makefile.in | ${XARGS} \
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
89 .include <bsd.port.mk>