pcmciautils-018_p8-r1.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit flag-o-matic linux-info toolchain-funcs udev
  5. DEB_REV=${PV#*_p}
  6. MY_PV=${PV%_p*}
  7. DESCRIPTION="PCMCIA userspace utilities for Linux"
  8. HOMEPAGE="http://packages.qa.debian.org/pcmciautils"
  9. SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${MY_PV}.orig.tar.gz
  10. mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${MY_PV}-${DEB_REV}.debian.tar.gz"
  11. LICENSE="GPL-2"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~arm ~ppc ~sh ~x86"
  14. IUSE="debug staticsocket"
  15. RDEPEND="virtual/modutils"
  16. DEPEND="${RDEPEND}
  17. virtual/yacc
  18. sys-devel/flex"
  19. S=${WORKDIR}/${PN}-${MY_PV}
  20. pkg_setup() {
  21. CONFIG_CHECK="~PCMCIA"
  22. linux-info_pkg_setup
  23. kernel_is lt 2 6 32 && ewarn "${P} requires at least kernel 2.6.32."
  24. mypcmciaopts=(
  25. STARTUP=$(usex staticsocket false true)
  26. exec_prefix=/usr
  27. UDEV=true
  28. DEBUG=false
  29. STATIC=false
  30. V=true
  31. udevdir="$(get_udevdir)"
  32. CC="$(tc-getCC)"
  33. LD="$(tc-getCC)"
  34. AR="$(tc-getAR)"
  35. STRIP=true
  36. RANLIB="$(tc-getRANLIB)"
  37. OPTIMIZATION="${CFLAGS} ${CPPFLAGS}"
  38. DESTDIR="${D}"
  39. )
  40. use debug && append-cppflags -DDEBUG
  41. }
  42. PATCHES=(
  43. "${WORKDIR}"/debian/patches/no-modprobe-rules.patch
  44. "${WORKDIR}"/debian/patches/remove-libsysfs-dep.patch
  45. "${FILESDIR}"/${P}-flex-2.6.3-fix.patch
  46. )
  47. src_prepare() {
  48. default
  49. sed -i \
  50. -e '/CFLAGS/s:-fomit-frame-pointer::' \
  51. -e '/dir/s:sbin:bin:g' \
  52. Makefile || die
  53. }
  54. src_compile() {
  55. emake "${mypcmciaopts[@]}"
  56. }
  57. src_install() {
  58. emake "${mypcmciaopts[@]}" install
  59. dodoc doc/*.txt
  60. }