media-gfx/openexr_viewers: Revision bump to 2.2.0-r1

* Converted ebuild to EAPI 6
* Made patch compatible with PATCHES
* Changed dependencies to depend on new CTL version
* Tidied metadata.xml file

Closes: #5725
This commit is contained in:
Jonathan Scruggs
2017-09-23 14:10:11 +01:00
committed by Alexis Ballier
parent ab61b102be
commit 91e4e15fe3
3 changed files with 89 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
From e8d26df2a888f307e61584367f5dc14894d8be82 Mon Sep 17 00:00:00 2001
From: Jonathan Scruggs <j.scruggs@gmail.com>
Date: Sat, 23 Sep 2017 13:39:34 +0100
Subject: [PATCH] OpenEXR_Viewers: Remove nVidia automagic
---
OpenEXR_Viewers/configure.ac | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 94c88cd..1de94f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -194,7 +194,10 @@ AM_PATH_FLTK(have_fltk=yes, have_fltk=no)
dnl
dnl check for Cg
dnl
-if test "${have_fltk}" = yes; then
+AC_ARG_ENABLE(cg, AC_HELP_STRING([--enable-cg],
+ [enable nvidia cg support [[default=check]]]), [want_cg="${enableval}"], [want_cg=yes])
+
+if test "${have_fltk}" = yes -a "${want_cg}" != "no"; then
AM_PATH_CG(have_cg=yes, have_cg=no)
if test "${have_cg}" = yes; then
AC_DEFINE(HAVE_FRAGMENT_SHADERS)
--
2.14.1

View File

@@ -7,4 +7,7 @@
<use>
<flag name="cg">Add support for nvidia's cg shaders</flag>
</use>
<upstream>
<remote-id type="github">openexr/openexr</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,58 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools flag-o-matic
DESCRIPTION="OpenEXR Viewers"
HOMEPAGE="http://openexr.com/"
SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE="cg opengl"
RDEPEND="~media-libs/ilmbase-${PV}:=
~media-libs/openexr-${PV}:=
>=media-libs/ctl-1.5.2:=
x11-libs/fltk:1[opengl]
opengl? (
virtual/opengl
x11-libs/fltk:1[opengl]
cg? ( media-gfx/nvidia-cg-toolkit )
)"
DEPEND="${RDEPEND}
virtual/pkgconfig"
PATCHES=( "${FILESDIR}/${P}-Remove-nVidia-automagic.patch" )
src_prepare() {
default
sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die
eautoreconf
}
src_configure() {
local myconf
if use cg; then
myconf="--with-cg-prefix=/opt/nvidia-cg-toolkit"
append-flags "$(no-as-needed)" # binary-only libCg is not properly linked
fi
econf \
$(use_enable cg) \
$(use_with opengl fltk-config /usr/bin/fltk-config) \
${myconf}
}
src_install() {
emake \
DESTDIR="${D}" \
docdir=/usr/share/doc/${PF}/pdf \
install
dodoc AUTHORS ChangeLog NEWS README
}