mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
sci-visualization/kst: Use upstream FindHDF5.cmake module
And make some minor adjustments so it actually gets picked up. Closes: https://bugs.gentoo.org/954233 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 219e338d31878b19560dd6ef9ce99df954501ea5 Mon Sep 17 00:00:00 2001
|
||||
From 7fbe099d763f99275e89d577a462f4195966cc0e Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Sturmlechner <asturm@gentoo.org>
|
||||
Date: Tue, 15 Apr 2025 19:59:04 +0200
|
||||
Subject: [PATCH] Use CMake FindGSL module
|
||||
@@ -7,11 +7,9 @@ Fixes build if /usr/include/gsl directory is polluted by ms-gsl.
|
||||
|
||||
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
cmake/modules/FindGsl.cmake | 67 -------------------------------------
|
||||
src/plugins/CMakeLists.txt | 3 +-
|
||||
3 files changed, 2 insertions(+), 70 deletions(-)
|
||||
delete mode 100644 cmake/modules/FindGsl.cmake
|
||||
CMakeLists.txt | 4 +--
|
||||
src/plugins/CMakeLists.txt | 5 ++-
|
||||
2 files changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a4bc5239..bc84fbf0 100644
|
||||
@@ -26,88 +24,17 @@ index a4bc5239..bc84fbf0 100644
|
||||
find_package(Netcdf)
|
||||
find_package(Matio)
|
||||
find_package(CFITSIO)
|
||||
diff --git a/cmake/modules/FindGsl.cmake b/cmake/modules/FindGsl.cmake
|
||||
deleted file mode 100644
|
||||
index 6261e3a0..00000000
|
||||
--- a/cmake/modules/FindGsl.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,67 +0,0 @@
|
||||
-# ***************************************************************************
|
||||
-# * *
|
||||
-# * Copyright : (C) 2010 The University of Toronto *
|
||||
-# * email : netterfield@astro.utoronto.ca *
|
||||
-# * *
|
||||
-# * Copyright : (C) 2010 Peter Kümmel *
|
||||
-# * email : syntheticpp@gmx.net *
|
||||
-# * *
|
||||
-# * This program is free software; you can redistribute it and/or modify *
|
||||
-# * it under the terms of the GNU General Public License as published by *
|
||||
-# * the Free Software Foundation; either version 2 of the License, or *
|
||||
-# * (at your option) any later version. *
|
||||
-# * *
|
||||
-# ***************************************************************************
|
||||
-
|
||||
-# use pkg to find the library name and paths,
|
||||
-# but use this iformation in find_* only
|
||||
-if(NOT GSL_INCLUDEDIR)
|
||||
-
|
||||
-if(NOT kst_cross)
|
||||
- include(FindPkgConfig)
|
||||
- pkg_check_modules(PKGGSL QUIET gsl)
|
||||
-endif()
|
||||
-
|
||||
-if(NOT PKGGSL_LIBRARIES)
|
||||
- set(PKGGSL_LIBRARIES gsl)
|
||||
- if (UNIX AND NOT kst_cross)
|
||||
- set(PKGGSL_LIBRARIES ${PKGGSL_LIBRARIES} m gslcblas)
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
-set(GSL_INCLUDEDIR GSL_INCLUDEDIR-NOTFOUND CACHE STRING "" FORCE)
|
||||
-find_path(GSL_INCLUDEDIR gsl_version.h
|
||||
- HINTS
|
||||
- ENV GSL_DIR
|
||||
- PATH_SUFFIXES include/gsl include
|
||||
- PATHS ${kst_3rdparty_dir} ${PKGGSL_INCLUDEDIR})
|
||||
-
|
||||
-set(GSL_LIBRARY_LIST)
|
||||
-foreach(it ${PKGGSL_LIBRARIES})
|
||||
- set(lib lib-NOTFOUND CACHE STRING "" FORCE)
|
||||
- FIND_LIBRARY(lib ${it}
|
||||
- HINTS
|
||||
- ENV GSL_DIR
|
||||
- PATH_SUFFIXES lib
|
||||
- PATHS ${kst_3rdparty_dir} ${PKGGSL_LIBRARY_DIRS})
|
||||
- list(APPEND GSL_LIBRARY_LIST ${lib})
|
||||
-endforeach()
|
||||
-set(GSL_LIBRARIES ${GSL_LIBRARY_LIST} CACHE STRING "" FORCE)
|
||||
-
|
||||
-endif()
|
||||
-
|
||||
-if(GSL_INCLUDEDIR AND GSL_LIBRARIES)
|
||||
- set(GSL_INCLUDE_DIR ${GSL_INCLUDEDIR} ${GSL_INCLUDEDIR}/..)
|
||||
- set(gsl 1)
|
||||
- message(STATUS "Found GSL:")
|
||||
- message(STATUS " includes : ${GSL_INCLUDE_DIR}")
|
||||
- message(STATUS " libraries: ${GSL_LIBRARIES}")
|
||||
-else()
|
||||
- message(STATUS "Not found: GSL.")
|
||||
- MESSAGE(STATUS " If GSL is installed outside the CMake search path,")
|
||||
- MESSAGE(STATUS " set the environmental variable GSL_DIR to the")
|
||||
- MESSAGE(STATUS " GSL install prefix.")
|
||||
-endif()
|
||||
-
|
||||
-message(STATUS "")
|
||||
-
|
||||
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
|
||||
index 6c744f97..0f4006ca 100644
|
||||
index 6c744f97..c5929d88 100644
|
||||
--- a/src/plugins/CMakeLists.txt
|
||||
+++ b/src/plugins/CMakeLists.txt
|
||||
@@ -31,10 +31,9 @@ kst_add_plugin(filters differentiation)
|
||||
@@ -30,11 +30,10 @@ kst_add_plugin(filters window)
|
||||
kst_add_plugin(filters differentiation)
|
||||
kst_add_plugin(filters exponential)
|
||||
|
||||
if(gsl)
|
||||
-if(gsl)
|
||||
- include_directories(${GSL_INCLUDE_DIR})
|
||||
+if(GSL_FOUND)
|
||||
macro(kst_add_gsl_plugin dir name)
|
||||
kst_add_plugin(${dir} ${name})
|
||||
- kst_link(${GSL_LIBRARIES})
|
||||
@@ -117,3 +44,4 @@ index 6c744f97..0f4006ca 100644
|
||||
kst_add_gsl_plugin(dataobject/convolution convolve)
|
||||
--
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From 58ea6c63dd800ebeb9f0b12744e4de87e8d372b5 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Sturmlechner <asturm@gentoo.org>
|
||||
Date: Wed, 23 Apr 2025 19:07:28 +0200
|
||||
Subject: [PATCH] Use CMake provided FindHDF5 module
|
||||
|
||||
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
src/datasources/CMakeLists.txt | 6 +--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index bc84fbf0..db9c09fb 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -166,7 +166,7 @@ if(kst_3rdparty)
|
||||
find_package(Matio)
|
||||
find_package(CFITSIO)
|
||||
find_package(LibTiff)
|
||||
- find_package(HDF5)
|
||||
+ find_package(HDF5 COMPONENTS CXX)
|
||||
message(STATUS "----------------------------------------------")
|
||||
else()
|
||||
message(STATUS "Building plugins depending on 3rd party libraries suppressed")
|
||||
diff --git a/src/datasources/CMakeLists.txt b/src/datasources/CMakeLists.txt
|
||||
index f72c44b0..12da98c8 100644
|
||||
--- a/src/datasources/CMakeLists.txt
|
||||
+++ b/src/datasources/CMakeLists.txt
|
||||
@@ -73,8 +73,8 @@ if(tiff)
|
||||
kst_link(${TIFF_LIBRARIES})
|
||||
endif()
|
||||
|
||||
-if(hdf5)
|
||||
- include_directories(${HDF5_INCLUDEDIR})
|
||||
+if(HDF5_FOUND)
|
||||
+ include_directories(${HDF5_CXX_INCLUDE_DIRS})
|
||||
kst_add_plugin(. hdf5)
|
||||
- kst_link(${HDF5_LIBRARIES})
|
||||
+ kst_link(${HDF5_CXX_LIBRARIES})
|
||||
endif()
|
||||
--
|
||||
2.49.0
|
||||
|
||||
84
sci-visualization/kst/kst-2.1.0_p20250415-r1.ebuild
Normal file
84
sci-visualization/kst/kst-2.1.0_p20250415-r1.ebuild
Normal file
@@ -0,0 +1,84 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CMAKE_REMOVE_MODULES_LIST=( FindGsl FindHDF5 )
|
||||
KDE_ORG_CATEGORY=graphics
|
||||
KDE_ORG_NAME=kst-plot
|
||||
KDE_ORG_COMMIT=16334f6f99613a1b60873d93835f9083dca258b2
|
||||
inherit cmake flag-o-matic kde.org xdg
|
||||
|
||||
DESCRIPTION="Fast real-time large-dataset viewing and plotting tool"
|
||||
HOMEPAGE="https://kst-plot.kde.org/"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 FDL-1.2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="debug test"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
dev-qt/designer:5
|
||||
dev-qt/qtconcurrent:5
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtnetwork:5
|
||||
dev-qt/qtprintsupport:5
|
||||
dev-qt/qtsvg:5
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtxml:5
|
||||
media-libs/tiff:=
|
||||
sci-libs/cfitsio:=
|
||||
sci-libs/getdata[cxx]
|
||||
sci-libs/gsl:=
|
||||
sci-libs/hdf5:=[cxx]
|
||||
sci-libs/matio:=
|
||||
sci-libs/netcdf-cxx:3
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-qt/qttest:5 )
|
||||
"
|
||||
BDEPEND="dev-qt/linguist-tools:5"
|
||||
|
||||
DOCS=( AUTHORS README.kstScript )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.0.8-getdata-drop-bogus-lib_debug.patch # bug #593848
|
||||
"${FILESDIR}"/${P}-cmake4.patch # thx opensuse
|
||||
"${FILESDIR}"/${P}-cmake-{findgsl,findhdf5}.patch # bugs #884625, #954233
|
||||
"${FILESDIR}"/${P}-hdf5cxx.patch # thx opensuse
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
rm -r cmake/3rdparty || die
|
||||
|
||||
cmake_src_prepare
|
||||
|
||||
sed -e "/^kst_revision_project_name/ s/^/# removed by ebuild: /" \
|
||||
-i CMakeLists.txt || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# -Werror=odr, -Werror=lto-type=-mismatch
|
||||
# https://bugs.gentoo.org/863296
|
||||
# https://bugs.kde.org/show_bug.cgi?id=484572
|
||||
filter-lto
|
||||
|
||||
local mycmakeargs=(
|
||||
-Dkst_install_libdir="$(get_libdir)"
|
||||
-Dkst_revision=${PV/*_p/-}
|
||||
-Dkst_dbgsym=ON
|
||||
-Dkst_pch=OFF
|
||||
-Dkst_python=OFF
|
||||
-Dkst_qt5=ON
|
||||
-Dkst_qt4=OFF
|
||||
-Dkst_rpath=OFF
|
||||
-Dkst_svnversion=OFF
|
||||
-Dkst_verbose=ON
|
||||
-Dkst_release=$(usex debug OFF ON)
|
||||
-Dkst_test=$(usex test)
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
Reference in New Issue
Block a user