summaryrefslogtreecommitdiff
blob: 2c5e9dedfc907c14c87ab20f12ef7bad9b51d2c3 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

ECM_HANDBOOK="forceoptional"
ECM_TEST="forceoptional"
KFMIN=6.3.0
QTMIN=6.6.2
inherit ecm kde.org

DESCRIPTION="Scientific data analysis and visualisation based on KDE Frameworks"
HOMEPAGE="https://labplot.kde.org/ https://apps.kde.org/labplot2/"
if [[ ${KDE_BUILD_TYPE} = release ]]; then
	SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz"
	KEYWORDS="~amd64 ~x86"
fi

LICENSE="GPL-2"
SLOT="0"
IUSE="eigen fftw fits hdf5 libcerf markdown matio netcdf ods origin root serial share telemetry xlsx"

# IUSE="cantor"
# 	cantor? (
# 		>=kde-apps/cantor-19.12.0:6
# 		>=kde-frameworks/kparts-${KFMIN}:6
# 		>=kde-frameworks/kservice-${KFMIN}:6
# 	)
DEPEND="
	app-text/poppler[qt6(-)]
	>=dev-qt/qtbase-${QTMIN}:6=[concurrent,gui,network,sql,widgets]
	>=dev-qt/qtsvg-${QTMIN}:6
	>=kde-frameworks/karchive-${KFMIN}:6
	>=kde-frameworks/kcompletion-${KFMIN}:6
	>=kde-frameworks/kconfig-${KFMIN}:6
	>=kde-frameworks/kconfigwidgets-${KFMIN}:6
	>=kde-frameworks/kcoreaddons-${KFMIN}:6
	>=kde-frameworks/kcrash-${KFMIN}:6
	>=kde-frameworks/ki18n-${KFMIN}:6
	>=kde-frameworks/kiconthemes-${KFMIN}:6
	>=kde-frameworks/kio-${KFMIN}:6
	>=kde-frameworks/knewstuff-${KFMIN}:6
	>=kde-frameworks/ktextwidgets-${KFMIN}:6
	>=kde-frameworks/kwidgetsaddons-${KFMIN}:6
	>=kde-frameworks/kxmlgui-${KFMIN}:6
	>=kde-frameworks/syntax-highlighting-${KFMIN}:6
	>=sci-libs/gsl-1.15:=
	eigen? ( dev-cpp/eigen:3= )
	xlsx? ( dev-libs/qxlsx:= )
	fftw? ( sci-libs/fftw:3.0= )
	fits? ( sci-libs/cfitsio:= )
	hdf5? ( sci-libs/hdf5:= )
	libcerf? ( sci-libs/libcerf )
	markdown? ( app-text/discount:= )
	matio? ( sci-libs/matio:= )
	netcdf? ( sci-libs/netcdf:= )
	ods? (
		dev-libs/libixion:=
		dev-libs/liborcus:=
	)
	origin? ( sci-libs/liborigin:2 )
	root? (
		app-arch/lz4
		sys-libs/zlib
	)
	serial? ( >=dev-qt/qtserialport-${QTMIN}:6 )
	share? ( >=kde-frameworks/purpose-${KFMIN}:6 )
	telemetry? ( >=kde-frameworks/kuserfeedback-${KFMIN}:6 )
"
RDEPEND="${DEPEND}
	!${CATEGORY}/${PN}:5
"
# not packaged: dev-qt/qtmqtt, bug 683994
BDEPEND="
	app-alternatives/yacc
	sys-devel/gettext
"

PATCHES=( "${FILESDIR}/${P}-ods-buildfix.patch" )

src_prepare() {
	ecm_src_prepare

	sed -e "/^ *find_package.*QT NAMES/s/Qt5 //" \
		-i CMakeLists.txt || die # ensure Qt6 build
}

src_configure() {
	local mycmakeargs=(
		-DENABLE_MQTT=OFF # not packaged
		-DENABLE_READSTAT=OFF # not packaged
		-DENABLE_VECTOR_BLF=OFF # not packaged
		-DENABLE_CANTOR=OFF # $(usex cantor)
		-DENABLE_EIGEN3=$(usex eigen)
		-DENABLE_XLSX=$(usex xlsx)
		-DENABLE_FFTW=$(usex fftw)
		-DENABLE_FITS=$(usex fits)
		-DENABLE_HDF5=$(usex hdf5)
		-DENABLE_LIBCERF=$(usex libcerf)
		-DENABLE_DISCOUNT=$(usex markdown)
		-DENABLE_MATIO=$(usex matio)
		-DENABLE_NETCDF=$(usex netcdf)
		-DENABLE_ORCUS=$(usex ods)
		-DENABLE_LIBORIGIN=$(usex origin)
		$(cmake_use_find_package share KF6Purpose)
		-DENABLE_ROOT=$(usex root)
		-DENABLE_QTSERIALPORT=$(usex serial)
		$(cmake_use_find_package telemetry KUserFeedbackQt6) # FIXME: should be KF6UserFeedback
		-DENABLE_TESTS=$(usex test)
	)

	ecm_src_configure
}