pkgconf_1.7.3.bb 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks."
  2. DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \
  3. flags for development frameworks. It is similar to pkg-config from \
  4. freedesktop.org, providing additional functionality while also maintaining \
  5. compatibility."
  6. HOMEPAGE = "http://pkgconf.org"
  7. BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues"
  8. SECTION = "devel"
  9. PROVIDES += "pkgconfig"
  10. RPROVIDES_${PN} += "pkgconfig"
  11. # The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
  12. # ISC, but has different wording, so needs its own name.
  13. LICENSE = "pkgconf"
  14. LIC_FILES_CHKSUM = "file://COPYING;md5=2214222ec1a820bd6cc75167a56925e0"
  15. SRC_URI = "\
  16. https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \
  17. file://pkg-config-wrapper \
  18. file://pkg-config-native.in \
  19. file://pkg-config-esdk.in \
  20. "
  21. SRC_URI[sha256sum] = "b846aea51cf696c3392a0ae58bef93e2e72f8e7073ca6ad1ed8b01c85871f9c0"
  22. inherit autotools
  23. EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
  24. do_install_append () {
  25. # Install a wrapper which deals, as much as possible with pkgconf vs
  26. # pkg-config compatibility issues.
  27. install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
  28. }
  29. do_install_append_class-native () {
  30. # Install a pkg-config-native wrapper that will use the native sysroot instead
  31. # of the MACHINE sysroot, for using pkg-config when building native tools.
  32. sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
  33. < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
  34. install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
  35. sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
  36. -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
  37. < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
  38. install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
  39. }
  40. # When using the RPM generated automatic package dependencies, some packages
  41. # will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
  42. # specifying an appropriate provide.
  43. RPROVIDES_${PN} += "pkgconfig(pkg-config)"
  44. # Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
  45. FILES_${PN}-dev_remove = "${datadir}/aclocal"
  46. FILES_${PN} += "${datadir}/aclocal"
  47. BBCLASSEXTEND += "native nativesdk"
  48. pkgconf_sstate_fixup_esdk () {
  49. if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
  50. pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
  51. mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
  52. lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
  53. sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
  54. fi
  55. }
  56. SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk"