blob: 732ca2a0348105372ca0ba0d2713c2cef0083919 [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"
10RPROVIDES_${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"
Brad Bishop96ff1982019-08-19 13:50:42 -040023SRC_URI[md5sum] = "f93fb1be95a5cb62e43c219c82b5791a"
24SRC_URI[sha256sum] = "61f0b31b0d5ea0e862b454a80c170f57bad47879c0c42bd8de89200ff62ea210"
Brad Bishop19323692019-04-05 15:28:33 -040025
26inherit autotools
27
28EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
29
30do_install_append () {
31 # Install a wrapper which deals, as much as possible with pkgconf vs
32 # pkg-config compatibility issues.
33 install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
34}
35
36do_install_append_class-native () {
37 # Install a pkg-config-native wrapper that will use the native sysroot instead
38 # of the MACHINE sysroot, for using pkg-config when building native tools.
39 sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
40 < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
41 install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
42 sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
43 -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
44 < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
45 install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
46}
47
48# When using the RPM generated automatic package dependencies, some packages
49# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
50# specifying an appropriate provide.
51RPROVIDES_${PN} += "pkgconfig(pkg-config)"
52
53# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
54FILES_${PN}-dev_remove = "${datadir}/aclocal"
55FILES_${PN} += "${datadir}/aclocal"
56
57BBCLASSEXTEND += "native nativesdk"
58
59pkgconf_sstate_fixup_esdk () {
60 if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
61 pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
62 mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
63 lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
64 sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
65 fi
66}
67
68SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk"