summaryrefslogtreecommitdiffstats
path: root/science/kst2/Makefile
blob: adafc21ba3507432b5ba2930f2737911362f9595 (plain)
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
# Created by: Markus Brueffer <markus@FreeBSD.org>
# $FreeBSD$

PORTNAME=	kst
DISTVERSION=	2.0.8
PORTREVISION=	2
CATEGORIES=	science kde
MASTER_SITES=	SF/${PORTNAME}/Kst%20${DISTVERSION:C/-r.*//}/
DISTNAME=	Kst-${DISTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Data viewing and plotting tool

LIB_DEPENDS=	libgsl.so:math/gsl

USES=		cmake:outsource pkgconfig
_USE_QT4=	gui xml designer svg linguisttools_build \
		qmake_build moc_build rcc_build uic_build
_USE_QT5=	concurrent network printsupport widgets xml \
		buildtools_build linguisttools_build qmake_build
USE_LDCONFIG=	yes

CMAKE_ARGS+=	-Dkst_install_prefix=${PREFIX} \
		-Dkst_pch=off

PLIST_SUB=	SHLIB_VER=${PORTVERSION}

OPTIONS_DEFINE=	FITS MATLAB NETCDF
OPTIONS_SINGLE=	TOOLKIT
OPTIONS_SINGLE_TOOLKIT=	QT4 QT5
OPTIONS_DEFAULT=	QT4
OPTIONS_SUB=	yes

FITS_DESC=	Support for data in FITS format
FITS_LIB_DEPENDS=	libcfitsio.so:astro/cfitsio

MATLAB_DESC=	Support for data in MATLAB format
MATLAB_LIB_DEPENDS=	libmatio.so:math/matio

NETCDF_DESC=	Support for data in NetCDF format (broken)
NETCDF_LIB_DEPENDS=	libnetcdf.so:science/netcdf
NETCDF_IGNORE=	does not support NetCDF 4

TOOLKIT_DESC=	Qt toolkit
QT4_USE=	${_USE_QT4:S/^/QT4=/}
QT5_USE=	${_USE_QT5:S/^/QT5=/}
QT5_CMAKE_ON=	-Dkst_qt5=on

post-patch:
	${REINPLACE_CMD} -e '/^Exec=kst2/s,\(kst2\).*,\1 %f,' \
		${WRKSRC}/src/kst/kst2.desktop

post-patch-FITS-off:
	${REINPLACE_CMD} -e '/find_package(CFITSIO)/d' \
		${CMAKE_SOURCE_PATH}/CMakeLists.txt

post-patch-MATLAB-off:
	${REINPLACE_CMD} -e '/find_package(Matio)/d' \
		${CMAKE_SOURCE_PATH}/CMakeLists.txt

post-patch-NETCDF-off:
	${REINPLACE_CMD} -e '/find_package(Netcdf)/d' \
		${CMAKE_SOURCE_PATH}/CMakeLists.txt

.include <bsd.port.mk>
OpenPOWER on IntegriCloud