From d61273bec22dc462e46a870b426aacf02b4599bf Mon Sep 17 00:00:00 2001 From: Firefly35 Date: Tue, 29 Mar 2022 11:27:25 +0200 Subject: [PATCH] fix: support both remaken- and bcom- prefix --- packagedependencies-parser.pri | 10 ++++++++-- packagedependencies.pri | 11 +++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/packagedependencies-parser.pri b/packagedependencies-parser.pri index 9464280..c335eb0 100644 --- a/packagedependencies-parser.pri +++ b/packagedependencies-parser.pri @@ -212,13 +212,15 @@ for(depfile, packagedepsfiles) { } } } + oldPkgCfgFilePath = $${deployFolder}/$${OLDPFX}$${DEBUGPFX}$${libName}.pc pkgCfgFilePath = $${deployFolder}/$${REMAKENPFX}$${DEBUGPFX}$${libName}.pc - !exists($${pkgCfgFilePath}) { + !exists($${pkgCfgFilePath}):!exists($${oldPkgCfgFilePath}) { # No specific .pc file for debug mode : # this package is a remaken like standard package with no library debug suffix pkgCfgFilePath = $${deployFolder}/$${REMAKENPFX}$${libName}.pc + oldPkgCfgFilePath = $${deployFolder}/$${OLDPFX}$${libName}.pc } - !exists($${pkgCfgFilePath}) {# default behavior + !exists($${pkgCfgFilePath}):!exists($${oldPkgCfgFilePath}) {# default behavior message(" --> [WARNING] " $${pkgCfgFilePath} " doesn't exists : adding default values") !exists($${deployFolder}/interfaces) { error(" --> [ERROR] " $${deployFolder}/interfaces " doesn't exists for package " $${libName}) @@ -234,6 +236,10 @@ for(depfile, packagedepsfiles) { LIBS += $${deployFolder}/lib/$$REMAKEN_TARGET_ARCH/$${pkg.linkMode}/$$OUTPUTDIR -l$${libName} } } else { + exists($${oldPkgCfgFilePath}):!exists($${pkgCfgFilePath}) { + # use old prefix file + pkgCfgFilePath = $${oldPkgCfgFilePath} + } verboseMessage(" --> [INFO] " $${pkgCfgFilePath} "exists") pkgCfgVars = --define-variable=prefix=$${deployFolder} --define-variable=depdir=$${deployFolder}/lib/dependencies/$$REMAKEN_TARGET_ARCH/$${pkg.linkMode}/$$OUTPUTDIR pkgCfgVars += --define-variable=lext=$${LIBEXT} diff --git a/packagedependencies.pri b/packagedependencies.pri index 6cc5438..ebbaae0 100644 --- a/packagedependencies.pri +++ b/packagedependencies.pri @@ -80,6 +80,7 @@ android { } REMAKENPFX = remaken- +OLDPFX = bcom- defineReplace(aggregateDepsFiles) { packageDepsFilesList = $$ARGS @@ -200,8 +201,14 @@ contains(DEPENDENCIESCONFIG,use_remaken_parser)|contains(CONFIG,use_remaken_pars exists($$_PRO_FILE_PWD_/$${REMAKENPFX}$${TARGET}.pc.in) { templatePkgConfigSrc=$$_PRO_FILE_PWD_/$${REMAKENPFX}$${TARGET}.pc.in -} else { - templatePkgConfigSrc=template-pkgconfig.pc.in +} +else { + exists($$_PRO_FILE_PWD_/$${OLDPFX}$${TARGET}.pc.in) { + templatePkgConfigSrc=$$_PRO_FILE_PWD_/$${OLDPFX}$${TARGET}.pc.in + } + else { + templatePkgConfigSrc=template-pkgconfig.pc.in + } } message("--> [INFO] using file " $${templatePkgConfigSrc} " as pkgconfig template source")