commit: 3da8fa0555ccb69b5f3114da975c166fd032faf2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> AuthorDate: Sat Apr 16 16:28:22 2022 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> CommitDate: Sat Apr 16 16:30:58 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3da8fa05
sci-visualization/scidavis: multiple bug fixes - Enable muparser unconditionally Closes: https://bugs.gentoo.org/834074 - Only set PYTHON_SCRIPTDIR if we enable python scripting Closes: https://bugs.gentoo.org/832753 - Fix build if sip-4 installed as well as sip-6 Closes: https://bugs.gentoo.org/828938 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> ...t3d.patch => scidavis-2.7-find-qwtplot3d.patch} | 0 .../scidavis-2.7-fix-build-if-sip4-installed.patch | 13 +++++++++++++ ....patch => scidavis-2.7-install-locations.patch} | 0 sci-visualization/scidavis/metadata.xml | 1 - ...{scidavis-2.7.ebuild => scidavis-2.7-r1.ebuild} | 22 +++++++++++++++------- 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/sci-visualization/scidavis/files/scidavis-qwtplot3d.patch b/sci-visualization/scidavis/files/scidavis-2.7-find-qwtplot3d.patch similarity index 100% rename from sci-visualization/scidavis/files/scidavis-qwtplot3d.patch rename to sci-visualization/scidavis/files/scidavis-2.7-find-qwtplot3d.patch diff --git a/sci-visualization/scidavis/files/scidavis-2.7-fix-build-if-sip4-installed.patch b/sci-visualization/scidavis/files/scidavis-2.7-fix-build-if-sip4-installed.patch new file mode 100644 index 000000000000..2b415458da22 --- /dev/null +++ b/sci-visualization/scidavis/files/scidavis-2.7-fix-build-if-sip4-installed.patch @@ -0,0 +1,13 @@ +diff --git a/libscidavis/CMakeLists.txt b/libscidavis/CMakeLists.txt +index 8fc6c4e3..27464ec2 100644 +--- a/libscidavis/CMakeLists.txt ++++ b/libscidavis/CMakeLists.txt +@@ -483,7 +483,7 @@ if( SCRIPTING_PYTHON ) + set(scidavis_PyQt_HDR ${scidavis_SIP_OUTPUT_DIR}/sipAPIscidavis.h) + if( SIP_VERSION VERSION_GREATER_EQUAL 5 ) + set( scidavis_SIP_HDR ${CMAKE_CURRENT_BINARY_DIR}/python/sip.h ) +- target_include_directories( libscidavis PUBLIC ++ target_include_directories( libscidavis BEFORE PUBLIC + "${CMAKE_CURRENT_BINARY_DIR}/python" + "${scidavis_SIP_OUTPUT_DIR}" + ) diff --git a/sci-visualization/scidavis/files/scidavis-muparser.patch b/sci-visualization/scidavis/files/scidavis-2.7-install-locations.patch similarity index 100% rename from sci-visualization/scidavis/files/scidavis-muparser.patch rename to sci-visualization/scidavis/files/scidavis-2.7-install-locations.patch diff --git a/sci-visualization/scidavis/metadata.xml b/sci-visualization/scidavis/metadata.xml index 93c583ed2a8f..1c44688f2711 100644 --- a/sci-visualization/scidavis/metadata.xml +++ b/sci-visualization/scidavis/metadata.xml @@ -16,7 +16,6 @@ <use> <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.7.ebuild b/sci-visualization/scidavis/scidavis-2.7-r1.ebuild similarity index 80% rename from sci-visualization/scidavis/scidavis-2.7.ebuild rename to sci-visualization/scidavis/scidavis-2.7-r1.ebuild index d6d6452d9a35..94668d6588f5 100644 --- a/sci-visualization/scidavis/scidavis-2.7.ebuild +++ b/sci-visualization/scidavis/scidavis-2.7-r1.ebuild @@ -18,7 +18,7 @@ LICENSE="GPL-2+ ZLIB" KEYWORDS="~amd64" SLOT="0" -IUSE="doc +muparser origin python test" +IUSE="doc origin python test" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" # requires network @@ -26,7 +26,7 @@ RESTRICT="test" PROPERTIES="test_network" RDEPEND=" - muparser? ( dev-cpp/muParser ) + dev-cpp/muParser dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 @@ -58,8 +58,9 @@ BDEPEND=" " PATCHES=( - "${FILESDIR}/${PN}-muparser.patch" - "${FILESDIR}/${PN}-qwtplot3d.patch" + "${FILESDIR}/${P}-install-locations.patch" + "${FILESDIR}/${P}-find-qwtplot3d.patch" + "${FILESDIR}/${P}-fix-build-if-sip4-installed.patch" ) src_prepare() { @@ -76,12 +77,19 @@ src_prepare() { src_configure() { local mycmakeargs=( - -DSCRIPTING_MUPARSER=$(usex muparser) - -DSCRIPTING_PYTHON=$(usex python) - -DPYTHON_SCRIPTDIR="$(python_get_scriptdir)" + # Even if we disable muparser scripting, we still need MuParser.h + # for Graph3D.cpp. So just enable it unconditionally. Bug 834074 + -DSCRIPTING_MUPARSER=ON -DORIGIN_IMPORT=$(usex origin) + -DSCRIPTING_PYTHON=$(usex python) -DBUILD_TESTS=$(usex test) ) + + if use python; then + mycmakeargs+=( + -DPYTHON_SCRIPTDIR="$(python_get_scriptdir)" + ) + fi cmake_src_configure }