diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /media-libs/openjpeg/openjpeg-1.5.2-r1.ebuild |
reinit the tree, so we can have metadata
Diffstat (limited to 'media-libs/openjpeg/openjpeg-1.5.2-r1.ebuild')
-rw-r--r-- | media-libs/openjpeg/openjpeg-1.5.2-r1.ebuild | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/media-libs/openjpeg/openjpeg-1.5.2-r1.ebuild b/media-libs/openjpeg/openjpeg-1.5.2-r1.ebuild new file mode 100644 index 000000000000..39e71e72ada2 --- /dev/null +++ b/media-libs/openjpeg/openjpeg-1.5.2-r1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit multilib cmake-multilib + +DESCRIPTION="An open-source JPEG 2000 library" +HOMEPAGE="http://www.openjpeg.org" +SRC_URI="mirror://sourceforge/${PN}.mirror/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0/5" # based on SONAME +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="doc static-libs test" + +RDEPEND="media-libs/lcms:2= + media-libs/libpng:0= + media-libs/tiff:0= + sys-libs/zlib:=" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen )" + +DOCS=( AUTHORS CHANGES NEWS README THANKS ) + +RESTRICT="test" #409263 + +src_prepare() { + # Stop installing LICENSE file, and install CHANGES from DOCS instead: + sed -i -e '/INSTALL.*FILES.*DESTINATION.*OPENJPEG_INSTALL_DOC_DIR/d' CMakeLists.txt || die +} + +multilib_src_configure() { + local mycmakeargs=( + -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)" + $(cmake-utils_use_build test TESTING) + -DBUILD_DOC=$(multilib_native_usex doc ON OFF) + -DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF) + ) + + cmake-utils_src_configure + + if use static-libs; then + mycmakeargs=( + -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)" + $(cmake-utils_use_build test TESTING) + -DBUILD_SHARED_LIBS=OFF + -DBUILD_CODEC=OFF + ) + BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_configure + fi +} + +multilib_src_compile() { + cmake-utils_src_compile + + if use static-libs; then + BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_compile + fi +} + +multilib_src_install() { + if use static-libs; then + BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_install + fi + + cmake-utils_src_install + + dosym openjpeg-1.5/openjpeg.h /usr/include/openjpeg.h + dosym libopenjpeg1.pc /usr/$(get_libdir)/pkgconfig/libopenjpeg.pc + + if use doc && multilib_is_native_abi; then + dodoc -r doc/html + fi +} |