1*4882a593SmuzhiyunSUMMARY = "Helper tool used when compiling" 2*4882a593SmuzhiyunDESCRIPTION = "pkg-config is a helper tool used when compiling applications and libraries. It helps determined \ 3*4882a593Smuzhiyunthe correct compiler/link options. It is also language-agnostic." 4*4882a593SmuzhiyunHOMEPAGE = "http://pkg-config.freedesktop.org/wiki/" 5*4882a593SmuzhiyunBUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=pkg-config" 6*4882a593SmuzhiyunSECTION = "console/utils" 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunLICENSE = "GPL-2.0-or-later" 9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunSRCREV = "d97db4fae4c1cd099b506970b285dc2afd818ea2" 12*4882a593SmuzhiyunPV = "0.29.2+git${SRCPV}" 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunSRC_URI = "git://gitlab.freedesktop.org/pkg-config/pkg-config.git;branch=master;protocol=https \ 15*4882a593Smuzhiyun file://pkg-config-esdk.in \ 16*4882a593Smuzhiyun file://pkg-config-native.in \ 17*4882a593Smuzhiyun file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \ 18*4882a593Smuzhiyun file://0001-autotools-remove-support-for-the-__int64-type.-See-1.patch \ 19*4882a593Smuzhiyun file://0001-autotools-use-C99-printf-format-specifiers-on-Window.patch \ 20*4882a593Smuzhiyun " 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunS = "${WORKDIR}/git" 23*4882a593Smuzhiyun 24*4882a593Smuzhiyuninherit autotools 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun# Because of a faulty test, the current auto mode always evaluates to no, 27*4882a593Smuzhiyun# so just continue that behaviour. 28*4882a593Smuzhiyun# 29*4882a593SmuzhiyunEXTRA_OECONF += "--disable-indirect-deps" 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunPACKAGECONFIG ??= "glib" 32*4882a593SmuzhiyunPACKAGECONFIG:class-native = "" 33*4882a593SmuzhiyunPACKAGECONFIG:class-nativesdk = "" 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunPACKAGECONFIG[glib] = "--without-internal-glib,--with-internal-glib,glib-2.0 pkgconfig-native" 36*4882a593Smuzhiyun 37*4882a593Smuzhiyunacpaths = "-I ." 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk" 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun# Set an empty dev package to ensure the base PN package gets 42*4882a593Smuzhiyun# the pkg.m4 macros, pkgconfig does not deliver any other -dev 43*4882a593Smuzhiyun# files. 44*4882a593SmuzhiyunFILES:${PN}-dev = "" 45*4882a593SmuzhiyunFILES:${PN} += "${datadir}/aclocal/pkg.m4" 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun# When using the RPM generated automatic package dependencies, some packages 48*4882a593Smuzhiyun# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by 49*4882a593Smuzhiyun# specifying an appropriate provide. 50*4882a593SmuzhiyunRPROVIDES:${PN} += "pkgconfig(pkg-config)" 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun# Install a pkg-config-native wrapper that will use the native sysroot instead 53*4882a593Smuzhiyun# of the MACHINE sysroot, for using pkg-config when building native tools. 54*4882a593Smuzhiyundo_install:append:class-native () { 55*4882a593Smuzhiyun sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ 56*4882a593Smuzhiyun -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ 57*4882a593Smuzhiyun < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native 58*4882a593Smuzhiyun install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native 59*4882a593Smuzhiyun sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ 60*4882a593Smuzhiyun -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ 61*4882a593Smuzhiyun < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk 62*4882a593Smuzhiyun install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk 63*4882a593Smuzhiyun} 64*4882a593Smuzhiyun 65*4882a593Smuzhiyunpkgconfig_sstate_fixup_esdk () { 66*4882a593Smuzhiyun if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then 67*4882a593Smuzhiyun pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}" 68*4882a593Smuzhiyun mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real 69*4882a593Smuzhiyun ln -rs $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config 70*4882a593Smuzhiyun sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native 71*4882a593Smuzhiyun fi 72*4882a593Smuzhiyun} 73*4882a593Smuzhiyun 74*4882a593SmuzhiyunSSTATEPOSTUNPACKFUNCS:append:class-native = " pkgconfig_sstate_fixup_esdk" 75