Skip to content

Commit

Permalink
media-libs/vigra: version bump to 1.11.0
Browse files Browse the repository at this point in the history
Also:
* update to EAPI 6
* respect USE=valgrind instead of always disabling
* minor naming fixes

Gentoo-Bug: https://bugs.gentoo.org/506902

Package-Manager: portage-2.2.28
  • Loading branch information
austin987 committed Sep 7, 2016
1 parent e1cd5b1 commit f104981
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 0 deletions.
1 change: 1 addition & 0 deletions media-libs/vigra/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST vigra-1.10.0-src-with-docu.tar.gz 36122311 SHA256 42d4a361b0bb52fbfdae7e76000698be04dabba77be3f4248d369139fe96a099 SHA512 4c0edb9d5a05d341034b6fe504658525130ddf830b09af4e08d9080407dd10ec62355bed362c4876cb1504632202a5eb125dc50cb66b0617c28dd274b8367d4d WHIRLPOOL 92cf1517acc6ff11eb255cb6bee523ebcaab118b9f73602baf07be8070c537c5bb7e94a9ccbd97bd7e20e20efeb8ac485a184f1c3609fe7747051ed6ec4ca65f
DIST vigra-1.11.0-src.tar.gz 51854568 SHA256 68617de347eae7d4700a8f66cd59ce31d6cd92ffb4a235b4df34c688673af5cb SHA512 3cd8fcfc8ba9a1209a37e49c7b5cb0080bc665987805deec0b92cabf8c571c2f09ba47e2850c12204d04b3c830322fc8e47efa19fc537cf78708c22e1d302d6a WHIRLPOOL 1dc73a42b5033c88427850d72078475211a206d9af69209a5d3d05d1b117baef651ccb8232b0c0428b775160feda28b08aae3f14ab07c353de1b076664a0e105
DIST vigra-1.9.0-src.tar.gz 30813416 SHA256 8fbdccb553a4925323098ab27b710fbc87d48f37bf81d404994936a31a31cf01 SHA512 8d1c7f3ad8cc8069b34d58fe775eb8604a2c902daeab4a5ad3a602d45c1eda0b4dcfe64e68b9fada669b46ee39b3a6f2c95af9c5f99c2fb2370c55580816e757 WHIRLPOOL 12c63119133a6a7e6a6d28078b9267f720e98b8754b416d0491b93ee87f3527cffe77bc043c00cdf729633c1161bdc11bdfe4cff57a73345c9addd1bd6cc62d9
3 changes: 3 additions & 0 deletions media-libs/vigra/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
<upstream>
<remote-id type="github">ukoethe/vigra</remote-id>
</upstream>
<use>
<flag name="valgrind">Enable valgrind in make check</flag>
</use>
</pkgmetadata>
138 changes: 138 additions & 0 deletions media-libs/vigra/vigra-1.11.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

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 with emphasis on customizable algorithms and data structures"
HOMEPAGE="http://hci.iwr.uni-heidelberg.de/vigra/"
SRC_URI="https://github.com/ukoethe/vigra/releases/download/Version-${MY_V}/${MY_P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
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 )
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 )"

DOCS=( README.md )

pkg_setup() {
use python && python_setup
}

src_prepare() {
default

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
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
}

0 comments on commit f104981

Please sign in to comment.