* remove files/openexr_viewers-2.3.0-fix-cg-libdir.patch
* add files/openexr_viewers-2.3.0--with-cg-libdir.patch
Addresses an issue, where Cg libraries where not found on 32-bit
arches. The patch adds an option --with-cg-libdir to configure to
pass 32-/64-bit specific libraries of Cg to configure script.
Thanks to Arfrever Frehtes Taifersar Arahesis for reporting the issue.
See also
https://github.com/gentoo/gentoo/pull/10030#pullrequestreview-
164522412
Closes: https://bugs.gentoo.org/668754
Signed-off-by: Bernd Waibel <waebbl@gmail.com>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Closes: https://github.com/gentoo/gentoo/pull/10172
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
--- /dev/null
+diff --git a/m4/path.cb.m4 b/m4/path.cb.m4
+index 7e38708..b5675b1 100644
+--- a/m4/path.cb.m4
++++ b/m4/path.cb.m4
+@@ -10,9 +10,17 @@ dnl
+ AC_ARG_WITH(cg-prefix,[ --with-cg-prefix=PFX Prefix where Cg is installed (optional)],
+ cg_prefix="$withval", cg_prefix="")
+
++AC_ARG_WITH(cg-libdir, [ --with-cg-libdir=PATH Directory where Cg libraries are installed (optional)],
++ cg_libdir="$withval", cg_libdir="")
++
+ if test x$cg_prefix != x ; then
+ CG_CXXFLAGS="-I$cg_prefix/include"
+- CG_LDFLAGS="-L$cg_prefix/lib -lGL -lCg -lCgGL -lGLU -lpthread -lglut"
++ if test x$cg_libdir != x; then
++ CG_LDFLAGS="-L$cg_libdir"
++ else
++ CG_LDFLAGS="-L$cg_prefix/lib"
++ fi
++ CG_LDFLAGS="$CG_LDFLAGS -lGL -lCg -lCgGL -lGLU -lpthread -lglut"
+ else
+ case $host_os in
+ darwin*)
+++ /dev/null
-diff --git a/m4/path.cb.m4 b/m4/path.cb.m4
-index 7e38708..832b96c 100644
---- a/m4/path.cb.m4
-+++ b/m4/path.cb.m4
-@@ -12,7 +12,7 @@ AC_ARG_WITH(cg-prefix,[ --with-cg-prefix=PFX Prefix where Cg is installed (opt
-
- if test x$cg_prefix != x ; then
- CG_CXXFLAGS="-I$cg_prefix/include"
-- CG_LDFLAGS="-L$cg_prefix/lib -lGL -lCg -lCgGL -lGLU -lpthread -lglut"
-+ CG_LDFLAGS="-L$cg_prefix/lib64 -lGL -lCg -lCgGL -lGLU -lpthread -lglut"
- else
- case $host_os in
- darwin*)
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PATCHES=(
"${FILESDIR}/${P}-fix-configure.patch"
- "${FILESDIR}/${P}-fix-cg-libdir.patch"
+ "${FILESDIR}/${P}--with-cg-libdir.patch"
)
src_prepare() {
myeconfargs+=(
--enable-cg
--with-cg-prefix="/opt/nvidia-cg-toolkit"
+ --with-cg-libdir="/opt/nvidia-cg-toolkit/$(get_libdir)"
)
append-ldflags "$(no-as-needed)" # binary-only libCg is not properly linked
fi