aboutsummaryrefslogtreecommitdiffstats
path: root/science/gchemutils/Makefile
blob: c6ccfd51736481fdc0d99bb08adb708ccc9488ff (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Created by: Pav Lucistnik <pav@oook.cz>
# $FreeBSD$

PORTNAME=   gchemutils
PORTVERSION=    0.14.16
PORTREVISION=   1
CATEGORIES= science
MASTER_SITES=   SAVANNAH/${PORTNAME}/${PORTVERSION:R}
DISTNAME=   gnome-chemistry-utils-${PORTVERSION}

MAINTAINER= kwm@FreeBSD.org
COMMENT=    C++ classes and Gtk3 widgets related to chemistry

LICENSE=    GPLv3+
LICENSE_FILE=   ${WRKSRC}/COPYING

BUILD_DEPENDS=  ${LOCALBASE}/libdata/pkgconfig/bodr.pc:science/bodr \
        ${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data
LIB_DEPENDS=    libgtkglext-x11-1.0.so:x11-toolkits/gtkglext \
        libopenbabel.so:science/openbabel \
        libgoffice-0.10.so:devel/goffice010
RUN_DEPENDS=    ${LOCALBASE}/libdata/pkgconfig/bodr.pc:science/bodr \
        ${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data

PORTSCOUT=  limitw:1,even

USE_XORG=   x11
USE_GNOME=  cairo gnomedocutils gtk30 intlhack libgsf libxml2
USE_GL=     gl
USES=       desktop-file-utils gettext gmake libtool:keepla localbase:ldflags \
        pathfix pkgconfig shared-mime-info tar:xz
USE_LDCONFIG=   yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-omf-dir=${PREFIX}/share/omf
INSTALLS_ICONS= yes
INSTALLS_OMF=   yes
GLIB_SCHEMAS=   org.gnome.gchemutils.crystal.gschema.xml \
        org.gnome.gchemutils.gschema.xml \
        org.gnome.gchemutils.paint.gschema.xml \
        org.gnome.gchemutils.paint.plugins.arrows.gschema.xml

VER=        ${PORTVERSION:R}
PLIST_SUB=  VER=${VER} GOFFICE=0.10 VERSION=${PORTVERSION}

OPTIONS_DEFINE= GNUMERIC XUL
OPTIONS_SUB=    yes
GNUMERIC_DESC=  Build gnumeric plugin
XUL_DESC=   Build browser plugin (requires libxul)

XUL_USES=   gecko
XUL_CONFIGURE_ON=--enable-mozilla-plugin \
        --with-mozilla-libdir=${PREFIX}/lib/xulrunner
XUL_CONFIGURE_OFF=--disable-mozilla-plugin

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGNUMERIC} || exists(${LOCALBASE}/lib/libspreadsheet.so)
LIB_DEPENDS+=   libspreadsheet.so:math/gnumeric
PLIST_SUB+= GNUMERIC=""
.else
PLIST_SUB+= GNUMERIC="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-ldl||g' ${WRKSRC}/libs/gcp/Makefile.in

post-install:
    @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so.*
    @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*/*/*/*/*.so

.include <bsd.port.mk>