Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | SUMMARY = "Helper tool used when compiling" |
| 2 | DESCRIPTION = "pkg-config is a helper tool used when compiling applications and libraries. It helps determined \ |
| 3 | the correct compiler/link options. It is also language-agnostic." |
| 4 | HOMEPAGE = "http://pkg-config.freedesktop.org/wiki/" |
| 5 | BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=pkg-config" |
| 6 | SECTION = "console/utils" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 7 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8 | LICENSE = "GPL-2.0-or-later" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 10 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 11 | SRCREV = "d97db4fae4c1cd099b506970b285dc2afd818ea2" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 12 | PV = "0.29.2+git${SRCPV}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 13 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 14 | SRC_URI = "git://gitlab.freedesktop.org/pkg-config/pkg-config.git;branch=master;protocol=https \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 15 | file://pkg-config-esdk.in \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 16 | file://pkg-config-native.in \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 17 | file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \ |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 18 | file://0001-autotools-remove-support-for-the-__int64-type.-See-1.patch \ |
| 19 | file://0001-autotools-use-C99-printf-format-specifiers-on-Window.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | " |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 21 | |
| 22 | S = "${WORKDIR}/git" |
| 23 | |
| 24 | inherit autotools |
| 25 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 26 | # Because of a faulty test, the current auto mode always evaluates to no, |
| 27 | # so just continue that behaviour. |
| 28 | # |
| 29 | EXTRA_OECONF += "--disable-indirect-deps" |
| 30 | |
| 31 | PACKAGECONFIG ??= "glib" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 32 | PACKAGECONFIG:class-native = "" |
| 33 | PACKAGECONFIG:class-nativesdk = "" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 34 | |
| 35 | PACKAGECONFIG[glib] = "--without-internal-glib,--with-internal-glib,glib-2.0 pkgconfig-native" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 36 | |
| 37 | acpaths = "-I ." |
| 38 | |
| 39 | BBCLASSEXTEND = "native nativesdk" |
| 40 | |
| 41 | # Set an empty dev package to ensure the base PN package gets |
| 42 | # the pkg.m4 macros, pkgconfig does not deliver any other -dev |
| 43 | # files. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 44 | FILES:${PN}-dev = "" |
| 45 | FILES:${PN} += "${datadir}/aclocal/pkg.m4" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | RPROVIDES:${PN} += "pkgconfig(pkg-config)" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 51 | |
| 52 | # Install a pkg-config-native wrapper that will use the native sysroot instead |
| 53 | # of the MACHINE sysroot, for using pkg-config when building native tools. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 54 | do_install:append:class-native () { |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 55 | sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ |
| 56 | -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ |
| 57 | < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native |
| 58 | install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 59 | sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ |
| 60 | -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ |
| 61 | < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk |
| 62 | install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 63 | } |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 64 | |
| 65 | pkgconfig_sstate_fixup_esdk () { |
| 66 | if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then |
| 67 | pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}" |
| 68 | mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 69 | ln -rs $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 70 | sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native |
| 71 | fi |
| 72 | } |
| 73 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 74 | SSTATEPOSTUNPACKFUNCS:append:class-native = " pkgconfig_sstate_fixup_esdk" |