freebsd-ports/science/openbabel/Makefile
Yuri Victorovich 64d089e01b science/openbabel: Remove PYTHON option
Python bindings will be spun out into a separate port.
2022-11-20 13:50:01 -08:00

64 lines
1.8 KiB
Makefile

PORTNAME= openbabel
DISTVERSION= 3.1.1
PORTREVISION= 7
DISTVERSIONSUFFIX= -source
CATEGORIES= science
MASTER_SITES= https://github.com/openbabel/openbabel/releases/download/openbabel-${PORTVERSION:C/\./-/g}/
MAINTAINER= yuri@FreeBSD.org
COMMENT= Chemical toolbox designed to speak the many languages of chemical data
WWW= https://openbabel.org/wiki/Main_Page
LICENSE= GPLv2+
BUILD_DEPENDS= rapidjson>0:devel/rapidjson
LIB_DEPENDS= libmaeparser.so:science/maeparser \
libcoordgen.so:science/coordgenlibs \
libboost_thread.so:devel/boost-libs
CONFLICTS_INSTALL= babel
USES= cmake compiler:c++11-lang eigen:3 gnome pkgconfig tar:bz2
USE_CXXSTD= gnu++98
USE_GNOME= libxml2
USE_LDCONFIG= yes
CMAKE_ON= WITH_COORDGEN WITH_JSON OPENBABEL_USE_SYSTEM_RAPIDJSON WITH_MAEPARSER
CMAKE_OFF= PYTHON_BINDINGS
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
PLIST_SUB= VERSION=3.1.0 # To be replaced by ${PORTVERSION} nexttime!
OPTIONS_DEFINE= CAIRO GUI
OPTIONS_DEFAULT= CAIRO GUI
OPTIONS_SUB= yes
CAIRO_DESC= PNG support via cairo library
CAIRO_USE= GNOME=cairo
GUI_CMAKE_BOOL= BUILD_GUI
GUI_CMAKE_ON= -DwxWidgets_CONFIG_EXECUTABLE:STRING=${WX_CONFIG}
GUI_USE= WX=3.0
.include <bsd.port.pre.mk>
.if ${CHOSEN_COMPILER_TYPE} == gcc
CXXFLAGS+= -Wno-narrowing
USE_CXXSTD= c++11
.endif
pre-configure:
${REINPLACE_CMD} -e '/pkgconfig/s,$${LIB_INSTALL_DIR},libdata,' \
${WRKSRC}/CMakeLists.txt
pre-configure-CAIRO-off:
${REINPLACE_CMD} -e '/find_package(Cairo)/d' \
${WRKSRC}/CMakeLists.txt
post-install-PYTHON-on:
(cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
-d ${PREFIX} -f ${PYTHONPREFIX_SITELIBDIR:S,${PREFIX}/,,})
(cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
-d ${PREFIX} -f ${PYTHONPREFIX_SITELIBDIR:S,${PREFIX}/,,})
.include <bsd.port.post.mk>