From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1698958-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 1C6711581F0
	for <garchives@archives.gentoo.org>; Wed, 11 Dec 2024 01:54:04 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 522D8E0827;
	Wed, 11 Dec 2024 01:54:01 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 17322E0827
	for <gentoo-commits@lists.gentoo.org>; Wed, 11 Dec 2024 01:54:01 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 68C29343137
	for <gentoo-commits@lists.gentoo.org>; Wed, 11 Dec 2024 01:53:59 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 9FFB91F45
	for <gentoo-commits@lists.gentoo.org>; Wed, 11 Dec 2024 01:53:56 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1733881996.96c74a26577dd5ea0947783ef44208eabd27f59d.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/vigra/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-libs/vigra/vigra-9999.ebuild
X-VCS-Directories: media-libs/vigra/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 96c74a26577dd5ea0947783ef44208eabd27f59d
X-VCS-Branch: master
Date: Wed, 11 Dec 2024 01:53:56 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 0813dcc9-e48b-48c1-83a4-e56c0be436a3
X-Archives-Hash: 48f14254c6cc7bef2d2445f8fceb0370

commit:     96c74a26577dd5ea0947783ef44208eabd27f59d
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Wed Dec 11 00:44:51 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 11 01:53:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96c74a26

media-libs/vigra: update live

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/39673
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/vigra/vigra-9999.ebuild | 92 ++++++++++++++++++++------------------
 1 file changed, 48 insertions(+), 44 deletions(-)

diff --git a/media-libs/vigra/vigra-9999.ebuild b/media-libs/vigra/vigra-9999.ebuild
index 09cc7b4ffdc8..490176b71a09 100644
--- a/media-libs/vigra/vigra-9999.ebuild
+++ b/media-libs/vigra/vigra-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
 PYTHON_REQ_USE="threads(+),xml(+)"
 
 inherit cmake flag-o-matic python-single-r1
@@ -12,15 +12,22 @@ DESCRIPTION="C++ computer vision library emphasizing customizable algorithms and
 HOMEPAGE="https://ukoethe.github.io/vigra/"
 
 if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/ukoethe/${PN}.git"
+	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"
+		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/${PN}/releases/download/Version-${PV//\./-}/${P}-src.tar.gz"
+		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"
@@ -28,19 +35,14 @@ fi
 
 LICENSE="MIT"
 SLOT="0"
-IUSE="+fftw +hdf5 +jpeg mpi openexr +png test +tiff +zlib"
+IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png test +tiff +zlib"
 
 REQUIRED_USE="
 	${PYTHON_REQUIRED_USE}
 	test? ( hdf5 fftw )
 "
-BDEPEND="
-	test? (
-		$(python_gen_cond_dep '
-			dev-python/pytest[${PYTHON_USEDEP}]
-		')
-	)
-"
+RESTRICT="!test? ( test )"
+
 DEPEND="
 	fftw? ( sci-libs/fftw:3.0= )
 	hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi=] )
@@ -58,63 +60,65 @@ RDEPEND="
 	${PYTHON_DEPS}
 	${DEPEND}
 "
-
-# Severely broken, also disabled in Fedora, bugs #390447, #653442
-RESTRICT="test"
+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() {
-	vigra_disable() {
-		if ! use ${1}; then
-			sed -e "/^VIGRA_FIND_PACKAGE.*${2:-$1}/Is/^/#disabled by USE=${1}: /" \
-				-i CMakeLists.txt || die "failed to disable ${1}"
-		fi
-	}
-
 	cmake_src_prepare
 
-	vigra_disable fftw fftw3
-	vigra_disable fftw fftw3f
-	vigra_disable jpeg
-	vigra_disable png
-	vigra_disable tiff
-	vigra_disable zlib
-
-	# Don't use python_fix_shebang because we can't put this behind USE="python"
-	sed -i -e '/env/s:python:python3:' config/vigra-config.in || die
-
-	sed -i -e '/ADD_DEPENDENCIES(PACKAGE_SRC_TAR doc_cpp)/d' CMakeLists.txt || die
+	sed -i -e '/ADD_DEPENDENCIES(PACKAGE_SRC_TAR/d' CMakeLists.txt || die
 
-	cmake_comment_add_subdirectory docsrc
-
-	if ! use test; then
-		cmake_comment_add_subdirectory test
-		cmake_run_in vigranumpy cmake_comment_add_subdirectory test
-	fi
+	sed -i -e 's|@DOCDIR@|@CMAKE_INSTALL_PREFIX@/@DOCINSTALL@|' config/vigra-config.in || die
 }
 
 src_configure() {
-	# Needed for now ("fix" compatibility with >=sci-libs/hdf5-1.12)
-	# bug #808731
-	use hdf5 && append-cppflags -DH5_USE_110_API
+	# 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_test() {
-	PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake_src_test
+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
 }