public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Craig Andrews" <candrews@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/vigra/files/, media-libs/vigra/
Date: Mon, 19 Nov 2018 20:13:18 +0000 (UTC)	[thread overview]
Message-ID: <1542658387.e2caaa6f7abb46ec70732b82a5bdd7bb00f058dd.candrews@gentoo> (raw)

commit:     e2caaa6f7abb46ec70732b82a5bdd7bb00f058dd
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  9 21:27:39 2018 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Mon Nov 19 20:13:07 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2caaa6f

media-libs/vigra: Fix compilation error and add -9999

Closes: https://bugs.gentoo.org/664720
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 ...1.1-fix-incorrect-template-parameter-type.patch | 139 +++++++++++++++++++
 media-libs/vigra/vigra-1.11.1-r1.ebuild            | 149 +++++++++++++++++++++
 media-libs/vigra/vigra-9999.ebuild                 | 144 ++++++++++++++++++++
 3 files changed, 432 insertions(+)

diff --git a/media-libs/vigra/files/vigra-1.11.1-fix-incorrect-template-parameter-type.patch b/media-libs/vigra/files/vigra-1.11.1-fix-incorrect-template-parameter-type.patch
new file mode 100644
index 00000000000..88ed61ee374
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.11.1-fix-incorrect-template-parameter-type.patch
@@ -0,0 +1,139 @@
+From 81958d302494e137f98a8b1d7869841532f90388 Mon Sep 17 00:00:00 2001
+From: JaimeIvanCervantes <jimmycc80@hotmail.com>
+Date: Fri, 16 Jun 2017 13:21:45 -0700
+Subject: [PATCH] multi_convolution: Fix for incorrect template parameter type
+ when using unsigned int N for TinyVector SIZE. (Fixes #414)
+
+---
+ include/vigra/multi_convolution.hxx | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/include/vigra/multi_convolution.hxx b/include/vigra/multi_convolution.hxx
+index 1b5efa740..ec89bcf58 100644
+--- a/include/vigra/multi_convolution.hxx
++++ b/include/vigra/multi_convolution.hxx
+@@ -1426,7 +1426,7 @@ gaussianSmoothMultiArray(MultiArrayView<N, T1, S1> const & source,
+                   class T2, class S2>
+         void
+         gaussianGradientMultiArray(MultiArrayView<N, T1, S1> const & source,
+-                                   MultiArrayView<N, TinyVector<T2, N>, S2> dest,
++                                   MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest,
+                                    double sigma,
+                                    ConvolutionOptions<N> opt = ConvolutionOptions<N>());
+ 
+@@ -1435,7 +1435,7 @@ gaussianSmoothMultiArray(MultiArrayView<N, T1, S1> const & source,
+                                   class T2, class S2>
+         void
+         gaussianGradientMultiArray(MultiArrayView<N, T1, S1> const & source,
+-                                   MultiArrayView<N, TinyVector<T2, N>, S2> dest,
++                                   MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest,
+                                    ConvolutionOptions<N> opt);
+ 
+         // likewise, but execute algorithm in parallel
+@@ -1443,7 +1443,7 @@ gaussianSmoothMultiArray(MultiArrayView<N, T1, S1> const & source,
+                                   class T2, class S2>
+         void
+         gaussianGradientMultiArray(MultiArrayView<N, T1, S1> const & source,
+-                                   MultiArrayView<N, TinyVector<T2, N>, S2> dest,
++                                   MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest,
+                                    BlockwiseConvolutionOptions<N> opt);
+     }
+     \endcode
+@@ -1590,7 +1590,7 @@ template <unsigned int N, class T1, class S1,
+                           class T2, class S2>
+ inline void
+ gaussianGradientMultiArray(MultiArrayView<N, T1, S1> const & source,
+-                           MultiArrayView<N, TinyVector<T2, N>, S2> dest,
++                           MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest,
+                            ConvolutionOptions<N> opt )
+ {
+     if(opt.to_point != typename MultiArrayShape<N>::type())
+@@ -1614,7 +1614,7 @@ template <unsigned int N, class T1, class S1,
+           class T2, class S2>
+ inline void
+ gaussianGradientMultiArray(MultiArrayView<N, T1, S1> const & source,
+-                           MultiArrayView<N, TinyVector<T2, N>, S2> dest,
++                           MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest,
+                            double sigma,
+                            ConvolutionOptions<N> opt = ConvolutionOptions<N>())
+ {
+@@ -1653,7 +1653,7 @@ gaussianGradientMagnitudeImpl(MultiArrayView<N+1, T1, S1> const & src,
+     dest.init(0.0);
+ 
+     typedef typename NumericTraits<T1>::RealPromote TmpType;
+-    MultiArray<N, TinyVector<TmpType, N> > grad(dest.shape());
++    MultiArray<N, TinyVector<TmpType, int(N)> > grad(dest.shape());
+ 
+     using namespace multi_math;
+ 
+@@ -1771,7 +1771,7 @@ gaussianGradientMagnitude(MultiArrayView<N+1, Multiband<T1>, S1> const & src,
+                                   class T2, class S2>
+         void
+         symmetricGradientMultiArray(MultiArrayView<N, T1, S1> const & source,
+-                                    MultiArrayView<N, TinyVector<T2, N>, S2> dest,
++                                    MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest,
+                                     ConvolutionOptions<N> opt = ConvolutionOptions<N>());
+ 
+         // execute algorithm in parallel
+@@ -1779,7 +1779,7 @@ gaussianGradientMagnitude(MultiArrayView<N+1, Multiband<T1>, S1> const & src,
+                                   class T2, class S2>
+         void
+         symmetricGradientMultiArray(MultiArrayView<N, T1, S1> const & source,
+-                                    MultiArrayView<N, TinyVector<T2, N>, S2> dest,
++                                    MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest,
+                                     BlockwiseConvolutionOptions<N> opt);
+     }
+     \endcode
+@@ -1895,7 +1895,7 @@ template <unsigned int N, class T1, class S1,
+                           class T2, class S2>
+ inline void
+ symmetricGradientMultiArray(MultiArrayView<N, T1, S1> const & source,
+-                            MultiArrayView<N, TinyVector<T2, N>, S2> dest,
++                            MultiArrayView<N, TinyVector<T2, int(N)>, S2> dest,
+                             ConvolutionOptions<N> opt = ConvolutionOptions<N>())
+ {
+     if(opt.to_point != typename MultiArrayShape<N>::type())
+@@ -2214,14 +2214,14 @@ laplacianOfGaussianMultiArray(MultiArrayView<N, T1, S1> const & source,
+         template <unsigned int N, class T1, class S1,
+                                   class T2, class S2>
+         void
+-        gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & vectorField,
++        gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, int(N)>, S1> const & vectorField,
+                                      MultiArrayView<N, T2, S2> divergence,
+                                      ConvolutionOptions<N> const & opt);
+ 
+         template <unsigned int N, class T1, class S1,
+                                   class T2, class S2>
+         void
+-        gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & vectorField,
++        gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, int(N)>, S1> const & vectorField,
+                                      MultiArrayView<N, T2, S2> divergence,
+                                      double sigma,
+                                      ConvolutionOptions<N> opt = ConvolutionOptions<N>());
+@@ -2231,7 +2231,7 @@ laplacianOfGaussianMultiArray(MultiArrayView<N, T1, S1> const & source,
+         template <unsigned int N, class T1, class S1,
+                                   class T2, class S2>
+         void
+-        gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & vectorField,
++        gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, int(N)>, S1> const & vectorField,
+                                      MultiArrayView<N, T2, S2> divergence,
+                                      BlockwiseConvolutionOptions<N> const & opt);
+     }
+@@ -2324,7 +2324,7 @@ gaussianDivergenceMultiArray(Iterator vectorField, Iterator vectorFieldEnd,
+ template <unsigned int N, class T1, class S1,
+                           class T2, class S2>
+ inline void
+-gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & vectorField,
++gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, int(N)>, S1> const & vectorField,
+                              MultiArrayView<N, T2, S2> divergence,
+                              ConvolutionOptions<N> const & opt)
+ {
+@@ -2338,7 +2338,7 @@ gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & ve
+ template <unsigned int N, class T1, class S1,
+                           class T2, class S2>
+ inline void
+-gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N>, S1> const & vectorField,
++gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, int(N)>, S1> const & vectorField,
+                              MultiArrayView<N, T2, S2> divergence,
+                              double sigma,
+                              ConvolutionOptions<N> opt = ConvolutionOptions<N>())

diff --git a/media-libs/vigra/vigra-1.11.1-r1.ebuild b/media-libs/vigra/vigra-1.11.1-r1.ebuild
new file mode 100644
index 00000000000..c5e8c814dae
--- /dev/null
+++ b/media-libs/vigra/vigra-1.11.1-r1.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_P="${P}-src"
+MY_V="${PV//\./-}"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads,xml"
+
+inherit cmake-utils python-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/${PN}.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/ukoethe/${PN}/releases/download/Version-${MY_V}/${MY_P}.tar.gz"
+	KEYWORDS="~amd64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png +python test +tiff valgrind"
+
+# runtime dependency on python:2.7 is required by the vigra-config script
+RDEPEND="
+	dev-lang/python:2.7
+	>=dev-libs/boost-1.52.0-r6:=[python?,${PYTHON_USEDEP}]
+	fftw? ( sci-libs/fftw:3.0 )
+	hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi?] )
+	jpeg? ( virtual/jpeg:0 )
+	openexr? ( media-libs/openexr:= )
+	png? ( media-libs/libpng:0= )
+	python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] )
+	tiff? ( media-libs/tiff:0= )
+	valgrind? ( dev-util/valgrind )"
+
+DEPEND="${RDEPEND}
+	doc? (
+		app-doc/doxygen
+		python? ( >=dev-python/sphinx-1.1.3-r5[${PYTHON_USEDEP}] )
+	)
+	test? ( >=dev-python/nose-1.1.2-r1[${PYTHON_USEDEP}] )"
+
+REQUIRED_USE="
+	doc? ( hdf5 fftw )
+	python? ( hdf5 ${PYTHON_REQUIRED_USE} )
+	test? ( hdf5 python fftw )"
+
+# Severely broken, also disabled in Fedora, bugs #390447, #653442
+RESTRICT="test"
+
+DOCS=( README.md )
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-incorrect-template-parameter-type.patch"
+)
+
+pkg_setup() {
+	use python && python_setup
+}
+
+src_prepare() {
+	einfo "Removing shipped docs and VCS files"
+	rm -rf doc || die
+	rm .git* .travis.yml || die
+
+	cmake-utils_src_prepare
+
+	# Don't use python_fix_shebang because we can't put this behind USE="python"
+	sed -i -e '/env/s:python:python2:' config/vigra-config.in || die
+}
+
+src_configure() {
+	vigra_configure() {
+		local libdir="$(get_libdir)"
+
+		local mycmakeargs=(
+			-DAUTOEXEC_TESTS=OFF
+			-DDOCDIR="${BUILD_DIR}/doc"
+			-DDOCINSTALL="share/doc/${P}"
+			-DLIBDIR_SUFFIX="${libdir/lib}"
+			-DUSE_DOC=$(usex doc ON OFF) # unused
+			-DUSE_FFTW3=$(usex fftw ON OFF) # unused
+			-DUSE_JPEG=$(usex jpeg ON OFF) # unused
+			-DUSE_MPI=$(usex mpi ON OFF) # unused
+			-DUSE_PNG=$(usex png ON OFF) # unused
+			-DUSE_TIFF=$(usex tiff ON OFF) # unused
+			-DWITH_HDF5=$(usex hdf5 ON OFF)
+			-DWITH_OPENEXR=$(usex openexr ON OFF)
+			-DWITH_VALGRIND=$(usex valgrind ON OFF)
+			-DWITH_VIGRANUMPY=$(usex python ON OFF)
+			-DBUILD_TESTING=$(usex test ON OFF) # unused
+			-DUSE_AUTOBUILD_TESTS=$(usex test ON OFF) # unused
+			-DUSE_CREATE_CTEST_TARGETS=$(usex test ON OFF) # unused
+		)
+		cmake-utils_src_configure
+	}
+
+	if use python; then
+		python_foreach_impl vigra_configure
+	else
+		# required for docdir
+		_cmake_check_build_dir init
+		vigra_configure
+	fi
+}
+
+src_compile() {
+	local VIGRA_BUILD_DIR
+	vigra_compile() {
+		cmake-utils_src_compile
+		VIGRA_BUILD_DIR="${BUILD_DIR}"
+	}
+	if use python; then
+		python_foreach_impl vigra_compile
+	else
+		vigra_compile
+	fi
+
+	if use doc; then
+		einfo "Generating Documentation"
+		# use build dir from last compile command
+		VARTEXFONTS="${T}/fonts" BUILD_DIR="${VIGRA_BUILD_DIR}" cmake-utils_src_make doc
+	fi
+}
+
+src_install() {
+	if use python; then
+		python_foreach_impl cmake-utils_src_install
+		python_optimize
+	else
+		cmake-utils_src_install
+	fi
+}
+
+src_test() {
+	# perhaps disable tests (see #390447)
+	vigra_test() {
+		PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake-utils_src_test
+	}
+	if use python; then
+		python_foreach_impl vigra_test
+	else
+		vigra_test
+	fi
+}

diff --git a/media-libs/vigra/vigra-9999.ebuild b/media-libs/vigra/vigra-9999.ebuild
new file mode 100644
index 00000000000..4073587b713
--- /dev/null
+++ b/media-libs/vigra/vigra-9999.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_P="${P}-src"
+MY_V="${PV//\./-}"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads,xml"
+
+inherit cmake-utils python-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/${PN}.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/ukoethe/${PN}/releases/download/Version-${MY_V}/${MY_P}.tar.gz"
+	KEYWORDS="~amd64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png +python test +tiff valgrind"
+
+# runtime dependency on python:2.7 is required by the vigra-config script
+RDEPEND="
+	dev-lang/python:2.7
+	>=dev-libs/boost-1.52.0-r6:=[python?,${PYTHON_USEDEP}]
+	fftw? ( sci-libs/fftw:3.0 )
+	hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi?] )
+	jpeg? ( virtual/jpeg:0 )
+	openexr? ( media-libs/openexr:= )
+	png? ( media-libs/libpng:0= )
+	python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] )
+	tiff? ( media-libs/tiff:0= )
+	valgrind? ( dev-util/valgrind )"
+
+DEPEND="${RDEPEND}
+	doc? (
+		app-doc/doxygen
+		python? ( >=dev-python/sphinx-1.1.3-r5[${PYTHON_USEDEP}] )
+	)
+	test? ( >=dev-python/nose-1.1.2-r1[${PYTHON_USEDEP}] )"
+
+REQUIRED_USE="
+	doc? ( hdf5 fftw )
+	python? ( hdf5 ${PYTHON_REQUIRED_USE} )
+	test? ( hdf5 python fftw )"
+
+# Severely broken, also disabled in Fedora, bugs #390447, #653442
+RESTRICT="test"
+
+DOCS=( README.md )
+
+pkg_setup() {
+	use python && python_setup
+}
+
+src_prepare() {
+	einfo "Removing shipped docs and VCS files"
+	rm -rf doc || die
+
+	cmake-utils_src_prepare
+
+	# Don't use python_fix_shebang because we can't put this behind USE="python"
+	sed -i -e '/env/s:python:python2:' config/vigra-config.in || die
+}
+
+src_configure() {
+	vigra_configure() {
+		local libdir="$(get_libdir)"
+
+		local mycmakeargs=(
+			-DAUTOEXEC_TESTS=OFF
+			-DDOCDIR="${BUILD_DIR}/doc"
+			-DDOCINSTALL="share/doc/${P}"
+			-DLIBDIR_SUFFIX="${libdir/lib}"
+			-DUSE_DOC=$(usex doc ON OFF) # unused
+			-DUSE_FFTW3=$(usex fftw ON OFF) # unused
+			-DUSE_JPEG=$(usex jpeg ON OFF) # unused
+			-DUSE_MPI=$(usex mpi ON OFF) # unused
+			-DUSE_PNG=$(usex png ON OFF) # unused
+			-DUSE_TIFF=$(usex tiff ON OFF) # unused
+			-DWITH_HDF5=$(usex hdf5 ON OFF)
+			-DWITH_OPENEXR=$(usex openexr ON OFF)
+			-DWITH_VALGRIND=$(usex valgrind ON OFF)
+			-DWITH_VIGRANUMPY=$(usex python ON OFF)
+			-DBUILD_TESTING=$(usex test ON OFF) # unused
+			-DUSE_AUTOBUILD_TESTS=$(usex test ON OFF) # unused
+			-DUSE_CREATE_CTEST_TARGETS=$(usex test ON OFF) # unused
+		)
+		cmake-utils_src_configure
+	}
+
+	if use python; then
+		python_foreach_impl vigra_configure
+	else
+		# required for docdir
+		_cmake_check_build_dir init
+		vigra_configure
+	fi
+}
+
+src_compile() {
+	local VIGRA_BUILD_DIR
+	vigra_compile() {
+		cmake-utils_src_compile
+		VIGRA_BUILD_DIR="${BUILD_DIR}"
+	}
+	if use python; then
+		python_foreach_impl vigra_compile
+	else
+		vigra_compile
+	fi
+
+	if use doc; then
+		einfo "Generating Documentation"
+		# use build dir from last compile command
+		VARTEXFONTS="${T}/fonts" BUILD_DIR="${VIGRA_BUILD_DIR}" cmake-utils_src_make doc
+	fi
+}
+
+src_install() {
+	if use python; then
+		python_foreach_impl cmake-utils_src_install
+		python_optimize
+	else
+		cmake-utils_src_install
+	fi
+}
+
+src_test() {
+	# perhaps disable tests (see #390447)
+	vigra_test() {
+		PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake-utils_src_test
+	}
+	if use python; then
+		python_foreach_impl vigra_test
+	else
+		vigra_test
+	fi
+}


             reply	other threads:[~2018-11-19 20:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 20:13 Craig Andrews [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-30 15:40 [gentoo-commits] repo/gentoo:master commit in: media-libs/vigra/files/, media-libs/vigra/ Andreas Sturmlechner
2024-06-14  7:15 Sam James
2024-05-30 17:14 Andreas Sturmlechner
2020-07-10 21:24 Andreas Sturmlechner
2019-11-27  0:13 Andreas Sturmlechner
2019-04-08 21:15 Andreas Sturmlechner
2018-06-06 22:04 Andreas Hüttel
2017-02-11 22:03 Andreas Hüttel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1542658387.e2caaa6f7abb46ec70732b82a5bdd7bb00f058dd.candrews@gentoo \
    --to=candrews@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox