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 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 8 | LICENSE = "GPLv2+" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 10 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 11 | SRCREV = "edf8e6f0ea77ede073f07bff0d2ae1fc7a38103b" |
| 12 | PV = "0.29.2+git${SRCPV}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 13 | |
| 14 | SRC_URI = "git://anongit.freedesktop.org/pkg-config \ |
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 \ |
| 17 | file://fix-glib-configure-libtool-usage.patch \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 18 | file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | " |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 20 | |
| 21 | S = "${WORKDIR}/git" |
| 22 | |
| 23 | inherit autotools |
| 24 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 25 | # Because of a faulty test, the current auto mode always evaluates to no, |
| 26 | # so just continue that behaviour. |
| 27 | # |
| 28 | EXTRA_OECONF += "--disable-indirect-deps" |
| 29 | |
| 30 | PACKAGECONFIG ??= "glib" |
| 31 | PACKAGECONFIG_class-native = "" |
| 32 | PACKAGECONFIG_class-nativesdk = "" |
| 33 | |
| 34 | 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] | 35 | |
| 36 | acpaths = "-I ." |
| 37 | |
| 38 | BBCLASSEXTEND = "native nativesdk" |
| 39 | |
| 40 | # Set an empty dev package to ensure the base PN package gets |
| 41 | # the pkg.m4 macros, pkgconfig does not deliver any other -dev |
| 42 | # files. |
| 43 | FILES_${PN}-dev = "" |
| 44 | FILES_${PN} += "${datadir}/aclocal/pkg.m4" |
| 45 | |
| 46 | # When using the RPM generated automatic package dependencies, some packages |
| 47 | # will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by |
| 48 | # specifying an appropriate provide. |
| 49 | RPROVIDES_${PN} += "pkgconfig(pkg-config)" |
| 50 | |
| 51 | # Install a pkg-config-native wrapper that will use the native sysroot instead |
| 52 | # of the MACHINE sysroot, for using pkg-config when building native tools. |
| 53 | do_install_append_class-native () { |
| 54 | sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ |
| 55 | -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ |
| 56 | < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native |
| 57 | install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 58 | sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ |
| 59 | -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ |
| 60 | < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk |
| 61 | install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 62 | } |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 63 | |
| 64 | pkgconfig_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 | |
| 73 | SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconfig_sstate_fixup_esdk" |