Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 48030
Collapse All | Expand All

(-)nvidia-kernel-1.0.5336-r2.ebuild (-12 / +22 lines)
Lines 94-110 Link Here
94
		EPATCH_SINGLE_MSG="Applying basic sysfs patch ..." \
94
		EPATCH_SINGLE_MSG="Applying basic sysfs patch ..." \
95
		epatch ${FILESDIR}/${PV}/NVIDIA_kernel-${NV_V}-basic-sysfs-support.patch
95
		epatch ${FILESDIR}/${PV}/NVIDIA_kernel-${NV_V}-basic-sysfs-support.patch
96
96
97
		# Kbuild have issues currently (sandbox related).
97
		rm makefile
98
#		ln -snf Makefile.nvidia Makefile
98
		ln -snf Makefile.kbuild Makefile
99
		sed -e "s:5328:${NV_V/1.0-/}:g" \
100
			${FILESDIR}/${PV}/Makefile > ${S}/makefile
101
102
		# Makefile is now makefile so we will do sed here instead.
103
		[ ! -z "${USE_CRAZY_OPTS}" ] && sed -i "s:-O:${CFLAGS}:" makefile
104
	else
105
		# if you set this then it's your own fault when stuff breaks :)
106
		[ ! -z "${USE_CRAZY_OPTS}" ] && sed -i "s:-O:${CFLAGS}:" Makefile
107
	fi
99
	fi
100
101
	# if you set this then it's your own fault when stuff breaks :)
102
	[ ! -z "${USE_CRAZY_OPTS}" ] && sed -i "s:-O:${CFLAGS}:" Makefile
103
108
}
104
}
109
105
110
src_compile() {
106
src_compile() {
Lines 117-124 Link Here
117
	# kernel outside the chroot rather than within.
113
	# kernel outside the chroot rather than within.
118
	if is_kernel 2 5 || is_kernel 2 6
114
	if is_kernel 2 5 || is_kernel 2 6
119
	then
115
	then
116
		# The nvidia makefile listens to the "ARCH" variable.. and the 2.6 kernels use "i386" not "x86"..
117
		if [ "${ARCH}" == "x86" ]
118
		then
119
			export ARCH=i386
120
		fi
121
120
		make IGNORE_CC_MISMATCH="yes" KERNDIR="/usr/src/linux" \
122
		make IGNORE_CC_MISMATCH="yes" KERNDIR="/usr/src/linux" \
121
			clean nvidia.o || die
123
			clean module || die
124
125
		# Is there any point setting this back here?
126
		# (i'm not exactly the master of ebuilds, as you can see)
127
		if [ "${ARCH}" == "i386" ]
128
		then
129
			export ARCH=x86
130
		fi
131
122
	else
132
	else
123
		make IGNORE_CC_MISMATCH="yes" KERNDIR="/usr/src/linux" \
133
		make IGNORE_CC_MISMATCH="yes" KERNDIR="/usr/src/linux" \
124
			clean module || die
134
			clean module || die
Lines 130-136 Link Here
130
	insinto /lib/modules/${KV}/video
140
	insinto /lib/modules/${KV}/video
131
	if is_kernel 2 5 || is_kernel 2 6
141
	if is_kernel 2 5 || is_kernel 2 6
132
	then
142
	then
133
		newins nvidia.o nvidia.ko
143
		doins nvidia.ko
134
	else
144
	else
135
		doins nvidia.o
145
		doins nvidia.o
136
	fi
146
	fi

Return to bug 48030