commit:     593c2ab8a6b518c9a160459d10f77e9acc2a488a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 14 07:27:09 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 07:28:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=593c2ab8

media-libs/vigra: add 1.11.2_p20240505

* Drop broken Python bindings as they use distutils quite a bit. There aren't
  any reverse dependencies.
* Drop broken docs (needs various patching and still don't work in snapshot).

Closes: https://bugs.gentoo.org/743160
Closes: https://bugs.gentoo.org/806470
Closes: https://bugs.gentoo.org/929649
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/vigra/Manifest                          |   1 +
 ...a-9999.ebuild => vigra-1.11.2_p20240505.ebuild} | 103 +++++++--------------
 media-libs/vigra/vigra-9999.ebuild                 | 103 +++++++--------------
 3 files changed, 69 insertions(+), 138 deletions(-)

diff --git a/media-libs/vigra/Manifest b/media-libs/vigra/Manifest
index cc03ca4ec086..6bacbbf4893a 100644
--- a/media-libs/vigra/Manifest
+++ b/media-libs/vigra/Manifest
@@ -1 +1,2 @@
 DIST vigra-1.11.1-src.tar.gz 55119047 BLAKE2B 
c67dc61515075843faacb4ee054f3e28b4edd033dc6cb89d3c591827309eafa697b839ca85ff7c68d6aff9d7e08b1d3db73d50e6c3b065a5210b64a90e242444
 SHA512 
9c1638d626d658fa4b13069e5850b628d91db02bb18b8a9f0a4642fee501ede8a6f4f267d79ca5cd5baf3991e704163345cd18ab7919ff2a93db6bd496096de3
+DIST vigra-1.11.2_p20240505.tar.gz 34219390 BLAKE2B 
ad92dc6d21acb52c1aa587a4fbe051fb8416ab8f0b5a7560a6d720f38e73d467c9cebb3940cede83827e7657e30438e4d0d52207cffaf208be76f4ff8cdebca9
 SHA512 
fa51fc456046989e8bf1225d8ae4bac9ef77b24b9343e657c327f817f3a1b622c645ef22772a6c14c30f7e86ec5ab08df8592ec7b21727146d0f775c010cc9d5

diff --git a/media-libs/vigra/vigra-9999.ebuild 
b/media-libs/vigra/vigra-1.11.2_p20240505.ebuild
similarity index 53%
copy from media-libs/vigra/vigra-9999.ebuild
copy to media-libs/vigra/vigra-1.11.2_p20240505.ebuild
index 4fee34b87e24..09cc7b4ffdc8 100644
--- a/media-libs/vigra/vigra-9999.ebuild
+++ b/media-libs/vigra/vigra-1.11.2_p20240505.ebuild
@@ -1,12 +1,12 @@
 # Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 PYTHON_REQ_USE="threads(+),xml(+)"
 
-inherit cmake flag-o-matic python-r1
+inherit cmake flag-o-matic python-single-r1
 
 DESCRIPTION="C++ computer vision library emphasizing customizable algorithms 
and structures"
 HOMEPAGE="https://ukoethe.github.io/vigra/";
@@ -15,24 +15,32 @@ if [[ ${PV} == *9999 ]] ; then
        EGIT_REPO_URI="https://github.com/ukoethe/${PN}.git";
        inherit git-r3
 else
-       
SRC_URI="https://github.com/ukoethe/${PN}/releases/download/Version-${PV//\./-}/${P}-src.tar.gz";
+       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/${PN}/releases/download/Version-${PV//\./-}/${P}-src.tar.gz";
+       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 +python test +tiff +zlib"
+IUSE="+fftw +hdf5 +jpeg mpi openexr +png test +tiff +zlib"
 
 REQUIRED_USE="
-       python? ( hdf5 ${PYTHON_REQUIRED_USE} )
-       test? ( hdf5 python fftw )"
-
+       ${PYTHON_REQUIRED_USE}
+       test? ( hdf5 fftw )
+"
 BDEPEND="
        test? (
-               dev-python/pytest[${PYTHON_USEDEP}]
+               $(python_gen_cond_dep '
+                       dev-python/pytest[${PYTHON_USEDEP}]
+               ')
        )
 "
-# runtime dependency on python is required by the vigra-config script
 DEPEND="
        fftw? ( sci-libs/fftw:3.0= )
        hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi=] )
@@ -42,15 +50,12 @@ DEPEND="
                >=media-libs/openexr-3:0=
        )
        png? ( media-libs/libpng:0= )
-       python? (
-               ${PYTHON_DEPS}
-               dev-libs/boost:=[python?,${PYTHON_USEDEP}]
-               dev-python/numpy[${PYTHON_USEDEP}]
-       )
        tiff? ( media-libs/tiff:= )
        zlib? ( sys-libs/zlib )
 "
-RDEPEND="${PYTHON_DEPS}
+# Python is needed as a runtime dep of installed vigra-config
+RDEPEND="
+       ${PYTHON_DEPS}
        ${DEPEND}
 "
 
@@ -61,13 +66,8 @@ PATCHES=(
        # TODO: upstream
        "${FILESDIR}/${PN}-1.11.1-lib_suffix.patch"
        "${FILESDIR}/${PN}-1.11.1-cmake-module-dir.patch"
-       "${FILESDIR}/${PN}-1.11.1-sphinx.ext.pngmath.patch" # thanks to Debian; 
bug 678308
 )
 
-pkg_setup() {
-       use python && python_setup
-}
-
 src_prepare() {
        vigra_disable() {
                if ! use ${1}; then
@@ -88,7 +88,9 @@ src_prepare() {
        # 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
 
-       use doc || cmake_comment_add_subdirectory docsrc
+       sed -i -e '/ADD_DEPENDENCIES(PACKAGE_SRC_TAR doc_cpp)/d' CMakeLists.txt 
|| die
+
+       cmake_comment_add_subdirectory docsrc
 
        if ! use test; then
                cmake_comment_add_subdirectory test
@@ -101,55 +103,18 @@ src_configure() {
        # bug #808731
        use hdf5 && append-cppflags -DH5_USE_110_API
 
-       vigra_configure() {
-               local mycmakeargs=(
-                       -DAUTOEXEC_TESTS=OFF
-                       -DDOCINSTALL="share/doc/${PF}/html"
-                       -DWITH_HDF5=$(usex hdf5)
-                       -DWITH_OPENEXR=$(usex openexr)
-                       -DWITH_VALGRIND=OFF # only used for tests
-                       -DWITH_VIGRANUMPY=$(usex python)
-               )
-               cmake_src_configure
-       }
-
-       if use python; then
-               python_foreach_impl vigra_configure
-       else
-               vigra_configure
-       fi
-}
-
-src_compile() {
-       local VIGRA_BUILD_DIR
-       vigra_compile() {
-               cmake_src_compile
-               VIGRA_BUILD_DIR="${BUILD_DIR}"
-       }
-       if use python; then
-               python_foreach_impl vigra_compile
-       else
-               vigra_compile
-       fi
-}
+       local mycmakeargs=(
+               -DAUTOEXEC_TESTS=OFF
+               -DDOCINSTALL="share/doc/${PF}/html"
+               -DWITH_HDF5=$(usex hdf5)
+               -DWITH_OPENEXR=$(usex openexr)
+               -DWITH_VALGRIND=OFF # only used for tests
+               -DWITH_VIGRANUMPY=OFF
+       )
 
-src_install() {
-       if use python; then
-               python_foreach_impl cmake_src_install
-               python_optimize
-       else
-               cmake_src_install
-       fi
+       cmake_src_configure
 }
 
 src_test() {
-       # perhaps disable tests (see #390447)
-       vigra_test() {
-               PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake_src_test
-       }
-       if use python; then
-               python_foreach_impl vigra_test
-       else
-               vigra_test
-       fi
+       PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake_src_test
 }

diff --git a/media-libs/vigra/vigra-9999.ebuild 
b/media-libs/vigra/vigra-9999.ebuild
index 4fee34b87e24..09cc7b4ffdc8 100644
--- a/media-libs/vigra/vigra-9999.ebuild
+++ b/media-libs/vigra/vigra-9999.ebuild
@@ -1,12 +1,12 @@
 # Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 PYTHON_REQ_USE="threads(+),xml(+)"
 
-inherit cmake flag-o-matic python-r1
+inherit cmake flag-o-matic python-single-r1
 
 DESCRIPTION="C++ computer vision library emphasizing customizable algorithms 
and structures"
 HOMEPAGE="https://ukoethe.github.io/vigra/";
@@ -15,24 +15,32 @@ if [[ ${PV} == *9999 ]] ; then
        EGIT_REPO_URI="https://github.com/ukoethe/${PN}.git";
        inherit git-r3
 else
-       
SRC_URI="https://github.com/ukoethe/${PN}/releases/download/Version-${PV//\./-}/${P}-src.tar.gz";
+       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/${PN}/releases/download/Version-${PV//\./-}/${P}-src.tar.gz";
+       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 +python test +tiff +zlib"
+IUSE="+fftw +hdf5 +jpeg mpi openexr +png test +tiff +zlib"
 
 REQUIRED_USE="
-       python? ( hdf5 ${PYTHON_REQUIRED_USE} )
-       test? ( hdf5 python fftw )"
-
+       ${PYTHON_REQUIRED_USE}
+       test? ( hdf5 fftw )
+"
 BDEPEND="
        test? (
-               dev-python/pytest[${PYTHON_USEDEP}]
+               $(python_gen_cond_dep '
+                       dev-python/pytest[${PYTHON_USEDEP}]
+               ')
        )
 "
-# runtime dependency on python is required by the vigra-config script
 DEPEND="
        fftw? ( sci-libs/fftw:3.0= )
        hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi=] )
@@ -42,15 +50,12 @@ DEPEND="
                >=media-libs/openexr-3:0=
        )
        png? ( media-libs/libpng:0= )
-       python? (
-               ${PYTHON_DEPS}
-               dev-libs/boost:=[python?,${PYTHON_USEDEP}]
-               dev-python/numpy[${PYTHON_USEDEP}]
-       )
        tiff? ( media-libs/tiff:= )
        zlib? ( sys-libs/zlib )
 "
-RDEPEND="${PYTHON_DEPS}
+# Python is needed as a runtime dep of installed vigra-config
+RDEPEND="
+       ${PYTHON_DEPS}
        ${DEPEND}
 "
 
@@ -61,13 +66,8 @@ PATCHES=(
        # TODO: upstream
        "${FILESDIR}/${PN}-1.11.1-lib_suffix.patch"
        "${FILESDIR}/${PN}-1.11.1-cmake-module-dir.patch"
-       "${FILESDIR}/${PN}-1.11.1-sphinx.ext.pngmath.patch" # thanks to Debian; 
bug 678308
 )
 
-pkg_setup() {
-       use python && python_setup
-}
-
 src_prepare() {
        vigra_disable() {
                if ! use ${1}; then
@@ -88,7 +88,9 @@ src_prepare() {
        # 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
 
-       use doc || cmake_comment_add_subdirectory docsrc
+       sed -i -e '/ADD_DEPENDENCIES(PACKAGE_SRC_TAR doc_cpp)/d' CMakeLists.txt 
|| die
+
+       cmake_comment_add_subdirectory docsrc
 
        if ! use test; then
                cmake_comment_add_subdirectory test
@@ -101,55 +103,18 @@ src_configure() {
        # bug #808731
        use hdf5 && append-cppflags -DH5_USE_110_API
 
-       vigra_configure() {
-               local mycmakeargs=(
-                       -DAUTOEXEC_TESTS=OFF
-                       -DDOCINSTALL="share/doc/${PF}/html"
-                       -DWITH_HDF5=$(usex hdf5)
-                       -DWITH_OPENEXR=$(usex openexr)
-                       -DWITH_VALGRIND=OFF # only used for tests
-                       -DWITH_VIGRANUMPY=$(usex python)
-               )
-               cmake_src_configure
-       }
-
-       if use python; then
-               python_foreach_impl vigra_configure
-       else
-               vigra_configure
-       fi
-}
-
-src_compile() {
-       local VIGRA_BUILD_DIR
-       vigra_compile() {
-               cmake_src_compile
-               VIGRA_BUILD_DIR="${BUILD_DIR}"
-       }
-       if use python; then
-               python_foreach_impl vigra_compile
-       else
-               vigra_compile
-       fi
-}
+       local mycmakeargs=(
+               -DAUTOEXEC_TESTS=OFF
+               -DDOCINSTALL="share/doc/${PF}/html"
+               -DWITH_HDF5=$(usex hdf5)
+               -DWITH_OPENEXR=$(usex openexr)
+               -DWITH_VALGRIND=OFF # only used for tests
+               -DWITH_VIGRANUMPY=OFF
+       )
 
-src_install() {
-       if use python; then
-               python_foreach_impl cmake_src_install
-               python_optimize
-       else
-               cmake_src_install
-       fi
+       cmake_src_configure
 }
 
 src_test() {
-       # perhaps disable tests (see #390447)
-       vigra_test() {
-               PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake_src_test
-       }
-       if use python; then
-               python_foreach_impl vigra_test
-       else
-               vigra_test
-       fi
+       PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake_src_test
 }

Reply via email to