libkudzu-1.2.57.1.ebuild 1.2 KB

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