summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2017-08-21 18:09:45 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-23 12:06:51 +0100
commitee8b56528dacf9b2821d537074fa40ad2d1baa7a (patch)
tree8a784fd85801c42fda9adf8c88ebeca4304b3df9 /meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
parent96d0d4b5b671ea08cb4dcaedc84e783f253d941e (diff)
downloadpoky-ee8b56528dacf9b2821d537074fa40ad2d1baa7a.tar.gz
pkgconf: add recipe
pkgconf is a better replacement for pkg-config. Fedora 26 replaces the system pkg-config implementation with pkgconf because it "provides better support for handling .pc files and a stable library ABI/API for integrating into applications." and is actively maintained, unlike pkg-config. pkgconf aims to offer many improvements over pkg-config such as faster/more efficient dependency resolver which "allows for the user to more conservatively link their binaries -- which may be helpful in some environments, such as when prelink(1) is being used. pkgconf also aims to provide a more complete implementation of pkg-config. The features most likely to benefit the Yocto Project build system are the faster/more efficient dependency resolution and linker flag optimisation. Move pkgconf recipe to oe-core from meta-pkgconf: https://github.com/kergoth/meta-kergoth-wip/tree/master/meta-pkgconf Links: 1. http://pkgconf.org 2. https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation 3. https://bugzilla.yoctoproject.org/show_bug.cgi?id=11308 (From OE-Core rev: 879bd0ff00ebebfdeef52c3f61597d635e040aef) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb')
-rw-r--r--meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb73
1 files changed, 73 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb b/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
new file mode 100644
index 0000000000..5da0dd15bd
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
@@ -0,0 +1,73 @@
1SUMMARY = "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"
11DEFAULT_PREFERENCE = "-1"
12
13# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
14# ISC, but has different wording, so needs its own name.
15LICENSE = "pkgconf"
16LIC_FILES_CHKSUM = "file://COPYING;md5=548a9d1db10cc0a84810c313a0e9266f"
17
18SRC_URI = "\
19 https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \
20 file://0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch \
21 file://0001-stdinc.h-fix-build-with-mingw.patch \
22 file://pkg-config-wrapper \
23 file://pkg-config-native.in \
24 file://pkg-config-esdk.in \
25"
26SRC_URI[md5sum] = "ac35c34d84eeb6a03d4d61b8555d6197"
27SRC_URI[sha256sum] = "1be7e40900c7467893c65f810211b1e68da3f8d5e70fddb883fc24839cad0339"
28
29inherit autotools update-alternatives
30
31EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
32
33do_install_append () {
34 # Install a wrapper which deals, as much as possible with pkgconf vs
35 # pkg-config compatibility issues.
36 install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
37}
38
39do_install_append_class-native () {
40 # Install a pkg-config-native wrapper that will use the native sysroot instead
41 # of the MACHINE sysroot, for using pkg-config when building native tools.
42 sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
43 < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
44 install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
45 sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
46 -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
47 < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
48 install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
49}
50
51ALTERNATIVE_${PN} = "pkg-config"
52
53# When using the RPM generated automatic package dependencies, some packages
54# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
55# specifying an appropriate provide.
56RPROVIDES_${PN} += "pkgconfig(pkg-config)"
57
58# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
59FILES_${PN}-dev_remove = "${datadir}/aclocal"
60FILES_${PN} += "${datadir}/aclocal"
61
62BBCLASSEXTEND += "native nativesdk"
63
64pkgconf_sstate_fixup_esdk () {
65 if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
66 pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
67 mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
68 lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
69 sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
70 fi
71}
72
73SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk"