Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 270480 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-2.1.0017.ebuild (-19 / +70 lines)
Lines 1-54 Link Here
1
# Copyright 1999-2010 Gentoo Foundation
1
# Copyright 1999-2011 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-2.1.0017.ebuild,v 1.2 2010/09/16 17:09:13 scarabeus Exp $
3
# $Header: $
4
4
5
inherit versionator
5
EAPI=2
6
7
inherit multilib versionator
6
8
7
MY_PV="$(get_version_component_range 1-2)"
9
MY_PV="$(get_version_component_range 1-2)"
8
MY_DATE="February2009"
10
MY_DATE="February2011"
9
DESCRIPTION="NVIDIA's C graphics compiler toolkit"
11
DESCRIPTION="NVIDIA's C graphics compiler toolkit"
10
HOMEPAGE="http://developer.nvidia.com/object/cg_toolkit.html"
12
HOMEPAGE="http://developer.nvidia.com/object/cg_toolkit.html"
11
SRC_URI="x86? ( http://developer.download.nvidia.com/cg/Cg_${MY_PV}/${PV}/Cg-${MY_PV}_${MY_DATE}_x86.tgz )
13
MY_32B_URI="http://developer.download.nvidia.com/cg/Cg_${MY_PV}/Cg-${MY_PV}_${MY_DATE}_x86.tgz"
12
	amd64? ( http://developer.download.nvidia.com/cg/Cg_${MY_PV}/${PV}/Cg-${MY_PV}_${MY_DATE}_x86_64.tgz )"
14
MY_64B_URI="http://developer.download.nvidia.com/cg/Cg_${MY_PV}/Cg-${MY_PV}_${MY_DATE}_x86_64.tgz"
15
SRC_URI="x86? ( ${MY_32B_URI} )
16
amd64? (
17
	multilib? ( ${MY_32B_URI} )
18
	${MY_64B_URI}
19
)"
13
20
14
LICENSE="NVIDIA"
21
LICENSE="NVIDIA"
15
SLOT="0"
22
SLOT="0"
16
KEYWORDS="~amd64 ~x86"
23
KEYWORDS="~amd64 ~x86"
17
IUSE=""
24
IUSE="doc examples multilib"
18
RESTRICT="strip"
25
RESTRICT="strip"
19
26
20
RDEPEND="media-libs/freeglut"
27
RDEPEND="media-libs/freeglut
28
	x86? ( virtual/libstdc++:3.3 )
29
	multilib? ( amd64? ( app-emulation/emul-linux-x86-xlibs ) )"
21
30
22
S=${WORKDIR}
31
S=${WORKDIR}
23
32
24
DEST=/opt/${PN}
33
DEST=/opt/${PN}
25
34
35
src_unpack() {
36
	if use multilib && use amd64; then
37
		for i in $A; do
38
			if [[ "$i" =~ .*x86_64.* ]]; then
39
				unpack "$i"
40
			else
41
				mkdir 32bit
42
				cd 32bit
43
				unpack "$i"
44
				cd ..
45
			fi
46
		done
47
	else
48
		default
49
	fi
50
}
51
26
src_install() {
52
src_install() {
27
	into ${DEST}
53
	into ${DEST}
28
	dobin usr/bin/cgc || die
54
	dobin usr/bin/*
29
	dosym ${DEST}/bin/cgc /opt/bin/cgc || die
55
	dolib usr/$(get_libdir)/*
30
56
	if use multilib && use amd64; then
31
	exeinto ${DEST}/lib
57
		ABI="x86" dolib 32bit/usr/lib/*
32
	if use x86 ; then
33
		doexe usr/lib/* || die
34
	elif use amd64 ; then
35
		doexe usr/lib64/* || die
36
	fi
58
	fi
37
59
38
	doenvd "${FILESDIR}"/80cgc-opt
39
40
	insinto ${DEST}/include/Cg
60
	insinto ${DEST}/include/Cg
41
	doins usr/include/Cg/*
61
	doins usr/include/Cg/*
42
62
63
	insinto ${DEST}/man/man1
64
	doins usr/share/man/man1/*
43
	insinto ${DEST}/man/man3
65
	insinto ${DEST}/man/man3
44
	doins usr/share/man/man3/*
66
	doins usr/share/man/man3/*
67
	# here we have some strange manpages
68
	#		usr/share/man/manCg/* usr/share/man/manCgFX/*
69
	prepman ${DEST}
45
70
46
	insinto ${DEST}
71
	insinto ${DEST}
47
	doins -r usr/local/Cg/{docs,examples,README}
72
	doins usr/local/Cg/README
73
74
	if use doc; then
75
		doins -r usr/local/Cg/docs
76
	fi
77
78
	if use examples; then
79
		doins -r usr/local/Cg/examples
80
	fi
81
82
	if use multilib && use amd64; then
83
		local LDPATH_MULITLIB_SUFFIX=":${DEST}/lib32"
84
	fi
85
86
	cat > "${T}/env" << EOF
87
# Configures the CG Runtime environment for Bourne shell and compatible shells
88
CG_COMPILER_EXE="${DEST}/bin/cgc"
89
90
# Make sure the helper files are found
91
PATH="${DEST}/bin"
92
LDPATH="${DEST}/$(get_libdir)${LDPATH_MULITLIB_SUFFIX}"
93
MANPATH="${DEST}/man"
94
EOF
95
	newenvd "${T}/env" 80cgc
48
}
96
}
49
97
50
pkg_postinst() {
98
pkg_postinst() {
51
	einfo "Starting with ${CATEGORY}/${PN}-2.1.0016, ${PN} is installed in"
99
	einfo "Starting with ${CATEGORY}/${PN}-2.1.0016, ${PN} is installed in"
52
	einfo "${DEST}.  Packages might have to add something like:"
100
	einfo "${DEST}.  Packages might have to add something like:"
53
	einfo "  append-cppflags -I${DEST}/include"
101
	einfo "  append-cppflags -I${DEST}/include"
102
	einfo "Starting with ${CATEGORY}/${PN}-2.2.0006, the cgc binary isn't"
103
	einfo "symlinked to /opt/bin, but to ${DEST}/bin is but into "
104
	einfo "\$\{PATH\} environment variable."
54
}
105
}

Return to bug 270480