diff options
5 files changed, 170 insertions, 1 deletions
diff --git a/media-gfx/nvidia-cg-toolkit/ChangeLog b/media-gfx/nvidia-cg-toolkit/ChangeLog index 8214099f961c..9e24f754e6af 100644 --- a/media-gfx/nvidia-cg-toolkit/ChangeLog +++ b/media-gfx/nvidia-cg-toolkit/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-gfx/nvidia-cg-toolkit # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/nvidia-cg-toolkit/ChangeLog,v 1.48 2012/11/15 22:07:12 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/nvidia-cg-toolkit/ChangeLog,v 1.49 2012/11/16 09:43:27 jlec Exp $ + +*nvidia-cg-toolkit-3.1.0013-r1 (16 Nov 2012) + + 16 Nov 2012; Justin Lecher <jlec@gentoo.org> +files/80cgc-opt-3, + +nvidia-cg-toolkit-3.1.0013-r1.ebuild, +files/nvidia-cg-toolkit.pc.in, + +files/nvidia-cg-toolkit-gl.pc.in: + Don't add binary packages to global linker search path; instead using + pkg-config. Thanks ssuominen pointing this out *nvidia-cg-toolkit-3.1.0013 (15 Nov 2012) diff --git a/media-gfx/nvidia-cg-toolkit/files/80cgc-opt-3 b/media-gfx/nvidia-cg-toolkit/files/80cgc-opt-3 new file mode 100644 index 000000000000..6313d20c1817 --- /dev/null +++ b/media-gfx/nvidia-cg-toolkit/files/80cgc-opt-3 @@ -0,0 +1,9 @@ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/nvidia-cg-toolkit/files/80cgc-opt-3,v 1.1 2012/11/16 09:43:27 jlec Exp $ + +# Configures the CG Runtime environment for Bourne shell and compatible shells +CG_COMPILER_EXE=@GENTOO_PORTAGE_EPREFIX@/opt/bin/cgc +CG_INC_PATH=@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit/include +CG_LIB_PATH="ELDPATH" + +PATH="@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit/bin" +ROOTPATH="@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit/bin" diff --git a/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit-gl.pc.in b/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit-gl.pc.in new file mode 100644 index 000000000000..6f1ca714efb9 --- /dev/null +++ b/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit-gl.pc.in @@ -0,0 +1,10 @@ +prefix=@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit +libdir=${prefix}/GENTOO_LIBDIR +includedir=${prefix}/include +Name: nvidia-cg-toolkit +Description: DESCRIPTION +Version: VERSION +URL: HOMEPAGE +Libs: -L${libdir} -lCg -lCgGL +Cflags: -I${includedir}/ +Requires: nvidia-cg-toolkit diff --git a/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit.pc.in b/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit.pc.in new file mode 100644 index 000000000000..43dedbef4bb7 --- /dev/null +++ b/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit.pc.in @@ -0,0 +1,9 @@ +prefix=@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit +libdir=${prefix}/GENTOO_LIBDIR +includedir=${prefix}/include +Name: nvidia-cg-toolkit +Description: DESCRIPTION +Version: VERSION +URL: HOMEPAGE +Libs: -L${libdir} -lCg +Cflags: -I${includedir}/ diff --git a/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r1.ebuild b/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r1.ebuild new file mode 100644 index 000000000000..990b334c04fa --- /dev/null +++ b/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r1.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r1.ebuild,v 1.1 2012/11/16 09:43:27 jlec Exp $ + +EAPI=5 + +inherit multilib prefix versionator + +MY_PV="$(get_version_component_range 1-2)" +MY_DATE="April2012" + +DESCRIPTION="NVIDIA's C graphics compiler toolkit" +HOMEPAGE="http://developer.nvidia.com/object/cg_toolkit.html" +X86_URI="http://developer.download.nvidia.com/cg/Cg_${MY_PV}/Cg-${MY_PV}_${MY_DATE}_x86.tgz" +SRC_URI=" + amd64? ( + http://developer.download.nvidia.com/cg/Cg_${MY_PV}/Cg-${MY_PV}_${MY_DATE}_x86_64.tgz + multilib? ( ${X86_URI} ) + ) + x86? ( ${X86_URI} )" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples multilib" + +RESTRICT="strip" + +RDEPEND=" + media-libs/freeglut + multilib? ( amd64? ( app-emulation/emul-linux-x86-xlibs ) ) + x86? ( virtual/libstdc++:3.3 )" +DEPEND="" + +S=${WORKDIR} + +DEST=/opt/${PN} + +QA_PREBUILT="${DEST}/*" + +src_unpack() { + local i + if use multilib && use amd64; then + mkdir {32,64}bit || die + for i in $A; do + if [[ "$i" =~ .*x86_64.* ]]; then + pushd 64bit > /dev/null + unpack "$i" + popd > /dev/null + else + pushd 32bit > /dev/null + unpack "$i" + popd > /dev/null + fi + done + else + default + fi +} + +install_pkgconfig() { + # Two args: .pc file + abi + local suffix + use amd64 && use multilib && [[ $2 == x86 ]] && suffix="-32" + insinto /usr/$(get_libdir)/pkgconfig + sed \ + -e "s:GENTOO_LIBDIR:$(ABI=$2 get_libdir):g" \ + -e "s:DESCRIPTION:${DESCRIPTION}:g" \ + -e "s:VERSION:${PV}:g" \ + -e "s|HOMEPAGE|${HOMEPAGE}|g" \ + "${FILESDIR}/${1}.in" > "${T}/${1/.pc/${suffix}.pc}" || die + eprefixify "${T}/${1/.pc/${suffix}.pc}" + doins "${T}/${1/.pc/${suffix}.pc}" +} + +src_install() { + local ldpath + into ${DEST} + if use multilib && use amd64; then + cd 64bit + fi + + dobin usr/bin/{cgc,cgfxcat,cginfo} + + if use x86; then + dolib usr/lib/* + ldpath="${EPREFIX}${DEST}/$(get_libdir)" + install_pkgconfig nvidia-cg-toolkit.pc x86 + install_pkgconfig nvidia-cg-toolkit-gl.pc x86 + elif use amd64; then + dolib usr/lib64/* + ldpath="${EPREFIX}${DEST}/$(get_libdir)" + install_pkgconfig nvidia-cg-toolkit.pc amd64 + install_pkgconfig nvidia-cg-toolkit-gl.pc amd64 + if use multilib; then + ldpath+=":${EPREFIX}${DEST}/lib32" + pushd ../32bit > /dev/null + ABI="x86" dolib usr/lib/* + popd > /dev/null + install_pkgconfig nvidia-cg-toolkit.pc x86 + install_pkgconfig nvidia-cg-toolkit-gl.pc x86 + fi + fi + + sed \ + -e "s|ELDPATH|${ldpath}|g" \ + "${FILESDIR}"/80cgc-opt-3 > "${T}"/80cgc-opt || die + eprefixify "${T}"/80cgc-opt + doenvd "${T}"/80cgc-opt + + insinto ${DEST}/include + doins -r usr/include/Cg + + insinto ${DEST} + dodoc usr/local/Cg/README + if use doc; then + dodoc usr/local/Cg/docs/*.{txt,pdf} + dohtml -r usr/local/Cg/docs/html/* + fi + if use examples; then + insinto /usr/share/${PN} + doins -r usr/local/Cg/examples + fi + find usr/local/Cg/{docs,examples,README} -delete +} + +pkg_postinst() { + if [[ ${REPLACING_VERSIONS} < 2.1.0016 ]]; then + einfo "Starting with ${CATEGORY}/${PN}-2.1.0016, ${PN} is installed in" + einfo "${DEST}. Packages might have to add something like:" + einfo " append-cppflags -I${DEST}/include" + fi +} |