Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-visualization/scidavis/, sci-visualization/scidavis/files/
Date: Tue, 07 Dec 2021 22:40:14
Message-Id: 1638916803.8e4607aa21b6465f729301980972085f453dd1dd.andrewammerlaan@gentoo
1 commit: 8e4607aa21b6465f729301980972085f453dd1dd
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 7 22:39:32 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 7 22:40:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e4607aa
7
8 sci-visualization/scidavis: add new snapshot
9
10 for sip-6 support
11
12 switched to cmake build system
13
14 Package-Manager: Portage-3.0.28, Repoman-3.0.3
15 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
16
17 sci-visualization/scidavis/Manifest | 1 +
18 .../scidavis/files/scidavis-muparser.patch | 61 ++++++++++++++
19 .../scidavis/files/scidavis-qwtplot3d.patch | 15 ++++
20 sci-visualization/scidavis/metadata.xml | 1 +
21 .../scidavis/scidavis-2.4.0_p20211117.ebuild | 98 ++++++++++++++++++++++
22 5 files changed, 176 insertions(+)
23
24 diff --git a/sci-visualization/scidavis/Manifest b/sci-visualization/scidavis/Manifest
25 index f6b5a4200127..861d0375614f 100644
26 --- a/sci-visualization/scidavis/Manifest
27 +++ b/sci-visualization/scidavis/Manifest
28 @@ -1 +1,2 @@
29 DIST scidavis-2.4.0-gh.tar.gz 9244613 BLAKE2B 5961c1c4c28a7e290940ddefb4a7a447fb2b743528bcb96d190b2638a6b0d8807dad51ceab6392e5a3081b270149d3f3fccef8db8108dfdacc71a66c55a7509e SHA512 9797daaf3239176eb8fc346fb8e579af965cfe0881e9048c77258f1165135a124aea3ec52434cc23e117ba2077313437da65f5c694f2d8a54d312997264d9318
30 +DIST scidavis-2.4.0_p20211117.tar.gz 9248921 BLAKE2B e14d4a270ab0b7221b3e21762c4547e5d64930ddc72bf085d72d02e4756cc4c82f38b438f90dc472a05837d059650ea3718e100ad8c56762e990b11f571fce31 SHA512 f3fba2569d5ba79be1b10ffe4ed242f7a4df81fb4561388fcdb9461404ab966b21ecfdaa001518b5139eeef319e3c979109e2889d9268b07dad9c3cec970999b
31
32 diff --git a/sci-visualization/scidavis/files/scidavis-muparser.patch b/sci-visualization/scidavis/files/scidavis-muparser.patch
33 new file mode 100644
34 index 000000000000..1b8c994bc74e
35 --- /dev/null
36 +++ b/sci-visualization/scidavis/files/scidavis-muparser.patch
37 @@ -0,0 +1,61 @@
38 +diff --git a/CMakeLists.txt b/CMakeLists.txt
39 +index 1b75dcc..f6c730a 100644
40 +--- a/CMakeLists.txt
41 ++++ b/CMakeLists.txt
42 +@@ -1,4 +1,5 @@
43 + cmake_minimum_required( VERSION 3.16 )
44 ++include(GNUInstallDirs)
45 +
46 + # Target platform is Windows 10
47 + if( CMAKE_GENERATOR STREQUAL "Visual Studio 15 2017" OR
48 +@@ -115,6 +116,7 @@ find_package( ZLIB "1.2.11" REQUIRED )
49 + find_package( OpenGL COMPONENTS OpenGL REQUIRED )
50 +
51 + # muParser
52 ++if( SCRIPTING_MUPARSER )
53 + find_library( MUPARSER_LIB
54 + NAMES muparser
55 + REQUIRED
56 +@@ -124,6 +126,7 @@ find_path( MUPARSER_INCLUDE_DIR
57 + REQUIRED
58 + )
59 + message( STATUS "Found muParser : ${MUPARSER_LIB} include: ${MUPARSER_INCLUDE_DIR}" )
60 ++endif()
61 +
62 + add_subdirectory( 3rdparty )
63 +
64 +@@ -149,7 +152,7 @@ set( DOC_FILES
65 + if( WIN32 )
66 + install( FILES ${DOC_FILES} DESTINATION . )
67 + else()
68 +- install( FILES ${DOC_FILES} DESTINATION share/doc/scidavis )
69 ++ install( FILES ${DOC_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR} )
70 + endif()
71 +
72 + if( MSVC )
73 +diff --git a/scidavis/CMakeLists.txt b/scidavis/CMakeLists.txt
74 +index cc68d4d..fb6da42 100644
75 +--- a/scidavis/CMakeLists.txt
76 ++++ b/scidavis/CMakeLists.txt
77 +@@ -127,15 +127,18 @@ if (NOT CMAKE_CROSS_COMPILING)
78 + install( FILES scidavis.desktop DESTINATION share/applications )
79 + install( FILES scidavis.xml DESTINATION share/mime/packages )
80 + install( FILES scidavis.1 DESTINATION share/man/man1 )
81 +- install( FILES scidavis.appdata.xml DESTINATION share/appdata )
82 ++ install( FILES scidavis.appdata.xml DESTINATION share/metainfo )
83 + install( FILES x-sciprj.desktop DESTINATION share/mimelnk/application )
84 + endif()
85 +
86 + if( SCRIPTING_PYTHON )
87 ++ if(NOT PYTHON_SCRIPTDIR)
88 ++ set(PYTHON_SCRIPTDIR etc)
89 ++ endif()
90 + if( MULTI_CONFIG )
91 +- install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/scidavisrc.pyc DESTINATION etc )
92 ++ install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/scidavisrc.pyc DESTINATION ${PYTHON_SCRIPTDIR} )
93 + else()
94 +- install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/scidavisrc.pyc DESTINATION etc )
95 ++ install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/scidavisrc.pyc DESTINATION ${PYTHON_SCRIPTDIR} )
96 + endif()
97 + install( FILES scidavisUtil.py DESTINATION share/scidavis )
98 + endif()
99
100 diff --git a/sci-visualization/scidavis/files/scidavis-qwtplot3d.patch b/sci-visualization/scidavis/files/scidavis-qwtplot3d.patch
101 new file mode 100644
102 index 000000000000..857cca79bd98
103 --- /dev/null
104 +++ b/sci-visualization/scidavis/files/scidavis-qwtplot3d.patch
105 @@ -0,0 +1,15 @@
106 +diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
107 +index 1b43375..a2bd52c 100644
108 +--- a/3rdparty/CMakeLists.txt
109 ++++ b/3rdparty/CMakeLists.txt
110 +@@ -46,8 +46,8 @@ endif()
111 + option( BUILD_QWTPLOT3D "Build QwtPlot3D using own code" OFF )
112 +
113 + if( NOT BUILD_QWTPLOT3D )
114 +- find_library ( QWTPLOT3D_LIBRARY
115 +- NAMES qwtplot3d-qt5
116 ++find_library ( QWTPLOT3D_LIBRARY
117 ++ NAMES qwtplot3d
118 + HINTS ${QT_LIBRARY_DIR}
119 + )
120 + if( NOT QWTPLOT3D_LIBRARY )
121
122 diff --git a/sci-visualization/scidavis/metadata.xml b/sci-visualization/scidavis/metadata.xml
123 index 4a839925ffcb..71ea968fc6f6 100644
124 --- a/sci-visualization/scidavis/metadata.xml
125 +++ b/sci-visualization/scidavis/metadata.xml
126 @@ -17,6 +17,7 @@
127 <flag name="assistant">Compile with QAssistant (documentation broweser) support from <pkg>dev-qt/assistant</pkg>.</flag>
128 <flag name="origin">Add support for reading OriginLab OPJ project files through <pkg>sci-libs/liborigin</pkg>.</flag>
129 <flag name="python">Build support for python scripting.</flag>
130 + <flag name="muparser">Build support for muparser scripting.</flag>
131 </use>
132 <upstream>
133 <remote-id type="sourceforge">scidavis</remote-id>
134
135 diff --git a/sci-visualization/scidavis/scidavis-2.4.0_p20211117.ebuild b/sci-visualization/scidavis/scidavis-2.4.0_p20211117.ebuild
136 new file mode 100644
137 index 000000000000..83ff296ac304
138 --- /dev/null
139 +++ b/sci-visualization/scidavis/scidavis-2.4.0_p20211117.ebuild
140 @@ -0,0 +1,98 @@
141 +# Copyright 1999-2021 Gentoo Authors
142 +# Distributed under the terms of the GNU General Public License v2
143 +
144 +EAPI=8
145 +
146 +DOCS_BUILDER="doxygen"
147 +DOCS_DEPEND="media-gfx/graphviz"
148 +
149 +PYTHON_COMPAT=( python3_{8..10} )
150 +
151 +inherit python-single-r1 cmake docs virtualx xdg
152 +
153 +COMMIT="acc11c507631dc89db90c8777bab53b814620b4c"
154 +
155 +DESCRIPTION="Application for Scientific Data Analysis and Visualization"
156 +HOMEPAGE="http://scidavis.sourceforge.net/ https://github.com/SciDAVis/scidavis/"
157 +SRC_URI="https://github.com/SciDAVis/scidavis/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
158 +S="${WORKDIR}/${PN}-${COMMIT}"
159 +
160 +LICENSE="GPL-2+ ZLIB"
161 +KEYWORDS="~amd64"
162 +SLOT="0"
163 +
164 +IUSE="doc +muparser origin python test"
165 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
166 +
167 +# requires network
168 +RESTRICT="test"
169 +PROPERTIES="test_network"
170 +
171 +RDEPEND="
172 + muparser? ( dev-cpp/muParser )
173 + dev-qt/qtcore:5
174 + dev-qt/qtgui:5
175 + dev-qt/qtnetwork:5
176 + dev-qt/qtopengl:5
177 + dev-qt/qtprintsupport:5
178 + dev-qt/qtwidgets:5
179 + dev-qt/qtxml:5
180 + sci-libs/gsl:=
181 + sys-libs/zlib[minizip]
182 + x11-libs/qwt:5
183 + x11-libs/qwtplot3d
184 + origin? ( sci-libs/liborigin )
185 + python? (
186 + ${PYTHON_DEPS}
187 + $(python_gen_cond_dep '
188 + >=dev-python/PyQt5-5.15.6[${PYTHON_USEDEP}]
189 + dev-python/PyQt5-sip[${PYTHON_USEDEP}]
190 + >=dev-python/sip-6:5[${PYTHON_USEDEP}]
191 + ')
192 + )
193 +"
194 +DEPEND="${RDEPEND}"
195 +BDEPEND="
196 + dev-qt/linguist-tools:5
197 + test? (
198 + dev-libs/unittest++
199 + dev-cpp/gtest
200 + )
201 +"
202 +
203 +PATCHES=(
204 + "${FILESDIR}/${PN}-muparser.patch"
205 + "${FILESDIR}/${PN}-qwtplot3d.patch"
206 +)
207 +
208 +src_prepare() {
209 + cmake_src_prepare
210 +
211 + # Remove things which are packaged elsewhere
212 + rm -r 3rdparty/qwt5-qt5 3rdparty/qwtplot3d 3rdparty/liborigin || die
213 +
214 + # OF has been renamed in Gentoo https://bugs.gentoo.org/383179
215 + # Note this is *not* packaged in sys-libs/zlib[minizip] because
216 + # this file resides in the test directory in upstream zlib
217 + sed -i -r 's:\<(O[FN])\>:_Z_\1:g' 3rdparty/minigzip/minigzip.c || die
218 +}
219 +
220 +src_configure() {
221 + local mycmakeargs=(
222 + -DSCRIPTING_MUPARSER=$(usex muparser)
223 + -DSCRIPTING_PYTHON=$(usex python)
224 + -DPYTHON_SCRIPTDIR="$(python_get_scriptdir)"
225 + -DORIGIN_IMPORT=$(usex origin)
226 + -DBUILD_TESTS=$(usex test)
227 + )
228 + cmake_src_configure
229 +}
230 +
231 +src_compile() {
232 + cmake_src_compile
233 + docs_compile
234 +}
235 +
236 +src_test() {
237 + virtx cmake_src_test
238 +}