summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Wingate <parona@protonmail.com>2024-12-04 19:34:47 +0200
committerSam James <sam@gentoo.org>2024-12-11 01:53:16 +0000
commit41afa1047022bd251e8e2bee85cfe3d0aa696238 (patch)
tree4d52b5fb135b331f99201454aef7632393472388 /media-libs/vigra
parentsys-auth/sssd: drop 2.10.0 (diff)
downloadgentoo-41afa1047022bd251e8e2bee85cfe3d0aa696238.tar.gz
gentoo-41afa1047022bd251e8e2bee85cfe3d0aa696238.tar.bz2
gentoo-41afa1047022bd251e8e2bee85cfe3d0aa696238.zip
media-libs/vigra: add 1.12.1
* Fix build with clang19 * Re-enable tests (and set -ffp-contract=off). * Enable python3.13. * Remove old quirks. Signed-off-by: Alfred Wingate <parona@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/vigra')
-rw-r--r--media-libs/vigra/Manifest1
-rw-r--r--media-libs/vigra/files/vigra-1.12.1-clang19.patch27
-rw-r--r--media-libs/vigra/files/vigra-1.12.1-python311.patch37
-rw-r--r--media-libs/vigra/vigra-1.12.1.ebuild124
4 files changed, 189 insertions, 0 deletions
diff --git a/media-libs/vigra/Manifest b/media-libs/vigra/Manifest
index 02889381064a..9db722bf27a6 100644
--- a/media-libs/vigra/Manifest
+++ b/media-libs/vigra/Manifest
@@ -1 +1,2 @@
DIST vigra-1.11.2_p20240505.tar.gz 34219390 BLAKE2B ad92dc6d21acb52c1aa587a4fbe051fb8416ab8f0b5a7560a6d720f38e73d467c9cebb3940cede83827e7657e30438e4d0d52207cffaf208be76f4ff8cdebca9 SHA512 fa51fc456046989e8bf1225d8ae4bac9ef77b24b9343e657c327f817f3a1b622c645ef22772a6c14c30f7e86ec5ab08df8592ec7b21727146d0f775c010cc9d5
+DIST vigra-1.12.1.tar.gz 34211133 BLAKE2B 177239a42e2052b93d414214a8119712354a939e01c2e8eeaac7ab63135eed44b4e66855a86c9e26565ca53c2e1686852ca44d6fe3924d92fe352756ccaad699 SHA512 745995f71cd32173f937083976d7894a37189c005d1a870c76f25be58aabf163ad10d1b562f65de4eb4adb1addc7c2951823c96e0391ba02f0c5ddcf569f2ee4
diff --git a/media-libs/vigra/files/vigra-1.12.1-clang19.patch b/media-libs/vigra/files/vigra-1.12.1-clang19.patch
new file mode 100644
index 000000000000..aae20e93be83
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.12.1-clang19.patch
@@ -0,0 +1,27 @@
+https://github.com/ukoethe/vigra/issues/591
+https://github.com/msys2/MINGW-packages/commit/bd697fd68cd657cfc3c746a290335b1faaf5371b
+
+--- a/include/vigra/multi_iterator_coupled.hxx
++++ b/include/vigra/multi_iterator_coupled.hxx
+@@ -490,7 +490,7 @@
+ CoupledScanOrderIterator operator--(int)
+ {
+ CoupledScanOrderIterator res(*this);
+- --this;
++ --(*this);
+ return res;
+ }
+
+--- a/include/vigra/random_access_set.hxx
++++ b/include/vigra/random_access_set.hxx
+@@ -400,8 +400,8 @@
+ const typename RandomAccessSet<Key,Compare,Alloc>::value_type& value
+ )
+ {
+- if((position == begin() || this->operator()(*(position-1),value))
+- && (position == end() || this->operator()(value, *position))) {
++ if((position == begin() || key_comp()(*(position-1),value))
++ && (position == end() || key_comp()(value, *position))) {
+ return vector_.insert(position, value);
+ }
+ return insert(value).first;
diff --git a/media-libs/vigra/files/vigra-1.12.1-python311.patch b/media-libs/vigra/files/vigra-1.12.1-python311.patch
new file mode 100644
index 000000000000..e3da95c94ea0
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.12.1-python311.patch
@@ -0,0 +1,37 @@
+https://github.com/ukoethe/vigra/issues/529
+https://github.com/ukoethe/vigra/pull/594
+
+From 5c2c21f7075836cdab84457632480a1cfabcec0f Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Wed, 4 Dec 2024 23:36:44 +0200
+Subject: [PATCH] Move away from inline global regex flag
+
+Fixes: https://github.com/ukoethe/vigra/issues/529
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+--- a/docsrc/post.py
++++ b/docsrc/post.py
+@@ -85,18 +85,18 @@ headingSummary = re.compile(r'''(<!-- Generated by Doxygen .+ -->
+ </div>
+ <div class="header">)
+ <div class="summary">
+-(?s).*?</div>''')
++(?s:.)*?</div>''')
+
+ # tested with doxygen 1.8.2
+ headingSummary2 = re.compile(r'''(<!-- Generated by Doxygen .+ -->
+ </div><!-- top -->
+ <div class="header">)
+ <div class="summary">
+-(?s).*?</div>''')
++(?s:.)*?</div>''')
+
+ # tested with doxygen 1.7.5.1
+ headingNavpath = re.compile(r'''(<!-- Generated by Doxygen .+ -->)
+- <div id="nav-path" class="navpath">(?s).*?</div>''')
++ <div id="nav-path" class="navpath">(?s:.)*?</div>''')
+
+ # tested with doxygen 1.8.2
+ headingNavpath2 = re.compile(r'''(<!-- Generated by Doxygen .+ -->)
+--
+2.47.1
+
diff --git a/media-libs/vigra/vigra-1.12.1.ebuild b/media-libs/vigra/vigra-1.12.1.ebuild
new file mode 100644
index 000000000000..490176b71a09
--- /dev/null
+++ b/media-libs/vigra/vigra-1.12.1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_REQ_USE="threads(+),xml(+)"
+
+inherit cmake flag-o-matic python-single-r1
+
+DESCRIPTION="C++ computer vision library emphasizing customizable algorithms and structures"
+HOMEPAGE="https://ukoethe.github.io/vigra/"
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/ukoethe/vigra.git"
+ inherit git-r3
+else
+ if [[ ${PV} == *_p* ]] ; then
+ VIGRA_COMMIT="4db795574a471bf1d94d258361f1ef536dd87ac1"
+ SRC_URI="
+ https://github.com/ukoethe/vigra/archive/${VIGRA_COMMIT}.tar.gz
+ -> ${P}.tar.gz
+ "
+ S="${WORKDIR}"/${PN}-${VIGRA_COMMIT}
+ else
+ SRC_URI="
+ https://github.com/ukoethe/vigra/archive/refs/tags/Version-$(ver_rs 1- -).tar.gz
+ -> ${P}.tar.gz
+ "
+ S="${WORKDIR}/${PN}-Version-$(ver_rs 1- -)"
+ fi
+
+ KEYWORDS="~amd64 ~arm64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png test +tiff +zlib"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ test? ( hdf5 fftw )
+"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ fftw? ( sci-libs/fftw:3.0= )
+ hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi=] )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ openexr? (
+ >=dev-libs/imath-3.1.4-r2:=
+ >=media-libs/openexr-3:0=
+ )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:= )
+ zlib? ( sys-libs/zlib )
+"
+# Python is needed as a runtime dep of installed vigra-config
+RDEPEND="
+ ${PYTHON_DEPS}
+ ${DEPEND}
+"
+BDEPEND="
+ doc? (
+ app-text/doxygen
+ dev-texlive/texlive-latex
+ )
+"
+
+PATCHES=(
+ # TODO: upstream
+ "${FILESDIR}/${PN}-1.11.1-lib_suffix.patch"
+ "${FILESDIR}/${PN}-1.11.1-cmake-module-dir.patch"
+
+ "${FILESDIR}/${PN}-1.12.1-clang19.patch"
+ "${FILESDIR}/${PN}-1.12.1-python311.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ sed -i -e '/ADD_DEPENDENCIES(PACKAGE_SRC_TAR/d' CMakeLists.txt || die
+
+ sed -i -e 's|@DOCDIR@|@CMAKE_INSTALL_PREFIX@/@DOCINSTALL@|' config/vigra-config.in || die
+}
+
+src_configure() {
+ # Floating point error increases with -mfma leading to test failures
+ append-flags -ffp-contract=off
+
+ local mycmakeargs=(
+ -DAUTOEXEC_TESTS=OFF
+ -DAUTOBUILD_TESTS=$(usex test)
+ -DDOCINSTALL="share/doc/${PF}/html"
+ -DWITH_HDF5=$(usex hdf5)
+ -DWITH_OPENEXR=$(usex openexr)
+ -DWITH_VALGRIND=OFF # only used for tests
+ -DWITH_VIGRANUMPY=OFF
+ -DBUILD_TESTS=$(usex test)
+ -DBUILD_DOCS=$(usex doc)
+ $(cmake_use_find_package fftw FFTW3)
+ $(cmake_use_find_package fftw FFTW3F)
+ $(cmake_use_find_package jpeg JPEG)
+ $(cmake_use_find_package png PNG)
+ $(cmake_use_find_package tiff TIFF)
+ $(cmake_use_find_package zlib ZLIB)
+ )
+
+ use doc && mycmakeargs+=( -DPython_EXECUTABLE=${PYTHON} )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ use doc && cmake_build doc_cpp
+}
+
+src_install() {
+ cmake_src_install
+ einstalldocs
+
+ python_fix_shebang "${ED}"/usr/bin/vigra-config
+}