freebsd-ports/science/avogadro/Makefile
Gerald Pfeifer 1cd277bdce Update the default version of GCC used in the Ports Collection from
GCC 4.6.4 to GCC 4.7.3.  This entails updating the lang/gcc port as
well as changing the default in Mk/bsd.default-versions.mk.

Part II, Bump PORTREVISIONs.

PR:		182136
Supported by:	Christoph Moench-Tegeder <cmt@burggraben.net> (fixing many ports)
Tested by:	bdrewery (two -exp runs)
2014-03-10 20:55:20 +00:00

69 lines
1.9 KiB
Makefile

# Created by: Troels Kofoed Jacobsen <tkjacobsen@gmail.com>
# $FreeBSD$
PORTNAME= avogadro
PORTVERSION= 1.1.1
PORTREVISION= 2
CATEGORIES= science
MASTER_SITES= SF
MAINTAINER= ports@FreeBSD.org
COMMENT= Advanced molecular editor and viewer
LICENSE= GPLv2 # (or later)
BUILD_DEPENDS= eigen2>2:${PORTSDIR}/math/eigen2
LIB_DEPENDS= libopenbabel.so:${PORTSDIR}/science/openbabel
OPTIONS_DEFINE= PYTHON
OPTIONS_DEFAULT=PYTHON
OPTIONS_SUB= yes
USE_BZIP2= yes
USES= cmake desktop-file-utils pkgconfig
USE_GL= glu gl
USE_QT4= gui network opengl \
linguist_build moc_build qmake_build rcc_build uic_build
CMAKE_ARGS= -DENABLE_GLSL=OFF \
-DQT_MKSPECS_RELATIVE=share/qt4/mkspecs
USE_LDCONFIG= yes
CFLAGS+= -idirafter ${LOCALBASE}/include/eigen2 \
-idirafter ${LOCALBASE}/include \
-I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPYTHON}
USE_PYTHON= 2
BUILD_DEPENDS+= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}sip>0:${PORTSDIR}/devel/py-sip
LIB_DEPENDS+= libboost_python.so:${PORTSDIR}/devel/boost-python-libs
RUN_DEPENDS+= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}sip>0:${PORTSDIR}/devel/py-sip
CMAKE_ARGS+= -DENABLE_PYTHON=ON \
-DPYTHON_INCLUDE_DIR:PATH=${WRKDIR}/include/${PYTHON_VERSION}
.else
CMAKE_ARGS+= -DENABLE_PYTHON=OFF
.endif
post-patch:
@${REINPLACE_CMD} -e \
'/FLAGS_RELEASE/s|^|#| ; \
/PC_FILES/s|$${LIB_INSTALL_DIR}|libdata|' ${WRKSRC}/CMakeLists.txt
@${REINPLACE_CMD} -e \
's|share/man|man|' ${WRKSRC}/doc/CMakeLists.txt
pre-configure:
.if ${PORT_OPTIONS:MPYTHON}
@${MKDIR} ${WRKDIR}/include/${PYTHON_VERSION}
@${FIND} ${PYTHON_INCLUDEDIR} ! -name "pyport.h" -type f \
-maxdepth 1 | ${XARGS} -J % ${LN} -sf % \
${WRKDIR}/include/${PYTHON_VERSION}
@${SED} -e 's|^#ifdef _PY_PORT_CTYPE_UTF8_ISSUE|#if 0|' \
${PYTHON_INCLUDEDIR}/pyport.h > \
${WRKDIR}/include/${PYTHON_VERSION}/pyport.h
.endif
.include <bsd.port.mk>