libudev-compat-186.ebuild 995 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit multilib multilib-minimal toolchain-funcs
  5. DESCRIPTION="Wrapper around libudev.so.1 for packages needing the old libudev.so.0"
  6. HOMEPAGE="http://gentoo.org/"
  7. SRC_URI=""
  8. LICENSE="LGPL-2.1+"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE=""
  12. DEPEND="virtual/libudev:0/1[${MULTILIB_USEDEP}]"
  13. RDEPEND="${DEPEND}"
  14. src_unpack() {
  15. mkdir "${S}" || die
  16. cp "${FILESDIR}"/udev_old.c "${S}" || die
  17. }
  18. multilib_src_configure() { :; }
  19. echo_and_run() {
  20. echo "$@"
  21. "$@"
  22. }
  23. multilib_src_compile() {
  24. # Note: --no-as-needed is used explictly here to ensure that libudev.so.1
  25. # is pulled in, even though nothing in udev_old.c otherwise requires it
  26. echo_and_run $(tc-getCC) \
  27. ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} \
  28. -fpic -shared \
  29. -Wl,-soname,libudev.so.0 \
  30. -o libudev.so.0 \
  31. "${S}"/udev_old.c \
  32. -Wl,--no-as-needed \
  33. -ludev || die
  34. }
  35. multilib_src_install() {
  36. dolib.so libudev.so.0
  37. }