blob: d5cebd6be282bcc4a5667c1cedce22183c40379a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils linux-info flag-o-matic toolchain-funcs
DESCRIPTION="Red Hat Hardware detection tools"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="mirror://gentoo/kudzu-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 hppa ia64 -mips ppc ppc64 sparc x86"
IUSE="zlib"
DEPEND="
dev-libs/popt
>=sys-apps/pciutils-2.2.4[zlib?]
zlib? ( sys-libs/zlib )
"
RDEPEND="
${DEPEND}
sys-apps/hwdata-gentoo
!sys-apps/kudzu
"
S=${WORKDIR}/kudzu-${PV}
src_prepare() {
sed -i -e 's/-fpic/-fPIC/g' Makefile || die
epatch \
"${FILESDIR}"/kudzu-${PV}-sbusfix.patch \
"${FILESDIR}"/kudzu-${PV}-sparc-keyboard.patch
}
src_configure() {
if use zlib; then
sed -i -e 's| -lpci| -lz -lpci|g' Makefile || die
fi
# Fix the modules directory to match Gentoo layout.
sed -i -e 's|/etc/modutils/kudzu|/etc/modules.d/kudzu|g' *.* || die
tc-export CC
}
src_compile() {
emake \
$( usex ppc ARCH='ppc' ARCH=$(tc-arch-kernel) ) \
AR=$(tc-getAR) \
RANLIB=$(tc-getRANLIB) \
RPM_OPT_FLAGS="${CFLAGS}" \
libkudzu.a libkudzu_loader.a
}
src_install() {
insinto /usr/include/kudzu
doins *.h
dolib.a libkudzu.a libkudzu_loader.a
keepdir /etc/sysconfig
}
|