Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 261481 - media-gfx/nvidia-cg-toolkit: Make it detectable by 3rd parties again
Summary: media-gfx/nvidia-cg-toolkit: Make it detectable by 3rd parties again
Status: RESOLVED DUPLICATE of bug 255867
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-06 18:27 UTC by Frank Richter
Modified: 2011-02-03 20:16 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild additionally performing a symlink to the Cg include directory from /usr/include/ (nvidia-cg-toolkit-2.1.0017-r1.ebuild,1.42 KB, text/plain)
2009-03-06 18:29 UTC, Frank Richter
Details
Add LIBRARY_PATH to 80cgc-opt (Cg-cgc-opt-LIBRARY_PATH.patch,292 bytes, patch)
2009-03-06 18:29 UTC, Frank Richter
Details | Diff
ebuild updated for latest Cg version (nvidia-cg-toolkit-2.2.0010.ebuild,1.21 KB, text/plain)
2010-01-05 06:39 UTC, Frank Richter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Richter 2009-03-06 18:27:45 UTC
Bug 255867 was accepted and the move of Cg to below /opt/ broke detection of Cg by 3rd party sources. (I.e. sources that are compiled *outside* portage.)

The attached changed remedy that by:
- symlinking to the 'Cg/' include directory from /usr/include/, allowing the headers to be found
- augmenting LIBRARY_PATH with the Cg directory, allowing the libraries to be found.
Comment 1 Frank Richter 2009-03-06 18:29:02 UTC
Created attachment 184155 [details]
ebuild additionally performing a symlink to the Cg include directory from /usr/include/

The important change is an one-liner:

--- nvidia-cg-toolkit-2.1.0017.ebuild	2009-03-01 22:31:51.000000000 +0100
+++ nvidia-cg-toolkit-2.1.0017-r1.ebuild	2009-03-06 19:01:49.000000000 +0100
@@ -39,6 +39,7 @@
 
 	insinto ${DEST}/include/Cg
 	doins usr/include/Cg/*
+	dosym ${DEST}/include/Cg /usr/include/Cg
 
 	insinto ${DEST}/man/man3
 	doins usr/share/man/man3/*
Comment 2 Frank Richter 2009-03-06 18:29:42 UTC
Created attachment 184156 [details, diff]
Add LIBRARY_PATH to 80cgc-opt

Augments the LIBRARY_PATH env var.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-03-09 17:34:50 UTC
Reassigning to graphics herd.
Comment 4 Frank Richter 2010-01-05 06:39:27 UTC
Created attachment 215230 [details]
ebuild updated for latest Cg version
Comment 5 Dennis Schridde 2011-01-03 08:47:41 UTC
Is the include symlink hack still needed? ps2emu-zerogs (pcsx2-overlay) seems to build fine.
Is the LIBRARY_PATH still needed? The env file sets LDPATH, which ends up adding to /etc/ld.so.cache, and hence there should be nothing else necessary.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2011-01-03 09:24:22 UTC
Link with -L/opt/nvidia-cg-toolkit/lib and use includes by -I/opt/nvidia-cg-toolkit/include or -I/opt/nvidia-cg-toolkit/include/Cg.

I don't see anything to fix here... closing.
Comment 7 Frank Richter 2011-01-03 10:52:19 UTC
(In reply to comment #6)
> Link with -L/opt/nvidia-cg-toolkit/lib and use includes by
> -I/opt/nvidia-cg-toolkit/include or -I/opt/nvidia-cg-toolkit/include/Cg.
> 
> I don't see anything to fix here... closing.

The point is that you should *not* have to do that.
It was once possible to use Cg without specifying additional include or library directories, and that's how it should be.

Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2011-01-03 11:12:00 UTC
(In reply to comment #7)
> The point is that you should *not* have to do that.
> It was once possible to use Cg without specifying additional include or library
> directories, and that's how it should be.

Nope, it's a binary-only library, therefore it should be hidden from scope of default paths compiler/linker looks it for. That's the whole point of moving it into /opt. Same applies to any binary-only package in tree. In fact, it's a gentoo quality and assurance policy.
Comment 9 Frank Richter 2011-01-03 12:48:31 UTC
Considering Cg is a library for _developers_, hiding it from the default compiler/linker paths pretty much goes against it's purpose.

Also, I'm curious about the rationale of that policy, but I failed to find any information on it so far.
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2011-01-03 13:10:37 UTC
(In reply to comment #9)
> Considering Cg is a library for _developers_, hiding it from the default
> compiler/linker paths pretty much goes against it's purpose.

just use the proper flags, developers should know howto do that :)

> 
> Also, I'm curious about the rationale of that policy, but I failed to find any
> information on it so far.
> 

it boils down to: we can't guarantee what binary-only packages *actually* contain, and can't fix bugs from them either, so they should be hidden away in /opt
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2011-02-03 20:16:27 UTC
reopen to properly mark this as duplicate
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2011-02-03 20:16:35 UTC

*** This bug has been marked as a duplicate of bug 255867 ***