1 |
commit: 606148aa9f8c8b33fa9b75a8d60c87e90756c068 |
2 |
Author: Kacper KoĆodziej <kacper <AT> kolodziej <DOT> in> |
3 |
AuthorDate: Sat Nov 26 21:53:27 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 4 13:25:15 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=606148aa |
7 |
|
8 |
media-gfx/nvidia-texture-tools: upgrade to EAPI=6 |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
|
12 |
.../files/nvidia-texture-tools-2.0.8-cg.patch | 4 +- |
13 |
.../files/nvidia-texture-tools-2.0.8-gcc-4.7.patch | 4 +- |
14 |
.../nvidia-texture-tools-2.0.8-r3.ebuild | 72 ++++++++++++++++++++++ |
15 |
3 files changed, 76 insertions(+), 4 deletions(-) |
16 |
|
17 |
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 |
18 |
index 6dcb1b4..79d38f5 100644 |
19 |
--- a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cg.patch |
20 |
+++ b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cg.patch |
21 |
@@ -3,8 +3,8 @@ Date: Thu May 3 20:06:31 UTC 2012 |
22 |
|
23 |
fix compilation for cg useflag |
24 |
|
25 |
---- cmake/FindCg.cmake |
26 |
-+++ cmake/FindCg.cmake |
27 |
+--- a/cmake/FindCg.cmake |
28 |
++++ b/cmake/FindCg.cmake |
29 |
@@ -86,6 +86,7 @@ |
30 |
FIND_PROGRAM( CG_COMPILER cgc |
31 |
/usr/bin |
32 |
|
33 |
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 |
34 |
index 62f33e9..aaba262 100644 |
35 |
--- a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-gcc-4.7.patch |
36 |
+++ b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-gcc-4.7.patch |
37 |
@@ -4,8 +4,8 @@ Subject: fix compilation on gcc 4.7 |
38 |
|
39 |
https://bugs.gentoo.org/show_bug.cgi?id=423965 |
40 |
|
41 |
---- src/nvcore/nvcore.h |
42 |
-+++ src/nvcore/nvcore.h |
43 |
+--- a/src/nvcore/nvcore.h |
44 |
++++ b/src/nvcore/nvcore.h |
45 |
@@ -158,6 +158,7 @@ |
46 |
#elif NV_CC_GNUC |
47 |
# if NV_OS_LINUX |
48 |
|
49 |
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 |
50 |
new file mode 100644 |
51 |
index 00000000..e49ec73 |
52 |
--- /dev/null |
53 |
+++ b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r3.ebuild |
54 |
@@ -0,0 +1,72 @@ |
55 |
+# Copyright 1999-2017 Gentoo Foundation |
56 |
+# Distributed under the terms of the GNU General Public License v2 |
57 |
+# $Id$ |
58 |
+ |
59 |
+EAPI=6 |
60 |
+ |
61 |
+inherit cmake-utils eutils |
62 |
+ |
63 |
+DESCRIPTION="A set of cuda-enabled texture tools and compressors" |
64 |
+HOMEPAGE="http://developer.nvidia.com/object/texture_tools.html" |
65 |
+SRC_URI="https://${PN}.googlecode.com/files/${P}-1.tar.gz |
66 |
+ https://dev.gentoo.org/~ssuominen/${P}-patchset-1.tar.xz" |
67 |
+ |
68 |
+LICENSE="MIT" |
69 |
+SLOT="0" |
70 |
+KEYWORDS="~amd64 ~x86" |
71 |
+IUSE="cg cuda glew glut openexr" |
72 |
+ |
73 |
+RDEPEND=" |
74 |
+ media-libs/ilmbase:= |
75 |
+ media-libs/libpng:0= |
76 |
+ media-libs/tiff:0 |
77 |
+ sys-libs/zlib |
78 |
+ virtual/jpeg:0 |
79 |
+ virtual/opengl |
80 |
+ x11-libs/libX11 |
81 |
+ cg? ( media-gfx/nvidia-cg-toolkit ) |
82 |
+ cuda? ( dev-util/nvidia-cuda-toolkit ) |
83 |
+ glew? ( media-libs/glew:0= ) |
84 |
+ glut? ( media-libs/freeglut ) |
85 |
+ openexr? ( media-libs/openexr:= ) |
86 |
+ " |
87 |
+DEPEND="${RDEPEND} |
88 |
+ virtual/pkgconfig" |
89 |
+ |
90 |
+PATCHES=( |
91 |
+ "${FILESDIR}/${P}-cg.patch" # fix bug #414509 |
92 |
+ "${FILESDIR}/${P}-gcc-4.7.patch" # fix bug #423965 |
93 |
+ "${FILESDIR}/${P}-openexr.patch" # fix bug #462494 |
94 |
+ "${FILESDIR}/${P}-clang.patch" # fix clang build |
95 |
+ "${FILESDIR}/${P}-cpp14.patch" # fix bug #594938 |
96 |
+) |
97 |
+ |
98 |
+S="${WORKDIR}/${PN}" |
99 |
+ |
100 |
+pkg_setup() { |
101 |
+ if use cuda; then |
102 |
+ if [[ $(( $(gcc-major-version) * 10 + $(gcc-minor-version) )) -gt 44 ]] ; then |
103 |
+ eerror "gcc 4.5 and up are not supported for useflag cuda!" |
104 |
+ die "gcc 4.5 and up are not supported for useflag cuda!" |
105 |
+ fi |
106 |
+ fi |
107 |
+} |
108 |
+ |
109 |
+src_prepare() { |
110 |
+ edos2unix cmake/* |
111 |
+ EPATCH_SUFFIX=patch epatch "${WORKDIR}/patches" |
112 |
+ cmake-utils_src_prepare |
113 |
+} |
114 |
+ |
115 |
+src_configure() { |
116 |
+ local mycmakeargs=( |
117 |
+ -DLIBDIR=$(get_libdir) |
118 |
+ -DNVTT_SHARED=TRUE |
119 |
+ -DCG=$(usex cg) |
120 |
+ -DCUDA=$(usex cuda) |
121 |
+ -DGLEW=$(usex glew) |
122 |
+ -DGLUT=$(usex glut) |
123 |
+ -DOPENEXR=$(usex openexr) |
124 |
+ ) |
125 |
+ cmake-utils_src_configure |
126 |
+} |