poky: PACKAGECONFIG的用法

本文详细解释了PACKAGECONFIG在软件包配置中的作用,通过设置不同的条件来调整编译选项和依赖项。例如,在基于x11或directfb的不同情况下,如何配置pango的编译和运行时依赖。

PACKAGECONFIG是用来区分一个软件包在不同的条件下,配置依赖和编译选项

例如:

PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
           ${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
PACKAGECONFIG[x11] = "--with-x,--without-x,${X11DEPENDS}"
PACKAGECONFIG[directfb] = ",,directfb"


用法说明:

PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends"

有四个参数,

--enable-foo:表示如果有foo的那么使能它

--disable-foo:表示没有foo的情况下就不是能它

foo_depends: 表示如果有foo的情况下编译时的依赖。

foo_runtime_depends:表示如果有foo的情况下,运行时的依赖

上面的例子是pango对基于x11或direcrfb的情况

如果是基于x11的(${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}),那么configure时,--with-x, 编译依赖${X11DEPENDS}

如果是基于direcrfb(${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)})的,那么运行confiure时,--without-x,编译依赖direcrfb

修改后,报错: ERROR: qtwayland-native-5.15.3+gitAUTOINC+f9dfeb6e72-r0 do_configure: Error calling /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/recipe-sysroot-native/usr/bin/qmake -makefile -o Makefile QT_BUILD_PARTS-=examples QT_BUILD_PARTS-=tests -no-feature-wayland-vulkan-server-buffer /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/git/src/qtwaylandscanner -- -no-feature-wayland-brcm -no-feature-wayland-client -no-feature-wayland-drm-egl-server-buffer -no-feature-wayland-egl -no-feature-wayland-libhybris-egl-server-buffer -no-feature-wayland-server -no-feature-wayland-vulkan-server-buffer -no-feature-xcomposite-egl -no-feature-xcomposite-glx ERROR: qtwayland-native-5.15.3+gitAUTOINC+f9dfeb6e72-r0 do_configure: ExecutionError('/DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/temp/run.do_configure.102733', 1, None, None) ERROR: Logfile of failure stored in: /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/temp/log.do_configure.102733 Log data follows: | DEBUG: Executing python function extend_recipe_sysroot | NOTE: Direct dependencies are ['/DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/poky/meta-joynext/meta-qt5/recipes-qt/qt5/qtbase-native_git.bb:do_populate_sysroot', '/DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', 'virtual:native:/DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/poky/meta-joynext/meta-qt5/recipes-qt/qt5/qtdeclarative_git.bb:do_populate_sysroot', 'virtual:native:/DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/poky/meta/recipes-graphics/wayland/wayland_1.20.0.bb:do_populate_sysroot'] | NOTE: Installed into sysroot: [] | NOTE: Skipping as already exists in sysroot: ['qtbase-native', 'quilt-native', 'qtdeclarative-native', 'pkgconfig-native', 'wayland-native', 'zlib-native', 'dbus-native', 'expat-native', 'libffi-native', 'python3-native', 'libxml2-native', 'xz-native', 'libtool-native', 'glib-2.0-native', 'gettext-minimal-native', 'cmake-native', 'texinfo-dummy-native', 'readline-native', 'ncurses-native', 'openssl-native', 'libtirpc-native', 'sqlite3-native', 'gdbm-native', 'util-linux-libuuid-native', 'bzip2-native', 'libnsl2-native', 'libpcre-native', 'gettext-native', 'util-linux-native', 'zstd-native', 'curl-native', 'perl-native', 'libpcre2-native', 'libcap-ng-native', 'make-native'] | DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function qmake5_base_preconfigure | DEBUG: Shell function qmake5_base_preconfigure finished | DEBUG: Executing shell function do_configure | NOTE: qmake using profiles: '/DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/git/src/qtwaylandscanner' | NOTE: qmake prevar substitution: ' QT_BUILD_PARTS-=examples QT_BUILD_PARTS-=tests -no-feature-wayland-vulkan-server-buffer' | NOTE: qmake configure substitution: ' -no-feature-wayland-brcm -no-feature-wayland-client -no-feature-wayland-drm-egl-server-buffer -no-feature-wayland-egl -no-feature-wayland-libhybris-egl-server-buffer -no-feature-wayland-server -no-feature-wayland-vulkan-server-buffer -no-feature-xcomposite-egl -no-feature-xcomposite-glx' | Usage: /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/recipe-sysroot-native/usr/bin/qmake [mode] [options] [files] | | QMake has two modes, one mode for generating project files based on | some heuristics, and the other for generating makefiles. Normally you | shouldn't need to specify a mode, as makefile generation is the default | mode for qmake, but you may use this to test qmake on an existing project | | Mode: | -project Put qmake into project file generation mode | In this mode qmake interprets [files] as files to | be added to the .pro file. By default, all files with | known source extensions are added. | Note: The created .pro file probably will | need to be edited. For example add the QT variable to | specify what modules are required. | -makefile Put qmake into makefile generation mode (default) | In this mode qmake interprets files as project files to | be processed, if skipped qmake will try to find a project | file in your current working directory | | Warnings Options: | -Wnone Turn off all warnings; specific ones may be re-enabled by | later -W options | -Wall Turn on all warnings | -Wparser Turn on parser warnings | -Wlogic Turn on logic warnings (on by default) | -Wdeprecated Turn on deprecation warnings (on by default) | | Options: | * You can place any variable assignment in options and it will be * | * processed as if it was in [files]. These assignments will be * | * processed before [files] by default. * | -o file Write output to file | -d Increase debug level | -t templ Overrides TEMPLATE as templ | -tp prefix Overrides TEMPLATE so that prefix is prefixed into the value | -help This help | -v Version information | -early All subsequent variable assignments will be | parsed right before default_pre.prf | -before All subsequent variable assignments will be | parsed right before [files] (the default) | -after All subsequent variable assignments will be | parsed after [files] | -late All subsequent variable assignments will be | parsed right after default_post.prf | -norecursive Don't do a recursive search | -recursive Do a recursive search | -set <prop> <value> Set persistent property | -unset <prop> Unset persistent property | -query <prop> Query persistent property. Show all if <prop> is empty. | -qtconf file Use file instead of looking for qt.conf | -cache file Use file as cache [makefile mode only] | -spec spec Use spec as QMAKESPEC [makefile mode only] | -nocache Don't use a cache file [makefile mode only] | -nodepend Don't generate dependencies [makefile mode only] | -nomoc Don't generate moc targets [makefile mode only] | -nopwd Don't look for files in pwd [project mode only] | ***Unknown option -no-feature-wayland-vulkan-server-buffer | ERROR: Error calling /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/recipe-sysroot-native/usr/bin/qmake -makefile -o Makefile QT_BUILD_PARTS-=examples QT_BUILD_PARTS-=tests -no-feature-wayland-vulkan-server-buffer /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/git/src/qtwaylandscanner -- -no-feature-wayland-brcm -no-feature-wayland-client -no-feature-wayland-drm-egl-server-buffer -no-feature-wayland-egl -no-feature-wayland-libhybris-egl-server-buffer -no-feature-wayland-server -no-feature-wayland-vulkan-server-buffer -no-feature-xcomposite-egl -no-feature-xcomposite-glx | WARNING: /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/temp/run.do_configure.102733:212 exit 1 from 'exit 1' | WARNING: Backtrace (BB generated script): | #1: bbfatal_log, /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/temp/run.do_configure.102733, line 212 | #2: die, /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/temp/run.do_configure.102733, line 202 | #3: qmake5_base_do_configure, /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/temp/run.do_configure.102733, line 188 | #4: do_configure, /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/temp/run.do_configure.102733, line 156 | #5: main, /DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/build-qti-distro-rb-debug/tmp-glibc/work/x86_64-linux/qtwayland-native/5.15.3+gitAUTOINC+f9dfeb6e72-r0/temp/run.do_configure.102733, line 216 ERROR: Task (virtual:native:/DATA/Joynext/zhao_w1/SA8538/LE.PRODUCT.2.1.R3/poky/meta-joynext/meta-qt5/recipes-qt/qt5/qtwayland_git.bb:do_configure) failed with exit code '1' WARNING: Recipe inherits features_check but doesn't use it
最新发布
08-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值