Move to new override syntax

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2021-08-16 00:03:30 +02:00
parent 6575019b7b
commit b1f483be1f
283 changed files with 446 additions and 446 deletions

View File

@@ -1,15 +1,15 @@
inherit cmake_sysroot
# do_install_append_class-cross does not work so hack
do_install_prepend_class-native() {
# do_install:append:class-cross does not work so hack
do_install:prepend:class-native() {
no_staging_check=true
}
do_install_prepend_class-nativesdk() {
do_install:prepend:class-nativesdk() {
no_staging_check=true
}
do_install_append() {
do_install:append() {
# avoid strange prefixing seen often
old_dir=`pwd`
cd ${D}

View File

@@ -42,16 +42,16 @@
#
# Native overriding:
#
# CMAKE_ALIGN_SYSROOT_class-native[<unique-id>] = "<dir>, <search>, <replace>"
# CMAKE_ALIGN_SYSROOT:class-native[<unique-id>] = "<dir>, <search>, <replace>"
#
# Native extended recipe -> no native alignement:
#
# CMAKE_ALIGN_SYSROOT_class-native[<unique-id>] = "ignore"
# CMAKE_ALIGN_SYSROOT:class-native[<unique-id>] = "ignore"
# CMAKE_ALIGN_SYSROOT[<unique-id>] = "<dir>, <search>, <replace>"
#
# Native extended recipe -> no cross alignement:
#
# CMAKE_ALIGN_SYSROOT_class-native[<unique-id>] = "<dir>, <search>, <replace>"
# CMAKE_ALIGN_SYSROOT:class-native[<unique-id>] = "<dir>, <search>, <replace>"
# CMAKE_ALIGN_SYSROOT[<unique-id>] = "ignore"
#
@@ -63,7 +63,7 @@ SSTATE_SYSROOT = "${STAGING_DIR}-components/${PACKAGE_ARCH}/${PN}"
def get_align_flags(d):
ret = {}
if bb.data.inherits_class('native', d):
ret = d.getVarFlags("CMAKE_ALIGN_SYSROOT_class-native") or {}
ret = d.getVarFlags("CMAKE_ALIGN_SYSROOT:class-native") or {}
if ret == {}:
ret = d.getVarFlags("CMAKE_ALIGN_SYSROOT") or {}
return ret
@@ -95,7 +95,7 @@ python () {
# 2. 3. in cmake_sysroot
# 4. Handle CMAKE_ALIGN_SYSROOT
python do_populate_sysroot_append() {
python do_populate_sysroot:append() {
pn = d.getVar('PN')
# parse single parameter in CMAKE_ALIGN_SYSROOT[..] and return array of line strings extracted
@@ -201,10 +201,10 @@ python do_populate_sysroot_append() {
bb.warn("No cmake replacements performed in %s for CMAKE_ALIGN_SYSROOT[%s]" % (pn, flag))
}
do_populate_sysroot[vardeps] += "CMAKE_ALIGN_SYSROOT CMAKE_ALIGN_SYSROOT_class-native"
do_populate_sysroot[vardeps] += "CMAKE_ALIGN_SYSROOT CMAKE_ALIGN_SYSROOT:class-native"
# change of CMAKE_ALIGN_SYSROOT causes configure rerun which currently seems
# the only way to force a rebuild at change of CMAKE_ALIGN_SYSROOT for recipes
# depending on this recipe
sysroot_cleansstate[vardeps] += "CMAKE_ALIGN_SYSROOT CMAKE_ALIGN_SYSROOT_class-native"
sysroot_cleansstate[vardeps] += "CMAKE_ALIGN_SYSROOT CMAKE_ALIGN_SYSROOT:class-native"

View File

@@ -4,14 +4,14 @@
CMAKEINSTALLED = "${WORKDIR}/staged_cmake_files"
# 1. remove tmp file from last build
python do_populate_sysroot_prepend() {
python do_populate_sysroot:prepend() {
tmpfile = d.getVar('CMAKEINSTALLED')
if os.path.isfile(tmpfile):
os.remove(tmpfile)
}
# 2. keep cmake files staged to sysroot
sysroot_stage_dir_append() {
sysroot_stage_dir:append() {
# avoid doubles causing double replacement
for file in `find $dest -name '*.cmake'`; do
if ! grep -q "$file" ${CMAKEINSTALLED} ; then

View File

@@ -4,4 +4,4 @@ KDE_APP_VERSION = "21.04.3"
SRC_URI = "${KDE_MIRROR}/stable/release-service/${PV}/src/${BPN}-${PV}.tar.xz"
RRECOMMENDS_${PN} += "qtbase-plugins"
RRECOMMENDS:${PN} += "qtbase-plugins"

View File

@@ -1,5 +1,5 @@
DEPENDS_prepend_class-nativesdk = "nativesdk-qtbase "
DEPENDS_prepend_class-target = "qtbase "
DEPENDS:prepend:class-nativesdk = "nativesdk-qtbase "
DEPENDS:prepend:class-target = "qtbase "
# Do not pin hard for extra-cmake-modules itself
DEPENDS+= "extra-cmake-modules-native "
@@ -24,11 +24,11 @@ inherit cmake_qt5_extra python3native
DEPENDS += "libxml2-native"
do_compile_prepend() {
do_compile:prepend() {
export XDG_DATA_HOME=${STAGING_DATADIR}
}
FILES_${PN} += " \
FILES:${PN} += " \
${datadir}/kf5 \
${datadir}/qlogging-categories5 \
${libdir}/plugins/kf5 \
@@ -45,9 +45,9 @@ EXTRA_OECMAKE += " \
-DKDE_PATH_EXTERNAL_HOST_BINS=${STAGING_BINDIR_NATIVE} \
"
FILES_${PN} += " \
FILES:${PN} += " \
${datadir}/appdata \
${datadir}/metainfo \
"
FILES_${PN}-dev += "${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs"
FILES:${PN}-dev += "${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs"

View File

@@ -5,7 +5,7 @@ DEPENDS += "qttools-native"
# default location
QT_TRANSLATION_FILES ??= "${datadir}/*/translations/*.qm ${datadir}/*/translations/*/*.qm ${datadir}/*/translations/*/*/*.qm"
FILES_${PN}-locale = "${datadir}/*/translations"
FILES:${PN}-locale = "${datadir}/*/translations"
python qt_do_split_locales() {
import glob
@@ -53,16 +53,16 @@ python qt_do_split_locales() {
files = ''
for transvar in d.getVar('QT_TRANSLATION_FILES').split():
files = '%s %s' % (files, transvar.replace('*.qm', '*_%s.qm' % l))
d.setVar('FILES_' + pkg, files )
d.setVar('RRECOMMENDS_' + pkg, '%svirtual-locale-%s' % (mlprefix, ln))
d.setVar('RPROVIDES_' + pkg, '%s-locale %s%s-translation' % (pn, mlprefix, ln))
d.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l))
d.setVar('DESCRIPTION_' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l))
d.setVar('FILES:' + pkg, files )
d.setVar('RRECOMMENDS:' + pkg, '%svirtual-locale-%s' % (mlprefix, ln))
d.setVar('RPROVIDES:' + pkg, '%s-locale %s%s-translation' % (pn, mlprefix, ln))
d.setVar('SUMMARY:' + pkg, '%s - %s translations' % (summary, l))
d.setVar('DESCRIPTION:' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l))
if locale_section:
d.setVar('SECTION_' + pkg, locale_section)
d.setVar('SECTION:' + pkg, locale_section)
d.setVar('PACKAGES', ' '.join(list(packages)))
}
PACKAGESPLITFUNCS_prepend = "qt_do_split_locales "
PACKAGESPLITFUNCS:prepend = "qt_do_split_locales "