1*4882a593SmuzhiyunSUMMARY = "pkgconf provides compiler and linker configuration for development frameworks." 2*4882a593SmuzhiyunDESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \ 3*4882a593Smuzhiyunflags for development frameworks. It is similar to pkg-config from \ 4*4882a593Smuzhiyunfreedesktop.org, providing additional functionality while also maintaining \ 5*4882a593Smuzhiyuncompatibility." 6*4882a593SmuzhiyunHOMEPAGE = "http://pkgconf.org" 7*4882a593SmuzhiyunBUGTRACKER = "https://github.com/pkgconf/pkgconf/issues" 8*4882a593SmuzhiyunSECTION = "devel" 9*4882a593SmuzhiyunPROVIDES += "pkgconfig" 10*4882a593SmuzhiyunRPROVIDES:${PN} += "pkgconfig" 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or 13*4882a593Smuzhiyun# ISC, but has different wording, so needs its own name. 14*4882a593SmuzhiyunLICENSE = "pkgconf" 15*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=2214222ec1a820bd6cc75167a56925e0" 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunSRC_URI = "\ 18*4882a593Smuzhiyun https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \ 19*4882a593Smuzhiyun file://0001-tuple-test-for-and-stop-string-processing-on-truncat.patch \ 20*4882a593Smuzhiyun file://pkg-config-wrapper \ 21*4882a593Smuzhiyun file://pkg-config-native.in \ 22*4882a593Smuzhiyun file://pkg-config-esdk.in \ 23*4882a593Smuzhiyun" 24*4882a593SmuzhiyunSRC_URI[sha256sum] = "ef9c7e61822b7cb8356e6e9e1dca58d9556f3200d78acab35e4347e9d4c2bbaf" 25*4882a593Smuzhiyun 26*4882a593Smuzhiyuninherit autotools 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunEXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'" 29*4882a593Smuzhiyun 30*4882a593Smuzhiyundo_install:append () { 31*4882a593Smuzhiyun # Install a wrapper which deals, as much as possible with pkgconf vs 32*4882a593Smuzhiyun # pkg-config compatibility issues. 33*4882a593Smuzhiyun install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config" 34*4882a593Smuzhiyun} 35*4882a593Smuzhiyun 36*4882a593Smuzhiyundo_install:append:class-native () { 37*4882a593Smuzhiyun # Install a pkg-config-native wrapper that will use the native sysroot instead 38*4882a593Smuzhiyun # of the MACHINE sysroot, for using pkg-config when building native tools. 39*4882a593Smuzhiyun sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ 40*4882a593Smuzhiyun < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native 41*4882a593Smuzhiyun install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native 42*4882a593Smuzhiyun sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \ 43*4882a593Smuzhiyun -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \ 44*4882a593Smuzhiyun < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk 45*4882a593Smuzhiyun install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk 46*4882a593Smuzhiyun} 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun# When using the RPM generated automatic package dependencies, some packages 49*4882a593Smuzhiyun# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by 50*4882a593Smuzhiyun# specifying an appropriate provide. 51*4882a593SmuzhiyunRPROVIDES:${PN} += "pkgconfig(pkg-config)" 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev 54*4882a593SmuzhiyunFILES:${PN}-dev:remove = "${datadir}/aclocal" 55*4882a593SmuzhiyunFILES:${PN} += "${datadir}/aclocal" 56*4882a593Smuzhiyun 57*4882a593SmuzhiyunBBCLASSEXTEND += "native nativesdk" 58*4882a593Smuzhiyun 59*4882a593Smuzhiyunpkgconf_sstate_fixup_esdk () { 60*4882a593Smuzhiyun if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then 61*4882a593Smuzhiyun pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}" 62*4882a593Smuzhiyun mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real 63*4882a593Smuzhiyun ln -rs $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config 64*4882a593Smuzhiyun sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native 65*4882a593Smuzhiyun fi 66*4882a593Smuzhiyun} 67*4882a593Smuzhiyun 68*4882a593SmuzhiyunSSTATEPOSTUNPACKFUNCS:append:class-native = " pkgconf_sstate_fixup_esdk" 69