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

(-)alsa-tools-0.9.7.ebuild (-1 / +55 lines)
Lines 29-47 Link Here
29
# hdsploader
29
# hdsploader
30
# sscape_ctl
30
# sscape_ctl
31
31
32
check_version_h() {
33
        if [ ! -f "${ROOT}/usr/src/linux/include/linux/version.h" ]
34
        then
35
                eerror "Please verify that your /usr/src/linux symlink is pointing"
36
                eerror "to your current kernel sources, and that you did run:"
37
                eerror
38
                eerror "  # make dep"
39
                die "/usr/src/linux symlink not setup!"
40
        fi
41
}
42
43
get_KV_info() {
44
        check_version_h
45
46
        # Get the kernel version of sources in /usr/src/linux ...
47
        export KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); print $3 }' \
48
                "${ROOT}/usr/src/linux/include/linux/version.h")"
49
        export KV_major="$(echo "${KV_full}" | cut -d. -f1)"
50
        export KV_minor="$(echo "${KV_full}" | cut -d. -f2)"
51
        export KV_micro="$(echo "${KV_full}" | cut -d. -f3 | sed -e 's:[^0-9].*::')"
52
}
53
54
is_2_5_kernel() {
55
        get_KV_info
56
57
        if [ "${KV_major}" -eq 2 -a "${KV_minor}" -eq 5 ]
58
        then
59
                return 0
60
        else
61
                return 1
62
        fi
63
}
64
65
is_2_6_kernel() {
66
        get_KV_info
67
68
        if [ "${KV_major}" -eq 2 -a "${KV_minor}" -eq 6 ]
69
        then
70
                return 0
71
        else
72
                return 1
73
        fi
74
}
75
76
32
src_compile() {
77
src_compile() {
33
	# hdspmixer requires fltk
78
	# hdspmixer requires fltk
34
	export LDFLAGS="-L/usr/lib/fltk-1.1"
79
	export LDFLAGS="-L/usr/lib/fltk-1.1"
35
	export CPPFLAGS="-I/usr/include/fltk-1.1"
80
	export CPPFLAGS="-I/usr/include/fltk-1.1"
36
81
82
	get_KV_info
83
37
	# hdspmixer is missing depconf - copy from the hdsploader directory
84
	# hdspmixer is missing depconf - copy from the hdsploader directory
38
	cp ${S}/hdsploader/depcomp ${S}/hdspmixer/
85
	cp ${S}/hdsploader/depcomp ${S}/hdspmixer/
39
86
87
	einfo "Linux kernel ${KV_major}.${KV_minor}.${KV_micro}"
88
40
	local f
89
	local f
41
	for f in ${ALSA_TOOLS}
90
	for f in ${ALSA_TOOLS}
42
	do
91
	do
43
		cd "${S}/${f}"
92
		cd "${S}/${f}"
44
		econf || die "configure failed"
93
		if is_2_5_kernel || is_2_6_kernel
94
		then
95
			econf --with-soundbase=/usr/src/linux/include || die "configure failed"
96
		else
97
			econf || die "configuration failure"
98
		fi	
45
		make || die "make failed"
99
		make || die "make failed"
46
	done
100
	done
47
}
101
}

Return to bug 30425