1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit multilib rpm toolchain-funcs
8 DESCRIPTION="hardware detection tool used in SuSE Linux"
9 HOMEPAGE="https://www.opensuse.org/"
10 SRC_URI="http://download.opensuse.org/source/factory/repo/oss/suse/src/${P}-1.1.src.rpm"
14 KEYWORDS="amd64 ~arm ppc x86 ~amd64-linux ~x86-linux"
18 amd64? ( dev-libs/libx86emu )
19 x86? ( dev-libs/libx86emu )"
22 >=sys-kernel/linux-headers-2.6.17"
24 MAKEOPTS="${MAKEOPTS} -j1"
27 # Respect AR variable.
29 -e 's:ar r:$(AR) r:' \
30 src/{,isdn,ids,smp,hd}/Makefile || die
32 # Avoid -I directories for dbus because HAL is obsolete.
33 sed -i -e '/CFLAGS/d' src/hd/Makefile || die
35 sed -i -e 's:$(CC) -shared:& $(LDFLAGS):' src/Makefile || die
36 sed -i -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' src/ids/Makefile || die
38 # Use linux/pci.h directly. #506876
40 -e '/#include.*sys\/pci.h/s:sys/pci.h:linux/pci.h:' \
43 # Respect MAKE variable. Skip forced -pipe and -g. Respect LDFLAGS.
45 -e 's:make:$(MAKE):' \
47 -e 's:LDFLAGS.*=:LDFLAGS +=:' \
48 Makefile{,.common} || die
53 emake CC="$(tc-getCC)" RPM_OPT_FLAGS="${CFLAGS}"
57 emake DESTDIR="${ED}" LIBDIR="/usr/$(get_libdir)" install
59 dodoc changelog README
61 insinto /usr/share/doc/${PF}/examples