Skip to content

Commit

Permalink
fix: support both remaken- and bcom- prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Firefly35 committed Mar 29, 2022
1 parent d17a6b3 commit d61273b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
10 changes: 8 additions & 2 deletions packagedependencies-parser.pri
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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}
Expand Down
11 changes: 9 additions & 2 deletions packagedependencies.pri
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ android {
}

REMAKENPFX = remaken-
OLDPFX = bcom-

defineReplace(aggregateDepsFiles) {
packageDepsFilesList = $$ARGS
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit d61273b

Please sign in to comment.