aboutsummaryrefslogtreecommitdiffstats
path: root/science/openbabel/Makefile
blob: 28124feccaeba287b60c1974661b4992422a9648 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Created by: ijliao
# $FreeBSD$

PORTNAME=   openbabel
PORTVERSION=    2.3.2
PORTREVISION=   2
CATEGORIES= science
MASTER_SITES=   SF

MAINTAINER= makc@FreeBSD.org
COMMENT=    Chemistry file translation program

BROKEN_powerpc64=   Does not build

BUILD_DEPENDS=  ${LOCALBASE}/include/eigen3/Eigen/Eigen:math/eigen3

CONFLICTS_INSTALL=  babel-*

USE_GNOME=  libxml2
USES=       cmake:outsource
CMAKE_ARGS= -DBUILD_GUI=off
USE_LDCONFIG=   yes

PLIST_SUB=  VERSION="${PORTVERSION}"

OPTIONS_DEFINE= CAIRO PYTHON
OPTIONS_DEFAULT=    PYTHON
OPTIONS_SUB=    yes

CAIRO_DESC= PNG support via cairo library
CAIRO_LIB_DEPENDS=  libcairo.so:graphics/cairo
CAIRO_USES= pkgconfig

PYTHON_USES=    python
PYTHON_CMAKE_ON=    -DPYTHON_BINDINGS=on

post-patch:
    ${REINPLACE_CMD} -e '/pkgconfig/s,$${LIB_INSTALL_DIR},libdata,' \
        ${WRKSRC}/CMakeLists.txt
    ${REINPLACE_CMD} -e 's,share/man,man,' \
        ${WRKSRC}/doc/CMakeLists.txt

post-patch-CAIRO-off:
    ${REINPLACE_CMD} -e '/find_package(Cairo)/d' \
        ${WRKSRC}/CMakeLists.txt

.include <bsd.port.mk>