summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/openjpeg/openjpeg-2.0.0.ebuild')
-rw-r--r--media-libs/openjpeg/openjpeg-2.0.0.ebuild41
1 files changed, 34 insertions, 7 deletions
diff --git a/media-libs/openjpeg/openjpeg-2.0.0.ebuild b/media-libs/openjpeg/openjpeg-2.0.0.ebuild
index 21b442e49049..624b3b161bf3 100644
--- a/media-libs/openjpeg/openjpeg-2.0.0.ebuild
+++ b/media-libs/openjpeg/openjpeg-2.0.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/openjpeg/openjpeg-2.0.0.ebuild,v 1.2 2013/06/06 13:54:04 xmw Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/openjpeg/openjpeg-2.0.0.ebuild,v 1.3 2013/06/08 10:36:47 xmw Exp $
EAPI=5
inherit cmake-utils multilib
@@ -12,19 +12,20 @@ SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
LICENSE="BSD-2"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc test"
+IUSE="doc static-libs test"
-RDEPEND="media-libs/lcms:2=
- media-libs/libpng:0=
- media-libs/tiff:0=
- sys-libs/zlib:="
+RDEPEND="media-libs/lcms:2=[static-libs?]
+ media-libs/libpng:0=[static-libs?]
+ media-libs/tiff:0=[static-libs?]
+ sys-libs/zlib:=[static-libs?]"
DEPEND="${RDEPEND}
doc? ( app-doc/doxygen )"
DOCS=( AUTHORS CHANGES NEWS README THANKS )
PATCHES=( "${FILESDIR}"/${P}-build.patch
- "${FILESDIR}"/${P}-pkgconfig.patch )
+ "${FILESDIR}"/${P}-pkgconfig.patch
+ "${FILESDIR}"/${P}-pkgconfig-static.patch )
RESTRICT="test" #409263
@@ -36,4 +37,30 @@ src_configure() {
)
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
+ )
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_configure
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use static-libs ; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_compile
+ fi
+}
+
+src_install() {
+ if use static-libs ; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_install
+ #static bins overwritten by shared install
+ fi
+
+ cmake-utils_src_install
}