diff options
Diffstat (limited to 'media-libs/vigra')
-rw-r--r-- | media-libs/vigra/Manifest | 6 | ||||
-rw-r--r-- | media-libs/vigra/files/vigra-1.12.1-clang19.patch | 27 | ||||
-rw-r--r-- | media-libs/vigra/files/vigra-1.12.1-python311.patch | 37 | ||||
-rw-r--r-- | media-libs/vigra/vigra-1.12.1.ebuild | 124 | ||||
-rw-r--r-- | media-libs/vigra/vigra-9999.ebuild | 92 |
5 files changed, 241 insertions, 45 deletions
diff --git a/media-libs/vigra/Manifest b/media-libs/vigra/Manifest index 2516f9e7adb2..33f917af62fd 100644 --- a/media-libs/vigra/Manifest +++ b/media-libs/vigra/Manifest @@ -1,6 +1,10 @@ AUX vigra-1.11.1-cmake-module-dir.patch 673 BLAKE2B 9dcd11f5754c59bee64d4a4ead62da0e0cb5cde74923871a377ca06a0f639be3a63d6b1769258d09da474e4110ad499a5402660912d8bb07ac0d5bbe199bc36c SHA512 9ab597ea7413d276b22d3cc46ac4179748b98bbaaa44234f71145d69e987b5162d38f87c3317d9bb863cabbcef7c1f3d77f727d19576df7892b2df7272055ce4 AUX vigra-1.11.1-lib_suffix.patch 1032 BLAKE2B ce1b73b89c4d10c3b2ef3185a3c9a7ca791f58efe85eb205bb5f4e638ddc18d171bb7f4a9487670bb1a276c998f0e5096e2efa4fee0f167907d3d02df01bcb42 SHA512 c1cb242eb2ebdf398c81e16acc5a493312b310836caa7f25717dd20d23e885800beeef9ca0589c75ec3a0bd1ba2d879b1e999094cfef3956134e0d6d13f25d0f +AUX vigra-1.12.1-clang19.patch 945 BLAKE2B 030ba9775971812013b735394c2d3cc6dddf2e99c4c84826251c5b969fc1ae800326a16b3eb5572a326f5aa9726512359fa3cc1c6a9cffb7ee20b4b9a80ebcf1 SHA512 2e6ee5cbd21abfc2d1450b008ceb2ec461902c08a51a4f881c5fc223583eb776ff2a6effa753c0fd005d168b4f0083ba73f1c1f92f35f6cdaa70d1239f43e4ce +AUX vigra-1.12.1-python311.patch 1158 BLAKE2B 10d89e4f4b999d555b815b7c50c5e3c68a08eba56f246264ae99c233f0c7ed9315477d25cabd9ba6c6c1cd82c6cc4ba07712921d847a4f1d4196f25584618123 SHA512 d36e4e561b74e54c159db849487e8c44c8879c827c2e3c600373e0ed94b2eced98b33dfe3d8f5aa24660cb330fab8f585ca83abf0b00024d36916b5519752170 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 EBUILD vigra-1.11.2_p20240505.ebuild 2907 BLAKE2B 60b6fd7c1741508a88a9487b3c76b6c4730f9510908eafa52a58d74b32aa407381f46bd0920d60b54b296db2c86fecbd6330aa7edf2f1599b8b34068735b96d9 SHA512 cbf6736b795e61e850d678ef0cbff4e549a70ebd7cfff79a587ec8bc00ea78ae8d1b13b19ea69140700eecb75d7786fb78109f3f31ea7ad268487f1efec91ef1 -EBUILD vigra-9999.ebuild 2910 BLAKE2B 170448e8f5fcfa9f22a6835482f1914c9a540253ffc928d0c04a88a45709654b6104a6daa5eab9533d2d0faa83521de7ae7f3132893dda00f1d94817c19be196 SHA512 1259a6730057cd09eaa1bd4b415f15785b207fb48bfcca32a738221b42f7c266967cb065c6861d79f5eb8725216bce938c5559ded5d7f952f09292526eae373b +EBUILD vigra-1.12.1.ebuild 2909 BLAKE2B c20772d6e38e4fe3176e72f3e42605bc6e5311b7b56824054f5a03101343df318cea3257857cc1e4e9721c49b57ae7ca3abc12ae0da7e5f0704ecfbeec1da643 SHA512 b7e705a4d9a8cd9bdce5b1d1853e5d766710ce4b7801c4b5db81a2fd58ab8eedcd004d07ca6a2d29ded7241a79c6608e9a6946d9a394498aea7193509b2094fc +EBUILD vigra-9999.ebuild 2909 BLAKE2B c20772d6e38e4fe3176e72f3e42605bc6e5311b7b56824054f5a03101343df318cea3257857cc1e4e9721c49b57ae7ca3abc12ae0da7e5f0704ecfbeec1da643 SHA512 b7e705a4d9a8cd9bdce5b1d1853e5d766710ce4b7801c4b5db81a2fd58ab8eedcd004d07ca6a2d29ded7241a79c6608e9a6946d9a394498aea7193509b2094fc MISC metadata.xml 338 BLAKE2B ce8cddf2fde724bf72d4e61054b4cbe18f40a34e02b34326d227a184d9eac1133bffc48a373f8d2bcc5c5d13de30263c3029a566db9fd6d4442f779be8e97ef7 SHA512 e4242661592f929fdba417b1fa4c176db354d82c7eeb9324a3a6102d3fb405267411e27313666fd9201af1da49de9c1319179c42017273932365113ddcd5a4a5 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 +} 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 } |