blob: 29cf4a6a94e3a7a2ec51f4f12da78e886cd9458e [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks."
2DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \
3flags for development frameworks. It is similar to pkg-config from \
4freedesktop.org, providing additional functionality while also maintaining \
5compatibility."
6HOMEPAGE = "http://pkgconf.org"
7BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues"
8SECTION = "devel"
9PROVIDES += "pkgconfig"
Patrick Williams213cb262021-08-07 19:21:33 -050010RPROVIDES:${PN} += "pkgconfig"
Brad Bishop19323692019-04-05 15:28:33 -040011
12# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
13# ISC, but has different wording, so needs its own name.
14LICENSE = "pkgconf"
15LIC_FILES_CHKSUM = "file://COPYING;md5=2214222ec1a820bd6cc75167a56925e0"
16
17SRC_URI = "\
18 https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \
19 file://pkg-config-wrapper \
20 file://pkg-config-native.in \
21 file://pkg-config-esdk.in \
22"
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050023SRC_URI[sha256sum] = "ef9c7e61822b7cb8356e6e9e1dca58d9556f3200d78acab35e4347e9d4c2bbaf"
Brad Bishop19323692019-04-05 15:28:33 -040024
25inherit autotools
26
27EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
28
Patrick Williams213cb262021-08-07 19:21:33 -050029do_install:append () {
Brad Bishop19323692019-04-05 15:28:33 -040030 # Install a wrapper which deals, as much as possible with pkgconf vs
31 # pkg-config compatibility issues.
32 install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
33}
34
Patrick Williams213cb262021-08-07 19:21:33 -050035do_install:append:class-native () {
Brad Bishop19323692019-04-05 15:28:33 -040036 # Install a pkg-config-native wrapper that will use the native sysroot instead
37 # of the MACHINE sysroot, for using pkg-config when building native tools.
38 sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
39 < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
40 install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
41 sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
42 -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
43 < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
44 install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
45}
46
47# When using the RPM generated automatic package dependencies, some packages
48# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
49# specifying an appropriate provide.
Patrick Williams213cb262021-08-07 19:21:33 -050050RPROVIDES:${PN} += "pkgconfig(pkg-config)"
Brad Bishop19323692019-04-05 15:28:33 -040051
52# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
Patrick Williams213cb262021-08-07 19:21:33 -050053FILES:${PN}-dev:remove = "${datadir}/aclocal"
54FILES:${PN} += "${datadir}/aclocal"
Brad Bishop19323692019-04-05 15:28:33 -040055
56BBCLASSEXTEND += "native nativesdk"
57
58pkgconf_sstate_fixup_esdk () {
59 if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
60 pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
61 mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
62 lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
63 sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
64 fi
65}
66
Patrick Williams213cb262021-08-07 19:21:33 -050067SSTATEPOSTUNPACKFUNCS:append:class-native = " pkgconf_sstate_fixup_esdk"