libnsl2-external.bb 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. SUMMARY = "Library containing NIS functions using TI-RPC (IPv6 enabled)"
  2. DESCRIPTION = "This library contains the public client interface for NIS(YP) and NIS+ \
  3. it was part of glibc and now is standalone packages. it also supports IPv6. \
  4. This recipe should work for extracting either the glibc or standalone libnsl \
  5. from the external toolchain."
  6. HOMEPAGE = "https://github.com/thkukuk/libnsl"
  7. LICENSE = "LGPL-2.1-only"
  8. LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
  9. SECTION = "libs"
  10. inherit external-toolchain
  11. FILES:${PN} = "${libdir}/libnsl*.so.* ${libdir}/libnsl-*.so"
  12. FILES:${PN}-dev = "${libdir}/libnsl.so ${includedir}/rpcsvc/nis*.h ${includedir}/rpcsvc/yp*.* ${libdir}/pkgconfig/libnsl.pc"
  13. FILES:${PN}-staticdev = "${libdir}/libnsl.a"
  14. libc_rdep = "${@'${PREFERRED_PROVIDER_virtual/libc}' if d.getVar('PREFERRED_PROVIDER_virtual/libc') else '${TCLIBC}'}"
  15. RDEPENDS:${PN} += "${libc_rdep}"
  16. # Default to avoid parsing issue
  17. PREFERRED_PROVIDER_libtirpc ?= "libtirpc"
  18. RDEPENDS:${PN} += "${PREFERRED_PROVIDER_libtirpc}"
  19. do_install_extra () {
  20. # Depending on whether this comes from the standalone libnsl2 or glibc, the
  21. # soname may vary, and it may be installed in base_libdir instead of
  22. # libdir, but the FILES configuration may result in its location changing,
  23. # breaking the libnsl.so symlink, so recreate it here.
  24. cd ${D}${libdir}/ || exit 1
  25. rm -f libnsl.so
  26. ln -s libnsl.so.[0-9] libnsl.so
  27. if ! [ -e libnsl.so ]; then
  28. bbfatal Failed to symlink libnsl.so
  29. fi
  30. }