commit:     606148aa9f8c8b33fa9b75a8d60c87e90756c068
Author:     Kacper KoƂodziej <kacper <AT> kolodziej <DOT> in>
AuthorDate: Sat Nov 26 21:53:27 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Jan  4 13:25:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=606148aa

media-gfx/nvidia-texture-tools: upgrade to EAPI=6

Package-Manager: portage-2.3.2

 .../files/nvidia-texture-tools-2.0.8-cg.patch      |  4 +-
 .../files/nvidia-texture-tools-2.0.8-gcc-4.7.patch |  4 +-
 .../nvidia-texture-tools-2.0.8-r3.ebuild           | 72 ++++++++++++++++++++++
 3 files changed, 76 insertions(+), 4 deletions(-)

diff --git 
a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cg.patch 
b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cg.patch
index 6dcb1b4..79d38f5 100644
--- a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cg.patch
+++ b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cg.patch
@@ -3,8 +3,8 @@ Date: Thu May  3 20:06:31 UTC 2012
 
 fix compilation for cg useflag
 
---- cmake/FindCg.cmake
-+++ cmake/FindCg.cmake
+--- a/cmake/FindCg.cmake
++++ b/cmake/FindCg.cmake
 @@ -86,6 +86,7 @@
      FIND_PROGRAM( CG_COMPILER cgc
        /usr/bin

diff --git 
a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-gcc-4.7.patch 
b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-gcc-4.7.patch
index 62f33e9..aaba262 100644
--- 
a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-gcc-4.7.patch
+++ 
b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-gcc-4.7.patch
@@ -4,8 +4,8 @@ Subject: fix compilation on gcc 4.7
 
 https://bugs.gentoo.org/show_bug.cgi?id=423965
 
---- src/nvcore/nvcore.h
-+++ src/nvcore/nvcore.h
+--- a/src/nvcore/nvcore.h
++++ b/src/nvcore/nvcore.h
 @@ -158,6 +158,7 @@
  #elif NV_CC_GNUC
  #     if NV_OS_LINUX

diff --git 
a/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r3.ebuild 
b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r3.ebuild
new file mode 100644
index 00000000..e49ec73
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r3.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit cmake-utils eutils
+
+DESCRIPTION="A set of cuda-enabled texture tools and compressors"
+HOMEPAGE="http://developer.nvidia.com/object/texture_tools.html";
+SRC_URI="https://${PN}.googlecode.com/files/${P}-1.tar.gz
+       https://dev.gentoo.org/~ssuominen/${P}-patchset-1.tar.xz";
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cg cuda glew glut openexr"
+
+RDEPEND="
+       media-libs/ilmbase:=
+       media-libs/libpng:0=
+       media-libs/tiff:0
+       sys-libs/zlib
+       virtual/jpeg:0
+       virtual/opengl
+       x11-libs/libX11
+       cg? ( media-gfx/nvidia-cg-toolkit )
+       cuda? ( dev-util/nvidia-cuda-toolkit )
+       glew? ( media-libs/glew:0= )
+       glut? ( media-libs/freeglut )
+       openexr? ( media-libs/openexr:= )
+       "
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}/${P}-cg.patch" # fix bug #414509
+       "${FILESDIR}/${P}-gcc-4.7.patch" # fix bug #423965
+       "${FILESDIR}/${P}-openexr.patch" # fix bug #462494
+       "${FILESDIR}/${P}-clang.patch" # fix clang build
+       "${FILESDIR}/${P}-cpp14.patch" # fix bug #594938
+)
+
+S="${WORKDIR}/${PN}"
+
+pkg_setup() {
+       if use cuda; then
+               if [[ $(( $(gcc-major-version) * 10 + $(gcc-minor-version) )) 
-gt 44 ]] ; then
+                       eerror "gcc 4.5 and up are not supported for useflag 
cuda!"
+                       die "gcc 4.5 and up are not supported for useflag cuda!"
+               fi
+       fi
+}
+
+src_prepare() {
+       edos2unix cmake/*
+       EPATCH_SUFFIX=patch epatch "${WORKDIR}/patches"
+       cmake-utils_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DLIBDIR=$(get_libdir)
+               -DNVTT_SHARED=TRUE
+               -DCG=$(usex cg)
+               -DCUDA=$(usex cuda)
+               -DGLEW=$(usex glew)
+               -DGLUT=$(usex glut)
+               -DOPENEXR=$(usex openexr)
+       )
+       cmake-utils_src_configure
+}

Reply via email to