diff options
author | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2021-12-07 23:39:32 +0100 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2021-12-07 23:40:03 +0100 |
commit | 8e4607aa21b6465f729301980972085f453dd1dd (patch) | |
tree | 0ef12f61f105bf583067ef4eb656624dbf0e6027 /sci-visualization/scidavis | |
parent | x11-libs/qwt: install additional headers required by scidavis (diff) | |
download | gentoo-8e4607aa21b6465f729301980972085f453dd1dd.tar.gz gentoo-8e4607aa21b6465f729301980972085f453dd1dd.tar.bz2 gentoo-8e4607aa21b6465f729301980972085f453dd1dd.zip |
sci-visualization/scidavis: add new snapshot
for sip-6 support
switched to cmake build system
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-visualization/scidavis')
-rw-r--r-- | sci-visualization/scidavis/Manifest | 1 | ||||
-rw-r--r-- | sci-visualization/scidavis/files/scidavis-muparser.patch | 61 | ||||
-rw-r--r-- | sci-visualization/scidavis/files/scidavis-qwtplot3d.patch | 15 | ||||
-rw-r--r-- | sci-visualization/scidavis/metadata.xml | 1 | ||||
-rw-r--r-- | sci-visualization/scidavis/scidavis-2.4.0_p20211117.ebuild | 98 |
5 files changed, 176 insertions, 0 deletions
diff --git a/sci-visualization/scidavis/Manifest b/sci-visualization/scidavis/Manifest index f6b5a4200127..861d0375614f 100644 --- a/sci-visualization/scidavis/Manifest +++ b/sci-visualization/scidavis/Manifest @@ -1 +1,2 @@ DIST scidavis-2.4.0-gh.tar.gz 9244613 BLAKE2B 5961c1c4c28a7e290940ddefb4a7a447fb2b743528bcb96d190b2638a6b0d8807dad51ceab6392e5a3081b270149d3f3fccef8db8108dfdacc71a66c55a7509e SHA512 9797daaf3239176eb8fc346fb8e579af965cfe0881e9048c77258f1165135a124aea3ec52434cc23e117ba2077313437da65f5c694f2d8a54d312997264d9318 +DIST scidavis-2.4.0_p20211117.tar.gz 9248921 BLAKE2B e14d4a270ab0b7221b3e21762c4547e5d64930ddc72bf085d72d02e4756cc4c82f38b438f90dc472a05837d059650ea3718e100ad8c56762e990b11f571fce31 SHA512 f3fba2569d5ba79be1b10ffe4ed242f7a4df81fb4561388fcdb9461404ab966b21ecfdaa001518b5139eeef319e3c979109e2889d9268b07dad9c3cec970999b diff --git a/sci-visualization/scidavis/files/scidavis-muparser.patch b/sci-visualization/scidavis/files/scidavis-muparser.patch new file mode 100644 index 000000000000..1b8c994bc74e --- /dev/null +++ b/sci-visualization/scidavis/files/scidavis-muparser.patch @@ -0,0 +1,61 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1b75dcc..f6c730a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,5 @@ + cmake_minimum_required( VERSION 3.16 ) ++include(GNUInstallDirs) + + # Target platform is Windows 10 + if( CMAKE_GENERATOR STREQUAL "Visual Studio 15 2017" OR +@@ -115,6 +116,7 @@ find_package( ZLIB "1.2.11" REQUIRED ) + find_package( OpenGL COMPONENTS OpenGL REQUIRED ) + + # muParser ++if( SCRIPTING_MUPARSER ) + find_library( MUPARSER_LIB + NAMES muparser + REQUIRED +@@ -124,6 +126,7 @@ find_path( MUPARSER_INCLUDE_DIR + REQUIRED + ) + message( STATUS "Found muParser : ${MUPARSER_LIB} include: ${MUPARSER_INCLUDE_DIR}" ) ++endif() + + add_subdirectory( 3rdparty ) + +@@ -149,7 +152,7 @@ set( DOC_FILES + if( WIN32 ) + install( FILES ${DOC_FILES} DESTINATION . ) + else() +- install( FILES ${DOC_FILES} DESTINATION share/doc/scidavis ) ++ install( FILES ${DOC_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR} ) + endif() + + if( MSVC ) +diff --git a/scidavis/CMakeLists.txt b/scidavis/CMakeLists.txt +index cc68d4d..fb6da42 100644 +--- a/scidavis/CMakeLists.txt ++++ b/scidavis/CMakeLists.txt +@@ -127,15 +127,18 @@ if (NOT CMAKE_CROSS_COMPILING) + install( FILES scidavis.desktop DESTINATION share/applications ) + install( FILES scidavis.xml DESTINATION share/mime/packages ) + install( FILES scidavis.1 DESTINATION share/man/man1 ) +- install( FILES scidavis.appdata.xml DESTINATION share/appdata ) ++ install( FILES scidavis.appdata.xml DESTINATION share/metainfo ) + install( FILES x-sciprj.desktop DESTINATION share/mimelnk/application ) + endif() + + if( SCRIPTING_PYTHON ) ++ if(NOT PYTHON_SCRIPTDIR) ++ set(PYTHON_SCRIPTDIR etc) ++ endif() + if( MULTI_CONFIG ) +- install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/scidavisrc.pyc DESTINATION etc ) ++ install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/scidavisrc.pyc DESTINATION ${PYTHON_SCRIPTDIR} ) + else() +- install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/scidavisrc.pyc DESTINATION etc ) ++ install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/scidavisrc.pyc DESTINATION ${PYTHON_SCRIPTDIR} ) + endif() + install( FILES scidavisUtil.py DESTINATION share/scidavis ) + endif() diff --git a/sci-visualization/scidavis/files/scidavis-qwtplot3d.patch b/sci-visualization/scidavis/files/scidavis-qwtplot3d.patch new file mode 100644 index 000000000000..857cca79bd98 --- /dev/null +++ b/sci-visualization/scidavis/files/scidavis-qwtplot3d.patch @@ -0,0 +1,15 @@ +diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt +index 1b43375..a2bd52c 100644 +--- a/3rdparty/CMakeLists.txt ++++ b/3rdparty/CMakeLists.txt +@@ -46,8 +46,8 @@ endif() + option( BUILD_QWTPLOT3D "Build QwtPlot3D using own code" OFF ) + + if( NOT BUILD_QWTPLOT3D ) +- find_library ( QWTPLOT3D_LIBRARY +- NAMES qwtplot3d-qt5 ++find_library ( QWTPLOT3D_LIBRARY ++ NAMES qwtplot3d + HINTS ${QT_LIBRARY_DIR} + ) + if( NOT QWTPLOT3D_LIBRARY ) diff --git a/sci-visualization/scidavis/metadata.xml b/sci-visualization/scidavis/metadata.xml index 4a839925ffcb..71ea968fc6f6 100644 --- a/sci-visualization/scidavis/metadata.xml +++ b/sci-visualization/scidavis/metadata.xml @@ -17,6 +17,7 @@ <flag name="assistant">Compile with QAssistant (documentation broweser) support from <pkg>dev-qt/assistant</pkg>.</flag> <flag name="origin">Add support for reading OriginLab OPJ project files through <pkg>sci-libs/liborigin</pkg>.</flag> <flag name="python">Build support for python scripting.</flag> + <flag name="muparser">Build support for muparser scripting.</flag> </use> <upstream> <remote-id type="sourceforge">scidavis</remote-id> diff --git a/sci-visualization/scidavis/scidavis-2.4.0_p20211117.ebuild b/sci-visualization/scidavis/scidavis-2.4.0_p20211117.ebuild new file mode 100644 index 000000000000..83ff296ac304 --- /dev/null +++ b/sci-visualization/scidavis/scidavis-2.4.0_p20211117.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DOCS_BUILDER="doxygen" +DOCS_DEPEND="media-gfx/graphviz" + +PYTHON_COMPAT=( python3_{8..10} ) + +inherit python-single-r1 cmake docs virtualx xdg + +COMMIT="acc11c507631dc89db90c8777bab53b814620b4c" + +DESCRIPTION="Application for Scientific Data Analysis and Visualization" +HOMEPAGE="http://scidavis.sourceforge.net/ https://github.com/SciDAVis/scidavis/" +SRC_URI="https://github.com/SciDAVis/scidavis/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${COMMIT}" + +LICENSE="GPL-2+ ZLIB" +KEYWORDS="~amd64" +SLOT="0" + +IUSE="doc +muparser origin python test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# requires network +RESTRICT="test" +PROPERTIES="test_network" + +RDEPEND=" + muparser? ( dev-cpp/muParser ) + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtopengl:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + sci-libs/gsl:= + sys-libs/zlib[minizip] + x11-libs/qwt:5 + x11-libs/qwtplot3d + origin? ( sci-libs/liborigin ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + >=dev-python/PyQt5-5.15.6[${PYTHON_USEDEP}] + dev-python/PyQt5-sip[${PYTHON_USEDEP}] + >=dev-python/sip-6:5[${PYTHON_USEDEP}] + ') + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-qt/linguist-tools:5 + test? ( + dev-libs/unittest++ + dev-cpp/gtest + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-muparser.patch" + "${FILESDIR}/${PN}-qwtplot3d.patch" +) + +src_prepare() { + cmake_src_prepare + + # Remove things which are packaged elsewhere + rm -r 3rdparty/qwt5-qt5 3rdparty/qwtplot3d 3rdparty/liborigin || die + + # OF has been renamed in Gentoo https://bugs.gentoo.org/383179 + # Note this is *not* packaged in sys-libs/zlib[minizip] because + # this file resides in the test directory in upstream zlib + sed -i -r 's:\<(O[FN])\>:_Z_\1:g' 3rdparty/minigzip/minigzip.c || die +} + +src_configure() { + local mycmakeargs=( + -DSCRIPTING_MUPARSER=$(usex muparser) + -DSCRIPTING_PYTHON=$(usex python) + -DPYTHON_SCRIPTDIR="$(python_get_scriptdir)" + -DORIGIN_IMPORT=$(usex origin) + -DBUILD_TESTS=$(usex test) + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + docs_compile +} + +src_test() { + virtx cmake_src_test +} |