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

Collapse All | Expand All

(-)kernel-mod.eclass.bak (-1 / +54 lines)
Lines 16-21 Link Here
16
SRC_URI="${SRC_URI:-unknown - please fix me!!}"
16
SRC_URI="${SRC_URI:-unknown - please fix me!!}"
17
KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}"
17
KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}"
18
18
19
# KERNEL_MOD_SOURCES is used if you don't want to unpack just ${A}
20
if [ -z "${KERNEL_MOD_SOURCES}" ]
21
then
22
	KERNEL_MOD_SOURCES=${A}
23
fi
24
19
kernel-mod_getmakefilevar ()
25
kernel-mod_getmakefilevar ()
20
{
26
{
21
	grep $1 $2 | head -n 1 | cut -d = -f 2- | awk '{ print $1 }'
27
	grep $1 $2 | head -n 1 | cut -d = -f 2- | awk '{ print $1 }'
Lines 61-66 Link Here
61
67
62
	KV_MK_VERSION_FULL="$KV_MK_MAJOR.$KV_MK_MINOR.$KV_MK_PATCH$KV_MK_TYPE"
68
	KV_MK_VERSION_FULL="$KV_MK_MAJOR.$KV_MK_MINOR.$KV_MK_PATCH$KV_MK_TYPE"
63
69
70
	KV_MK_OUTPUT="`kernel-mod_getmakefilevar KBUILD_OUTPUT $KV_MK_FILE`"
71
64
	if [ "$KV_MK_VERSION_FULL" != "$KV_DIR_VERSION_FULL" ]; then
72
	if [ "$KV_MK_VERSION_FULL" != "$KV_DIR_VERSION_FULL" ]; then
65
		ewarn
73
		ewarn
66
		ewarn "The kernel Makefile says that this is a $KV_MK_VERSION_FULL kernel"
74
		ewarn "The kernel Makefile says that this is a $KV_MK_VERSION_FULL kernel"
Lines 82-88 Link Here
82
	KV_PATCH="$KV_MK_PATCH"
90
	KV_PATCH="$KV_MK_PATCH"
83
	KV_TYPE="$KV_MK_TYPE"
91
	KV_TYPE="$KV_MK_TYPE"
84
92
93
	# if we found an output location, use that. otherwise use KERNEL_DIR.
94
	if [ ! -z "${KV_MK_OUTPUT}" ]
95
	then
96
		KV_OUTPUT="$KV_MK_OUTPUT"
97
	else
98
		KV_OUTPUT="$KERNEL_DIR"
99
	fi
100
101
	if [ "${KV_MINOR}" -gt "4" ]
102
	then
103
		KV_OBJ="ko"
104
	else
105
		KV_OBJ="o"
106
	fi
107
85
	einfo "Building for Linux ${KV_VERSION_FULL} found in ${KERNEL_DIR}"
108
	einfo "Building for Linux ${KV_VERSION_FULL} found in ${KERNEL_DIR}"
109
110
	if [ "${KV_MINOR}" -gt "4" ]
111
	then
112
		einfo "which outputs to ${KV_OUTPUT}"
113
114
		# Warn them if they aren't using a different output directory
115
		if [ "${KV_OUTPUT}" = "/usr/src/linux" ]; then
116
			ewarn "By not using the kernel's ability to output to an alternative"
117
			ewarn "directory, most external module builds will not build."
118
			ewarn "See <insert link to user doc here>"
119
		fi
120
	fi
86
}
121
}
87
122
88
kernel-mod_checkzlibinflate_configured ()
123
kernel-mod_checkzlibinflate_configured ()
Lines 151-161 Link Here
151
	die "Kernel doesn't include zlib support"
186
	die "Kernel doesn't include zlib support"
152
}
187
}
153
188
189
kernel-mod_src_unpack ()
190
{
191
	check_KV
192
	kernel-mod_getversion
193
	unpack ${KERNEL_MOD_SOURCES}
194
	if [ -n "${KERNEL_MOD_KOUTPUT_PATCH}" ]
195
	then
196
		cd ${S}
197
		einfo "Patching to enable koutput compatibility"
198
		epatch ${KERNEL_MOD_KOUTPUT_PATCH}
199
	fi
200
}
201
154
kernel-mod_src_compile ()
202
kernel-mod_src_compile ()
155
{
203
{
156
	emake KERNEL_DIR=${KERNEL_DIR} || die
204
	emake KERNEL_DIR=${KERNEL_DIR} || die
157
}
205
}
158
206
207
kernel-mod_pkg_postinst()
208
{
209
	depmod -a
210
}
211
159
kernel-mod_is_2_4_kernel() {
212
kernel-mod_is_2_4_kernel() {
160
	kernel-mod_getversion
213
	kernel-mod_getversion
161
214
Lines 189-192 Link Here
189
    fi
242
    fi
190
}
243
}
191
244
192
EXPORT_FUNCTIONS src_compile
245
EXPORT_FUNCTIONS src_unpack src_compile pkg_postinst

Return to bug 32737