From 7514aa2a2ac9c2bbf6867350595a6e9dc1ae514f Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:20:13 +0100 Subject: [PATCH 01/53] eclass/flag-o-matic: Sync with gentoo It's from gentoo commit 76a84c525c56fb6ed3fe108d8105f617771bd88f. --- .../portage-stable/eclass/flag-o-matic.eclass | 234 ++++++++++++++---- 1 file changed, 192 insertions(+), 42 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass b/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass index 933104190a..32119cb9a5 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass @@ -1,33 +1,67 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: flag-o-matic.eclass # @MAINTAINER: # toolchain@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: common functions to manipulate and query toolchain flags # @DESCRIPTION: # This eclass contains a suite of functions to help developers sanely # and safely manage toolchain flags in their builds. +case ${EAPI:-0} in + 0|1|2|3|4) die "flag-o-matic.eclass: EAPI ${EAPI} is too old." ;; + 5|6|7|8) ;; + *) die "EAPI ${EAPI} is not supported by flag-o-matic.eclass." ;; +esac + if [[ -z ${_FLAG_O_MATIC_ECLASS} ]]; then _FLAG_O_MATIC_ECLASS=1 -inherit eutils toolchain-funcs multilib +inherit toolchain-funcs +[[ ${EAPI} == [567] ]] && inherit eutils + +# @FUNCTION: all-flag-vars +# @DESCRIPTION: # Return all the flag variables that our high level funcs operate on. all-flag-vars() { echo {ADA,C,CPP,CXX,CCAS,F,FC,LD}FLAGS } +# @FUNCTION: setup-allowed-flags +# @INTERNAL +# @DESCRIPTION: # {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags # Note: shell globs and character lists are allowed setup-allowed-flags() { + [[ ${EAPI} == [567] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _setup-allowed-flags "$@" +} + +# @FUNCTION: _setup-allowed-flags +# @INTERNAL +# @DESCRIPTION: +# {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags +# Note: shell globs and character lists are allowed +_setup-allowed-flags() { ALLOWED_FLAGS=( -pipe -O '-O[12sg]' -mcpu -march -mtune - '-fstack-protector*' '-fsanitize*' '-fstack-check*' -fno-stack-check + '-fstack-protector*' + '-fsanitize*' '-fno-sanitize*' + '-fstack-check*' -fno-stack-check -fbounds-check -fbounds-checking -fno-strict-overflow -fno-PIE -fno-pie -nopie -no-pie -fno-unit-at-a-time - -g '-g[0-9]' -ggdb '-ggdb[0-9]' '-gdwarf-*' gstabs -gstabs+ -gz + + # debugging symbols should generally be very safe to add + -g '-g[0-9]' + -ggdb '-ggdb[0-9]' + -gdwarf '-gdwarf-*' + -gstabs -gstabs+ + -gz + -fno-ident -fpermissive -frecord-gcc-switches '-fdiagnostics*' '-fplugin*' '-W*' -w @@ -56,7 +90,9 @@ setup-allowed-flags() { -mno-faster-structs -mfaster-structs -m32 -m64 -mx32 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC -mlive-g0 -mcmodel -mstack-bias -mno-stack-bias -msecure-plt '-m*-toc' -mfloat-abi - -mfix-r10000 -mno-fix-r10000 -mthumb -marm + -mfix-r4000 -mno-fix-r4000 -mfix-r4400 -mno-fix-r4400 + -mfix-rm7000 -mno-fix-rm7000 -mfix-r10000 -mno-fix-r10000 + -mr10k-cache-barrier -mthumb -marm # gcc 4.5 -mno-fma4 -mno-movbe -mno-xop -mno-lwp @@ -78,7 +114,10 @@ setup-allowed-flags() { ) } -# inverted filters for hardened compiler. This is trying to unpick +# @FUNCTION: _filter-hardened +# @INTERNAL +# @DESCRIPTION: +# Inverted filters for hardened compiler. This is trying to unpick # the hardened compiler defaults. _filter-hardened() { local f @@ -112,6 +151,9 @@ _filter-hardened() { done } +# @FUNCTION: _filter-var +# @INTERNAL +# @DESCRIPTION: # Remove occurrences of strings from variable given in $1 # Strings removed are matched as globs, so for example # '-O*' would remove -O1, -O2 etc. @@ -151,7 +193,8 @@ filter-lfs-flags() { # _LARGEFILE_SOURCE: enable support for new LFS funcs (ftello/etc...) # _LARGEFILE64_SOURCE: enable support for 64bit variants (off64_t/fseeko64/etc...) # _FILE_OFFSET_BITS: default to 64bit variants (off_t is defined as off64_t) - filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + # _TIME_BITS: default to 64bit time_t (requires _FILE_OFFSET_BITS=64) + filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_TIME_BITS=64 } # @FUNCTION: filter-ldflags @@ -304,6 +347,11 @@ replace-cpu-flags() { return 0 } +# @FUNCTION: _is_flagq +# @USAGE: +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if is in a given , else returns shell false. _is_flagq() { local x var="$1[*]" for x in ${!var} ; do @@ -392,10 +440,11 @@ filter-mfpmath() { # Strip *FLAGS of everything except known good/safe flags. This runs over all # flags returned by all_flag_vars(). strip-flags() { + [[ $# -ne 0 ]] && die "strip-flags takes no arguments" local x y var local ALLOWED_FLAGS - setup-allowed-flags + _setup-allowed-flags set -f # disable pathname expansion @@ -428,36 +477,112 @@ strip-flags() { return 0 } +# @FUNCTION: test-flag-PROG +# @USAGE: +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if is supported by given , +# else returns shell false. test-flag-PROG() { + [[ ${EAPI} == [567] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _test-flag-PROG "$@" +} + +# @FUNCTION: _test-flag-PROG +# @USAGE: +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if is supported by given , +# else returns shell false. +_test-flag-PROG() { local comp=$1 local lang=$2 shift 2 - [[ -z ${comp} || -z $1 ]] && return 1 + if [[ -z ${comp} ]]; then + return 1 + fi + if [[ -z $1 ]]; then + return 1 + fi + # verify selected compiler exists before using it + comp=($(tc-get${comp})) + # 'comp' can already contain compiler options. + # 'type' needs a binary name + if ! type -p ${comp[0]} >/dev/null; then + return 1 + fi + + # Set up test file. + local in_src in_ext cmdline_extra=() + case "${lang}" in + # compiler/assembler only + c) + in_ext='c' + in_src='int main(void) { return 0; }' + cmdline_extra+=(-xc -c) + ;; + c++) + in_ext='cc' + in_src='int main(void) { return 0; }' + cmdline_extra+=(-xc++ -c) + ;; + f77) + in_ext='f' + # fixed source form + in_src=' end' + cmdline_extra+=(-xf77 -c) + ;; + f95) + in_ext='f90' + in_src='end' + cmdline_extra+=(-xf95 -c) + ;; + + # C compiler/assembler/linker + c+ld) + in_ext='c' + in_src='int main(void) { return 0; }' + cmdline_extra+=(-xc) + ;; + esac + local test_in=${T}/test-flag.${in_ext} + local test_out=${T}/test-flag.exe + + printf "%s\n" "${in_src}" > "${test_in}" || die "Failed to create '${test_in}'" + + # Currently we rely on warning-free output of a compiler + # before the flag to see if a flag prduces any warnings. + # This has a few drawbacks: + # - if compiler already generates warnings we filter out + # every single flag: bug #712488 + # - if user actually wants to see warnings we just strip + # them regardless of warnings type. + # + # We can add more selective detection of no-op flags via + # '-Werror=ignored-optimization-argument' and similar error options + # similar to what we are doing with '-Qunused-arguments'. local cmdline=( - $(tc-get${comp}) + "${comp[@]}" # Clang will warn about unknown gcc flags but exit 0. # Need -Werror to force it to exit non-zero. -Werror - # Use -c so we can test the assembler as well. - -c -o /dev/null - ) - if "${cmdline[@]}" -x${lang} - /dev/null ; then - cmdline+=( "$@" -x${lang} - ) - else - # XXX: what's the purpose of this? does it even work with - # any compiler? - cmdline+=( "$@" -c -o /dev/null /dev/null ) - fi + "$@" + # -x options need to go before first source file + "${cmdline_extra[@]}" - if ! "${cmdline[@]}" /dev/null; then + "${test_in}" -o "${test_out}" + ) + + if ! "${cmdline[@]}" &>/dev/null; then # -Werror makes clang bail out on unused arguments as well; # try to add -Qunused-arguments to work-around that # other compilers don't support it but then, it's failure like # any other cmdline+=( -Qunused-arguments ) - "${cmdline[@]}" /dev/null + "${cmdline[@]}" &>/dev/null fi } @@ -465,27 +590,51 @@ test-flag-PROG() { # @USAGE: # @DESCRIPTION: # Returns shell true if is supported by the C compiler, else returns shell false. -test-flag-CC() { test-flag-PROG "CC" c "$@"; } +test-flag-CC() { _test-flag-PROG CC c "$@"; } # @FUNCTION: test-flag-CXX # @USAGE: # @DESCRIPTION: # Returns shell true if is supported by the C++ compiler, else returns shell false. -test-flag-CXX() { test-flag-PROG "CXX" c++ "$@"; } +test-flag-CXX() { _test-flag-PROG CXX c++ "$@"; } # @FUNCTION: test-flag-F77 # @USAGE: # @DESCRIPTION: # Returns shell true if is supported by the Fortran 77 compiler, else returns shell false. -test-flag-F77() { test-flag-PROG "F77" f77 "$@"; } +test-flag-F77() { _test-flag-PROG F77 f77 "$@"; } # @FUNCTION: test-flag-FC # @USAGE: # @DESCRIPTION: # Returns shell true if is supported by the Fortran 90 compiler, else returns shell false. -test-flag-FC() { test-flag-PROG "FC" f95 "$@"; } +test-flag-FC() { _test-flag-PROG FC f95 "$@"; } +# @FUNCTION: test-flag-CCLD +# @USAGE: +# @DESCRIPTION: +# Returns shell true if is supported by the C compiler and linker, else returns shell false. +test-flag-CCLD() { _test-flag-PROG CC c+ld "$@"; } + +# @FUNCTION: test-flags-PROG +# @USAGE: [more flags...] +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if are supported by given , +# else returns shell false. test-flags-PROG() { + [[ ${EAPI} == [567] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _test-flags-PROG "$@" +} + +# @FUNCTION: _test-flags-PROG +# @USAGE: [more flags...] +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if are supported by given , +# else returns shell false. +_test-flags-PROG() { local comp=$1 local flags=() local x @@ -496,7 +645,8 @@ test-flags-PROG() { while (( $# )); do case "$1" in - --param) + # '-B /foo': bug # 687198 + --param|-B) if test-flag-${comp} "$1" "$2"; then flags+=( "$1" "$2" ) fi @@ -521,25 +671,31 @@ test-flags-PROG() { # @USAGE: # @DESCRIPTION: # Returns shell true if are supported by the C compiler, else returns shell false. -test-flags-CC() { test-flags-PROG "CC" "$@"; } +test-flags-CC() { _test-flags-PROG CC "$@"; } # @FUNCTION: test-flags-CXX # @USAGE: # @DESCRIPTION: # Returns shell true if are supported by the C++ compiler, else returns shell false. -test-flags-CXX() { test-flags-PROG "CXX" "$@"; } +test-flags-CXX() { _test-flags-PROG CXX "$@"; } # @FUNCTION: test-flags-F77 # @USAGE: # @DESCRIPTION: # Returns shell true if are supported by the Fortran 77 compiler, else returns shell false. -test-flags-F77() { test-flags-PROG "F77" "$@"; } +test-flags-F77() { _test-flags-PROG F77 "$@"; } # @FUNCTION: test-flags-FC # @USAGE: # @DESCRIPTION: # Returns shell true if are supported by the Fortran 90 compiler, else returns shell false. -test-flags-FC() { test-flags-PROG "FC" "$@"; } +test-flags-FC() { _test-flags-PROG FC "$@"; } + +# @FUNCTION: test-flags-CCLD +# @USAGE: +# @DESCRIPTION: +# Returns shell true if are supported by the C compiler and default linker, else returns shell false. +test-flags-CCLD() { _test-flags-PROG CCLD "$@"; } # @FUNCTION: test-flags # @USAGE: @@ -565,13 +721,12 @@ test_version_info() { # @DESCRIPTION: # Strip {C,CXX,F,FC}FLAGS of any flags not supported by the active toolchain. strip-unsupported-flags() { + [[ $# -ne 0 ]] && die "strip-unsupported-flags takes no arguments" export CFLAGS=$(test-flags-CC ${CFLAGS}) export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS}) export FFLAGS=$(test-flags-F77 ${FFLAGS}) export FCFLAGS=$(test-flags-FC ${FCFLAGS}) - # note: this does not verify the linker flags but it is enough - # to strip invalid C flags which are much more likely, #621274 - export LDFLAGS=$(test-flags-CC ${LDFLAGS}) + export LDFLAGS=$(test-flags-CCLD ${LDFLAGS}) } # @FUNCTION: get-flag @@ -579,6 +734,7 @@ strip-unsupported-flags() { # @DESCRIPTION: # Find and echo the value for a particular flag. Accepts shell globs. get-flag() { + [[ $# -ne 1 ]] && die "usage: " local f var findflag="$1" # this code looks a little flaky but seems to work for @@ -597,18 +753,11 @@ get-flag() { return 1 } -has_m64() { - die "${FUNCNAME}: don't use this anymore" -} - -has_m32() { - die "${FUNCNAME}: don't use this anymore" -} - # @FUNCTION: replace-sparc64-flags # @DESCRIPTION: # Sets mcpu to v8 and uses the original value as mtune if none specified. replace-sparc64-flags() { + [[ $# -ne 0 ]] && die "replace-sparc64-flags takes no arguments" local SPARC64_CPUS="ultrasparc3 ultrasparc v9" if [ "${CFLAGS/mtune}" != "${CFLAGS}" ]; then @@ -692,6 +841,7 @@ raw-ldflags() { # @FUNCTION: no-as-needed # @RETURN: Flag to disable asneeded behavior for use with append-ldflags. no-as-needed() { + [[ $# -ne 0 ]] && die "no-as-needed takes no arguments" case $($(tc-getLD) -v 2>&1 Date: Tue, 21 Dec 2021 09:22:19 +0100 Subject: [PATCH 02/53] eclass/flag-o-matic: Support EAPI 0 and 4 --- .../portage-stable/eclass/flag-o-matic.eclass | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass b/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass index 32119cb9a5..c52b0a0216 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass @@ -1,18 +1,20 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0 and 4. + # @ECLASS: flag-o-matic.eclass # @MAINTAINER: # toolchain@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 0 4 5 6 7 8 # @BLURB: common functions to manipulate and query toolchain flags # @DESCRIPTION: # This eclass contains a suite of functions to help developers sanely # and safely manage toolchain flags in their builds. case ${EAPI:-0} in - 0|1|2|3|4) die "flag-o-matic.eclass: EAPI ${EAPI} is too old." ;; - 5|6|7|8) ;; + 1|2|3) die "flag-o-matic.eclass: EAPI ${EAPI} is too old." ;; + 0|4|5|6|7|8) ;; *) die "EAPI ${EAPI} is not supported by flag-o-matic.eclass." ;; esac @@ -21,7 +23,7 @@ _FLAG_O_MATIC_ECLASS=1 inherit toolchain-funcs -[[ ${EAPI} == [567] ]] && inherit eutils +[[ ${EAPI:-0} == [04567] ]] && inherit eutils # @FUNCTION: all-flag-vars # @DESCRIPTION: @@ -36,8 +38,8 @@ all-flag-vars() { # {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags # Note: shell globs and character lists are allowed setup-allowed-flags() { - [[ ${EAPI} == [567] ]] || - die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + [[ ${EAPI:-0} == [04567] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI:-0}." _setup-allowed-flags "$@" } @@ -484,8 +486,8 @@ strip-flags() { # Returns shell true if is supported by given , # else returns shell false. test-flag-PROG() { - [[ ${EAPI} == [567] ]] || - die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + [[ ${EAPI:-0} == [04567] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI:-0}." _test-flag-PROG "$@" } @@ -623,8 +625,8 @@ test-flag-CCLD() { _test-flag-PROG CC c+ld "$@"; } # Returns shell true if are supported by given , # else returns shell false. test-flags-PROG() { - [[ ${EAPI} == [567] ]] || - die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + [[ ${EAPI:-0} == [04567] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI:-0}." _test-flags-PROG "$@" } From 6493b12aeeb13d091087fb69fdd4fd380b8a7e6c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:23:15 +0100 Subject: [PATCH 03/53] eclass/git-r3: Sync with gentoo It's from gentoo commit 306f1d3694c25f6802985e288ef08c3d9fefcab7. --- .../portage-stable/eclass/git-r3.eclass | 73 +++---------------- 1 file changed, 11 insertions(+), 62 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass b/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass index cda7ac161e..3981700004 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass @@ -1,24 +1,18 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: git-r3.eclass # @MAINTAINER: # Michał Górny -# @SUPPORTED_EAPIS: 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: Eclass for fetching and unpacking git repositories. # @DESCRIPTION: # Third generation eclass for easing maintenance of live ebuilds using # git as remote repository. -case "${EAPI:-0}" in - 0|1|2|3) - die "Unsupported EAPI=${EAPI} (obsolete) for ${ECLASS}" - ;; - 4|5|6|7) - ;; - *) - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" - ;; +case ${EAPI:-0} in + 5|6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac EXPORT_FUNCTIONS src_unpack @@ -27,15 +21,14 @@ if [[ ! ${_GIT_R3} ]]; then PROPERTIES+=" live" -if [[ ! ${_INHERITED_BY_GIT_2} ]]; then - if [[ ${EAPI:-0} != [0123456] ]]; then - BDEPEND=">=dev-vcs/git-1.8.2.1[curl]" - else - DEPEND=">=dev-vcs/git-1.8.2.1[curl]" - fi +if [[ ${EAPI} != [56] ]]; then + BDEPEND=">=dev-vcs/git-1.8.2.1[curl]" +else + DEPEND=">=dev-vcs/git-1.8.2.1[curl]" fi # @ECLASS-VARIABLE: EGIT_CLONE_TYPE +# @USER_VARIABLE # @DESCRIPTION: # Type of clone that should be used against the remote repository. # This can be either of: 'mirror', 'single', 'shallow'. @@ -283,50 +276,6 @@ _git-r3_env_setup() { if [[ ${EGIT_COMMIT} && ${EGIT_COMMIT_DATE} ]]; then die "EGIT_COMMIT and EGIT_COMMIT_DATE can not be specified simultaneously" fi - - # Migration helpers. Remove them when git-2 is removed. - - if [[ ${EGIT_SOURCEDIR} ]]; then - eerror "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR. While updating" - eerror "your ebuild, please check whether the variable is necessary at all" - eerror "since the default has been changed from \${S} to \${WORKDIR}/\${P}." - eerror "Therefore, proper setting of S may be sufficient." - die "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR." - fi - - if [[ ${EGIT_MASTER} ]]; then - eerror "EGIT_MASTER has been removed. Instead, the upstream default (HEAD)" - eerror "is used by the eclass. Please remove the assignment or use EGIT_BRANCH" - eerror "as necessary." - die "EGIT_MASTER has been removed." - fi - - if [[ ${EGIT_HAS_SUBMODULES} ]]; then - eerror "EGIT_HAS_SUBMODULES has been removed. The eclass no longer needs" - eerror "to switch the clone type in order to support submodules and therefore" - eerror "submodules are detected and fetched automatically. If you need to" - eerror "disable or filter submodules, see EGIT_SUBMODULES." - die "EGIT_HAS_SUBMODULES is no longer necessary." - fi - - if [[ ${EGIT_PROJECT} ]]; then - eerror "EGIT_PROJECT has been removed. Instead, the eclass determines" - eerror "the local clone path using path in canonical EGIT_REPO_URI." - eerror "If the current algorithm causes issues for you, please report a bug." - die "EGIT_PROJECT is no longer necessary." - fi - - if [[ ${EGIT_BOOTSTRAP} ]]; then - eerror "EGIT_BOOTSTRAP has been removed. Please create proper src_prepare()" - eerror "instead." - die "EGIT_BOOTSTRAP has been removed." - fi - - if [[ ${EGIT_NOUNPACK} ]]; then - eerror "EGIT_NOUNPACK has been removed. The eclass no longer calls default" - eerror "unpack function. If necessary, please declare proper src_unpack()." - die "EGIT_NOUNPACK has been removed." - fi } # @FUNCTION: _git-r3_set_gitdir @@ -611,7 +560,7 @@ git-r3_fetch() { local commit_date=${4:-${EGIT_COMMIT_DATE}} # support new override API for EAPI 6+ - if ! has "${EAPI:-0}" 0 1 2 3 4 5; then + if [[ ${EAPI} != 5 ]]; then # get the name and do some more processing: # 1) kill .git suffix, # 2) underscore (remaining) non-variable characters, From ff5f9e015e0664c02f67abbec49b2391bb2e3cce Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:24:48 +0100 Subject: [PATCH 04/53] eclass/git-r3: Support EAPI 4 --- .../third_party/portage-stable/eclass/git-r3.eclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass b/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass index 3981700004..895b3046e0 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass @@ -1,17 +1,19 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 4. + # @ECLASS: git-r3.eclass # @MAINTAINER: # Michał Górny -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 4 5 6 7 8 # @BLURB: Eclass for fetching and unpacking git repositories. # @DESCRIPTION: # Third generation eclass for easing maintenance of live ebuilds using # git as remote repository. case ${EAPI:-0} in - 5|6|7|8) ;; + 4|5|6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -21,7 +23,7 @@ if [[ ! ${_GIT_R3} ]]; then PROPERTIES+=" live" -if [[ ${EAPI} != [56] ]]; then +if [[ ${EAPI} != [456] ]]; then BDEPEND=">=dev-vcs/git-1.8.2.1[curl]" else DEPEND=">=dev-vcs/git-1.8.2.1[curl]" @@ -560,7 +562,7 @@ git-r3_fetch() { local commit_date=${4:-${EGIT_COMMIT_DATE}} # support new override API for EAPI 6+ - if [[ ${EAPI} != 5 ]]; then + if [[ ${EAPI} != [45] ]]; then # get the name and do some more processing: # 1) kill .git suffix, # 2) underscore (remaining) non-variable characters, From fb18341312a18d7c25945f7f7b922aaecf07a1cf Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:25:29 +0100 Subject: [PATCH 05/53] eclass/autotools: Sync with gentoo It's from gentoo commit 74fe7755f50b6968c35c3a5dc247be66e27cbe11. --- .../portage-stable/eclass/autotools.eclass | 178 +++++++++++------- 1 file changed, 111 insertions(+), 67 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass b/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass index 9143aa454d..95c92cc6df 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: autotools.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: Regenerates auto* build scripts # @DESCRIPTION: # This eclass is for safely handling autotooled software packages that need to @@ -19,31 +19,38 @@ if [[ ${__AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then # eclass at that point, but that adds overhead, and it's trivial # to re-order inherit in eclasses/ebuilds instead. #409611 if [[ ${__AUTOTOOLS_AUTO_DEPEND} != ${AUTOTOOLS_AUTO_DEPEND} ]] ; then - die "AUTOTOOLS_AUTO_DEPEND changed value between inherits; please inherit autotools.eclass first! ${__AUTOTOOLS_AUTO_DEPEND} -> ${AUTOTOOLS_AUTO_DEPEND}" + die "AUTOTOOLS_AUTO_DEPEND changed value between inherits; please inherit ${ECLASS} first! ${__AUTOTOOLS_AUTO_DEPEND} -> ${AUTOTOOLS_AUTO_DEPEND}" fi fi -if [[ -z ${_AUTOTOOLS_ECLASS} ]]; then +if [[ -z ${_AUTOTOOLS_ECLASS} ]] ; then _AUTOTOOLS_ECLASS=1 -case ${EAPI:-0} in - 0|1|2|3|4|5|6|7) ;; +case ${EAPI} in + 5|6) + # Needed for eqawarn + inherit eutils + ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; esac -inherit libtool +inherit gnuconfig libtool # @ECLASS-VARIABLE: WANT_AUTOCONF +# @PRE_INHERIT # @DESCRIPTION: # The major version of autoconf your package needs : ${WANT_AUTOCONF:=latest} # @ECLASS-VARIABLE: WANT_AUTOMAKE +# @PRE_INHERIT # @DESCRIPTION: # The major version of automake your package needs : ${WANT_AUTOMAKE:=latest} # @ECLASS-VARIABLE: WANT_LIBTOOL +# @PRE_INHERIT # @DESCRIPTION: # Do you want libtool? Valid values here are "latest" and "none". : ${WANT_LIBTOOL:=latest} @@ -54,36 +61,31 @@ inherit libtool # CONSTANT! # The latest major unstable and stable version/slot of automake available # on each arch. +# Only add unstable version if it is in a different slot than latest stable +# version. # List latest unstable version first to boost testing adoption rate because # most package manager dependency resolver will pick the first suitable # version. # If a newer slot is stable on any arch, and is NOT reflected in this list, # then circular dependencies may arise during emerge @system bootstraps. -# -# See bug 312315 and 465732 for further information and context. -# +# +# See bug #312315 and bug #465732 for further information and context. +# # Do NOT change this variable in your ebuilds! # If you want to force a newer minor version, you can specify the correct # WANT value by using a colon: : -_LATEST_AUTOMAKE=( 1.16.1:1.16 1.15.1:1.15 ) +_LATEST_AUTOMAKE=( 1.16.2-r1:1.16 ) _automake_atom="sys-devel/automake" _autoconf_atom="sys-devel/autoconf" -if [[ -n ${WANT_AUTOMAKE} ]]; then +if [[ -n ${WANT_AUTOMAKE} ]] ; then case ${WANT_AUTOMAKE} in # Even if the package doesn't use automake, we still need to depend # on it because we run aclocal to process m4 macros. This matches - # the autoreconf tool, so this requirement is correct. #401605 + # the autoreconf tool, so this requirement is correct, bug #401605. none) ;; - latest) - # Use SLOT deps if we can. For EAPI=0, we get pretty close. - if [[ ${EAPI:-0} != 0 ]] ; then - _automake_atom="|| ( `printf '>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }` )" - else - _automake_atom="|| ( `printf '>=sys-devel/automake-%s ' ${_LATEST_AUTOMAKE[@]/%:*}` )" - fi - ;; - *) _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*" ;; + latest) _automake_atom="|| ( `printf '>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }` )" ;; + *) _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*";; esac export WANT_AUTOMAKE fi @@ -109,24 +111,27 @@ if [[ -n ${WANT_LIBTOOL} ]] ; then export WANT_LIBTOOL fi -# Force people (nicely) to upgrade to a newer version of gettext as -# older ones are known to be crappy. #496454 -AUTOTOOLS_DEPEND="! # @INTERNAL +# @DESCRIPTION: # See if the specified macros are enabled. _at_uses_pkg() { if [[ -n $(autotools_check_macro "$@") ]] ; then @@ -289,8 +307,8 @@ eaclocal_amflags() { [[ -e ${amflags_file} ]] || continue # setup the env in case the pkg does something crazy # in their ACLOCAL_AMFLAGS. like run a shell script - # which turns around and runs autotools. #365401 - # or split across multiple lines. #383525 + # which turns around and runs autotools (bug #365401) + # or split across multiple lines (bug #383525) autotools_env_setup aclocal_opts=$(sed -n \ "/^ACLOCAL_AMFLAGS[[:space:]]*=/{ \ @@ -312,7 +330,7 @@ eaclocal_amflags() { # specified parametes. The name of the tool run is the same of the function # without e prefix. # They also force installing the support files for safety. -# Respects AT_M4DIR for additional directories to search for macro's. +# Respects AT_M4DIR for additional directories to search for macros. eaclocal() { [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \ autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags) @@ -326,7 +344,7 @@ eaclocal() { _elibtoolize() { local LIBTOOLIZE=${LIBTOOLIZE:-$(type -P glibtoolize > /dev/null && echo glibtoolize || echo libtoolize)} - if [[ $1 == "--auto-ltdl" ]] ; then + if [[ ${1} == "--auto-ltdl" ]] ; then shift _at_uses_libltdl && set -- "$@" --ltdl fi @@ -354,12 +372,29 @@ eautoconf() { echo die "No configure.{ac,in} present!" fi + + if [[ ${WANT_AUTOCONF} != "2.1" && -e configure.in ]] ; then - eqawarn "This package has a configure.in file which has long been deprecated. Please" - eqawarn "update it to use configure.ac instead as newer versions of autotools will die" - eqawarn "when it finds this file. See https://bugs.gentoo.org/426262 for details." + case ${EAPI:-0} in + 0|1|2|3|4|5|6|7) + eqawarn "This package has a configure.in file which has long been deprecated. Please" + eqawarn "update it to use configure.ac instead as newer versions of autotools will die" + eqawarn "when it finds this file. See https://bugs.gentoo.org/426262 for details." + ;; + *) + # Move configure file to the new location only on newer EAPIs to ensure + # checks are done rather than retroactively breaking ebuilds. + eqawarn "Moving configure.in to configure.ac (bug #426262)" + mv configure.{in,ac} || die + ;; + esac fi + # Install config.guess and config.sub which are required by many macros + # in autoconf >=2.70. + local _gnuconfig=$(gnuconfig_findnewest) + cp "${_gnuconfig}"/config.{guess,sub} . || die + autotools_run_tool --at-m4flags autoconf "$@" } @@ -385,7 +420,7 @@ eautomake() { if [[ -z ${makefile_name} ]] ; then _at_uses_automake || return 0 - elif [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name%.am}.in ]]; then + elif [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name%.am}.in ]] ; then local used_automake local installed_automake @@ -393,7 +428,7 @@ eautomake() { used_automake=$(head -n 1 < ${makefile_name%.am}.in | \ sed -e 's:.*by automake \(.*\) from .*:\1:') - if [[ ${installed_automake} != ${used_automake} ]]; then + if [[ ${installed_automake} != ${used_automake} ]] ; then ewarn "Automake used for the package (${used_automake}) differs from" \ "the installed version (${installed_automake})." ewarn "Forcing a full rebuild of the autotools to workaround." @@ -406,10 +441,10 @@ eautomake() { || extra_opts+=( --foreign ) # Older versions of automake do not support --force-missing. But we want - # to use this whenever possible to update random bundled files #133489. + # to use this whenever possible to update random bundled files, bug #133489. case $(_automake_version) in - 1.4|1.4[.-]*) ;; - *) extra_opts+=( --force-missing ) ;; + 1.4|1.4[.-]*) ;; + *) extra_opts+=( --force-missing ) ;; esac autotools_run_tool automake --add-missing --copy "${extra_opts[@]}" "$@" @@ -429,7 +464,16 @@ eautopoint() { # use gettext directly. So we have to copy it in manually since # we can't let `autopoint` do it for us. config_rpath_update() { - local dst src=$(type -P gettext | sed 's:bin/gettext:share/gettext/config.rpath:') + local dst src + + case ${EAPI} in + 5|6) + src="${EPREFIX}/usr/share/gettext/config.rpath" + ;; + *) + src="${BROOT}/usr/share/gettext/config.rpath" + ;; + esac [[ $# -eq 0 ]] && set -- $(find -name config.rpath) [[ $# -eq 0 ]] && return 0 @@ -448,12 +492,12 @@ config_rpath_update() { autotools_env_setup() { # We do the "latest" → version switch here because it solves # possible order problems, see bug #270010 as an example. - if [[ ${WANT_AUTOMAKE} == "latest" ]]; then + if [[ ${WANT_AUTOMAKE} == "latest" ]] ; then local pv for pv in ${_LATEST_AUTOMAKE[@]/#*:} ; do # Break on first hit to respect _LATEST_AUTOMAKE order. local hv_args="" - case ${EAPI:-0} in + case ${EAPI} in 5|6) hv_args="--host-root" ;; @@ -478,30 +522,30 @@ autotools_env_setup() { autotools_run_tool() { # Process our own internal flags first local autofail=true m4flags=false missing_ok=false return_output=false - while [[ -n $1 ]] ; do - case $1 in - --at-no-fail) autofail=false;; - --at-m4flags) m4flags=true;; - --at-missing) missing_ok=true;; - --at-output) return_output=true;; - # whatever is left goes to the actual tool - *) break;; + while [[ -n ${1} ]] ; do + case ${1} in + --at-no-fail) autofail=false ;; + --at-m4flags) m4flags=true ;; + --at-missing) missing_ok=true ;; + --at-output) return_output=true ;; + # whatever is left goes to the actual tool + *) break ;; esac shift done - if [[ ${EBUILD_PHASE} != "unpack" && ${EBUILD_PHASE} != "prepare" ]]; then - ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase" + if [[ ${EBUILD_PHASE_FUNC} != "src_unpack" && ${EBUILD_PHASE_FUNC} != "src_prepare" ]] ; then + eqawarn "Running '${1}' in ${EBUILD_PHASE_FUNC} phase" fi if ${missing_ok} && ! type -P ${1} >/dev/null ; then - einfo "Skipping '$*' due $1 not installed" + einfo "Skipping '$*' because '${1}' not installed" return 0 fi autotools_env_setup - # Allow people to pass in full paths. #549268 + # Allow people to pass in full paths, bug #549268 local STDERR_TARGET="${T}/${1##*/}.out" # most of the time, there will only be one run, but if there are # more, make sure we get unique log filenames @@ -515,7 +559,7 @@ autotools_run_tool() { fi if ${m4flags} ; then - set -- "${1}" $(autotools_m4dir_include) "${@:2}" $(autotools_m4sysdir_include) + set -- "${1}" $(autotools_m4dir_include) $(autotools_m4sysdir_include) "${@:2}" fi # If the caller wants to probe something, then let them do it directly. @@ -524,19 +568,19 @@ autotools_run_tool() { return fi - printf "***** $1 *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}" + printf "***** ${1} *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}" - ebegin "Running $@" + ebegin "Running '$@'" "$@" >> "${STDERR_TARGET}" 2>&1 if ! eend $? && ${autofail} ; then echo - eerror "Failed Running $1 !" + eerror "Failed running '${1}'!" eerror - eerror "Include in your bugreport the contents of:" + eerror "Include in your bug report the contents of:" eerror eerror " ${STDERR_TARGET}" echo - die "Failed Running $1 !" + die "Failed running '${1}'!" fi } @@ -609,7 +653,7 @@ _autotools_m4dir_include() { # We handle it below -${flag}) ;; *) - [[ ! -d ${x} ]] && ewarn "autotools.eclass: '${x}' does not exist" + [[ ! -d ${x} ]] && ewarn "${ECLASS}: '${x}' does not exist" include_opts+=" -${flag} ${x}" ;; esac From 907b109ff9cca057e3d30fed46ac48a5015f88d1 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:26:52 +0100 Subject: [PATCH 06/53] eclass/autotools: Support EAPI 0 and 4 --- .../portage-stable/eclass/autotools.eclass | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass b/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass index 95c92cc6df..47cc492554 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass @@ -1,10 +1,12 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0 and 4. + # @ECLASS: autotools.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 0 4 5 6 7 8 # @BLURB: Regenerates auto* build scripts # @DESCRIPTION: # This eclass is for safely handling autotooled software packages that need to @@ -26,8 +28,8 @@ fi if [[ -z ${_AUTOTOOLS_ECLASS} ]] ; then _AUTOTOOLS_ECLASS=1 -case ${EAPI} in - 5|6) +case ${EAPI:-0} in + 0|4|5|6) # Needed for eqawarn inherit eutils ;; @@ -129,8 +131,8 @@ RDEPEND="" # their own DEPEND string. : ${AUTOTOOLS_AUTO_DEPEND:=yes} if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then - case ${EAPI} in - 5|6) DEPEND=${AUTOTOOLS_DEPEND} ;; + case ${EAPI:-0} in + 0|4|5|6) DEPEND=${AUTOTOOLS_DEPEND} ;; *) BDEPEND=${AUTOTOOLS_DEPEND} ;; esac fi @@ -466,8 +468,8 @@ eautopoint() { config_rpath_update() { local dst src - case ${EAPI} in - 5|6) + case ${EAPI:-0} in + 0|4|5|6) src="${EPREFIX}/usr/share/gettext/config.rpath" ;; *) @@ -497,8 +499,8 @@ autotools_env_setup() { for pv in ${_LATEST_AUTOMAKE[@]/#*:} ; do # Break on first hit to respect _LATEST_AUTOMAKE order. local hv_args="" - case ${EAPI} in - 5|6) + case ${EAPI:-0} in + 0|4|5|6) hv_args="--host-root" ;; 7) From 9142c184e9ab99c09e6d93a6dc0be932162125de Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:27:55 +0100 Subject: [PATCH 07/53] eclass/cmake-multilib: Sync with gentoo It's from gentoo commit e97c8246b1b81c5e79480af3e152fab5df4ff3d2. --- .../eclass/cmake-multilib.eclass | 70 ++++++++++++------- 1 file changed, 43 insertions(+), 27 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/cmake-multilib.eclass b/sdk_container/src/third_party/portage-stable/eclass/cmake-multilib.eclass index 2693d9c72e..b40157dc3f 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/cmake-multilib.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/cmake-multilib.eclass @@ -1,50 +1,62 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: cmake-multilib.eclass # @MAINTAINER: -# gx86-multilib team +# Michał Górny # @AUTHOR: # Author: Michał Górny -# @SUPPORTED_EAPIS: 6 7 -# @BLURB: cmake-utils wrapper for multilib builds +# @SUPPORTED_EAPIS: 7 8 +# @PROVIDES: cmake cmake-utils multilib-minimal +# @BLURB: cmake wrapper for multilib builds # @DESCRIPTION: -# The cmake-multilib.eclass provides a glue between cmake-utils.eclass(5) +# The cmake-multilib.eclass provides a glue between cmake.eclass(5) # and multilib-minimal.eclass(5), aiming to provide a convenient way # to build packages using cmake for multiple ABIs. # # Inheriting this eclass sets IUSE and exports default multilib_src_*() -# sub-phases that call cmake-utils phase functions for each ABI enabled. +# sub-phases that call cmake phase functions for each ABI enabled. # The multilib_src_*() functions can be defined in ebuild just like -# in multilib-minimal, yet they ought to call appropriate cmake-utils +# in multilib-minimal, yet they ought to call appropriate cmake # phase rather than 'default'. +[[ ${EAPI} == 7 ]] && : ${CMAKE_ECLASS:=cmake-utils} # @ECLASS-VARIABLE: CMAKE_ECLASS +# @PRE_INHERIT # @DESCRIPTION: -# Default is "cmake-utils" for compatibility. Specify "cmake" for ebuilds -# that ported from cmake-utils.eclass to cmake.eclass already. -: ${CMAKE_ECLASS:=cmake-utils} +# Only "cmake" is supported in EAPI-8 and later. +# In EAPI-7, default is "cmake-utils" for compatibility. Specify "cmake" for +# ebuilds that ported to cmake.eclass already. +: ${CMAKE_ECLASS:=cmake} -case ${EAPI:-0} in - [67]) ;; - *) die "EAPI=${EAPI} is not supported" ;; +# @ECLASS-VARIABLE: _CMAKE_ECLASS_IMPL +# @INTERNAL +# @DESCRIPTION: +# TODO: Cleanup once EAPI-7 support is gone. +_CMAKE_ECLASS_IMPL=cmake + +case ${EAPI} in + 7|8) + case ${CMAKE_ECLASS} in + cmake-utils|cmake) ;; + *) + eerror "Unknown value for \${CMAKE_ECLASS}" + die "Value ${CMAKE_ECLASS} is not supported" + ;; + esac + _CMAKE_ECLASS_IMPL=${CMAKE_ECLASS} + ;; + *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;; esac if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then die "${ECLASS}: multilib support requires out-of-source builds." fi -case ${CMAKE_ECLASS} in - cmake-utils|cmake) ;; - *) - eerror "Unknown value for \${CMAKE_ECLASS}" - die "Value ${CMAKE_ECLASS} is not supported" - ;; -esac +if [[ -z ${_CMAKE_MULTILIB_ECLASS} ]]; then +_CMAKE_MULTILIB_ECLASS=1 -inherit ${CMAKE_ECLASS} multilib-minimal - -EXPORT_FUNCTIONS src_configure src_compile src_test src_install +inherit ${_CMAKE_ECLASS_IMPL} multilib-minimal cmake-multilib_src_configure() { local _cmake_args=( "${@}" ) @@ -53,7 +65,7 @@ cmake-multilib_src_configure() { } multilib_src_configure() { - ${CMAKE_ECLASS}_src_configure "${_cmake_args[@]}" + ${_CMAKE_ECLASS_IMPL}_src_configure "${_cmake_args[@]}" } cmake-multilib_src_compile() { @@ -63,7 +75,7 @@ cmake-multilib_src_compile() { } multilib_src_compile() { - ${CMAKE_ECLASS}_src_compile "${_cmake_args[@]}" + ${_CMAKE_ECLASS_IMPL}_src_compile "${_cmake_args[@]}" } cmake-multilib_src_test() { @@ -73,7 +85,7 @@ cmake-multilib_src_test() { } multilib_src_test() { - ${CMAKE_ECLASS}_src_test "${_cmake_args[@]}" + ${_CMAKE_ECLASS_IMPL}_src_test "${_cmake_args[@]}" } cmake-multilib_src_install() { @@ -83,5 +95,9 @@ cmake-multilib_src_install() { } multilib_src_install() { - ${CMAKE_ECLASS}_src_install "${_cmake_args[@]}" + ${_CMAKE_ECLASS_IMPL}_src_install "${_cmake_args[@]}" } + +fi + +EXPORT_FUNCTIONS src_configure src_compile src_test src_install From 6229813ce8c57da0a7d762ac4a0e3851b126e24f Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:33:57 +0100 Subject: [PATCH 08/53] eclass/cmake-multilib: Support EAPI 6 --- .../portage-stable/eclass/cmake-multilib.eclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/cmake-multilib.eclass b/sdk_container/src/third_party/portage-stable/eclass/cmake-multilib.eclass index b40157dc3f..0cd1ec1218 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/cmake-multilib.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/cmake-multilib.eclass @@ -1,12 +1,14 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 6. + # @ECLASS: cmake-multilib.eclass # @MAINTAINER: # Michał Górny # @AUTHOR: # Author: Michał Górny -# @SUPPORTED_EAPIS: 7 8 +# @SUPPORTED_EAPIS: 6 7 8 # @PROVIDES: cmake cmake-utils multilib-minimal # @BLURB: cmake wrapper for multilib builds # @DESCRIPTION: @@ -20,7 +22,7 @@ # in multilib-minimal, yet they ought to call appropriate cmake # phase rather than 'default'. -[[ ${EAPI} == 7 ]] && : ${CMAKE_ECLASS:=cmake-utils} +[[ ${EAPI} == [67] ]] && : ${CMAKE_ECLASS:=cmake-utils} # @ECLASS-VARIABLE: CMAKE_ECLASS # @PRE_INHERIT # @DESCRIPTION: @@ -36,7 +38,7 @@ _CMAKE_ECLASS_IMPL=cmake case ${EAPI} in - 7|8) + 6|7|8) case ${CMAKE_ECLASS} in cmake-utils|cmake) ;; *) From ab2a0d9f2a35bbdf02cba3262fb1f39a8b9debb3 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:32:55 +0100 Subject: [PATCH 09/53] eclass/multiprocessing: Sync with gentoo It's from gentoo commit dbc4faf304995e2f20c4d98f714bb8cfde76a329. --- .../portage-stable/eclass/multiprocessing.eclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/multiprocessing.eclass b/sdk_container/src/third_party/portage-stable/eclass/multiprocessing.eclass index 3e8b2f9d25..c32bfaac2e 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/multiprocessing.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/multiprocessing.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: multiprocessing.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Brian Harring # Mike Frysinger +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: multiprocessing helper functions # @DESCRIPTION: # The multiprocessing eclass contains a suite of utility functions @@ -23,6 +24,11 @@ # } # @CODE +case ${EAPI:-0} in + [5678]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_MULTIPROCESSING_ECLASS} ]]; then _MULTIPROCESSING_ECLASS=1 From a58b103f26c678bbe5d79189d4df0c3b996ecd4b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:34:09 +0100 Subject: [PATCH 10/53] eclass/multiprocessing: Support EAPI 0 and 4 --- .../portage-stable/eclass/multiprocessing.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/multiprocessing.eclass b/sdk_container/src/third_party/portage-stable/eclass/multiprocessing.eclass index c32bfaac2e..39e81ab207 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/multiprocessing.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/multiprocessing.eclass @@ -1,13 +1,15 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0 and 4. + # @ECLASS: multiprocessing.eclass # @MAINTAINER: # base-system@gentoo.org # @AUTHOR: # Brian Harring # Mike Frysinger -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 0 4 5 6 7 8 # @BLURB: multiprocessing helper functions # @DESCRIPTION: # The multiprocessing eclass contains a suite of utility functions @@ -25,7 +27,7 @@ # @CODE case ${EAPI:-0} in - [5678]) ;; + [045678]) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac From aa96af304866e3d37938b10ca827291d0646fc4c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:35:07 +0100 Subject: [PATCH 11/53] eclass/toolchain-funcs: Sync with gentoo It's from gentoo commit 1010cde56c21432c19c2dd5fa2a901e6fe82329d. --- .../portage-stable/eclass/toolchain-funcs.eclass | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass index 032433daa7..77fb304940 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass @@ -13,13 +13,11 @@ # in such a way that you can rely on the function always returning # something sane. -# Flatcar: we still have some packages that use old EAPI, revert this -# change when we update those packages. -#case ${EAPI:-0} in -# # EAPI=0 is still used by crossdev, bug #797367 -# 0|5|6|7|8) ;; -# *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; -#esac +case ${EAPI:-0} in + # EAPI=0 is still used by crossdev, bug #797367 + 0|5|6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac if [[ -z ${_TOOLCHAIN_FUNCS_ECLASS} ]]; then _TOOLCHAIN_FUNCS_ECLASS=1 @@ -677,6 +675,7 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; } fi ;; ia64*) echo ia64;; + loongarch*) ninj loongarch loong;; m68*) echo m68k;; metag*) echo metag;; microblaze*) echo microblaze;; @@ -754,6 +753,7 @@ tc-endian() { hppa*) echo big;; i?86*) echo little;; ia64*) echo little;; + loongarch*) echo little;; m68*) echo big;; mips*l*) echo little;; mips*) echo big;; From c3cbaf1fb222ec9a96ad1196d32d016a53bcd601 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:36:18 +0100 Subject: [PATCH 12/53] eclass/toolchain-funcs: Support EAPI 4 --- .../portage-stable/eclass/toolchain-funcs.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass index 77fb304940..b3956c9441 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass @@ -1,10 +1,12 @@ # Copyright 2002-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 4. + # @ECLASS: toolchain-funcs.eclass # @MAINTAINER: # Toolchain Ninjas -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 4 5 6 7 8 # @BLURB: functions to query common info about the toolchain # @DESCRIPTION: # The toolchain-funcs aims to provide a complete suite of functions @@ -15,7 +17,7 @@ case ${EAPI:-0} in # EAPI=0 is still used by crossdev, bug #797367 - 0|5|6|7|8) ;; + 0|4|5|6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac From 57ca064a751330ff68c55a7bfa8966c978b29d3a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:37:17 +0100 Subject: [PATCH 13/53] eclass/multilib-minimal: Sync with gentoo It's from gentoo commit 4f7f10044d8f647292fd88b16f18012bc987c4b8. --- .../eclass/multilib-minimal.eclass | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass b/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass index 136ee3b741..9a1efe2cc4 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass @@ -1,10 +1,11 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: multilib-minimal.eclass # @MAINTAINER: -# Multilib team -# @SUPPORTED_EAPIS: 4 5 6 7 +# Michał Górny +# @SUPPORTED_EAPIS: 5 6 7 8 +# @PROVIDES: multilib-build # @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions # @DESCRIPTION: # @@ -23,14 +24,13 @@ # If you need generic install rules, use multilib_src_install_all function. -# EAPI=4 is required for meaningful MULTILIB_USEDEP. -case ${EAPI:-0} in - 4|5|6|7) ;; - *) die "EAPI=${EAPI} is not supported" ;; +case ${EAPI} in + 5|6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -[[ ${EAPI} == [45] ]] && inherit eutils +[[ ${EAPI} == 5 ]] && inherit eutils inherit multilib-build EXPORT_FUNCTIONS src_configure src_compile src_test src_install From 6d921008d6e559e6aeecadea00394dadabbd2669 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:38:21 +0100 Subject: [PATCH 14/53] eclass/multilib-minimal: Support EAPI 4 --- .../portage-stable/eclass/multilib-minimal.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass b/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass index 9a1efe2cc4..220b1f2296 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass @@ -1,6 +1,8 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 4. + # @ECLASS: multilib-minimal.eclass # @MAINTAINER: # Michał Górny @@ -25,12 +27,12 @@ case ${EAPI} in - 5|6|7|8) ;; + 4|5|6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -[[ ${EAPI} == 5 ]] && inherit eutils +[[ ${EAPI} == [45] ]] && inherit eutils inherit multilib-build EXPORT_FUNCTIONS src_configure src_compile src_test src_install From 84dd6015602453efdb679b5ed0a4803b39a1e269 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:41:42 +0100 Subject: [PATCH 15/53] eclass/cmake: Sync with gentoo It's from gentoo commit 3a93d23f14886170b0c33a416aaad7bb70f15256. --- .../portage-stable/eclass/cmake.eclass | 374 +++++++++++------- 1 file changed, 227 insertions(+), 147 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/cmake.eclass b/sdk_container/src/third_party/portage-stable/eclass/cmake.eclass index 3da3b9aeb5..02683634af 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/cmake.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/cmake.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: cmake.eclass @@ -9,7 +9,8 @@ # Maciej Mrozowski # (undisclosed contributors) # Original author: Zephyrus (zephyrus@mirach.it) -# @SUPPORTED_EAPIS: 7 +# @SUPPORTED_EAPIS: 7 8 +# @PROVIDES: ninja-utils # @BLURB: common ebuild functions for cmake-based packages # @DESCRIPTION: # The cmake eclass makes creating ebuilds for cmake-based packages much easier. @@ -17,30 +18,44 @@ # out-of-source builds (default), in-source builds and an implementation of the # well-known use_enable function for CMake. +case ${EAPI} in + 7|8) ;; + *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;; +esac + if [[ -z ${_CMAKE_ECLASS} ]]; then _CMAKE_ECLASS=1 +inherit flag-o-matic multiprocessing ninja-utils toolchain-funcs xdg-utils + # @ECLASS-VARIABLE: BUILD_DIR +# @DEFAULT_UNSET # @DESCRIPTION: # Build directory where all cmake processed files should be generated. # For in-source build it's fixed to ${CMAKE_USE_DIR}. # For out-of-source build it can be overridden, by default it uses -# ${WORKDIR}/${P}_build. -: ${BUILD_DIR:=${WORKDIR}/${P}_build} +# ${CMAKE_USE_DIR}_build (in EAPI-7: ${WORKDIR}/${P}_build). +[[ ${EAPI} == 7 ]] && : ${BUILD_DIR:=${WORKDIR}/${P}_build} +# EAPI-8: set inside _cmake_check_build_dir # @ECLASS-VARIABLE: CMAKE_BINARY # @DESCRIPTION: # Eclass can use different cmake binary than the one provided in by system. : ${CMAKE_BINARY:=cmake} +[[ ${EAPI} == 7 ]] && : ${CMAKE_BUILD_TYPE:=Gentoo} # @ECLASS-VARIABLE: CMAKE_BUILD_TYPE # @DESCRIPTION: # Set to override default CMAKE_BUILD_TYPE. Only useful for packages # known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)". # If about to be set - needs to be set before invoking cmake_src_configure. -# You usually do *NOT* want nor need to set it as it pulls CMake default -# build-type specific compiler flags overriding make.conf. -: ${CMAKE_BUILD_TYPE:=Gentoo} +# +# The default is RelWithDebInfo as that is least likely to append undesirable +# flags. However, you may still need to sed CMake files or choose a different +# build type to achieve desirable results. +# +# In EAPI 7, the default was non-standard build type of Gentoo. +: ${CMAKE_BUILD_TYPE:=RelWithDebInfo} # @ECLASS-VARIABLE: CMAKE_IN_SOURCE_BUILD # @DEFAULT_UNSET @@ -48,6 +63,7 @@ _CMAKE_ECLASS=1 # Set to enable in-source build. # @ECLASS-VARIABLE: CMAKE_MAKEFILE_GENERATOR +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # Specify a makefile generator to be used by cmake. @@ -56,17 +72,29 @@ _CMAKE_ECLASS=1 : ${CMAKE_MAKEFILE_GENERATOR:=ninja} # @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST +# @PRE_INHERIT +# @DEFAULT_UNSET # @DESCRIPTION: -# Array of CMake modules that will be removed in $S during src_prepare, -# in order to force packages to use the system version. -# Set to "none" to disable removing modules entirely. -: ${CMAKE_REMOVE_MODULES_LIST:=FindBLAS FindLAPACK} +# Array of .cmake modules to be removed in ${CMAKE_USE_DIR} (in EAPI-7: ${S}) +# during src_prepare, in order to force packages to use the system version. +# By default, contains "FindBLAS" and "FindLAPACK". +# Set to empty to disable removing modules entirely. +if [[ ${CMAKE_REMOVE_MODULES_LIST} ]]; then + if [[ ${EAPI} != 7 ]]; then + [[ ${CMAKE_REMOVE_MODULES_LIST@a} == *a* ]] || + die "CMAKE_REMOVE_MODULES_LIST must be an array" + fi +else + if ! [[ ${CMAKE_REMOVE_MODULES_LIST@a} == *a* && ${#CMAKE_REMOVE_MODULES_LIST[@]} -eq 0 ]]; then + CMAKE_REMOVE_MODULES_LIST=( FindBLAS FindLAPACK ) + fi +fi # @ECLASS-VARIABLE: CMAKE_USE_DIR # @DESCRIPTION: # Sets the directory where we are working with cmake, for example when # application uses autotools and only one plugin needs to be done by cmake. -# By default it uses ${S}. +# By default it uses current working directory (in EAPI-7: ${S}). # @ECLASS-VARIABLE: CMAKE_VERBOSE # @DESCRIPTION: @@ -81,6 +109,7 @@ _CMAKE_ECLASS=1 : ${CMAKE_WARN_UNUSED_CLI:=yes} # @ECLASS-VARIABLE: CMAKE_EXTRA_CACHE_FILE +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # Specifies an extra cache file to pass to cmake. This is the analog of EXTRA_ECONF @@ -88,24 +117,16 @@ _CMAKE_ECLASS=1 # Should be set by user in a per-package basis in /etc/portage/package.env. # @ECLASS-VARIABLE: CMAKE_QA_SRC_DIR_READONLY +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: -# After running cmake_src_prepare, sets ${S} to read-only. This is -# a user flag and should under _no circumstances_ be set in the ebuild. -# Helps in improving QA of build systems that write to source tree. - -case ${EAPI} in - 7) ;; - *) die "EAPI=${EAPI:-0} is not supported" ;; -esac - -inherit toolchain-funcs ninja-utils flag-o-matic multiprocessing xdg-utils - -EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install +# After running cmake_src_prepare, sets ${CMAKE_USE_DIR} (in EAPI-7: ${S}) to +# read-only. This is a user flag and should under _no circumstances_ be set in +# the ebuild. Helps in improving QA of build systems that write to source tree. [[ ${CMAKE_MIN_VERSION} ]] && die "CMAKE_MIN_VERSION is banned; if necessary, set BDEPEND=\">=dev-util/cmake-${CMAKE_MIN_VERSION}\" directly" [[ ${CMAKE_BUILD_DIR} ]] && die "The ebuild must be migrated to BUILD_DIR" -[[ ${CMAKE_REMOVE_MODULES} ]] && die "CMAKE_REMOVE_MODULES is banned, set CMAKE_REMOVE_MODULES_LIST=\"\" instead" +[[ ${CMAKE_REMOVE_MODULES} ]] && die "CMAKE_REMOVE_MODULES is banned, set CMAKE_REMOVE_MODULES_LIST array instead" [[ ${CMAKE_UTILS_QA_SRC_DIR_READONLY} ]] && die "Use CMAKE_QA_SRC_DIR_READONLY instead" [[ ${WANT_CMAKE} ]] && die "WANT_CMAKE has been removed and is a no-op" [[ ${PREFIX} ]] && die "PREFIX has been removed and is a no-op" @@ -124,27 +145,23 @@ case ${CMAKE_MAKEFILE_GENERATOR} in esac if [[ ${PN} != cmake ]]; then - BDEPEND+=" dev-util/cmake" + BDEPEND+=" >=dev-util/cmake-3.20.5" fi -# @FUNCTION: _cmake_banned_func -# @INTERNAL +# @FUNCTION: cmake_run_in +# @USAGE: # @DESCRIPTION: -# Banned functions are banned. -_cmake_banned_func() { - die "${FUNCNAME[1]} is banned. use -D$1=\"\$(usex $2)\" instead" -} - -# Determine using IN or OUT source build -_cmake_check_build_dir() { - : ${CMAKE_USE_DIR:=${S}} - if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then - # we build in source dir - BUILD_DIR="${CMAKE_USE_DIR}" +# Set the desired working dir for a function or command. +cmake_run_in() { + if [[ -z ${2} ]]; then + die "${FUNCNAME[0]} must be passed at least two arguments" fi - mkdir -p "${BUILD_DIR}" || die - einfo "Working in BUILD_DIR: \"$BUILD_DIR\"" + [[ -e ${1} ]] || die "${FUNCNAME[0]}: Nonexistent path: ${1}" + + pushd ${1} > /dev/null || die + "${@:2}" + popd > /dev/null || die } # @FUNCTION: cmake_comment_add_subdirectory @@ -153,16 +170,17 @@ _cmake_check_build_dir() { # Comment out one or more add_subdirectory calls in CMakeLists.txt in the current directory cmake_comment_add_subdirectory() { if [[ -z ${1} ]]; then - die "comment_add_subdirectory must be passed at least one directory name to comment" + die "${FUNCNAME[0]} must be passed at least one directory name to comment" fi - if [[ -e "CMakeLists.txt" ]]; then - local d - for d in $@; do - sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${d//\//\\/}[[:space:]]*)/I s/^/#DONOTCOMPILE /" \ - -i CMakeLists.txt || die "failed to comment add_subdirectory(${d})" - done - fi + [[ -e "CMakeLists.txt" ]] || return + + local d + for d in $@; do + d=${d//\//\\/} + sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${d}[[:space:]]*)/I s/^/#DONOTCOMPILE /" \ + -i CMakeLists.txt || die "failed to comment add_subdirectory(${d})" + done } # @FUNCTION: comment_add_subdirectory @@ -173,18 +191,6 @@ comment_add_subdirectory() { die "comment_add_subdirectory is banned. Use cmake_comment_add_subdirectory instead" } -# @FUNCTION: cmake-utils_use_with -# @INTERNAL -# @DESCRIPTION: -# Banned. Use -DWITH_FOO=$(usex foo) instead. -cmake-utils_use_with() { _cmake_banned_func WITH_ "$@" ; } - -# @FUNCTION: cmake-utils_use_enable -# @INTERNAL -# @DESCRIPTION: -# Banned. Use -DENABLE_FOO=$(usex foo) instead. -cmake-utils_use_enable() { _cmake_banned_func ENABLE_ "$@" ; } - # @FUNCTION: cmake_use_find_package # @USAGE: # @DESCRIPTION: @@ -203,6 +209,26 @@ cmake_use_find_package() { echo "-DCMAKE_DISABLE_FIND_PACKAGE_$2=$(use $1 && echo OFF || echo ON)" } +# @FUNCTION: _cmake_banned_func +# @INTERNAL +# @DESCRIPTION: +# Banned functions are banned. +_cmake_banned_func() { + die "${FUNCNAME[1]} is banned. use -D$1=\"\$(usex $2)\" instead" +} + +# @FUNCTION: cmake-utils_use_with +# @INTERNAL +# @DESCRIPTION: +# Banned. Use -DWITH_FOO=$(usex foo) instead. +cmake-utils_use_with() { _cmake_banned_func WITH_ "$@" ; } + +# @FUNCTION: cmake-utils_use_enable +# @INTERNAL +# @DESCRIPTION: +# Banned. Use -DENABLE_FOO=$(usex foo) instead. +cmake-utils_use_enable() { _cmake_banned_func ENABLE_ "$@" ; } + # @FUNCTION: cmake-utils_use_disable # @INTERNAL # @DESCRIPTION: @@ -251,6 +277,32 @@ cmake-utils_use() { _cmake_banned_func "" "$@" ; } # Banned. Use -DNOFOO=$(usex !foo) instead. cmake-utils_useno() { _cmake_banned_func "" "$@" ; } +# @FUNCTION: _cmake_check_build_dir +# @INTERNAL +# @DESCRIPTION: +# Determine using IN or OUT source build +_cmake_check_build_dir() { + if [[ ${EAPI} == 7 ]]; then + : ${CMAKE_USE_DIR:=${S}} + else + : ${CMAKE_USE_DIR:=${PWD}} + fi + if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then + # we build in source dir + BUILD_DIR="${CMAKE_USE_DIR}" + else + : ${BUILD_DIR:=${CMAKE_USE_DIR}_build} + fi + + einfo "Source directory (CMAKE_USE_DIR): \"${CMAKE_USE_DIR}\"" + einfo "Build directory (BUILD_DIR): \"${BUILD_DIR}\"" + + mkdir -p "${BUILD_DIR}" || die +} + +# @FUNCTION: _cmake_modify-cmakelists +# @INTERNAL +# @DESCRIPTION: # Internal function for modifying hardcoded definitions. # Removes dangerous definitions that override Gentoo settings. _cmake_modify-cmakelists() { @@ -275,7 +327,7 @@ _cmake_modify-cmakelists() { # NOTE Append some useful summary here cat >> "${CMAKE_USE_DIR}"/CMakeLists.txt <<- _EOF_ || die - MESSAGE(STATUS "<<< Gentoo configuration >>> + message(STATUS "<<< Gentoo configuration >>> Build type \${CMAKE_BUILD_TYPE} Install path \${CMAKE_INSTALL_PREFIX} Compiler flags: @@ -290,16 +342,18 @@ _cmake_modify-cmakelists() { # @FUNCTION: cmake_src_prepare # @DESCRIPTION: -# Apply ebuild and user patches. +# Apply ebuild and user patches. *MUST* be run or cmake_src_configure will fail. cmake_src_prepare() { debug-print-function ${FUNCNAME} "$@" - # FIXME: workaround from cmake-utils; use current working directory instead, bug #704524 - # esp. test with 'special' pkgs like: app-arch/brotli, media-gfx/gmic, net-libs/quiche - pushd "${S}" > /dev/null || die + if [[ ${EAPI} == 7 ]]; then + pushd "${S}" > /dev/null || die # workaround from cmake-utils + # in EAPI-8, we use current working directory instead, bug #704524 + # esp. test with 'special' pkgs like: app-arch/brotli, media-gfx/gmic, net-libs/quiche + fi + _cmake_check_build_dir default_src_prepare - _cmake_check_build_dir # check if CMakeLists.txt exist and if no then die if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then @@ -317,49 +371,55 @@ cmake_src_prepare() { fi local modules_list - if [[ $(declare -p CMAKE_REMOVE_MODULES_LIST) == "declare -a"* ]]; then - modules_list=( "${CMAKE_REMOVE_MODULES_LIST[@]}" ) - else + if [[ ${EAPI} == 7 && $(declare -p CMAKE_REMOVE_MODULES_LIST) != "declare -a"* ]]; then modules_list=( ${CMAKE_REMOVE_MODULES_LIST} ) + else + modules_list=( "${CMAKE_REMOVE_MODULES_LIST[@]}" ) fi local name for name in "${modules_list[@]}" ; do - find "${S}" -name ${name}.cmake -exec rm -v {} + || die + if [[ ${EAPI} == 7 ]]; then + find "${S}" -name ${name}.cmake -exec rm -v {} + || die + else + find -name "${name}.cmake" -exec rm -v {} + || die + fi done # Remove dangerous things. _cmake_modify-cmakelists - popd > /dev/null || die + if [[ ${EAPI} == 7 ]]; then + popd > /dev/null || die + fi - # make ${S} read-only in order to detect broken build-systems + # Make ${CMAKE_USE_DIR} (in EAPI-7: ${S}) read-only in order to detect + # broken build systems. if [[ ${CMAKE_QA_SRC_DIR_READONLY} && ! ${CMAKE_IN_SOURCE_BUILD} ]]; then - chmod -R a-w "${S}" + if [[ ${EAPI} == 7 ]]; then + chmod -R a-w "${S}" + else + chmod -R a-w "${CMAKE_USE_DIR}" + fi fi _CMAKE_SRC_PREPARE_HAS_RUN=1 } -# @VARIABLE: mycmakeargs -# @DEFAULT_UNSET -# @DESCRIPTION: -# Optional cmake defines as a bash array. Should be defined before calling -# src_configure. -# @CODE -# src_configure() { -# local mycmakeargs=( -# $(cmake_use_with openconnect) -# ) -# -# cmake_src_configure -# } -# @CODE - # @FUNCTION: cmake_src_configure # @DESCRIPTION: # General function for configuring with cmake. Default behaviour is to start an # out-of-source build. +# Passes arguments to cmake by reading from an optionally pre-defined local +# mycmakeargs bash array. +# @CODE +# src_configure() { +# local mycmakeargs=( +# $(cmake_use_find_package foo LibFoo) +# ) +# cmake_src_configure +# } +# @CODE cmake_src_configure() { debug-print-function ${FUNCNAME} "$@" @@ -375,12 +435,12 @@ cmake_src_configure() { local build_rules=${BUILD_DIR}/gentoo_rules.cmake cat > "${build_rules}" <<- _EOF_ || die - SET (CMAKE_ASM_COMPILE_OBJECT " ${CPPFLAGS} -o -c " CACHE STRING "ASM compile command" FORCE) - SET (CMAKE_ASM-ATT_COMPILE_OBJECT " ${CPPFLAGS} -o -c -x assembler " CACHE STRING "ASM-ATT compile command" FORCE) - SET (CMAKE_ASM-ATT_LINK_FLAGS "-nostdlib" CACHE STRING "ASM-ATT link flags" FORCE) - SET (CMAKE_C_COMPILE_OBJECT " ${CPPFLAGS} -o -c " CACHE STRING "C compile command" FORCE) - SET (CMAKE_CXX_COMPILE_OBJECT " ${CPPFLAGS} -o -c " CACHE STRING "C++ compile command" FORCE) - SET (CMAKE_Fortran_COMPILE_OBJECT " ${FCFLAGS} -o -c " CACHE STRING "Fortran compile command" FORCE) + set(CMAKE_ASM_COMPILE_OBJECT " ${CPPFLAGS} -o -c " CACHE STRING "ASM compile command" FORCE) + set(CMAKE_ASM-ATT_COMPILE_OBJECT " ${CPPFLAGS} -o -c -x assembler " CACHE STRING "ASM-ATT compile command" FORCE) + set(CMAKE_ASM-ATT_LINK_FLAGS "-nostdlib" CACHE STRING "ASM-ATT link flags" FORCE) + set(CMAKE_C_COMPILE_OBJECT " ${CPPFLAGS} -o -c " CACHE STRING "C compile command" FORCE) + set(CMAKE_CXX_COMPILE_OBJECT " ${CPPFLAGS} -o -c " CACHE STRING "C++ compile command" FORCE) + set(CMAKE_Fortran_COMPILE_OBJECT " ${FCFLAGS} -o -c " CACHE STRING "Fortran compile command" FORCE) _EOF_ local myCC=$(tc-getCC) myCXX=$(tc-getCXX) myFC=$(tc-getFC) @@ -392,14 +452,14 @@ cmake_src_configure() { # space separated. local toolchain_file=${BUILD_DIR}/gentoo_toolchain.cmake cat > ${toolchain_file} <<- _EOF_ || die - SET (CMAKE_ASM_COMPILER "${myCC/ /;}") - SET (CMAKE_ASM-ATT_COMPILER "${myCC/ /;}") - SET (CMAKE_C_COMPILER "${myCC/ /;}") - SET (CMAKE_CXX_COMPILER "${myCXX/ /;}") - SET (CMAKE_Fortran_COMPILER "${myFC/ /;}") - SET (CMAKE_AR $(type -P $(tc-getAR)) CACHE FILEPATH "Archive manager" FORCE) - SET (CMAKE_RANLIB $(type -P $(tc-getRANLIB)) CACHE FILEPATH "Archive index generator" FORCE) - SET (CMAKE_SYSTEM_PROCESSOR "${CHOST%%-*}") + set(CMAKE_ASM_COMPILER "${myCC/ /;}") + set(CMAKE_ASM-ATT_COMPILER "${myCC/ /;}") + set(CMAKE_C_COMPILER "${myCC/ /;}") + set(CMAKE_CXX_COMPILER "${myCXX/ /;}") + set(CMAKE_Fortran_COMPILER "${myFC/ /;}") + set(CMAKE_AR $(type -P $(tc-getAR)) CACHE FILEPATH "Archive manager" FORCE) + set(CMAKE_RANLIB $(type -P $(tc-getRANLIB)) CACHE FILEPATH "Archive index generator" FORCE) + set(CMAKE_SYSTEM_PROCESSOR "${CHOST%%-*}") _EOF_ # We are using the C compiler for assembly by default. @@ -415,24 +475,24 @@ cmake_src_configure() { Winnt) sysname="Windows" cat >> "${toolchain_file}" <<- _EOF_ || die - SET (CMAKE_RC_COMPILER $(tc-getRC)) + set(CMAKE_RC_COMPILER $(tc-getRC)) _EOF_ ;; *) sysname="${KERNEL}" ;; esac cat >> "${toolchain_file}" <<- _EOF_ || die - SET (CMAKE_SYSTEM_NAME "${sysname}") + set(CMAKE_SYSTEM_NAME "${sysname}") _EOF_ if [ "${SYSROOT:-/}" != "/" ] ; then # When cross-compiling with a sysroot (e.g. with crossdev's emerge wrappers) # we need to tell cmake to use libs/headers from the sysroot but programs from / only. cat >> "${toolchain_file}" <<- _EOF_ || die - SET (CMAKE_FIND_ROOT_PATH "${SYSROOT}") - SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + set(CMAKE_FIND_ROOT_PATH "${SYSROOT}") + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) _EOF_ fi fi @@ -441,20 +501,16 @@ cmake_src_configure() { cat >> "${build_rules}" <<- _EOF_ || die # in Prefix we need rpath and must ensure cmake gets our default linker path # right ... except for Darwin hosts - IF (NOT APPLE) - SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE) - SET (CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" - CACHE STRING "" FORCE) - - ELSE () - - SET (CMAKE_PREFIX_PATH "${EPREFIX}/usr" CACHE STRING "" FORCE) - SET (CMAKE_MACOSX_RPATH ON CACHE BOOL "" FORCE) - SET (CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE) - SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE) - SET (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE) - - ENDIF (NOT APPLE) + if(NOT APPLE) + set(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE) + set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE) + else() + set(CMAKE_PREFIX_PATH "${EPREFIX}/usr" CACHE STRING "" FORCE) + set(CMAKE_MACOSX_RPATH ON CACHE BOOL "" FORCE) + set(CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE) + set(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE) + endif() _EOF_ fi @@ -462,31 +518,46 @@ cmake_src_configure() { local common_config=${BUILD_DIR}/gentoo_common_config.cmake local libdir=$(get_libdir) cat > "${common_config}" <<- _EOF_ || die - SET (CMAKE_GENTOO_BUILD ON CACHE BOOL "Indicate Gentoo package build") - SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE) - SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries") - SET (CMAKE_INSTALL_INFODIR "${EPREFIX}/usr/share/info" CACHE PATH "") - SET (CMAKE_INSTALL_MANDIR "${EPREFIX}/usr/share/man" CACHE PATH "") - SET (CMAKE_USER_MAKE_RULES_OVERRIDE "${build_rules}" CACHE FILEPATH "Gentoo override rules") - SET (CMAKE_INSTALL_DOCDIR "${EPREFIX}/usr/share/doc/${PF}" CACHE PATH "") - SET (BUILD_SHARED_LIBS ON CACHE BOOL "") + set(CMAKE_GENTOO_BUILD ON CACHE BOOL "Indicate Gentoo package build") + set(LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE) + set(CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries") + set(CMAKE_INSTALL_INFODIR "${EPREFIX}/usr/share/info" CACHE PATH "") + set(CMAKE_INSTALL_MANDIR "${EPREFIX}/usr/share/man" CACHE PATH "") + set(CMAKE_USER_MAKE_RULES_OVERRIDE "${build_rules}" CACHE FILEPATH "Gentoo override rules") + set(CMAKE_INSTALL_DOCDIR "${EPREFIX}/usr/share/doc/${PF}" CACHE PATH "") + set(BUILD_SHARED_LIBS ON CACHE BOOL "") _EOF_ + + if [[ -n ${_ECM_ECLASS} ]]; then + echo 'set(ECM_DISABLE_QMLPLUGINDUMP ON CACHE BOOL "")' >> "${common_config}" || die + fi + + # See bug 689410 + if [[ "${ARCH}" == riscv ]]; then + echo 'set(CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX '"${libdir#lib}"' CACHE STRING "library search suffix" FORCE)' >> "${common_config}" || die + fi + if [[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]]; then - echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" || die + echo 'set(CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" || die + fi + + # See bug 735820 + if [[ ${EAPI} != 7 ]]; then + echo 'set(CMAKE_INSTALL_ALWAYS 1)' >> "${common_config}" || die fi # Wipe the default optimization flags out of CMake if [[ ${CMAKE_BUILD_TYPE} != Gentoo ]]; then cat >> ${common_config} <<- _EOF_ || die - SET (CMAKE_ASM_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") - SET (CMAKE_ASM-ATT_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") - SET (CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") - SET (CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") - SET (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") - SET (CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") - SET (CMAKE_MODULE_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") - SET (CMAKE_SHARED_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") - SET (CMAKE_STATIC_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") + set(CMAKE_ASM_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") + set(CMAKE_ASM-ATT_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") + set(CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") + set(CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") + set(CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") + set(CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") + set(CMAKE_MODULE_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") + set(CMAKE_SHARED_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") + set(CMAKE_STATIC_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "") _EOF_ fi @@ -538,8 +609,8 @@ cmake_src_configure() { # @FUNCTION: cmake_src_compile # @DESCRIPTION: -# General function for compiling with cmake. -# Automatically detects the build type. All arguments are passed to emake. +# General function for compiling with cmake. All arguments are passed +# to cmake_build. cmake_src_compile() { debug-print-function ${FUNCNAME} "$@" @@ -549,7 +620,8 @@ cmake_src_compile() { # @FUNCTION: cmake_build # @DESCRIPTION: # Function for building the package. Automatically detects the build type. -# All arguments are passed to emake. +# All arguments are passed to eninja (default) or emake depending on the value +# of CMAKE_MAKEFILE_GENERATOR. cmake_build() { debug-print-function ${FUNCNAME} "$@" @@ -629,9 +701,17 @@ cmake_src_install() { die "died running ${CMAKE_MAKEFILE_GENERATOR} install" popd > /dev/null || die - pushd "${S}" > /dev/null || die - einstalldocs - popd > /dev/null || die + if [[ ${EAPI} == 7 ]]; then + pushd "${S}" > /dev/null || die + einstalldocs + popd > /dev/null || die + else + pushd "${CMAKE_USE_DIR}" > /dev/null || die + einstalldocs + popd > /dev/null || die + fi } fi + +EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install From 122700c07afb1984086e175897dee645957ca007 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:42:57 +0100 Subject: [PATCH 16/53] eclass/cmake-utils: Sync with gentoo It's from gentoo commit 23dd6ff48a93ecd3c1e02fe61f18bd5288207d9c. --- .../portage-stable/eclass/cmake-utils.eclass | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/cmake-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/cmake-utils.eclass index d01a64d014..28753faf66 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/cmake-utils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/cmake-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: cmake-utils.eclass @@ -10,8 +10,11 @@ # (undisclosed contributors) # Original author: Zephyrus (zephyrus@mirach.it) # @SUPPORTED_EAPIS: 5 6 7 +# @PROVIDES: ninja-utils # @BLURB: common ebuild functions for cmake-based packages +# @DEPRECATED: cmake.eclass # @DESCRIPTION: +# DEPRECATED: This no longer receives any changes. Everyone must port to cmake.eclass. # The cmake-utils eclass makes creating ebuilds for cmake-based packages much easier. # It provides all inherited features (DOCS, HTML_DOCS, PATCHES) along with out-of-source # builds (default), in-source builds and an implementation of the well-known use_enable @@ -92,6 +95,7 @@ _CMAKE_UTILS_ECLASS=1 # "no" to disable (default) or anything else to enable. # @ECLASS-VARIABLE: CMAKE_EXTRA_CACHE_FILE +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # Specifies an extra cache file to pass to cmake. This is the analog of EXTRA_ECONF @@ -99,6 +103,7 @@ _CMAKE_UTILS_ECLASS=1 # Should be set by user in a per-package basis in /etc/portage/package.env. # @ECLASS-VARIABLE: CMAKE_UTILS_QA_SRC_DIR_READONLY +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # After running cmake-utils_src_prepare, sets ${S} to read-only. This is @@ -338,6 +343,18 @@ cmake-utils_use_find_package() { _cmake_use_me_now_inverted CMAKE_DISABLE_FIND_PACKAGE_ "$@" ; } +# @FUNCTION: cmake_use_find_package +# @USAGE: +# @DESCRIPTION: +# Alias for cmake-utils_use_find_package. +cmake_use_find_package() { + if [[ "$#" != 2 ]] ; then + die "Usage: cmake_use_find_package " + fi + + cmake-utils_use_find_package "$@" ; +} + # @FUNCTION: cmake-utils_use_disable # @USAGE: [flag name] # @DESCRIPTION: @@ -420,10 +437,10 @@ _cmake_modify-cmakelists() { # Comment out all set ( value) find "${CMAKE_USE_DIR}" -name CMakeLists.txt -exec sed \ - -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \ + -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE\([[:space:]].*)\|)\)/I{s/^/#_cmake_modify_IGNORE /g}' \ -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_COLOR_MAKEFILE[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \ -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \ - -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE[[:space:]].*)/I{s/^/#G_cmake_modify_IGNORE /g}' \ + -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \ -i {} + || die "${LINENO}: failed to disable hardcoded settings" local x for x in $(find "${CMAKE_USE_DIR}" -name CMakeLists.txt -exec grep -l "^#_cmake_modify_IGNORE" {} +;); do @@ -612,7 +629,7 @@ cmake-utils_src_configure() { fi fi - if [[ ${EPREFIX} ]]; then + if use prefix-guest; then cat >> "${build_rules}" <<- _EOF_ || die # in Prefix we need rpath and must ensure cmake gets our default linker path # right ... except for Darwin hosts @@ -644,12 +661,18 @@ cmake-utils_src_configure() { SET (CMAKE_INSTALL_MANDIR "${EPREFIX}/usr/share/man" CACHE PATH "") SET (CMAKE_USER_MAKE_RULES_OVERRIDE "${build_rules}" CACHE FILEPATH "Gentoo override rules") _EOF_ + + # See bug 689410 + if [[ "${ARCH}" == riscv ]]; then + echo 'SET (CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX '"${libdir#lib}"' CACHE STRING "library search suffix" FORCE)' >> "${common_config}" || die + fi + [[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" if [[ ${EAPI} != [56] ]]; then cat >> "${common_config}" <<- _EOF_ || die SET (CMAKE_INSTALL_DOCDIR "${EPREFIX}/usr/share/doc/${PF}" CACHE PATH "") - SET (BUILD_SHARED_LIBS ON CACHE BOOLEAN "") + SET (BUILD_SHARED_LIBS ON CACHE BOOL "") _EOF_ fi From 734cccb1147968884d82f180393c659d3d6c600e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:45:00 +0100 Subject: [PATCH 17/53] eclass/eapi7-ver: Sync with gentoo It's from gentoo commit 18a01a9ed1bf8132464a0104344b976804912e4d. --- .../third_party/portage-stable/eclass/eapi7-ver.eclass | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/eapi7-ver.eclass b/sdk_container/src/third_party/portage-stable/eclass/eapi7-ver.eclass index b7f9715bc4..a23e76ad3e 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/eapi7-ver.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/eapi7-ver.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: eapi7-ver.eclass @@ -17,8 +17,7 @@ # # https://bugs.gentoo.org/482170 # -# @ROFF .SS -# Version strings +# @SUBSECTION Version strings # # The functions support arbitrary version strings consisting of version # components interspersed with (possibly empty) version separators. @@ -50,8 +49,7 @@ # 0 1 1 # @CODE # -# @ROFF .SS -# Ranges +# @SUBSECTION Ranges # # A range can be specified as 'm' for m-th version component, 'm-' # for all components starting with m-th or 'm-n' for components starting @@ -60,7 +58,7 @@ case ${EAPI:-0} in 0|1|2|3|4|5|6) ;; - 7) die "${ECLASS}: EAPI=${EAPI} includes all functions from this eclass" ;; + 7|8) die "${ECLASS}: EAPI=${EAPI} includes all functions from this eclass" ;; *) die "${ECLASS}: EAPI=${EAPI} unknown" ;; esac From cf383e6edf020cb8723e5661d282ea6b0fe45048 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:45:43 +0100 Subject: [PATCH 18/53] eclass/eutils: Sync with gentoo It's from gentoo commit 48651ecc0d4444536ed15b06736e331238b6f92b. --- .../portage-stable/eclass/eutils.eclass | 256 ++---------------- 1 file changed, 24 insertions(+), 232 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass b/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass index 7b6336e2ae..207d05e7f9 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass @@ -1,9 +1,10 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: eutils.eclass # @MAINTAINER: # base-system@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: many extra (but common) functions that are used in ebuilds # @DESCRIPTION: # The eutils eclass contains a suite of functions that complement @@ -13,24 +14,32 @@ # # Due to the nature of this eclass, some functions may have maintainers # different from the overall eclass! +# +# This eclass is DEPRECATED and must not be inherited by any new ebuilds +# or eclasses. Use the more specific split eclasses instead, or native +# package manager functions when available. if [[ -z ${_EUTILS_ECLASS} ]]; then _EUTILS_ECLASS=1 # implicitly inherited (now split) eclasses -case ${EAPI:-0} in -0|1|2|3|4|5|6) - inherit desktop epatch estack ltprune multilib preserve-libs \ - toolchain-funcs vcs-clean - ;; +case ${EAPI} in + 5|6) + inherit desktop edos2unix epatch estack ltprune multilib \ + preserve-libs strip-linguas toolchain-funcs vcs-clean wrapper + ;; + 7) inherit edos2unix strip-linguas wrapper ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac # @FUNCTION: emktemp # @USAGE: [temp dir] # @DESCRIPTION: -# Cheap replacement for when debianutils (and thus mktemp) -# does not exist on the users system. +# Cheap replacement for when coreutils (and thus mktemp) does not exist +# on the user's system. emktemp() { + eqawarn "emktemp is deprecated. Create a temporary file in \${T} instead." + local exe="touch" [[ $1 == -d ]] && exe="mkdir" && shift local topdir=$1 @@ -60,114 +69,6 @@ emktemp() { fi } -# @FUNCTION: edos2unix -# @USAGE: [more files ...] -# @DESCRIPTION: -# A handy replacement for dos2unix, recode, fixdos, etc... This allows you -# to remove all of these text utilities from DEPEND variables because this -# is a script based solution. Just give it a list of files to convert and -# they will all be changed from the DOS CRLF format to the UNIX LF format. -edos2unix() { - [[ $# -eq 0 ]] && return 0 - sed -i 's/\r$//' -- "$@" || die -} - -# @FUNCTION: strip-linguas -# @USAGE: [|<-i|-u> ] -# @DESCRIPTION: -# Make sure that LINGUAS only contains languages that -# a package can support. The first form allows you to -# specify a list of LINGUAS. The -i builds a list of po -# files found in all the directories and uses the -# intersection of the lists. The -u builds a list of po -# files found in all the directories and uses the union -# of the lists. -strip-linguas() { - local ls newls nols - if [[ $1 == "-i" ]] || [[ $1 == "-u" ]] ; then - local op=$1; shift - ls=$(find "$1" -name '*.po' -exec basename {} .po ';'); shift - local d f - for d in "$@" ; do - if [[ ${op} == "-u" ]] ; then - newls=${ls} - else - newls="" - fi - for f in $(find "$d" -name '*.po' -exec basename {} .po ';') ; do - if [[ ${op} == "-i" ]] ; then - has ${f} ${ls} && newls="${newls} ${f}" - else - has ${f} ${ls} || newls="${newls} ${f}" - fi - done - ls=${newls} - done - else - ls="$@" - fi - - nols="" - newls="" - for f in ${LINGUAS} ; do - if has ${f} ${ls} ; then - newls="${newls} ${f}" - else - nols="${nols} ${f}" - fi - done - [[ -n ${nols} ]] \ - && einfo "Sorry, but ${PN} does not support the LINGUAS:" ${nols} - export LINGUAS=${newls:1} -} - -# @FUNCTION: make_wrapper -# @USAGE: [chdir] [libpaths] [installpath] -# @DESCRIPTION: -# Create a shell wrapper script named wrapper in installpath -# (defaults to the bindir) to execute target (default of wrapper) by -# first optionally setting LD_LIBRARY_PATH to the colon-delimited -# libpaths followed by optionally changing directory to chdir. -make_wrapper() { - local wrapper=$1 bin=$2 chdir=$3 libdir=$4 path=$5 - local tmpwrapper=$(emktemp) - has "${EAPI:-0}" 0 1 2 && local EPREFIX="" - - ( - echo '#!/bin/sh' - if [[ -n ${libdir} ]] ; then - local var - if [[ ${CHOST} == *-darwin* ]] ; then - var=DYLD_LIBRARY_PATH - else - var=LD_LIBRARY_PATH - fi - cat <<-EOF - if [ "\${${var}+set}" = "set" ] ; then - export ${var}="\${${var}}:${EPREFIX}${libdir}" - else - export ${var}="${EPREFIX}${libdir}" - fi - EOF - fi - [[ -n ${chdir} ]] && printf 'cd "%s" &&\n' "${EPREFIX}${chdir}" - # We don't want to quote ${bin} so that people can pass complex - # things as ${bin} ... "./someprog --args" - printf 'exec %s "$@"\n' "${bin/#\//${EPREFIX}/}" - ) > "${tmpwrapper}" - chmod go+rx "${tmpwrapper}" - - if [[ -n ${path} ]] ; then - ( - exeopts -m 0755 - exeinto "${path}" - newexe "${tmpwrapper}" "${wrapper}" - ) || die - else - newbin "${tmpwrapper}" "${wrapper}" || die - fi -} - path_exists() { eerror "path_exists has been removed. Please see the following post" eerror "for a replacement snippet:" @@ -182,119 +83,14 @@ path_exists() { # # Note that this function should not be used in the global scope. use_if_iuse() { + eqawarn "use_if_iuse is deprecated." + eqawarn "Define it as a local function, or inline it:" + eqawarn " in_iuse foo && use foo" in_iuse $1 || return 1 use $1 } -# @FUNCTION: optfeature -# @USAGE: [other atoms] -# @DESCRIPTION: -# Print out a message suggesting an optional package (or packages) -# not currently installed which provides the described functionality. -# -# The following snippet would suggest app-misc/foo for optional foo support, -# app-misc/bar or app-misc/baz[bar] for optional bar support -# and either both app-misc/a and app-misc/b or app-misc/c for alphabet support. -# @CODE -# optfeature "foo support" app-misc/foo -# optfeature "bar support" app-misc/bar app-misc/baz[bar] -# optfeature "alphabet support" "app-misc/a app-misc/b" app-misc/c -# @CODE -optfeature() { - debug-print-function ${FUNCNAME} "$@" - local i j msg - local desc=$1 - local flag=0 - shift - for i; do - for j in ${i}; do - if has_version "${j}"; then - flag=1 - else - flag=0 - break - fi - done - if [[ ${flag} -eq 1 ]]; then - break - fi - done - if [[ ${flag} -eq 0 ]]; then - for i; do - msg=" " - for j in ${i}; do - msg+=" ${j} and" - done - msg="${msg:0: -4} for ${desc}" - elog "${msg}" - done - fi -} - -case ${EAPI:-0} in -0|1|2) - -# @FUNCTION: epause -# @USAGE: [seconds] -# @DESCRIPTION: -# Sleep for the specified number of seconds (default of 5 seconds). Useful when -# printing a message the user should probably be reading and often used in -# conjunction with the ebeep function. If the EPAUSE_IGNORE env var is set, -# don't wait at all. Defined in EAPIs 0 1 and 2. -epause() { - [[ -z ${EPAUSE_IGNORE} ]] && sleep ${1:-5} -} - -# @FUNCTION: ebeep -# @USAGE: [number of beeps] -# @DESCRIPTION: -# Issue the specified number of beeps (default of 5 beeps). Useful when -# printing a message the user should probably be reading and often used in -# conjunction with the epause function. If the EBEEP_IGNORE env var is set, -# don't beep at all. Defined in EAPIs 0 1 and 2. -ebeep() { - local n - if [[ -z ${EBEEP_IGNORE} ]] ; then - for ((n=1 ; n <= ${1:-5} ; n++)) ; do - echo -ne "\a" - sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null - echo -ne "\a" - sleep 1 - done - fi -} - -;; -*) - -ebeep() { - ewarn "QA Notice: ebeep is not defined in EAPI=${EAPI}, please file a bug at https://bugs.gentoo.org" -} - -epause() { - ewarn "QA Notice: epause is not defined in EAPI=${EAPI}, please file a bug at https://bugs.gentoo.org" -} - -;; -esac - -case ${EAPI:-0} in -0|1|2|3|4) - -# @FUNCTION: usex -# @USAGE: [true output] [false output] [true suffix] [false suffix] -# @DESCRIPTION: -# Proxy to declare usex for package managers or EAPIs that do not provide it -# and use the package manager implementation when available (i.e. EAPI >= 5). -# If USE flag is set, echo [true output][true suffix] (defaults to "yes"), -# otherwise echo [false output][false suffix] (defaults to "no"). -usex() { use "$1" && echo "${2-yes}$4" || echo "${3-no}$5" ; } #382963 - -;; -esac - -case ${EAPI:-0} in -0|1|2|3|4|5) +if [[ ${EAPI} == 5 ]] ; then # @FUNCTION: einstalldocs # @DESCRIPTION: @@ -326,7 +122,6 @@ einstalldocs() { debug-print-function ${FUNCNAME} "${@}" local dodoc_opts=-r - has ${EAPI} 0 1 2 3 && dodoc_opts= if ! declare -p DOCS &>/dev/null ; then local d @@ -377,11 +172,9 @@ in_iuse() { has "${flag}" "${liuse[@]#[+-]}" } -;; -esac +fi # EAPI 5 -case ${EAPI:-0} in -0|1|2|3|4|5|6) +if [[ ${EAPI} == [56] ]] ; then # @FUNCTION: eqawarn # @USAGE: [message] @@ -396,7 +189,6 @@ if ! declare -F eqawarn >/dev/null ; then } fi -;; -esac +fi # EAPI [56] fi From d532eb6390013b5c56325df66b2911ad50601328 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:53:27 +0100 Subject: [PATCH 19/53] eclass/eutils: Support EAPI 0 and 4 --- .../portage-stable/eclass/eutils.eclass | 63 ++++++++++++++++--- 1 file changed, 56 insertions(+), 7 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass b/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass index 207d05e7f9..9620495050 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass @@ -1,10 +1,12 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0 and 4. + # @ECLASS: eutils.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 0 4 5 6 7 # @BLURB: many extra (but common) functions that are used in ebuilds # @DESCRIPTION: # The eutils eclass contains a suite of functions that complement @@ -23,8 +25,8 @@ if [[ -z ${_EUTILS_ECLASS} ]]; then _EUTILS_ECLASS=1 # implicitly inherited (now split) eclasses -case ${EAPI} in - 5|6) +case ${EAPI:-0} in + 0|4|5|6) inherit desktop edos2unix epatch estack ltprune multilib \ preserve-libs strip-linguas toolchain-funcs vcs-clean wrapper ;; @@ -90,7 +92,54 @@ use_if_iuse() { use $1 } -if [[ ${EAPI} == 5 ]] ; then +if [[ ${EAPI:-0} == 0 ]] ; then + +# @FUNCTION: epause +# @USAGE: [seconds] +# @DESCRIPTION: +# Sleep for the specified number of seconds (default of 5 seconds). Useful when +# printing a message the user should probably be reading and often used in +# conjunction with the ebeep function. If the EPAUSE_IGNORE env var is set, +# don't wait at all. Defined in EAPIs 0 1 and 2. +epause() { + [[ -z ${EPAUSE_IGNORE} ]] && sleep ${1:-5} +} + +# @FUNCTION: ebeep +# @USAGE: [number of beeps] +# @DESCRIPTION: +# Issue the specified number of beeps (default of 5 beeps). Useful when +# printing a message the user should probably be reading and often used in +# conjunction with the epause function. If the EBEEP_IGNORE env var is set, +# don't beep at all. Defined in EAPIs 0 1 and 2. +ebeep() { + local n + if [[ -z ${EBEEP_IGNORE} ]] ; then + for ((n=1 ; n <= ${1:-5} ; n++)) ; do + echo -ne "\a" + sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null + echo -ne "\a" + sleep 1 + done + fi +} + +fi # EAPI 0 + +if [[ ${EAPI:-0} == [04] ]] ; then + +# @FUNCTION: usex +# @USAGE: [true output] [false output] [true suffix] [false suffix] +# @DESCRIPTION: +# Proxy to declare usex for package managers or EAPIs that do not provide it +# and use the package manager implementation when available (i.e. EAPI >= 5). +# If USE flag is set, echo [true output][true suffix] (defaults to "yes"), +# otherwise echo [false output][false suffix] (defaults to "no"). +usex() { use "$1" && echo "${2-yes}$4" || echo "${3-no}$5" ; } #382963 + +fi # EAPI [04] + +if [[ ${EAPI:-0} == [045] ]] ; then # @FUNCTION: einstalldocs # @DESCRIPTION: @@ -172,9 +221,9 @@ in_iuse() { has "${flag}" "${liuse[@]#[+-]}" } -fi # EAPI 5 +fi # EAPI [045] -if [[ ${EAPI} == [56] ]] ; then +if [[ ${EAPI:-0} == [0456] ]] ; then # @FUNCTION: eqawarn # @USAGE: [message] @@ -189,6 +238,6 @@ if ! declare -F eqawarn >/dev/null ; then } fi -fi # EAPI [56] +fi # EAPI [0456] fi From b1d75df15cfef7539030df6bb477ec903680dbd6 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:53:57 +0100 Subject: [PATCH 20/53] eclass/desktop: Sync with gentoo It's from gentoo commit f6212ee060d6a2962ac27cf57ffd721d14b64215. --- .../portage-stable/eclass/desktop.eclass | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/desktop.eclass b/sdk_container/src/third_party/portage-stable/eclass/desktop.eclass index 6fc72ab8ec..82e764e2a1 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/desktop.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/desktop.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: desktop.eclass @@ -10,7 +10,7 @@ if [[ -z ${_DESKTOP_ECLASS} ]]; then _DESKTOP_ECLASS=1 # @FUNCTION: make_desktop_entry -# @USAGE: make_desktop_entry(, [name], [icon], [type], [fields]) +# @USAGE: [name] [icon] [type] [fields] # @DESCRIPTION: # Make a .desktop file. # @@ -162,8 +162,15 @@ make_desktop_entry() { else local desktop_name="${PN}-${slot}" fi - local desktop="${T}/$(echo ${exec} | sed 's:[[:space:]/:]:_:g')-${desktop_name}.desktop" - #local desktop=${T}/${exec%% *:-${desktop_name}}.desktop + local desktop_exec="${exec%%[[:space:]]*}" + desktop_exec="${desktop_exec##*/}" + + # Prevent collisions if a file with the same name already exists #771708 + local desktop="${desktop_exec}-${desktop_name}" count=0 + while [[ -e ${ED}/usr/share/applications/${desktop}.desktop ]]; do + desktop="${desktop_exec}-$((++count))-${desktop_name}" + done + desktop="${T}/${desktop}.desktop" # Don't append another ";" when a valid category value is provided. type=${type%;}${type:+;} From 5d1d909aeec392e04e974797ffa373b737ced037 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:54:40 +0100 Subject: [PATCH 21/53] eclass/edos2unix: Add from gentoo It's from gentoo commit 80f9e1b4058fddc6df645f36c06367a676a11cbe. --- .../portage-stable/eclass/edos2unix.eclass | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/eclass/edos2unix.eclass diff --git a/sdk_container/src/third_party/portage-stable/eclass/edos2unix.eclass b/sdk_container/src/third_party/portage-stable/eclass/edos2unix.eclass new file mode 100644 index 0000000000..8b774844cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/eclass/edos2unix.eclass @@ -0,0 +1,21 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: edos2unix.eclass +# @MAINTAINER: +# base-system@gentoo.org +# @BLURB: convert files from DOS CRLF to UNIX LF line endings + +# @FUNCTION: edos2unix +# @USAGE: [more files ...] +# @DESCRIPTION: +# A handy replacement for dos2unix, recode, fixdos, etc... This allows +# you to remove all of these text utilities from DEPEND variables +# because this is a script based solution. Just give it a list of files +# to convert and they will all be changed from the DOS CRLF format to +# the UNIX LF format. + +edos2unix() { + [[ $# -eq 0 ]] && return 0 + sed -i 's/\r$//' -- "$@" || die +} From 27432830c2e4ea6aec15ff90a0655b76727ab43b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:55:15 +0100 Subject: [PATCH 22/53] eclass/epatch: Sync with gentoo It's from gentoo commit 7a9020ea8b355ffdb03d4f9f7d7328b1e985f25b. --- .../portage-stable/eclass/epatch.eclass | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/epatch.eclass b/sdk_container/src/third_party/portage-stable/eclass/epatch.eclass index 1ea657a3b6..5d18befe55 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/epatch.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/epatch.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: epatch.eclass @@ -6,6 +6,7 @@ # base-system@gentoo.org # @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: easy patch application functions +# @DEPRECATED: eapply from EAPI 7 # @DESCRIPTION: # An eclass providing epatch and epatch_user functions to easily apply # patches to ebuilds. Mostly superseded by eapply* in EAPI 6. @@ -19,6 +20,8 @@ case ${EAPI:-0} in die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";; esac +inherit estack + # @VARIABLE: EPATCH_SOURCE # @DESCRIPTION: # Default directory to search for patches. @@ -209,14 +212,13 @@ epatch() { # Let people filter things dynamically if [[ -n ${EPATCH_EXCLUDE}${EPATCH_USER_EXCLUDE} ]] ; then # let people use globs in the exclude - local prev_noglob=$(shopt -p -o noglob) - set -o noglob + eshopts_push -o noglob local ex for ex in ${EPATCH_EXCLUDE} ; do if [[ ${patchname} == ${ex} ]] ; then einfo " Skipping ${patchname} due to EPATCH_EXCLUDE ..." - ${prev_noglob} + eshopts_pop continue 2 fi done @@ -224,12 +226,12 @@ epatch() { for ex in ${EPATCH_USER_EXCLUDE} ; do if [[ ${patchname} == ${ex} ]] ; then einfo " Skipping ${patchname} due to EPATCH_USER_EXCLUDE ..." - ${prev_noglob} + eshopts_pop continue 2 fi done - ${prev_noglob} + eshopts_pop fi if [[ ${SINGLE_PATCH} == "yes" ]] ; then @@ -292,7 +294,7 @@ epatch() { local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}") if [[ -n ${rel_paths} ]] ; then echo - eerror "Rejected Patch: ${patchname} !" + eerror "Rejected Patch: ${patchname}!" eerror " ( ${PATCH_TARGET} )" eerror eerror "Your patch uses relative paths '../':" @@ -357,14 +359,14 @@ epatch() { if [[ ${count} -ge 5 ]] ; then echo - eerror "Failed Patch: ${patchname} !" + eerror "Failed patch: ${patchname}!" eerror " ( ${PATCH_TARGET} )" eerror - eerror "Include in your bugreport the contents of:" + eerror "Include in your bug report the contents of:" eerror eerror " ${STDERR_TARGET}" echo - die "Failed Patch: ${patchname}!" + die "Failed patch: ${patchname}!" fi # if everything worked, delete the full debug patch log @@ -387,7 +389,8 @@ epatch() { case ${EAPI:-0} in 0|1|2|3|4|5) -# @VARIABLE: EPATCH_USER_SOURCE +# @ECLASS_VARIABLE: EPATCH_USER_SOURCE +# @USER_VARIABLE # @DESCRIPTION: # Location for user patches, see the epatch_user function. # Should be set by the user. Don't set this in ebuilds. From a8c0b3a950c658fdcbb85afe282cccb55cf3da26 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 09:55:57 +0100 Subject: [PATCH 23/53] eclass/estack: Sync with gentoo It's from gentoo commit 2f653f03c381cd6c4b1c7fc3aa7b25901fc8b47f. --- .../portage-stable/eclass/estack.eclass | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/estack.eclass b/sdk_container/src/third_party/portage-stable/eclass/estack.eclass index f548abf8c2..c0823adb03 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/estack.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/estack.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: estack.eclass @@ -115,7 +115,8 @@ evar_pop() { local cnt=${1:-bad} case $# in 0) cnt=1 ;; - 1) isdigit "${cnt}" || die "${FUNCNAME}: first arg must be a number: $*" ;; + 1) [[ -z ${cnt//[0-9]} ]] \ + || die "${FUNCNAME}: first arg must be a number: $*" ;; *) die "${FUNCNAME}: only accepts one arg: $*" ;; esac @@ -153,12 +154,13 @@ evar_pop() { # eshopts_pop # @CODE eshopts_push() { + # Save both "shopt" and "set -o" option sets, because otherwise + # restoring posix would disable expand_aliases by side effect. #662586 + estack_push eshopts "$(shopt -p -o) $(shopt -p)" if [[ $1 == -[su] ]] ; then - estack_push eshopts "$(shopt -p)" - [[ $# -eq 0 ]] && return 0 + [[ $# -le 1 ]] && return 0 shopt "$@" || die "${FUNCNAME}: bad options to shopt: $*" else - estack_push eshopts "$(shopt -p -o)" [[ $# -eq 0 ]] && return 0 set "$@" || die "${FUNCNAME}: bad options to set: $*" fi @@ -196,17 +198,5 @@ eumask_pop() { umask ${s} || die "${FUNCNAME}: sanity: could not restore umask: ${s}" } -# @FUNCTION: isdigit -# @USAGE: [more numbers] -# @DESCRIPTION: -# Return true if all arguments are numbers. -isdigit() { - local d - for d ; do - [[ ${d:-bad} == *[!0-9]* ]] && return 1 - done - return 0 -} - _ESTACK_ECLASS=1 fi #_ESTACK_ECLASS From 239110c99a5e1e0d0be77f45651eb9c561d71886 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:37:30 +0100 Subject: [PATCH 24/53] eclass/gnuconfig: Sync with gentoo It's from gentoo commit d3f4cba0102a542650af7f49537a7fcddcd1bd89. --- .../portage-stable/eclass/gnuconfig.eclass | 77 +++++++++++++------ 1 file changed, 54 insertions(+), 23 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass b/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass index f43647ef6f..58bdcfd660 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass @@ -1,37 +1,47 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# -# THIS ECLASS IS DEAD: It has been integrated into portage -# -# Author: Will Woods -# + +# @ECLASS: gnuconfig.eclass +# @MAINTAINER: +# Sam James +# @AUTHOR: +# Will Woods +# @SUPPORTED_EAPIS: 5 6 7 8 +# @BLURB: Refresh bundled gnuconfig files (config.guess, config.sub) +# @DESCRIPTION: # This eclass is used to automatically update files that typically come with # automake to the newest version available on the system. The most common use # of this is to update config.guess and config.sub when configure dies from # misguessing your canonical system name (CHOST). It can also be used to update # other files that come with automake, e.g. depcomp, mkinstalldirs, etc. # -# usage: gnuconfig_update [file1 file2 ...] + +case ${EAPI:-0} in + 5|6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_GNUCONFIG_ECLASS} ]] ; then + _GNUCONFIG_CLASS=1 + +BDEPEND="sys-devel/gnuconfig" + +[[ ${EAPI} == [56] ]] && DEPEND="${BDEPEND}" + +# @FUNCTION: gnuconfig_update +# @USAGE: [file1 file2 ...] +# @DESCRIPTION: # if called without arguments, config.guess and config.sub will be updated. # All files in the source tree ($S) with the given name(s) will be replaced # with the newest available versions chosen from the list of locations in # gnuconfig_findnewest(), below. # # gnuconfig_update should generally be called from src_unpack() - - -DEPEND="sys-devel/gnuconfig" - +# # Wrapper function for gnuconfig_do_update. If no arguments are given, update # config.sub and config.guess (old default behavior), otherwise update the # named files. gnuconfig_update() { - -# hmm some packages (like binutils gcc glibc) still use this ... -# echo -# ewarn "QA Notice: Please stop using me, portage updates files for you." -# echo - local startdir # declared here ... used in gnuconfig_do_update if [[ $1 == /* ]] ; then @@ -50,6 +60,9 @@ gnuconfig_update() { return $? } +# @FUNCTION: gnuconfig_do_update +# @INTERNAL +# @DESCRIPTION: # Copy the newest available version of specified files over any old ones in the # source dir. This function shouldn't be called directly - use gnuconfig_update # @@ -83,16 +96,34 @@ gnuconfig_do_update() { return 0 } -# this searches the standard locations for the newest config.{sub|guess}, and +# @FUNCTION: gnuconfig_findnewest +# @INTERNAL +# @DESCRIPTION: +# This searches the standard locations for the newest config.{sub|guess}, and # returns the directory where they can be found. gnuconfig_findnewest() { - local locations=( - "${EPREFIX}"/usr/share/misc/config.sub - "${EPREFIX}"/usr/share/gnuconfig/config.sub - "${EPREFIX}"/usr/share/automake*/config.sub - "${EPREFIX}"/usr/share/libtool/config.sub + local locations=() + local prefix + + case ${EAPI} in + 5|6) + prefix="${EPREFIX}" + ;; + *) + prefix="${BROOT}" + ;; + esac + + locations+=( + "${prefix}"/usr/share/misc/config.sub + "${prefix}"/usr/share/gnuconfig/config.sub + "${prefix}"/usr/share/automake*/config.sub + "${prefix}"/usr/share/libtool/config.sub ) + grep -s '^timestamp' "${locations[@]}" | \ sort -r -n -t\' -k2 | \ sed -n '1{s,/config.sub:.*$,,;p;q}' } + +fi From 6c07488fe0f792a91b3ab1e7959e752df8c43e36 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:39:08 +0100 Subject: [PATCH 25/53] eclass/gnuconfig: Support EAPI 0 and 4 --- .../portage-stable/eclass/gnuconfig.eclass | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass b/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass index 58bdcfd660..54bba31e4c 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass @@ -1,12 +1,14 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0 and 4. + # @ECLASS: gnuconfig.eclass # @MAINTAINER: # Sam James # @AUTHOR: # Will Woods -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 0 4 5 6 7 8 # @BLURB: Refresh bundled gnuconfig files (config.guess, config.sub) # @DESCRIPTION: # This eclass is used to automatically update files that typically come with @@ -17,7 +19,7 @@ # case ${EAPI:-0} in - 5|6|7|8) ;; + 0|4|5|6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -26,7 +28,7 @@ if [[ -z ${_GNUCONFIG_ECLASS} ]] ; then BDEPEND="sys-devel/gnuconfig" -[[ ${EAPI} == [56] ]] && DEPEND="${BDEPEND}" +[[ ${EAPI:-0} == [0456] ]] && DEPEND="${BDEPEND}" # @FUNCTION: gnuconfig_update # @USAGE: [file1 file2 ...] @@ -105,8 +107,8 @@ gnuconfig_findnewest() { local locations=() local prefix - case ${EAPI} in - 5|6) + case ${EAPI:-0} in + 0|4|5|6) prefix="${EPREFIX}" ;; *) From 568c87ae13e4c72ae06f7c2eef226ad204ed8b9b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:39:44 +0100 Subject: [PATCH 26/53] eclass/libtool: Sync with gentoo It's from gentoo commit 04040326aedc27bd5a8fbe4788ee81c853bbe8d8. --- .../third_party/portage-stable/eclass/libtool.eclass | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass b/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass index 4565c8a8f6..a38f415882 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: libtool.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: quickly update bundled libtool code # @DESCRIPTION: # This eclass patches ltmain.sh distributed with libtoolized packages with the @@ -18,8 +18,8 @@ if [[ -z ${_LIBTOOL_ECLASS} ]]; then _LIBTOOL_ECLASS=1 case ${EAPI:-0} in - 0|1|2|3|4|5|6) DEPEND=">=app-portage/elt-patches-20170815" ;; - 7) BDEPEND=">=app-portage/elt-patches-20170815" ;; + 5|6) DEPEND=">=app-portage/elt-patches-20170815" ;; + 7|8) BDEPEND=">=app-portage/elt-patches-20170815" ;; *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; esac @@ -43,7 +43,4 @@ elibtoolize() { eltpatch "${@}" || die "eltpatch failed" } -uclibctoolize() { die "Use elibtoolize"; } -darwintoolize() { die "Use elibtoolize"; } - fi From afe2775187fa12f366ea7f9d95b514a612675295 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:40:37 +0100 Subject: [PATCH 27/53] eclass/libtool: Support EAPI 0 and 4 --- .../src/third_party/portage-stable/eclass/libtool.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass b/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass index a38f415882..e70fd715ae 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass @@ -1,10 +1,12 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0 and 4. + # @ECLASS: libtool.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 0 4 5 6 7 8 # @BLURB: quickly update bundled libtool code # @DESCRIPTION: # This eclass patches ltmain.sh distributed with libtoolized packages with the @@ -18,7 +20,7 @@ if [[ -z ${_LIBTOOL_ECLASS} ]]; then _LIBTOOL_ECLASS=1 case ${EAPI:-0} in - 5|6) DEPEND=">=app-portage/elt-patches-20170815" ;; + 0|4|5|6) DEPEND=">=app-portage/elt-patches-20170815" ;; 7|8) BDEPEND=">=app-portage/elt-patches-20170815" ;; *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; esac From e6c6bb3e787e8ae4e4eed89e6ef794a79444388c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:41:05 +0100 Subject: [PATCH 28/53] eclass/ltprune: Sync with gentoo It's from gentoo commit 38092efc6cdf12267c794a4f9b8a4a656d27af6c. --- .../src/third_party/portage-stable/eclass/ltprune.eclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/ltprune.eclass b/sdk_container/src/third_party/portage-stable/eclass/ltprune.eclass index d8e93b6fb4..e7d8cd2c4f 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/ltprune.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/ltprune.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ltprune.eclass @@ -6,12 +6,13 @@ # Michał Górny # @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: Smart .la file pruning +# @DEPRECATED: none # @DESCRIPTION: # A function to locate and remove unnecessary .la files. # # Discouraged. Whenever possible, please use much simpler: # @CODE -# find "${D}" -name '*.la' -type f -delete || die +# find "${ED}" -name '*.la' -delete || die # @CODE if [[ -z ${_LTPRUNE_ECLASS} ]]; then From a3c22cc2ab96f94c13ab5b0d677735b03e8e9010 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:41:58 +0100 Subject: [PATCH 29/53] eclass/multilib: Sync with gentoo It's from gentoo commit f64708850264e93cb54c8857d6eb459a4faf274e. --- .../portage-stable/eclass/multilib.eclass | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass b/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass index 430fb865b0..483f8d10c7 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass @@ -9,13 +9,11 @@ # @DESCRIPTION: # This eclass is for all functions pertaining to handling multilib configurations. -# Flatcar: we still have some packages that use old EAPI, revert this -# change when we update those packages. -#case ${EAPI:-0} in -# # EAPI=0 is still used by crossdev, bug #797367 -# 0|5|6|7|8) ;; -# *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; -#esac +case ${EAPI:-0} in + # EAPI=0 is still used by crossdev, bug #797367 + 0|5|6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac if [[ -z ${_MULTILIB_ECLASS} ]]; then _MULTILIB_ECLASS=1 @@ -56,8 +54,7 @@ has_multilib_profile() { # fall back on old behavior. Any profile that has these set should also # depend on a newer version of portage (not yet released) which uses these # over CONF_LIBDIR in econf, dolib, etc... -# Flatcar: Support older EAPIs for now. -if [[ ${EAPI} == [0345] ]] ; then +if [[ ${EAPI} == [05] ]] ; then get_libdir() { local CONF_LIBDIR if [ -n "${CONF_LIBDIR_OVERRIDE}" ] ; then From 325657cc4a39e54213ce81076a7ded735f840757 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:45:50 +0100 Subject: [PATCH 30/53] eclass/multilib: Support EAPI 4 --- .../src/third_party/portage-stable/eclass/multilib.eclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass b/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass index 483f8d10c7..53f6eba63a 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass @@ -1,17 +1,19 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 4. + # @ECLASS: multilib.eclass # @MAINTAINER: # toolchain@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 4 5 6 7 8 # @BLURB: This eclass is for all functions pertaining to handling multilib configurations. # @DESCRIPTION: # This eclass is for all functions pertaining to handling multilib configurations. case ${EAPI:-0} in # EAPI=0 is still used by crossdev, bug #797367 - 0|5|6|7|8) ;; + 0|4|5|6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -54,7 +56,7 @@ has_multilib_profile() { # fall back on old behavior. Any profile that has these set should also # depend on a newer version of portage (not yet released) which uses these # over CONF_LIBDIR in econf, dolib, etc... -if [[ ${EAPI} == [05] ]] ; then +if [[ ${EAPI} == [045] ]] ; then get_libdir() { local CONF_LIBDIR if [ -n "${CONF_LIBDIR_OVERRIDE}" ] ; then From 9898cbdf5d516a7c11e797c047e9ecfe50433dab Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:43:17 +0100 Subject: [PATCH 31/53] eclass/multilib-build: Sync with gentoo It's from gentoo commit 63636277fcee0a5fd90299253aa870af989f895d. --- .../eclass/multilib-build.eclass | 44 ++++++++----------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass b/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass index 00f02df98f..17cd7da0d1 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass @@ -1,12 +1,13 @@ -# Copyright 2013-2019 Gentoo Authors +# Copyright 2013-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: multilib-build.eclass # @MAINTAINER: -# gx86-multilib team +# Michał Górny # @AUTHOR: # Author: Michał Górny -# @SUPPORTED_EAPIS: 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 8 +# @PROVIDES: multibuild # @BLURB: flags and utility functions for building multilib packages # @DESCRIPTION: # The multilib-build.eclass exports USE flags and utility functions @@ -17,15 +18,15 @@ # dependencies shall use the USE dependency string in ${MULTILIB_USEDEP} # to properly request multilib enabled. -if [[ ! ${_MULTILIB_BUILD} ]]; then - -# EAPI=4 is required for meaningful MULTILIB_USEDEP. -case ${EAPI:-0} in - 4|5|6|7) ;; - *) die "EAPI=${EAPI} is not supported" ;; +case ${EAPI} in + 5|6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -[[ ${EAPI} == [45] ]] && inherit eutils +if [[ -z ${_MULTILIB_BUILD} ]]; then +_MULTILIB_BUILD=1 + +[[ ${EAPI} == 5 ]] && inherit eutils inherit multibuild multilib # @ECLASS-VARIABLE: _MULTILIB_FLAGS @@ -47,8 +48,6 @@ _MULTILIB_FLAGS=( abi_mips_o32:o32 # abi_ppc_32:ppc,ppc_aix,ppc_macos # abi_ppc_64:ppc64 - abi_riscv_lp64d:lp64d - abi_riscv_lp64:lp64 abi_s390_32:s390 abi_s390_64:s390x ) @@ -79,6 +78,7 @@ readonly _MULTILIB_FLAGS # @CODE # @ECLASS-VARIABLE: MULTILIB_USEDEP +# @OUTPUT_VARIABLE # @DESCRIPTION: # The USE-dependency to be used on dependencies (libraries) needing # to support multilib as well. @@ -90,7 +90,7 @@ readonly _MULTILIB_FLAGS # @CODE # @ECLASS-VARIABLE: MULTILIB_ABI_FLAG -# @DEFAULT_UNSET +# @OUTPUT_VARIABLE # @DESCRIPTION: # The complete ABI name. Resembles the USE flag name. # @@ -251,7 +251,7 @@ multilib_parallel_foreach_abi() { multilib_for_best_abi() { debug-print-function ${FUNCNAME} "${@}" - [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead" + [[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead" eqawarn "QA warning: multilib_for_best_abi() function is deprecated and should" eqawarn "not be used. The multilib_is_native_abi() check may be used instead." @@ -320,6 +320,7 @@ multilib_copy_sources() { } # @ECLASS-VARIABLE: MULTILIB_WRAPPED_HEADERS +# @DEFAULT_UNSET # @DESCRIPTION: # A list of headers to wrap for multilib support. The listed headers # will be moved to a non-standard location and replaced with a file @@ -342,6 +343,7 @@ multilib_copy_sources() { # @CODE # @ECLASS-VARIABLE: MULTILIB_CHOST_TOOLS +# @DEFAULT_UNSET # @DESCRIPTION: # A list of tool executables to preserve for each multilib ABI. # The listed executables will be renamed to ${CHOST}-${basename}, @@ -369,8 +371,8 @@ multilib_copy_sources() { # MULTILIB_CHOST_TOOLS=( # /usr/bin/foo-config # ) - # @CODE + # @FUNCTION: multilib_prepare_wrappers # @USAGE: [] # @DESCRIPTION: @@ -488,14 +490,6 @@ multilib_prepare_wrappers() { # elif(_MIPS_SIM == _ABIO32) /* o32 */ # error "abi_mips_o32 not supported by the package." # endif -#elif defined(__riscv) -# if defined(__riscv_float_abi_double) -# error "abi_riscv_lp64d not supported by the package." -# elif defined(__riscv_float_abi_single) -# error "abi_riscv_lp64f not supported by the package." -# else -# error "abi_riscv_lp64 not supported by the package." -# endif #elif defined(__sparc__) # if defined(__arch64__) # error "abi_sparc_64 not supported by the package." @@ -595,7 +589,7 @@ multilib_is_native_abi() { multilib_build_binaries() { debug-print-function ${FUNCNAME} "${@}" - [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead" + [[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead" eqawarn "QA warning: multilib_build_binaries is deprecated. Please use the equivalent" eqawarn "multilib_is_native_abi function instead." @@ -670,7 +664,6 @@ multilib_native_with() { # of (or 'no' if unspecified) and . Arguments # are the same as for usex in the EAPI. # -# Note: in EAPI 4 you need to inherit eutils to use this function. multilib_native_usex() { if multilib_is_native_abi; then usex "${@}" @@ -679,5 +672,4 @@ multilib_native_usex() { fi } -_MULTILIB_BUILD=1 fi From d38d91ad6c4ae5eebbf893e4c2f39e17000cd733 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:45:37 +0100 Subject: [PATCH 32/53] eclass/multilib-build: Support EAPI 4 --- .../portage-stable/eclass/multilib-build.eclass | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass b/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass index 17cd7da0d1..c4c33a92b9 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass @@ -1,12 +1,14 @@ # Copyright 2013-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 4. + # @ECLASS: multilib-build.eclass # @MAINTAINER: # Michał Górny # @AUTHOR: # Author: Michał Górny -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 4 5 6 7 8 # @PROVIDES: multibuild # @BLURB: flags and utility functions for building multilib packages # @DESCRIPTION: @@ -19,14 +21,14 @@ # to properly request multilib enabled. case ${EAPI} in - 5|6|7|8) ;; + 4|5|6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac if [[ -z ${_MULTILIB_BUILD} ]]; then _MULTILIB_BUILD=1 -[[ ${EAPI} == 5 ]] && inherit eutils +[[ ${EAPI} == [45] ]] && inherit eutils inherit multibuild multilib # @ECLASS-VARIABLE: _MULTILIB_FLAGS @@ -251,7 +253,7 @@ multilib_parallel_foreach_abi() { multilib_for_best_abi() { debug-print-function ${FUNCNAME} "${@}" - [[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead" + [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead" eqawarn "QA warning: multilib_for_best_abi() function is deprecated and should" eqawarn "not be used. The multilib_is_native_abi() check may be used instead." @@ -589,7 +591,7 @@ multilib_is_native_abi() { multilib_build_binaries() { debug-print-function ${FUNCNAME} "${@}" - [[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead" + [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead" eqawarn "QA warning: multilib_build_binaries is deprecated. Please use the equivalent" eqawarn "multilib_is_native_abi function instead." @@ -664,6 +666,7 @@ multilib_native_with() { # of (or 'no' if unspecified) and . Arguments # are the same as for usex in the EAPI. # +# Note: in EAPI 4 you need to inherit eutils to use this function. multilib_native_usex() { if multilib_is_native_abi; then usex "${@}" From e7e61efa9814d0b6c9d6669f37638d126ba3ac25 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:46:50 +0100 Subject: [PATCH 33/53] eclass/multibuild: Sync with gentoo It's from gentoo commit 991ee6a9b2a150cfbe0bdd001cba00788da594f7. --- .../portage-stable/eclass/multibuild.eclass | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/multibuild.eclass b/sdk_container/src/third_party/portage-stable/eclass/multibuild.eclass index 169c0fa008..37568ebf87 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/multibuild.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/multibuild.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: multibuild.eclass @@ -6,7 +6,7 @@ # Michał Górny # @AUTHOR: # Author: Michał Górny -# @SUPPORTED_EAPIS: 4 5 6 7 +# @SUPPORTED_EAPIS: 4 5 6 7 8 # @BLURB: A generic eclass for building multiple variants of packages. # @DESCRIPTION: # The multibuild eclass aims to provide a generic framework for building @@ -14,10 +14,10 @@ # implementations). case "${EAPI:-0}" in - 0|1|2|3) + [0-3]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; - 4|5|6|7) + [4-8]) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" @@ -27,6 +27,7 @@ esac if [[ ! ${_MULTIBUILD} ]]; then # @ECLASS-VARIABLE: MULTIBUILD_VARIANTS +# @REQUIRED # @DESCRIPTION: # An array specifying all enabled variants which multibuild_foreach* # can execute the process for. @@ -43,6 +44,7 @@ if [[ ! ${_MULTIBUILD} ]]; then # @CODE # @ECLASS-VARIABLE: MULTIBUILD_VARIANT +# @OUTPUT_VARIABLE # @DESCRIPTION: # The current variant which the function was executed for. # @@ -52,6 +54,7 @@ if [[ ! ${_MULTIBUILD} ]]; then # @CODE # @ECLASS-VARIABLE: MULTIBUILD_ID +# @OUTPUT_VARIABLE # @DESCRIPTION: # The unique identifier for a multibuild run. In a simple run, it is # equal to MULTIBUILD_VARIANT. In a nested multibuild environment, it @@ -65,6 +68,8 @@ if [[ ! ${_MULTIBUILD} ]]; then # @CODE # @ECLASS-VARIABLE: BUILD_DIR +# @OUTPUT_VARIABLE +# @DEFAULT_UNSET # @DESCRIPTION: # The current build directory. In global scope, it is supposed # to contain an 'initial' build directory. If unset, ${S} is used. From b2509beaaa7b5626602355cf9e3b731d27bec12a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:49:18 +0100 Subject: [PATCH 34/53] eclass/optfeature: Sync with gentoo It's from gentoo commit 3b2d830d52a9e6bee1a803566b360b28aa759c9d. --- .../portage-stable/eclass/optfeature.eclass | 80 ++++++++++++++++--- 1 file changed, 71 insertions(+), 9 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass b/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass index 1943ae37bf..f9870e0473 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass @@ -1,19 +1,72 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: optfeature.eclass # @MAINTAINER: # base-system@gentoo.org +# @SUPPORTED_EAPIS: 6 7 8 # @BLURB: Advertise optional functionality that might be useful to users -case ${EAPI:-0} in - [0-7]) ;; - *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;; +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;; esac if [[ -z ${_OPTFEATURE_ECLASS} ]]; then _OPTFEATURE_ECLASS=1 +# @ECLASS-VARIABLE: _OPTFEATURE_DEFAULT_HEADER +# @INTERNAL +# @DESCRIPTION: +# Default header printed ahead of optfeature output. Can be overridden +# by calling optfeature_header function. Will not be displayed if all optional +# dependencies are present. +_OPTFEATURE_DEFAULT_HEADER="Install additional packages for optional runtime features:" + +readonly _OPTFEATURE_DEFAULT_HEADER + +# @ECLASS-VARIABLE: _OPTFEATURE_HEADER +# @INTERNAL +# @DESCRIPTION: +# Default empty. Custom header printed ahead of optfeature output. +# Set by calling optfeature_header function with the desired output, or reset +# by optfeature_header without argument. Will not be displayed if all optional +# dependencies are present. +_OPTFEATURE_HEADER= + +# @ECLASS-VARIABLE: _OPTFEATURE_DOHEADER +# @INTERNAL +# @DESCRIPTION: +# If true, print header ahead of the first optfeature output. +_OPTFEATURE_DOHEADER=true + +# @FUNCTION: optfeature_header +# @USAGE: [custom header for follow-up optfeature calls] +# @DESCRIPTION: +# Set a custom header for follow-up optfeature calls, or reset to default +# header by calling it without argument. This can not only be used to customize +# the header but also to distinguish optfeature "groups", e.g. to list a number +# of different possible database backends, and then a number of optional +# regular runtime features. +# +# The following snippet will leave the default header untouched for the first +# two optfeature calls. Then a custom header is set that is going to be +# displayed in case dev-db/a or dev-db/b are not installed. +# @CODE +# pkg_postinst() { +# optfeature "foo support" app-misc/foo +# optfeature "bar support" app-misc/bar +# optfeature_header "Install optional database backends:" +# optfeature "a DB backend" dev-db/a +# optfeature "b DB backend" dev-db/b +# } +# @CODE +optfeature_header() { + debug-print-function ${FUNCNAME} "$@" + _OPTFEATURE_HEADER="${1}" + _OPTFEATURE_DOHEADER=true +} + # @FUNCTION: optfeature # @USAGE: [other atoms] # @DESCRIPTION: @@ -24,19 +77,23 @@ _OPTFEATURE_ECLASS=1 # app-misc/bar or app-misc/baz[bar] for optional bar support # and either both app-misc/a and app-misc/b or app-misc/c for alphabet support. # @CODE -# optfeature "foo support" app-misc/foo -# optfeature "bar support" app-misc/bar app-misc/baz[bar] -# optfeature "alphabet support" "app-misc/a app-misc/b" app-misc/c +# pkg_postinst() { +# optfeature "foo support" app-misc/foo +# optfeature "bar support" app-misc/bar app-misc/baz[bar] +# optfeature "alphabet support" "app-misc/a app-misc/b" app-misc/c +# } # @CODE optfeature() { debug-print-function ${FUNCNAME} "$@" local i j msg + local -a arr local desc=$1 local flag=0 shift for i; do - for j in ${i}; do + read -r -d '' -a arr <<<"${i}" + for j in "${arr[@]}"; do if has_version "${j}"; then flag=1 else @@ -49,9 +106,14 @@ optfeature() { fi done if [[ ${flag} -eq 0 ]]; then + if [[ ${_OPTFEATURE_DOHEADER} == true ]]; then + elog ${_OPTFEATURE_HEADER:-${_OPTFEATURE_DEFAULT_HEADER}} + _OPTFEATURE_DOHEADER=false + fi for i; do + read -r -d '' -a arr <<<"${i}" msg=" " - for j in ${i}; do + for j in "${arr[@]}"; do msg+=" ${j} and" done msg="${msg:0: -4} for ${desc}" From bc4a6d30a8034aa32e6a34b25a5f4140454dde31 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:50:37 +0100 Subject: [PATCH 35/53] eclass/optfeature: Support EAPI 0, 4 and 5 --- .../third_party/portage-stable/eclass/optfeature.eclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass b/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass index f9870e0473..250a995901 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass @@ -1,14 +1,16 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0, 4 and 5. + # @ECLASS: optfeature.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 0 4 5 6 7 8 # @BLURB: Advertise optional functionality that might be useful to users -case ${EAPI} in - 6|7|8) ;; +case ${EAPI:-0} in + 0|4|5|6|7|8) ;; *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;; esac From 9522ecbb6dd614da389ebddd6cc3539b821b96a6 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 20 Dec 2021 13:08:50 +0100 Subject: [PATCH 36/53] eclass/ninja-utils: Sync with gentoo It's from gentoo commit cec274bcb2fde829ddf72c3a06ffad14d4adb373. --- .../portage-stable/eclass/ninja-utils.eclass | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/ninja-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/ninja-utils.eclass index ca8d67191d..c5e195a9f8 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/ninja-utils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/ninja-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ninja-utils.eclass @@ -8,7 +8,7 @@ # @AUTHOR: # Michał Górny # Mike Gilbert -# @SUPPORTED_EAPIS: 2 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: common bits to run dev-util/ninja builder # @DESCRIPTION: # This eclass provides a single function -- eninja -- that can be used @@ -18,15 +18,14 @@ # be used indirectly by the eclasses for other build systems (CMake, # Meson). -if [[ -z ${_NINJA_UTILS_ECLASS} ]]; then - -case ${EAPI:-0} in - 0|1|3) die "EAPI=${EAPI:-0} is not supported (too old)";; - # copied from cmake-utils - 2|4|5|6|7) ;; - *) die "EAPI=${EAPI} is not yet supported" ;; +case ${EAPI} in + 5|6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac +if [[ -z ${_NINJA_UTILS_ECLASS} ]]; then +_NINJA_UTILS_ECLASS=1 + # @ECLASS-VARIABLE: NINJAOPTS # @DEFAULT_UNSET # @DESCRIPTION: @@ -44,7 +43,7 @@ inherit multiprocessing # with EAPI 6, it also supports being called via 'nonfatal'. eninja() { local nonfatal_args=() - [[ ${EAPI:-0} != [245] ]] && nonfatal_args+=( -n ) + [[ ${EAPI} != 5 ]] && nonfatal_args+=( -n ) if [[ -z ${NINJAOPTS+set} ]]; then NINJAOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0)" @@ -54,5 +53,4 @@ eninja() { "$@" || die "${nonfatal_args[@]}" "${*} failed" } -_NINJA_UTILS_ECLASS=1 fi From 3ba5570ef357eca1b99025a61bead5e6700d2174 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:50:24 +0100 Subject: [PATCH 37/53] eclass/ninja-utils: Support EAPI 4 --- .../third_party/portage-stable/eclass/ninja-utils.eclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/ninja-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/ninja-utils.eclass index c5e195a9f8..e69244b39f 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/ninja-utils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/ninja-utils.eclass @@ -1,6 +1,8 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 4. + # @ECLASS: ninja-utils.eclass # @MAINTAINER: # Michał Górny @@ -8,7 +10,7 @@ # @AUTHOR: # Michał Górny # Mike Gilbert -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 4 5 6 7 8 # @BLURB: common bits to run dev-util/ninja builder # @DESCRIPTION: # This eclass provides a single function -- eninja -- that can be used @@ -19,7 +21,7 @@ # Meson). case ${EAPI} in - 5|6|7|8) ;; + 4|5|6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -43,7 +45,7 @@ inherit multiprocessing # with EAPI 6, it also supports being called via 'nonfatal'. eninja() { local nonfatal_args=() - [[ ${EAPI} != 5 ]] && nonfatal_args+=( -n ) + [[ ${EAPI} != [45] ]] && nonfatal_args+=( -n ) if [[ -z ${NINJAOPTS+set} ]]; then NINJAOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0)" From b5d401dc6b25d865d0b84bd827d707838c720935 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:51:23 +0100 Subject: [PATCH 38/53] eclass/preserve-libs: Sync with gentoo It's from gentoo commit 6762a2adb04570a3d4aff01c519cef323a3622df. --- .../portage-stable/eclass/preserve-libs.eclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/preserve-libs.eclass b/sdk_container/src/third_party/portage-stable/eclass/preserve-libs.eclass index 548c6411fc..da13e7943a 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/preserve-libs.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/preserve-libs.eclass @@ -1,11 +1,17 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: preserve-libs.eclass # @MAINTAINER: # base-system@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: preserve libraries after SONAME changes +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_PRESERVE_LIBS_ECLASS} ]]; then _PRESERVE_LIBS_ECLASS=1 From 6b3e575b5097171ac483967949b1a857f7b165cb Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:53:00 +0100 Subject: [PATCH 39/53] eclass/preserve-libs: Support EAPI 0 and 4 --- .../third_party/portage-stable/eclass/preserve-libs.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/preserve-libs.eclass b/sdk_container/src/third_party/portage-stable/eclass/preserve-libs.eclass index da13e7943a..8866ff3ba0 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/preserve-libs.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/preserve-libs.eclass @@ -1,14 +1,16 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0 and 4. + # @ECLASS: preserve-libs.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 0 4 5 6 7 # @BLURB: preserve libraries after SONAME changes case ${EAPI:-0} in - [567]) ;; + [04567]) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac From dc7d1bf238eab06950e87d0635f6b2ef787cba25 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:56:02 +0100 Subject: [PATCH 40/53] eclass/strip-linguas: Add from gentoo It's from gentoo commit 48651ecc0d4444536ed15b06736e331238b6f92b. --- .../eclass/strip-linguas.eclass | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/eclass/strip-linguas.eclass diff --git a/sdk_container/src/third_party/portage-stable/eclass/strip-linguas.eclass b/sdk_container/src/third_party/portage-stable/eclass/strip-linguas.eclass new file mode 100644 index 0000000000..718341b4a6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/eclass/strip-linguas.eclass @@ -0,0 +1,67 @@ +# Copyright 2004-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: strip-linguas.eclass +# @MAINTAINER: +# Ulrich Müller +# @AUTHOR: +# Mike Frysinger +# @SUPPORTED_EAPIS: 5 6 7 8 +# @BLURB: convenience function for LINGUAS support + +case ${EAPI} in + 5|6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_STRIP_LINGUAS_ECLASS} ]]; then +_STRIP_LINGUAS_ECLASS=1 + +# @FUNCTION: strip-linguas +# @USAGE: [|<-i|-u> ] +# @DESCRIPTION: +# Make sure that LINGUAS only contains languages that a package can +# support. The first form allows you to specify a list of LINGUAS. +# The -i builds a list of po files found in all the directories and uses +# the intersection of the lists. The -u builds a list of po files found +# in all the directories and uses the union of the lists. +strip-linguas() { + local d f ls newls nols + + if [[ $1 == "-i" ]] || [[ $1 == "-u" ]]; then + local op=$1; shift + ls=$(find "$1" -name '*.po' -exec basename {} .po ';'); shift + for d; do + if [[ ${op} == "-u" ]]; then + newls=${ls} + else + newls="" + fi + for f in $(find "${d}" -name '*.po' -exec basename {} .po ';'); do + if [[ ${op} == "-i" ]]; then + has ${f} ${ls} && newls+=" ${f}" + else + has ${f} ${ls} || newls+=" ${f}" + fi + done + ls=${newls} + done + else + ls="$@" + fi + + nols="" + newls="" + for f in ${LINGUAS}; do + if has ${f} ${ls}; then + newls+=" ${f}" + else + nols+=" ${f}" + fi + done + [[ -n ${nols} ]] \ + && einfo "Sorry, but ${PN} does not support the LINGUAS:" ${nols} + export LINGUAS=${newls:1} +} + +fi From f34c6b178e9c47caa05580c9f2e6b7de85f75b52 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:57:46 +0100 Subject: [PATCH 41/53] eclass/strip-linguas: Support EAPI 0 and 4 --- .../portage-stable/eclass/strip-linguas.eclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/strip-linguas.eclass b/sdk_container/src/third_party/portage-stable/eclass/strip-linguas.eclass index 718341b4a6..2513b2e608 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/strip-linguas.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/strip-linguas.eclass @@ -1,16 +1,18 @@ # Copyright 2004-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0 and 4. + # @ECLASS: strip-linguas.eclass # @MAINTAINER: # Ulrich Müller # @AUTHOR: # Mike Frysinger -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 0 4 5 6 7 8 # @BLURB: convenience function for LINGUAS support -case ${EAPI} in - 5|6|7|8) ;; +case ${EAPI:-0} in + 0|4|5|6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac From d410c427d4ffe6729b19fce581bea687faefc620 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:57:55 +0100 Subject: [PATCH 42/53] eclass/vcs-clean: Sync with gentoo It's from gentoo commit 649d76b85a8dfd316c6416c0bb44b9ea4e16f11a. --- .../portage-stable/eclass/vcs-clean.eclass | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass b/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass index 649a9e3039..89f6b73218 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: vcs-clean.eclass @@ -6,8 +6,17 @@ # base-system@gentoo.org # @AUTHOR: # Benedikt Böhm +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: helper functions to remove VCS directories +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_VCS_CLEAN_ECLASS} ]] ; then +_VCS_CLEAN_ECLASS=1 + # @FUNCTION: ecvs_clean # @USAGE: [list of dirs] # @DESCRIPTION: @@ -38,3 +47,5 @@ egit_clean() { [[ $# -eq 0 ]] && set -- . find "$@" -type d -name '.git*' -prune -exec rm -rf '{}' + } + +fi From 1737fd14c5f37174271bfc6fea6acc31870ce821 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:58:33 +0100 Subject: [PATCH 43/53] eclass/vcs-clean: Support EAPI 0 and 4 --- .../src/third_party/portage-stable/eclass/vcs-clean.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass b/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass index 89f6b73218..4e01a72510 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass @@ -1,16 +1,18 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0 and 4. + # @ECLASS: vcs-clean.eclass # @MAINTAINER: # base-system@gentoo.org # @AUTHOR: # Benedikt Böhm -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 0 4 5 6 7 # @BLURB: helper functions to remove VCS directories case ${EAPI:-0} in - [567]) ;; + [04567]) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac From f99ffcd275af4a45a86101306bedf3d595f9fe3b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:58:54 +0100 Subject: [PATCH 44/53] eclass/wrapper: Add from gentoo It's from gentoo commit f4a84c180c096ff27a077e3fc6475b99228ae9f9. --- .../portage-stable/eclass/wrapper.eclass | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/eclass/wrapper.eclass diff --git a/sdk_container/src/third_party/portage-stable/eclass/wrapper.eclass b/sdk_container/src/third_party/portage-stable/eclass/wrapper.eclass new file mode 100644 index 0000000000..399c7cc269 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/eclass/wrapper.eclass @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: wrapper.eclass +# @MAINTAINER: +# base-system@gentoo.org +# @BLURB: create a shell wrapper script + +if [[ -z ${_WRAPPER_ECLASS} ]]; then +_WRAPPER_ECLASS=1 + +# @FUNCTION: make_wrapper +# @USAGE: [chdir] [libpaths] [installpath] +# @DESCRIPTION: +# Create a shell wrapper script named wrapper in installpath +# (defaults to the bindir) to execute target (default of wrapper) +# by first optionally setting LD_LIBRARY_PATH to the colon-delimited +# libpaths followed by optionally changing directory to chdir. +make_wrapper() { + local wrapper=$1 bin=$2 chdir=$3 libdir=$4 path=$5 + local tmpwrapper="${T}/tmp.wrapper.${wrapper##*/}" + has "${EAPI:-0}" 0 1 2 && local EPREFIX="" + + ( + echo '#!/bin/sh' + if [[ -n ${libdir} ]] ; then + local var + if [[ ${CHOST} == *-darwin* ]] ; then + var=DYLD_LIBRARY_PATH + else + var=LD_LIBRARY_PATH + fi + cat <<-EOF + if [ "\${${var}+set}" = "set" ] ; then + export ${var}="\${${var}}:${EPREFIX}${libdir}" + else + export ${var}="${EPREFIX}${libdir}" + fi + EOF + fi + [[ -n ${chdir} ]] && printf 'cd "%s" &&\n' "${EPREFIX}${chdir}" + # We don't want to quote ${bin} so that people can pass complex + # things as ${bin} ... "./someprog --args" + printf 'exec %s "$@"\n' "${bin/#\//${EPREFIX}/}" + ) > "${tmpwrapper}" + chmod go+rx "${tmpwrapper}" + + if [[ -n ${path} ]] ; then + ( + exeopts -m 0755 + exeinto "${path}" + newexe "${tmpwrapper}" "${wrapper}" + ) || die + else + newbin "${tmpwrapper}" "${wrapper}" || die + fi +} + +fi From d69116590fcde060de2dfd9bee69dc911e2600c0 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:59:55 +0100 Subject: [PATCH 45/53] eclass/xdg-utils: Sync with gentoo It's from gentoo commit 99c24c9cd97877fe0a052f028061c177e066360c. --- .../portage-stable/eclass/xdg-utils.eclass | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass index f5121830d8..a834d5d3ac 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass @@ -1,12 +1,13 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 2004-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: xdg-utils.eclass # @MAINTAINER: # gnome@gentoo.org +# freedesktop-bugs@gentoo.org # @AUTHOR: # Original author: Gilles Dartiguelongue -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: Auxiliary functions commonly used by XDG compliant packages. # @DESCRIPTION: # This eclass provides a set of auxiliary functions needed by most XDG @@ -16,9 +17,9 @@ # * XDG .desktop files cache management # * XDG mime information database management -case "${EAPI:-0}" in - 0|1|2|3|4|5|6|7) ;; - *) die "EAPI=${EAPI} is not supported" ;; +case ${EAPI} in + 5|6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac # @ECLASS-VARIABLE: DESKTOP_DATABASE_DIR @@ -56,7 +57,7 @@ xdg_environment_reset() { # Updates the .desktop files database. # Generates a list of mimetypes linked to applications that can handle them xdg_desktop_database_update() { - if [[ ${EBUILD_PHASE} != post* ]] ; then + if [[ ${EBUILD_PHASE} != post* ]]; then die "xdg_desktop_database_update must be used in pkg_post* phases." fi @@ -75,7 +76,7 @@ xdg_desktop_database_update() { # Updates icon theme cache files under /usr/share/icons. # This function should be called from pkg_postinst and pkg_postrm. xdg_icon_cache_update() { - if [[ ${EBUILD_PHASE} != post* ]] ; then + if [[ ${EBUILD_PHASE} != post* ]]; then die "xdg_icon_cache_update must be used in pkg_post* phases." fi @@ -85,21 +86,17 @@ xdg_icon_cache_update() { fi ebegin "Updating icons cache" - local retval=0 - local fails=( ) - for dir in "${EROOT%/}"/usr/share/icons/* - do - if [[ -f "${dir}/index.theme" ]] ; then - local rv=0 - gtk-update-icon-cache -qf "${dir}" - rv=$? - if [[ ! $rv -eq 0 ]] ; then + local dir retval=0 + local fails=() + for dir in "${EROOT%/}"/usr/share/icons/*; do + if [[ -f ${dir}/index.theme ]]; then + if ! gtk-update-icon-cache -qf "${dir}"; then debug-print "Updating cache failed on ${dir}" # Add to the list of failures - fails+=( "${dir}" ) + fails+=("${dir}") retval=2 fi - elif [[ $(ls "${dir}") = "icon-theme.cache" ]]; then + elif [[ $(ls "${dir}") = icon-theme.cache ]]; then # Clear stale cache files after theme uninstallation rm "${dir}/icon-theme.cache" fi @@ -109,8 +106,8 @@ xdg_icon_cache_update() { fi done eend ${retval} - for f in "${fails[@]}" ; do - eerror "Failed to update cache with icon $f" + for dir in "${fails[@]}"; do + eerror "Failed to update cache with icon ${dir}" done } @@ -119,7 +116,7 @@ xdg_icon_cache_update() { # Update the mime database. # Creates a general list of mime types from several sources xdg_mimeinfo_database_update() { - if [[ ${EBUILD_PHASE} != post* ]] ; then + if [[ ${EBUILD_PHASE} != post* ]]; then die "xdg_mimeinfo_database_update must be used in pkg_post* phases." fi @@ -128,6 +125,9 @@ xdg_mimeinfo_database_update() { return fi + # https://bugs.gentoo.org/819783 + local -x PKGSYSTEM_ENABLE_FSYNC=0 + ebegin "Updating shared mime info database" update-mime-database "${EROOT%/}${MIMEINFO_DATABASE_DIR}" eend $? From 7a47eaae7cd74e55e9c5511e1101c0d612002921 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 11:00:54 +0100 Subject: [PATCH 46/53] eclass/xdg-utils: Support EAPI 0 and 4 --- .../third_party/portage-stable/eclass/xdg-utils.eclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass index a834d5d3ac..7cde847536 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass @@ -1,13 +1,15 @@ # Copyright 2004-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 0 and 4. + # @ECLASS: xdg-utils.eclass # @MAINTAINER: # gnome@gentoo.org # freedesktop-bugs@gentoo.org # @AUTHOR: # Original author: Gilles Dartiguelongue -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 0 4 5 6 7 8 # @BLURB: Auxiliary functions commonly used by XDG compliant packages. # @DESCRIPTION: # This eclass provides a set of auxiliary functions needed by most XDG @@ -17,8 +19,8 @@ # * XDG .desktop files cache management # * XDG mime information database management -case ${EAPI} in - 5|6|7|8) ;; +case ${EAPI:-0} in + 0|4|5|6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac From 6d6e68b43054f8997c14682dc94835697b46c2fd Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 4 Jan 2022 18:16:11 +0100 Subject: [PATCH 47/53] dev-util/cmake: Sync with gentoo Needed by the updated eclasses. It's from gentoo commit d7869179b1bd60af77318cfb73447dd93d05da50. --- .../portage-stable/dev-util/cmake/Manifest | 7 +- .../dev-util/cmake/cmake-3.13.5.ebuild | 230 ------------------ ...make-3.19.7.ebuild => cmake-3.20.5.ebuild} | 4 +- ...make-3.18.5.ebuild => cmake-3.21.4.ebuild} | 36 ++- ...make-3.20.2.ebuild => cmake-3.22.1.ebuild} | 2 +- .../cmake/files/cmake-3.0.2-FindLAPACK.patch | 43 ---- .../files/cmake-3.1.0-darwin-isysroot.patch | 48 ---- .../files/cmake-3.11.0_rc2-FindBLAS.patch | 23 -- .../cmake-3.11.4-fix-boost-detection.patch | 13 - .../files/cmake-3.13.4-prefix-dirs.patch | 127 ---------- .../files/cmake-3.17.0_rc1-FindLAPACK.patch | 56 ----- .../files/cmake-3.4.0_rc1-darwin-bundle.patch | 25 -- .../dev-util/cmake/metadata.xml | 5 +- 13 files changed, 34 insertions(+), 585 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.13.5.ebuild rename sdk_container/src/third_party/portage-stable/dev-util/cmake/{cmake-3.19.7.ebuild => cmake-3.20.5.ebuild} (92%) rename sdk_container/src/third_party/portage-stable/dev-util/cmake/{cmake-3.18.5.ebuild => cmake-3.21.4.ebuild} (76%) rename sdk_container/src/third_party/portage-stable/dev-util/cmake/{cmake-3.20.2.ebuild => cmake-3.22.1.ebuild} (99%) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.0.2-FindLAPACK.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.1.0-darwin-isysroot.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.11.0_rc2-FindBLAS.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.11.4-fix-boost-detection.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.13.4-prefix-dirs.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.17.0_rc1-FindLAPACK.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.4.0_rc1-darwin-bundle.patch diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/Manifest b/sdk_container/src/third_party/portage-stable/dev-util/cmake/Manifest index 7fa1a3115a..08f0bfe8bc 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-util/cmake/Manifest @@ -1,4 +1,3 @@ -DIST cmake-3.13.5.tar.gz 8618821 BLAKE2B 765678bc92821207c53bfb4ac995a791b938f20236c3a6fda873b8edd11cd1401b4f4c05f170b8f600f38bde5f1227c715499eee072a8de3bb29d4f5cd230226 SHA512 99e3a8f5bc147dd90b9cab11f06892d87f289aa1354ad323711fe96ebc9c32b1e887e8f9d3575a37831c4d2153a070ff9115c5e27a185d54170bad9dbbaabc26 -DIST cmake-3.18.5.tar.gz 8975784 BLAKE2B 62ea68b602e7e352c22ba6122aa010fb78fb5c4e484aa51bc336e750280d5fc03ffa439bd8005d2c43176f5a5db4ebfd419beca65cc59c5b8cd5666e38394fb8 SHA512 c15e0937a9c0ce0b6164c3d02a147e679ea57e1119cff4189a15de71429a7facb3c04eb8db467471876b5da5dbd4a25acb228efa7101fe78efd205f0d2c96343 -DIST cmake-3.19.7.tar.gz 9271358 BLAKE2B 379b89c0d6bcfe81a397257cb3f95e4b4a8987566258f6d5b312e8ffd455fd07f09ed570c47111f9a519d76f43014b680e8242cddef13810ba87f9b9ec7e2e2f SHA512 6af1fe3ea41906324d4c29f5f982281d92145d086f4a47fa2220b93483bc65d59b1e23f5b51d82305c630690be7c552827bb795560674b03620763e0917bf14a -DIST cmake-3.20.2.tar.gz 9438694 BLAKE2B b1e1c091047d5ccae77d64ffda8201cfa7661f09fac2aceadfede8be09257cebdc8c2536f10ced82c700fd87174979344489fa6ab1b460e3ddfc41325ca6f19b SHA512 675a92f84b437169aee86dbfa59715671b9195ddeffc6fea83c7803a70abe3116106ad0a627b9e4bef326bfb2a10fdf624ad341fd9d3d08e3d8a69c271cd2b32 +DIST cmake-3.20.5.tar.gz 9441947 BLAKE2B f073d7c3968c714be315f5014076c785790ed47e9a746f2d16bc59769fb6862009f67c2e118038c6c9d8390b709f2b4ed4a4dfc41a93996fedd9d7d77111b84a SHA512 4ad7f194353be291e76d86d95928633daea653a0bd8d35369ac6ee2bb3f811c3a1aabe6a2bd51c6d5b07af2c6edc7e38d8b347ded32ab1ddcf331dbfce40c008 +DIST cmake-3.21.4.tar.gz 9630991 BLAKE2B ca6b6c50d984cc6713f3e88e1a6438c360d80c34927e60a20cc006ba47df2b91a290f1578d556f58d2d40711848a9b9caf36f65a043df892b81c1d48e3edb0d8 SHA512 0262a666f6da106576c26215580c40b54497bcdac400e847e1799716c31c71068293e719416338132a7da6122826c08ff50ac23dfed2711ab42631e96303f544 +DIST cmake-3.22.1.tar.gz 9778031 BLAKE2B 8c91e9e666ece94e0cfb5868ad257b1de824206b6f5420a5f516f684e4fd655e634918c59955f41a3f27b604b76946d86ab51cf975de7052c067a9dc4f952400 SHA512 b1e900fe573cd1cc76d26386f2298d7722737c9ff67930ee108994972b4561ef69caeb537177c9b95b7f17b755e20e034825d3807ea0d2dd4c391310b03adc11 diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.13.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.13.5.ebuild deleted file mode 100644 index 2b496b4396..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.13.5.ebuild +++ /dev/null @@ -1,230 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -CMAKE_MAKEFILE_GENERATOR="emake" -CMAKE_REMOVE_MODULES_LIST=( none ) -inherit bash-completion-r1 cmake elisp-common flag-o-matic toolchain-funcs virtualx xdg-utils - -MY_P="${P/_/-}" - -DESCRIPTION="Cross platform Make" -HOMEPAGE="https://cmake.org/" -SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz" - -LICENSE="CMake" -SLOT="0" -[[ "${PV}" = *_rc* ]] || \ -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" -IUSE="doc emacs system-jsoncpp ncurses qt5" - -RDEPEND=" - app-crypt/rhash - >=app-arch/libarchive-3.0.0:= - >=dev-libs/expat-2.0.1 - >=dev-libs/libuv-1.10.0:= - >=net-misc/curl-7.21.5[ssl] - sys-libs/zlib - virtual/pkgconfig - emacs? ( >=app-editors/emacs-23.1:* ) - ncurses? ( sys-libs/ncurses:0= ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 - ) - system-jsoncpp? ( >=dev-libs/jsoncpp-0.6.0_rc2:0= ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - doc? ( - dev-python/requests - dev-python/sphinx - ) -" - -S="${WORKDIR}/${MY_P}" - -SITEFILE="50${PN}-gentoo.el" - -PATCHES=( - # prefix - "${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch - "${FILESDIR}"/${PN}-3.13.4-prefix-dirs.patch - "${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch - - # handle gentoo packaging in find modules - "${FILESDIR}"/${PN}-3.11.0_rc2-FindBLAS.patch - "${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch - "${FILESDIR}"/${PN}-3.5.2-FindQt4.patch - - # respect python eclasses - "${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch - "${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch - - # boost (#660980) - "${FILESDIR}"/${PN}-3.11.4-fix-boost-detection.patch - - # upstream fixes (can usually be removed with a version bump) -) - -cmake_src_bootstrap() { - # Cleanup args to extract only JOBS. - # Because bootstrap does not know anything else. - grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< "${MAKEOPTS}" > /dev/null - if [[ $? -eq 0 ]] ; then - par_arg=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< "${MAKEOPTS}" | tail -n1 | grep -o '[[:digit:]]+') - par_arg="--parallel=${par_arg}" - else - par_arg="--parallel=1" - fi - - # disable running of cmake in boostrap command - sed -i \ - -e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \ - bootstrap || die "sed failed" - - # execinfo.h on Solaris isn't quite what it is on Darwin - if [[ ${CHOST} == *-solaris* ]] ; then - sed -i -e 's/execinfo\.h/blablabla.h/' \ - Source/kwsys/CMakeLists.txt || die - fi - - tc-export CC CXX LD - - # bootstrap script isn't exactly /bin/sh compatible - ${CONFIG_SHELL:-sh} ./bootstrap \ - --prefix="${T}/cmakestrap/" \ - ${par_arg} \ - || die "Bootstrap failed" -} - -cmake_src_test() { - # fix OutDir and SelectLibraryConfigurations tests - # these are altered thanks to our eclass - sed -i -e 's:^#_cmake_modify_IGNORE ::g' \ - "${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \ - || die - - pushd "${BUILD_DIR}" > /dev/null - - local ctestargs - [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure" - - # Excluded tests: - # BootstrapTest: we actualy bootstrap it every time so why test it. - # BundleUtilities: bundle creation broken - # CMakeOnly.AllFindModules: pthread issues - # CTest.updatecvs: which fails to commit as root - # Fortran: requires fortran - # RunCMake.CompilerLauncher: also requires fortran - # RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because - # debugedit binary is not in the expected location - # RunCMake.CPack_DEB: breaks if app-arch/dpkg is installed because - # it can't find a deb package that owns libc - # TestUpload, which requires network access - "${BUILD_DIR}"/bin/ctest \ - -j "$(makeopts_jobs)" \ - --test-load "$(makeopts_loadavg)" \ - ${ctestargs} \ - -E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CTest.UpdateCVS|Fortran|RunCMake.CompilerLauncher|RunCMake.CPack_(DEB|RPM)|TestUpload)" \ - || die "Tests failed" - - popd > /dev/null -} - -src_prepare() { - cmake_src_prepare - - # disable Xcode hooks, bug #652134 - if [[ ${CHOST} == *-darwin* ]] ; then - sed -i -e 's/__APPLE__/__DISABLED_APPLE__/' \ - Source/cmGlobalXCodeGenerator.cxx || die - fi - - # Add gcc libs to the default link paths - sed -i \ - -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \ - -e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \ - -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ - Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" - if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then - CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" - cmake_src_bootstrap - fi -} - -src_configure() { - # Fix linking on Solaris - [[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl - - local mycmakeargs=( - -DCMAKE_USE_SYSTEM_LIBRARIES=ON - -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=$(usex system-jsoncpp) - -DCMAKE_DOC_DIR=/share/doc/${PF} - -DCMAKE_MAN_DIR=/share/man - -DCMAKE_DATA_DIR=/share/${PN} - -DSPHINX_MAN=$(usex doc) - -DSPHINX_HTML=$(usex doc) - -DBUILD_CursesDialog="$(usex ncurses)" - ) - - if use qt5 ; then - mycmakeargs+=( - -DBUILD_QtDialog=ON - $(cmake_use_find_package qt5 Qt5Widgets) - ) - fi - - cmake_src_configure -} - -src_compile() { - cmake_src_compile - use emacs && elisp-compile Auxiliary/cmake-mode.el -} - -src_test() { - virtx cmake_src_test -} - -src_install() { - cmake_src_install - - if use emacs; then - elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi - - insinto /usr/share/vim/vimfiles/syntax - doins Auxiliary/vim/syntax/cmake.vim - - insinto /usr/share/vim/vimfiles/indent - doins Auxiliary/vim/indent/cmake.vim - - insinto /usr/share/vim/vimfiles/ftdetect - doins "${FILESDIR}/${PN}.vim" - - dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack} - - rm -r "${ED}"/usr/share/cmake/{completions,editors} || die -} - -pkg_postinst() { - use emacs && elisp-site-regen - if use qt5; then - xdg_icon_cache_update - xdg_desktop_database_update - xdg_mimeinfo_database_update - fi -} - -pkg_postrm() { - use emacs && elisp-site-regen - if use qt5; then - xdg_icon_cache_update - xdg_desktop_database_update - xdg_mimeinfo_database_update - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.19.7.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.20.5.ebuild similarity index 92% rename from sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.19.7.ebuild rename to sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.20.5.ebuild index 3d40c53f21..466c27ca2e 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.19.7.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.20.5.ebuild @@ -17,7 +17,7 @@ SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz" LICENSE="CMake" SLOT="0" [[ "${PV}" = *_rc* ]] || \ -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="doc emacs ncurses qt5 test" RESTRICT="!test? ( test )" @@ -120,7 +120,7 @@ cmake_src_test() { -j "$(makeopts_jobs)" \ --test-load "$(makeopts_loadavg)" \ ${ctestargs} \ - -E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CompileOptions|CTest.UpdateCVS|DependencyGraph|Fortran|RunCMake.CompilerLauncher|RunCMake.IncompatibleQt|RunCMake.ObsoleteQtMacros|RunCMake.PrecompileHeaders|RunCMake.CPack_(DEB|RPM)|TestUpload)" \ + -E "(BootstrapTest|BundleUtilities|ConfigSources|CMakeOnly.AllFindModules|CPackComponentsDEB-components-depend2|CompileOptions|CTest.UpdateCVS|DependencyGraph|Fortran|RunCMake.CompilerLauncher|RunCMake.IncompatibleQt|RunCMake.ObsoleteQtMacros|RunCMake.PrecompileHeaders|RunCMake.CPack_(DEB|RPM)|TestUpload)" \ || die "Tests failed" popd > /dev/null diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.18.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.21.4.ebuild similarity index 76% rename from sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.18.5.ebuild rename to sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.21.4.ebuild index be86fdd110..466c27ca2e 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.18.5.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.21.4.ebuild @@ -3,7 +3,7 @@ EAPI=7 -CMAKE_MAKEFILE_GENERATOR="emake" # Fixed in 3.19, see commit 491dddfb; bug #596460 +CMAKE_MAKEFILE_GENERATOR="emake" # TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja CMAKE_REMOVE_MODULES_LIST=( none ) inherit bash-completion-r1 cmake elisp-common flag-o-matic multiprocessing \ toolchain-funcs virtualx xdg-utils @@ -17,7 +17,7 @@ SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz" LICENSE="CMake" SLOT="0" [[ "${PV}" = *_rc* ]] || \ -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="doc emacs ncurses qt5 test" RESTRICT="!test? ( test )" @@ -55,12 +55,12 @@ PATCHES=( # prefix "${FILESDIR}"/${PN}-3.16.0_rc4-darwin-bundle.patch "${FILESDIR}"/${PN}-3.14.0_rc3-prefix-dirs.patch - # Next patch requires new work from prefix people - #"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch + "${FILESDIR}"/${PN}-3.19.1-darwin-gcc.patch # handle gentoo packaging in find modules "${FILESDIR}"/${PN}-3.17.0_rc1-FindBLAS.patch - "${FILESDIR}"/${PN}-3.17.0_rc1-FindLAPACK.patch + # Next patch needs to be reworked + #"${FILESDIR}"/${PN}-3.17.0_rc1-FindLAPACK.patch "${FILESDIR}"/${PN}-3.5.2-FindQt4.patch # respect python eclasses @@ -120,7 +120,7 @@ cmake_src_test() { -j "$(makeopts_jobs)" \ --test-load "$(makeopts_loadavg)" \ ${ctestargs} \ - -E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CompileOptions|CTest.UpdateCVS|Fortran|RunCMake.CompilerLauncher|RunCMake.IncompatibleQt|RunCMake.ObsoleteQtMacros|RunCMake.PrecompileHeaders|RunCMake.CPack_(DEB|RPM)|TestUpload)" \ + -E "(BootstrapTest|BundleUtilities|ConfigSources|CMakeOnly.AllFindModules|CPackComponentsDEB-components-depend2|CompileOptions|CTest.UpdateCVS|DependencyGraph|Fortran|RunCMake.CompilerLauncher|RunCMake.IncompatibleQt|RunCMake.ObsoleteQtMacros|RunCMake.PrecompileHeaders|RunCMake.CPack_(DEB|RPM)|TestUpload)" \ || die "Tests failed" popd > /dev/null @@ -129,10 +129,28 @@ cmake_src_test() { src_prepare() { cmake_src_prepare - # disable Xcode hooks, bug #652134 if [[ ${CHOST} == *-darwin* ]] ; then - sed -i -e 's/__APPLE__/__DISABLED_APPLE__/' \ - Source/cmGlobalXCodeGenerator.cxx || die + # disable Xcode hooks, bug #652134 + sed -i -e 's/cm\(\|Global\|Local\)XCode[^.]\+\.\(cxx\|h\)//' \ + Source/CMakeLists.txt || die + sed -i -e '/define CMAKE_USE_XCODE/s/XCODE/NO_XCODE/' \ + -e '/cmGlobalXCodeGenerator.h/d' \ + Source/cmake.cxx || die + # disable isysroot usage with GCC, we've properly instructed + # where things are via GCC configuration and ldwrapper + sed -i -e '/cmake_gnu_set_sysroot_flag/d' \ + Modules/Platform/Apple-GNU-*.cmake || die + # disable isysroot usage with clang as well + sed -i -e '/_SYSROOT_FLAG/d' \ + Modules/Platform/Apple-Clang.cmake || die + # don't set a POSIX standard, system headers don't like that, #757426 + sed -i -e 's/^#if !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \ + Source/cmLoadCommandCommand.cxx \ + Source/cmStandardLexer.h \ + Source/cmSystemTools.cxx \ + Source/cmTimestamp.cxx + sed -i -e 's/^#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \ + Source/cmStandardLexer.h fi # Add gcc libs to the default link paths diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.20.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.22.1.ebuild similarity index 99% rename from sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.20.2.ebuild rename to sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.22.1.ebuild index b1cc1455ac..a9b3de7323 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.20.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/cmake/cmake-3.22.1.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 CMAKE_MAKEFILE_GENERATOR="emake" # TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja CMAKE_REMOVE_MODULES_LIST=( none ) diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.0.2-FindLAPACK.patch b/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.0.2-FindLAPACK.patch deleted file mode 100644 index 321f05302a..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.0.2-FindLAPACK.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/Modules/FindLAPACK.cmake -+++ b/Modules/FindLAPACK.cmake -@@ -4,6 +4,10 @@ - # - # Find LAPACK library - # -+# Version modified for Gentoo Linux. -+# If a valid PkgConfig configuration is found, this overrides and cancels -+# all further checks. -+# - # This module finds an installed fortran library that implements the - # LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). - # -@@ -140,6 +144,23 @@ - - endmacro() - -+# -+# first, try PkgConfig -+# -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(PC_LAPACK lapack) -+if(PC_LAPACK_FOUND) -+ foreach(PC_LIB ${PC_LAPACK_LIBRARIES}) -+ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_LAPACK_LIBRARY_DIRS} ) -+ if (NOT ${PC_LIB}_LIBRARY) -+ message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_LAPACK_LIBRARY_DIRS}") -+ endif (NOT ${PC_LIB}_LIBRARY) -+ list(APPEND LAPACK_LIBRARIES ${${PC_LIB}_LIBRARY}) -+ endforeach(PC_LIB) -+ find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARIES) -+ mark_as_advanced(LAPACK_LIBRARIES) -+else(PC_LAPACK_FOUND) -+message(STATUS "No PkgConfig configuration for LAPACK found; starting more extensive search.") - - set(LAPACK_LINKER_FLAGS) - set(LAPACK_LIBRARIES) -@@ -348,3 +369,5 @@ - endif() - - set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) -+ -+endif(PC_LAPACK_FOUND) diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.1.0-darwin-isysroot.patch b/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.1.0-darwin-isysroot.patch deleted file mode 100644 index 1f3599bcc8..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.1.0-darwin-isysroot.patch +++ /dev/null @@ -1,48 +0,0 @@ -Do not detect Xcode and set -isysroot for its SDK, since that messes up -our toolchain, and hence makes any compilation fail, bug #445308 - ---- a/Modules/Platform/Darwin-Initialize.cmake -+++ b/Modules/Platform/Darwin-Initialize.cmake -@@ -1,16 +1,16 @@ - # Ask xcode-select where to find /Developer or fall back to ancient location. --execute_process(COMMAND xcode-select -print-path -- OUTPUT_VARIABLE _stdout -- OUTPUT_STRIP_TRAILING_WHITESPACE -- ERROR_VARIABLE _stderr -- RESULT_VARIABLE _failed) --if(NOT _failed AND IS_DIRECTORY ${_stdout}) -- set(OSX_DEVELOPER_ROOT ${_stdout}) --elseif(IS_DIRECTORY "/Developer") -- set(OSX_DEVELOPER_ROOT "/Developer") --else() -+#execute_process(COMMAND xcode-select -print-path -+# OUTPUT_VARIABLE _stdout -+# OUTPUT_STRIP_TRAILING_WHITESPACE -+# ERROR_VARIABLE _stderr -+# RESULT_VARIABLE _failed) -+#if(NOT _failed AND IS_DIRECTORY ${_stdout}) -+# set(OSX_DEVELOPER_ROOT ${_stdout}) -+#elseif(IS_DIRECTORY "/Developer") -+# set(OSX_DEVELOPER_ROOT "/Developer") -+#else() - set(OSX_DEVELOPER_ROOT "") --endif() -+#endif() - - execute_process(COMMAND sw_vers -productVersion - OUTPUT_VARIABLE CURRENT_OSX_VERSION -@@ -91,10 +91,10 @@ - # CMAKE_OSX_DEPLOYMENT_TARGET - - # Set cache variable - end user may change this during ccmake or cmake-gui configure. --if(_CURRENT_OSX_VERSION VERSION_GREATER 10.3) -- set(CMAKE_OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}" CACHE STRING -- "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.") --endif() -+#if(_CURRENT_OSX_VERSION VERSION_GREATER 10.3) -+# set(CMAKE_OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}" CACHE STRING -+# "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.") -+#endif() - - #---------------------------------------------------------------------------- - # CMAKE_OSX_SYSROOT diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.11.0_rc2-FindBLAS.patch b/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.11.0_rc2-FindBLAS.patch deleted file mode 100644 index 6bad45b208..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.11.0_rc2-FindBLAS.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/Modules/FindBLAS.cmake -+++ b/Modules/FindBLAS.cmake -@@ -4,6 +4,10 @@ - # - # Find BLAS library - # -+# Version modified for Gentoo Linux. -+# If a valid PkgConfig configuration is found, this overrides and cancels -+# all further checks. -+# - # This module finds an installed fortran library that implements the - # BLAS linear-algebra interface (see http://www.netlib.org/blas/). The - # list of libraries searched for is taken from the autoconf macro file, -@@ -50,6 +54,9 @@ - # (To distribute this file outside of CMake, substitute the full - # License text for the above reference.) - -+# first, try PkgConfig -+set(BLA_PREFER_PKGCONFIG On) -+ - include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake) - include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake) - diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.11.4-fix-boost-detection.patch b/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.11.4-fix-boost-detection.patch deleted file mode 100644 index bcf229ad39..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.11.4-fix-boost-detection.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://bugs.gentoo.org/660980 - ---- cmake-3.11.4/Modules/FindBoost.cmake -+++ cmake-3.11.4/Modules/FindBoost.cmake -@@ -1680,7 +1680,7 @@ - list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}") - list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}") - # Gentoo -- list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}") -+ list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}.${COMPONENT_PYTHON_VERSION_MINOR}") - # RPMs - list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}") - endif() diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.13.4-prefix-dirs.patch b/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.13.4-prefix-dirs.patch deleted file mode 100644 index bb60aaf351..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.13.4-prefix-dirs.patch +++ /dev/null @@ -1,127 +0,0 @@ -From b1f045122fb210728081ae2165197aebff4ee498 Mon Sep 17 00:00:00 2001 -From: Lars Wendler -Date: Fri, 9 Jun 2017 01:47:55 +0200 -Subject: [PATCH] Set some proper paths to make cmake find our tools. - -The ebuild now adds an extra / at the end of $EPREFIX so that it is -never the empty string (so that CMAKE_SYSTEM_PREFIX_PATH remains -correct) - -Original patch by Heiko Przybyl. -Updated by Chris Reffett (cmake-2.8.8) -Updated by Johannes Huber (cmake-2.8.9) -Updated by Michael Palimaka (cmake-2.8.10) -Updated by Chris Reffett (cmake-2.8.11) -Updated by Michael Palimaka (cmake-3.0.0) -Updated by Lars Wendler (cmake-3.9.0_rc2) ---- - Modules/Platform/Darwin.cmake | 12 ++++++++---- - Modules/Platform/UnixPaths.cmake | 29 ++++++++++++++++++++++++----- - 2 files changed, 32 insertions(+), 9 deletions(-) - -Index: cmake-3.13.3/Modules/Platform/Darwin.cmake -=================================================================== ---- cmake-3.13.3.orig/Modules/Platform/Darwin.cmake -+++ cmake-3.13.3/Modules/Platform/Darwin.cmake -@@ -108,9 +108,9 @@ set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F) - set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F) - set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F) - --# default to searching for frameworks first -+# default to searching for frameworks last - if(NOT DEFINED CMAKE_FIND_FRAMEWORK) -- set(CMAKE_FIND_FRAMEWORK FIRST) -+ set(CMAKE_FIND_FRAMEWORK LAST) - endif() - - # Older OS X linkers do not report their framework search path -@@ -132,6 +132,8 @@ endif() - - # set up the default search directories for frameworks - set(CMAKE_SYSTEM_FRAMEWORK_PATH -+ @GENTOO_PORTAGE_EPREFIX@Frameworks -+ @GENTOO_PORTAGE_EPREFIX@usr/lib - ~/Library/Frameworks - ) - if(_CMAKE_OSX_SYSROOT_PATH) -@@ -178,13 +180,15 @@ if(CMAKE_OSX_SYSROOT) - endif() - endif() - --# default to searching for application bundles first -+# default to searching for application bundles last - if(NOT DEFINED CMAKE_FIND_APPBUNDLE) -- set(CMAKE_FIND_APPBUNDLE FIRST) -+ set(CMAKE_FIND_APPBUNDLE LAST) - endif() - # set up the default search directories for application bundles - set(_apps_paths) - foreach(_path -+ @GENTOO_PORTAGE_EPREFIX@Applications -+ @GENTOO_PORTAGE_EPREFIX@usr/bin - "~/Applications" - "/Applications" - "${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+ -Index: cmake-3.13.3/Modules/Platform/UnixPaths.cmake -=================================================================== ---- cmake-3.13.3.orig/Modules/Platform/UnixPaths.cmake -+++ cmake-3.13.3/Modules/Platform/UnixPaths.cmake -@@ -23,7 +23,8 @@ get_filename_component(_CMAKE_INSTALL_DI - # search types. - list(APPEND CMAKE_SYSTEM_PREFIX_PATH - # Standard -- /usr/local /usr / -+ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@ -+ @GENTOO_HOST@/usr/local /usr / - - # CMake install location - "${_CMAKE_INSTALL_DIR}" -@@ -50,23 +51,41 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH - - # List common include file locations not under the common prefixes. - list(APPEND CMAKE_SYSTEM_INCLUDE_PATH -- # X11 -- /usr/include/X11 -+ @GENTOO_PORTAGE_EPREFIX@usr/include - ) - - list(APPEND CMAKE_SYSTEM_LIBRARY_PATH -- # X11 -- /usr/lib/X11 -+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc -+ @GENTOO_PORTAGE_GCCLIBDIR@ -+ @GENTOO_PORTAGE_EPREFIX@usr/lib64 -+ @GENTOO_PORTAGE_EPREFIX@usr/libx32 -+ @GENTOO_PORTAGE_EPREFIX@usr/lib32 -+ @GENTOO_PORTAGE_EPREFIX@usr/lib -+ @GENTOO_PORTAGE_EPREFIX@lib -+ ) -+ -+list(APPEND CMAKE_SYSTEM_PROGRAM_PATH -+ @GENTOO_PORTAGE_EPREFIX@usr/bin -+ @GENTOO_PORTAGE_EPREFIX@bin - ) - - list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES -- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64 -+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc -+ @GENTOO_PORTAGE_GCCLIBDIR@ -+ @GENTOO_PORTAGE_EPREFIX@usr/lib64 -+ @GENTOO_PORTAGE_EPREFIX@usr/libx32 -+ @GENTOO_PORTAGE_EPREFIX@usr/lib32 -+ @GENTOO_PORTAGE_EPREFIX@usr/lib -+ @GENTOO_PORTAGE_EPREFIX@lib -+ @GENTOO_HOST@/lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32 - ) - - list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES -- /usr/include -+ @GENTOO_PORTAGE_EPREFIX@usr/include -+ @GENTOO_HOST@/usr/include - ) - list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES -- /usr/include -+ @GENTOO_PORTAGE_EPREFIX@usr/include -+ @GENTOO_HOST@/usr/include - ) - list(APPEND CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.17.0_rc1-FindLAPACK.patch b/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.17.0_rc1-FindLAPACK.patch deleted file mode 100644 index 29eefcbd51..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.17.0_rc1-FindLAPACK.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 7459f27dd4bb9b60067ac49ee2c6be93d20c2c1e Mon Sep 17 00:00:00 2001 -From: Lars Wendler -Date: Thu, 13 Feb 2020 13:16:16 +0100 -Subject: [PATCH] Prefer pkgconfig in FindLAPACK - ---- - Modules/FindLAPACK.cmake | 22 ++++++++++++++++++++++ - 1 file changed, 22 insertions(+) - -diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake -index c9629769f0..de852d562c 100644 ---- a/Modules/FindLAPACK.cmake -+++ b/Modules/FindLAPACK.cmake -@@ -7,6 +7,10 @@ FindLAPACK - - Find Linear Algebra PACKage (LAPACK) library - -+Version modified for Gentoo Linux. -+If a valid PkgConfig configuration is found, this overrides and cancels -+all further checks. -+ - This module finds an installed Fortran library that implements the - LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). - -@@ -186,6 +190,22 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a - #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") - endmacro() - -+# first, try PkgConfig -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(PC_LAPACK lapack) -+if(PC_LAPACK_FOUND) -+ foreach(PC_LIB ${PC_LAPACK_LIBRARIES}) -+ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_LAPACK_LIBRARY_DIRS} ) -+ if (NOT ${PC_LIB}_LIBRARY) -+ message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_LAPACK_LIBRARY_DIRS}") -+ endif (NOT ${PC_LIB}_LIBRARY) -+ list(APPEND LAPACK_LIBRARIES ${${PC_LIB}_LIBRARY}) -+ endforeach(PC_LIB) -+ find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARIES) -+ mark_as_advanced(LAPACK_LIBRARIES) -+else(PC_LAPACK_FOUND) -+message(STATUS "No PkgConfig configuration for LAPACK found; starting more extensive search.") -+ - set(LAPACK_LINKER_FLAGS) - set(LAPACK_LIBRARIES) - set(LAPACK95_LIBRARIES) -@@ -494,3 +514,5 @@ endif() - - cmake_pop_check_state() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) -+ -+endif(PC_LAPACK_FOUND) --- -2.25.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.4.0_rc1-darwin-bundle.patch b/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.4.0_rc1-darwin-bundle.patch deleted file mode 100644 index 2808ed79f7..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/files/cmake-3.4.0_rc1-darwin-bundle.patch +++ /dev/null @@ -1,25 +0,0 @@ -Don't use .so for modules on darwin/macos. Use .bundle instead. -Patch by Heiko Przybyl - -Forward-ported from 2.8.10 to 3.4.0-rc1 - ---- cmake-3.4.0-rc1/Modules/Platform/Darwin.cmake -+++ cmake-3.4.0-rc1/Modules/Platform/Darwin.cmake -@@ -26,7 +26,7 @@ - set(CMAKE_SHARED_LIBRARY_PREFIX "lib") - set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") - set(CMAKE_SHARED_MODULE_PREFIX "lib") --set(CMAKE_SHARED_MODULE_SUFFIX ".so") -+set(CMAKE_SHARED_MODULE_SUFFIX ".bundle") - set(CMAKE_MODULE_EXISTS 1) - set(CMAKE_DL_LIBS "") - -@@ -53,7 +53,7 @@ - set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names") - set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") - set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") --set(CMAKE_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".so" ".a") -+set(CMAKE_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".bundle" ".a") - - # hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree - # (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache diff --git a/sdk_container/src/third_party/portage-stable/dev-util/cmake/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-util/cmake/metadata.xml index 633caf12af..6c0ea812d0 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/cmake/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-util/cmake/metadata.xml @@ -1,13 +1,10 @@ - + kde@gentoo.org Gentoo KDE Project - - Use system copy of dev-libs/jsoncpp instead of bundled one. - cpe:/a:cmake_project:cmake From f000cc73a3c5a2b2186adb82156fbb393a3f7f7e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 5 Jan 2022 18:16:43 +0100 Subject: [PATCH 48/53] sys-devel/gettext: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. --- .../portage-stable/sys-devel/gettext/gettext-0.21-r1.ebuild | 1 + .../third_party/portage-stable/sys-devel/gettext/metadata.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.21-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.21-r1.ebuild index 40031f2f5a..bab939d0eb 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.21-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.21-r1.ebuild @@ -41,6 +41,7 @@ RDEPEND="${DEPEND} git? ( dev-vcs/git ) java? ( >=virtual/jre-1.8 )" BDEPEND=" + !git? ( cvs? ( dev-vcs/cvs ) ) git? ( dev-vcs/git ) " PDEPEND="emacs? ( app-emacs/po-mode )" diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gettext/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-devel/gettext/metadata.xml index 8b69e80f97..502becbd6b 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gettext/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gettext/metadata.xml @@ -1,5 +1,5 @@ - + base-system@gentoo.org From 77d8fbde2d5c497a990481f0859ee3b426e9aa3c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 5 Jan 2022 18:17:13 +0100 Subject: [PATCH 49/53] sys-block/parted: Sync with gentoo Apparently the old parted has some problems with updated eclasses. It's from gentoo commit e8750eda30030e3f13ceaf0fc3c03a0e604ca649. --- .../portage-stable/sys-block/parted/Manifest | 5 +- .../parted/files/parted-3.2-devmapper.patch | 60 ---------------- .../files/parted-3.2-fix-resizing-FAT16.patch | 64 ----------------- .../parted/files/parted-3.2-sysmacros.patch | 28 -------- .../parted/files/parted-3.3-atari.patch | 11 +++ .../sys-block/parted/metadata.xml | 28 +++++--- .../sys-block/parted/parted-3.2-r1.ebuild | 60 ---------------- .../sys-block/parted/parted-3.2-r2.ebuild | 63 ----------------- .../sys-block/parted/parted-3.2_p19-r1.ebuild | 70 ------------------- .../sys-block/parted/parted-3.2_p20-r1.ebuild | 70 ------------------- .../sys-block/parted/parted-3.4.ebuild | 66 +++++++++++++++++ 11 files changed, 96 insertions(+), 429 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-devmapper.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-fix-resizing-FAT16.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-sysmacros.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.3-atari.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2-r2.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2_p19-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2_p20-r1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.4.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/Manifest b/sdk_container/src/third_party/portage-stable/sys-block/parted/Manifest index fbf95dc359..3e081f5964 100644 --- a/sdk_container/src/third_party/portage-stable/sys-block/parted/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-block/parted/Manifest @@ -1,3 +1,2 @@ -DIST parted-3.2.tar.xz 1655244 BLAKE2B 56608590b26a9b5266dacf3698d990b730bdb35d9374d1da57103fbef3ef5037e40dd2fe0f523ca8e0e75401a3b25cf543e5ca5c94cf410bbaa62ea15d6f0ba3 SHA512 4e37dbdd6f5032c9ebfec43704f6882379597d038167b9c4d04053efa083c68a705196713864451fa9e11d32777e16c68982877945c5efd9ea5f8252cb20e1c4 -DIST parted_3.2-19.debian.tar.xz 87288 BLAKE2B f0cef2978ead9edca3e952849deb36526eea0a050d45ab480b2aa62d02ba0a1750c28e93c28a714df6629f02ccf5a1e4fbb33a6e42b82bf6685c05aeaad1756c SHA512 de3e55545d7d94668eb608c8c31440f550baaf7b664836d199f73f7a8c75bba4ff59b4c06a23459c7d522250d7c03d29fa7f727f7d1a2b1e5a0366e83a2d871a -DIST parted_3.2-20.debian.tar.xz 87496 BLAKE2B 4409826b35b42093f16f80b1ab2f41b4caf2264c9dcfe9572fa1ddf5f51eeffa2208fc187bd7a98290ee2df92604928eae84fd2fdee78d688ec19e81f8b9efac SHA512 83f14befdd7d048976572b3e2eebfaa42649458cbcfd659db704737dce991980ddb2bc65013c5b31b04a17fc17fb756da0dda76edbcba93708afca34c56e0d22 +DIST parted-3.4.tar.xz 1860300 BLAKE2B c724d3d1490c62d440b9e5dc359fef7ff623bc77ae5f867d8905245cb279ec391fa07a1a774488ad3bf7a2c477007264d7bab2635a544be8f94dc706a654a711 SHA512 e69bd1b610778e980d4595d04892f2ea1faf4ae9bfc98cd62abfc70066423f08ddaa396f9461c7beb1330d023232274606b6b26091a0458aeedd0f3f57536690 +DIST parted-3.4.tar.xz.sig 508 BLAKE2B 112ad0158b1100bd9150a7c87e8f93e67d42870b82a17d4d0aa8bb5e46306f837f3f99feabaf301f8cd640c299174e5f5acf152dd1f20ea2b7ace73d57d31f14 SHA512 6b11812267e66470ba2908ee1cc78b232b0bc2519787f5a17b92cd5f8ba904b1a836833f19c5244b23d4c7810437eeb26fbbd68fac819391b342709682345472 diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-devmapper.patch b/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-devmapper.patch deleted file mode 100644 index 0cd3e0e330..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-devmapper.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- a/libparted/arch/linux.c -+++ b/libparted/arch/linux.c -@@ -2304,6 +2304,7 @@ - return r < 0 ? NULL : resultp; - } - -+#ifdef ENABLE_DEVICE_MAPPER - static char * - dm_canonical_path (PedDevice const *dev) - { -@@ -2326,12 +2327,22 @@ - err: - return NULL; - } -+#endif /* ENABLE_DEVICE_MAPPER */ - - static char* - _device_get_part_path (PedDevice const *dev, int num) - { -- char *devpath = (dev->type == PED_DEVICE_DM -- ? dm_canonical_path (dev) : dev->path); -+ char *devpath = -+#ifdef ENABLE_DEVICE_MAPPER -+ ( -+ dev->type == PED_DEVICE_DM -+ ? dm_canonical_path (dev) : -+#endif /* ENABLE_DEVICE_MAPPER */ -+ dev->path -+#ifdef ENABLE_DEVICE_MAPPER -+ ) -+#endif /* ENABLE_DEVICE_MAPPER */ -+ ; - size_t path_len = strlen (devpath); - char *result; - /* Check for devfs-style /disc => /partN transformation -@@ -2945,12 +2956,14 @@ - unsigned long long *length); - - -+#ifdef ENABLE_DEVICE_MAPPER - if (disk->dev->type == PED_DEVICE_DM) { - add_partition = _dm_add_partition; - remove_partition = _dm_remove_partition; - resize_partition = _dm_resize_partition; - get_partition_start_and_length = _dm_get_partition_start_and_length; - } else { -+#endif /* ENABLE_DEVICE_MAPPER */ - add_partition = _blkpg_add_partition; - remove_partition = _blkpg_remove_partition; - #ifdef BLKPG_RESIZE_PARTITION -@@ -2959,7 +2972,9 @@ - resize_partition = NULL; - #endif - get_partition_start_and_length = _kernel_get_partition_start_and_length; -+#ifdef ENABLE_DEVICE_MAPPER - } -+#endif /* ENABLE_DEVICE_MAPPER */ - - /* lpn = largest partition number. - * for remove pass, use greater of device or label limit */ diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-fix-resizing-FAT16.patch b/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-fix-resizing-FAT16.patch deleted file mode 100644 index 2a5a2311f1..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-fix-resizing-FAT16.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 1e9e770f4bc7f3d80e09ecd1df58575fad064163 Mon Sep 17 00:00:00 2001 -From: Mike Fleetwood -Date: Sun, 28 Sep 2014 15:15:48 +0000 -Subject: lib-fs-resize: Prevent crash resizing FAT16 file systems - -Resizing FAT16 file system crashes in libparted/fs/r/fat/resize.c -create_resize_context() because it was dereferencing NULL pointer -fs_info->info_sector to copy the info_sector. - -Only FAT32 file systems have info_sector populated by fat_open() -> -fat_info_sector_read(). FAT12 and FAT16 file systems don't have an -info_sector so pointer fs_info->info_sector remains assigned NULL from -fat_alloc(). When resizing a FAT file system create_resize_context() -was always dereferencing fs_info->info_sector to memory copy the -info_sector, hence it crashed for FAT12 and FAT16. - -Make create_resize_context() only copy the info_sector for FAT32 file -systems. - -Reported by Christian Hesse in -https://bugzilla.gnome.org/show_bug.cgi?id=735669 ---- -diff --git a/NEWS b/NEWS -index 297b0a5..da7db50 100644 ---- a/NEWS -+++ b/NEWS -@@ -2,6 +2,10 @@ GNU parted NEWS -*- outline -*- - - * Noteworthy changes in release ?.? (????-??-??) [?] - -+** Bug Fixes -+ -+ libparted-fs-resize: Prevent crash resizing FAT16 file systems. -+ - - * Noteworthy changes in release 3.2 (2014-07-28) [stable] - -diff --git a/libparted/fs/r/fat/resize.c b/libparted/fs/r/fat/resize.c -index 919acf0..bfe60a0 100644 ---- a/libparted/fs/r/fat/resize.c -+++ b/libparted/fs/r/fat/resize.c -@@ -668,11 +668,17 @@ create_resize_context (PedFileSystem* fs, const PedGeometry* new_geom) - - /* preserve boot code, etc. */ - new_fs_info->boot_sector = ped_malloc (new_geom->dev->sector_size); -- new_fs_info->info_sector = ped_malloc (new_geom->dev->sector_size); - memcpy (new_fs_info->boot_sector, fs_info->boot_sector, - new_geom->dev->sector_size); -- memcpy (new_fs_info->info_sector, fs_info->info_sector, -- new_geom->dev->sector_size); -+ new_fs_info->info_sector = NULL; -+ if (fs_info->fat_type == FAT_TYPE_FAT32) -+ { -+ PED_ASSERT (fs_info->info_sector != NULL); -+ new_fs_info->info_sector = -+ ped_malloc (new_geom->dev->sector_size); -+ memcpy (new_fs_info->info_sector, fs_info->info_sector, -+ new_geom->dev->sector_size); -+ } - - new_fs_info->logical_sector_size = fs_info->logical_sector_size; - new_fs_info->sector_count = new_geom->length; --- -cgit v0.9.0.2 diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-sysmacros.patch b/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-sysmacros.patch deleted file mode 100644 index a29e7619b1..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.2-sysmacros.patch +++ /dev/null @@ -1,28 +0,0 @@ -https://bugs.gentoo.org/580022 - -From dec8995fe80508374beba6356f6ecbba8ef6b18b Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Tue, 21 Jun 2016 15:01:08 -0400 -Subject: [PATCH] include sysmacros.h for major/minor/makedev - -Linux C libs are moving away from including this header implicitly via -sys/types.h, so include it explicitly. ---- - libparted/arch/linux.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c -index 326b95619d31..e5c168be3c68 100644 ---- a/libparted/arch/linux.c -+++ b/libparted/arch/linux.c -@@ -37,6 +37,7 @@ - #include - #include - #include -+#include - #include - #include /* for uname() */ - #include --- -2.8.2 - diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.3-atari.patch b/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.3-atari.patch new file mode 100644 index 0000000000..41771d02d4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-block/parted/files/parted-3.3-atari.patch @@ -0,0 +1,11 @@ +--- a/libparted/labels/atari.c ++++ b/libparted/labels/atari.c +@@ -1957,7 +1957,7 @@ + PED_ASSERT (sizeof (AtariRawPartition) == 12); + PED_ASSERT (sizeof (AtariRawTable) == 512); + /* GNU Libc doesn't support NULL instead of the locale name */ +- PED_ASSERT ((atr_c_locale = newlocale(LC_ALL_MASK, "C", NULL)) != NULL); ++ atr_c_locale = newlocale(LC_ALL_MASK, "C", NULL); + + ped_disk_type_register (&atari_disk_type); + } diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-block/parted/metadata.xml index 2011c0117f..8a1f1a6426 100644 --- a/sdk_container/src/third_party/portage-stable/sys-block/parted/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-block/parted/metadata.xml @@ -1,20 +1,26 @@ - + + + mgorny@gentoo.org + Michał Górny + - livecd@gentoo.org - Gentoo LiveCD Project + base-system@gentoo.org + Base System Project - Enable device-mapper support from sys-fs/lvm2 in parted - + Enable device-mapper support from sys-fs/lvm2 + in parted + - Enable debugging as encouraged by upstream: [The default configuration] - includes --enable-debug (by default), which contains many assertions. - Obviously, these "waste" space, but in the past, they have caught - potentially dangerous bugs before they would have done damage, so we think - it's worth it. Also, it means we get more bug reports ;) - + Enable debugging as encouraged by upstream: [The default + configuration] includes --enable-debug (by default), which + contains many assertions. Obviously, these "waste" space, + but in the past, they have caught potentially dangerous bugs + before they would have done damage, so we think it's worth + it. Also, it means we get more bug reports ;) + diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2-r1.ebuild deleted file mode 100644 index 2faa8cf2fa..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2-r1.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit autotools eutils flag-o-matic - -DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" -HOMEPAGE="https://www.gnu.org/software/parted" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86" -IUSE="+debug device-mapper nls readline selinux static-libs" -RESTRICT="test" - -# specific version for gettext needed -# to fix bug 85999 -RDEPEND=" - >=sys-fs/e2fsprogs-1.27 - device-mapper? ( >=sys-fs/lvm2-2.02.45 ) - readline? ( >=sys-libs/readline-5.2:0= >=sys-libs/ncurses-5.7-r7:0= ) - selinux? ( sys-libs/libselinux ) - elibc_uclibc? ( dev-libs/libiconv ) -" -DEPEND=" - ${RDEPEND} - nls? ( >=sys-devel/gettext-0.12.1-r2 ) - virtual/pkgconfig -" - -src_prepare() { - epatch \ - "${FILESDIR}"/${PN}-3.2-devmapper.patch \ - "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch \ - "${FILESDIR}"/${PN}-3.2-fix-resizing-FAT16.patch \ - "${FILESDIR}"/${PN}-3.2-sysmacros.patch - - eautoreconf -} - -src_configure() { - use elibc_uclibc && append-libs -liconv - econf \ - $(use_enable debug) \ - $(use_enable device-mapper) \ - $(use_enable nls) \ - $(use_enable selinux) \ - $(use_enable static-libs static) \ - $(use_with readline) \ - --disable-rpath \ - --disable-silent-rules -} - -DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} ) - -src_install() { - default - prune_libtool_files -} diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2-r2.ebuild deleted file mode 100644 index b4561cfee2..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2-r2.ebuild +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit autotools eutils flag-o-matic - -DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" -HOMEPAGE="https://www.gnu.org/software/parted" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="+debug device-mapper nls readline selinux static-libs" -RESTRICT="test" - -# specific version for gettext needed -# to fix bug 85999 -RDEPEND=" - >=sys-fs/e2fsprogs-1.27 - device-mapper? ( >=sys-fs/lvm2-2.02.45 ) - readline? ( >=sys-libs/readline-5.2:0= >=sys-libs/ncurses-5.7-r7:0= ) - selinux? ( sys-libs/libselinux ) - elibc_uclibc? ( dev-libs/libiconv ) -" -DEPEND=" - ${RDEPEND} - nls? ( >=sys-devel/gettext-0.12.1-r2 ) - virtual/pkgconfig -" -PATCHES=( - "${FILESDIR}"/${PN}-3.2-devmapper.patch - "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch - "${FILESDIR}"/${PN}-3.2-fix-resizing-FAT16.patch - "${FILESDIR}"/${PN}-3.2-sysmacros.patch -) - -src_prepare() { - default - - eautoreconf -} - -src_configure() { - use elibc_uclibc && append-libs -liconv - econf \ - $(use_enable debug) \ - $(use_enable device-mapper) \ - $(use_enable nls) \ - $(use_enable selinux) \ - $(use_enable static-libs static) \ - $(use_with readline) \ - --disable-rpath \ - --disable-silent-rules -} - -DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} ) - -src_install() { - default - - prune_libtool_files -} diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2_p19-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2_p19-r1.ebuild deleted file mode 100644 index 8547e2cb78..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2_p19-r1.ebuild +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit autotools eutils flag-o-matic - -DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" -HOMEPAGE="https://www.gnu.org/software/parted" -SRC_URI=" - mirror://gnu/${PN}/${P/_p*/}.tar.xz - mirror://debian/pool/main/p/${PN}/${PN}_${PV/_p/-}.debian.tar.xz -" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="+debug device-mapper nls readline selinux static-libs" -RESTRICT="test" - -# specific version for gettext needed -# to fix bug 85999 -RDEPEND=" - >=sys-fs/e2fsprogs-1.27 - device-mapper? ( >=sys-fs/lvm2-2.02.45 ) - readline? ( >=sys-libs/readline-5.2:0= >=sys-libs/ncurses-5.7-r7:0= ) - selinux? ( sys-libs/libselinux ) - elibc_uclibc? ( dev-libs/libiconv ) -" -DEPEND=" - ${RDEPEND} - nls? ( >=sys-devel/gettext-0.12.1-r2 ) - virtual/pkgconfig -" -PATCHES=( - "${FILESDIR}"/${PN}-3.2-devmapper.patch - "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch - "${FILESDIR}"/${PN}-3.2-sysmacros.patch -) -S=${WORKDIR}/${P/_p*/} - -src_prepare() { - default - sed -i -e '/atari\.patch/d' "${WORKDIR}"/debian/patches/series || die - for patch in $(< "${WORKDIR}"/debian/patches/series); do - eapply "${WORKDIR}/debian/patches/$patch" - done - - eautoreconf -} - -src_configure() { - use elibc_uclibc && append-libs -liconv - econf \ - $(use_enable debug) \ - $(use_enable device-mapper) \ - $(use_enable nls) \ - $(use_enable selinux) \ - $(use_enable static-libs static) \ - $(use_with readline) \ - --disable-rpath \ - --disable-silent-rules -} - -DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} ) - -src_install() { - default - - prune_libtool_files -} diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2_p20-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2_p20-r1.ebuild deleted file mode 100644 index 8547e2cb78..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.2_p20-r1.ebuild +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit autotools eutils flag-o-matic - -DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" -HOMEPAGE="https://www.gnu.org/software/parted" -SRC_URI=" - mirror://gnu/${PN}/${P/_p*/}.tar.xz - mirror://debian/pool/main/p/${PN}/${PN}_${PV/_p/-}.debian.tar.xz -" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="+debug device-mapper nls readline selinux static-libs" -RESTRICT="test" - -# specific version for gettext needed -# to fix bug 85999 -RDEPEND=" - >=sys-fs/e2fsprogs-1.27 - device-mapper? ( >=sys-fs/lvm2-2.02.45 ) - readline? ( >=sys-libs/readline-5.2:0= >=sys-libs/ncurses-5.7-r7:0= ) - selinux? ( sys-libs/libselinux ) - elibc_uclibc? ( dev-libs/libiconv ) -" -DEPEND=" - ${RDEPEND} - nls? ( >=sys-devel/gettext-0.12.1-r2 ) - virtual/pkgconfig -" -PATCHES=( - "${FILESDIR}"/${PN}-3.2-devmapper.patch - "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch - "${FILESDIR}"/${PN}-3.2-sysmacros.patch -) -S=${WORKDIR}/${P/_p*/} - -src_prepare() { - default - sed -i -e '/atari\.patch/d' "${WORKDIR}"/debian/patches/series || die - for patch in $(< "${WORKDIR}"/debian/patches/series); do - eapply "${WORKDIR}/debian/patches/$patch" - done - - eautoreconf -} - -src_configure() { - use elibc_uclibc && append-libs -liconv - econf \ - $(use_enable debug) \ - $(use_enable device-mapper) \ - $(use_enable nls) \ - $(use_enable selinux) \ - $(use_enable static-libs static) \ - $(use_with readline) \ - --disable-rpath \ - --disable-silent-rules -} - -DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} ) - -src_install() { - default - - prune_libtool_files -} diff --git a/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.4.ebuild b/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.4.ebuild new file mode 100644 index 0000000000..67d60f004c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-block/parted/parted-3.4.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit verify-sig + +DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" +HOMEPAGE="https://www.gnu.org/software/parted/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz + verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="+debug device-mapper nls readline" + +# util-linux for libuuid +RDEPEND=" + >=sys-fs/e2fsprogs-1.27 + sys-apps/util-linux + device-mapper? ( >=sys-fs/lvm2-2.02.45 ) + readline? ( + >=sys-libs/ncurses-5.7-r7:0= + >=sys-libs/readline-5.2:0= + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + nls? ( >=sys-devel/gettext-0.12.1-r2 ) + verify-sig? ( sec-keys/openpgp-keys-bcl ) + virtual/pkgconfig +" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/bcl.asc + +PATCHES=( + "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch + "${FILESDIR}"/${PN}-3.3-atari.patch +) + +src_prepare() { + default + touch doc/pt_BR/Makefile.in || die +} + +src_configure() { + local myconf=( + $(use_enable debug) + $(use_enable device-mapper) + $(use_enable nls) + $(use_with readline) + --disable-rpath + --disable-static + ) + econf "${myconf[@]}" +} + +DOCS=( + AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} +) + +src_install() { + default + find "${ED}" -type f -name '*.la' -delete || die +} From eef0962cf60ef226033e8c6a3eaad3ec1c2ec675 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 7 Jan 2022 15:48:36 +0100 Subject: [PATCH 50/53] eclass/virtualx: Sync with gentoo It's from gentoo commit 3a34d9930357ff882123aa4004ac7f568d2269fd. --- .../portage-stable/eclass/virtualx.eclass | 146 ++++-------------- 1 file changed, 28 insertions(+), 118 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/virtualx.eclass b/sdk_container/src/third_party/portage-stable/eclass/virtualx.eclass index fb6a867a35..9d446cfdd3 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/virtualx.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/virtualx.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: virtualx.eclass @@ -6,25 +6,19 @@ # x11@gentoo.org # @AUTHOR: # Original author: Martin Schlemmer -# @SUPPORTED_EAPIS: 4 5 6 7 -# @BLURB: This eclass can be used for packages that needs a working X environment to build. +# @SUPPORTED_EAPIS: 6 7 8 +# @BLURB: This eclass can be used for packages that need a working X environment to build. -if [[ ! ${_VIRTUAL_X} ]]; then - -case "${EAPI:-0}" in - 0|1|2|3) - die "virtualx.eclass: EAPI ${EAPI} is too old." - ;; - 4|5|6|7) - ;; - *) - die "virtualx.eclass: EAPI ${EAPI} is not supported yet." - ;; +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported." ;; esac -[[ ${EAPI} == [45] ]] && inherit eutils +if [[ ! ${_VIRTUALX_ECLASS} ]]; then +_VIRTUALX_ECLASS=1 # @ECLASS-VARIABLE: VIRTUALX_REQUIRED +# @PRE_INHERIT # @DESCRIPTION: # Variable specifying the dependency on xorg-server and xhost. # Possible special values are "always" and "manual", which specify @@ -35,83 +29,36 @@ esac : ${VIRTUALX_REQUIRED:=test} # @ECLASS-VARIABLE: VIRTUALX_DEPEND +# @OUTPUT_VARIABLE # @DESCRIPTION: -# Dep string available for use outside of eclass, in case a more -# complicated dep is needed. -# You can specify the variable BEFORE inherit to add more dependencies. -VIRTUALX_DEPEND="${VIRTUALX_DEPEND} - !prefix? ( x11-base/xorg-server[xvfb] ) +# Standard dependencies string that is automatically added to BDEPEND +# (in EAPI-6: DEPEND) unless VIRTUALX_REQUIRED is set to "manual". +# DEPRECATED: Pre-EAPI-8 you can specify the variable BEFORE inherit +# to add more dependencies. +[[ ${EAPI} != [67] ]] && VIRTUALX_DEPEND="" +VIRTUALX_DEPEND+=" + x11-base/xorg-server[xvfb] x11-apps/xhost " +[[ ${EAPI} != [67] ]] && readonly VIRTUALX_DEPEND -# @ECLASS-VARIABLE: VIRTUALX_COMMAND -# @DESCRIPTION: -# Command (or eclass function call) to be run in the X11 environment -# (within virtualmake function). -: ${VIRTUALX_COMMAND:="emake"} +[[ ${VIRTUALX_COMMAND} ]] && die "VIRTUALX_COMMAND has been removed and is a no-op" case ${VIRTUALX_REQUIRED} in manual) ;; always) - if [[ ${EAPI:-0} != [0123456] ]]; then - BDEPEND="${VIRTUALX_DEPEND}" - else - DEPEND="${VIRTUALX_DEPEND}" - fi - RDEPEND="" - ;; - optional|tests) - [[ ${EAPI} == [45] ]] \ - || die 'Values "optional" and "tests" for VIRTUALX_REQUIRED are banned in EAPI > 5' - # deprecated section YAY. - eqawarn "VIRTUALX_REQUIRED=optional and VIRTUALX_REQUIRED=tests are deprecated." - eqawarn "You can drop the variable definition completely from ebuild," - eqawarn "because it is default behaviour." - - if [[ -n ${VIRTUALX_USE} ]]; then - # so they like to specify the useflag - eqawarn "VIRTUALX_USE variable is deprecated." - eqawarn "Please read eclass manpage to find out how to use VIRTUALX_REQUIRED" - eqawarn "to achieve the same behaviour." - fi - - [[ -z ${VIRTUALX_USE} ]] && VIRTUALX_USE="test" - DEPEND="${VIRTUALX_USE}? ( ${VIRTUALX_DEPEND} )" - RDEPEND="" - IUSE="${VIRTUALX_USE}" + BDEPEND="${VIRTUALX_DEPEND}" ;; *) - if [[ ${EAPI:-0} != [0123456] ]]; then - BDEPEND="${VIRTUALX_REQUIRED}? ( ${VIRTUALX_DEPEND} )" - else - DEPEND="${VIRTUALX_REQUIRED}? ( ${VIRTUALX_DEPEND} )" - fi - RDEPEND="" + BDEPEND="${VIRTUALX_REQUIRED}? ( ${VIRTUALX_DEPEND} )" IUSE="${VIRTUALX_REQUIRED}" + [[ ${VIRTUALX_REQUIRED} == test ]] && + RESTRICT+=" !test? ( test )" ;; esac -# @FUNCTION: virtualmake -# @DESCRIPTION: -# Function which start new Xvfb session -# where the VIRTUALX_COMMAND variable content gets executed. -virtualmake() { - debug-print-function ${FUNCNAME} "$@" - - [[ ${EAPI} == [45] ]] \ - || die "${FUNCNAME} is unsupported in EAPI > 5, please use virtx" - - # backcompat for maketype - if [[ -n ${maketype} ]]; then - [[ ${EAPI} == [45] ]] || die "maketype is banned in EAPI > 5" - eqawarn "ebuild is exporting \$maketype=${maketype}" - eqawarn "Ebuild should be migrated to use 'virtx command' instead." - VIRTUALX_COMMAND=${maketype} - fi - - virtx "${VIRTUALX_COMMAND}" "${@}" -} +[[ ${EAPI} == 6 ]] && DEPEND="${BDEPEND}" # @FUNCTION: virtx @@ -178,7 +125,10 @@ virtx() { # Xvfb is started, else bump the display number # # Azarah - 5 May 2002 - XDISPLAY=$(i=0; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i}) + # GNOME GDM may have started X on DISPLAY :0 with a + # lock file /tmp/.X1024-lock, therefore start the search at 1. + # Else a leftover /tmp/.X1-lock will prevent finding an available display. + XDISPLAY=$(i=1; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i}) debug-print "${FUNCNAME}: XDISPLAY=${XDISPLAY}" # We really do not want SANDBOX enabled here @@ -226,44 +176,4 @@ virtx() { return 0 # always return 0, it can be altered by failed kill for Xvfb } -# @FUNCTION: Xmake -# @DESCRIPTION: -# Same as "make", but set up the Xvfb hack if needed. -# Deprecated call. -Xmake() { - debug-print-function ${FUNCNAME} "$@" - - [[ ${EAPI} == [45] ]] \ - || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx emake -j1 ....'" - - eqawarn "you should not execute make directly" - eqawarn "rather execute Xemake -j1 if you have issues with parallel make" - VIRTUALX_COMMAND="emake -j1" virtualmake "$@" -} - -# @FUNCTION: Xemake -# @DESCRIPTION: -# Same as "emake", but set up the Xvfb hack if needed. -Xemake() { - debug-print-function ${FUNCNAME} "$@" - - [[ ${EAPI} == [45] ]] \ - || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx emake ....'" - - VIRTUALX_COMMAND="emake" virtualmake "$@" -} - -# @FUNCTION: Xeconf -# @DESCRIPTION: -# Same as "econf", but set up the Xvfb hack if needed. -Xeconf() { - debug-print-function ${FUNCNAME} "$@" - - [[ ${EAPI} == [45] ]] \ - || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx econf ....'" - - VIRTUALX_COMMAND="econf" virtualmake "$@" -} - -_VIRTUAL_X=1 fi From 223c1090e57882508a1ba76bd938e39672b7ac29 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 7 Jan 2022 15:52:51 +0100 Subject: [PATCH 51/53] eclass/virtualx: Support EAPI 4 --- .../portage-stable/eclass/virtualx.eclass | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/virtualx.eclass b/sdk_container/src/third_party/portage-stable/eclass/virtualx.eclass index 9d446cfdd3..948e5ce3d4 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/virtualx.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/virtualx.eclass @@ -1,16 +1,17 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Support EAPI 4 and 5. + # @ECLASS: virtualx.eclass # @MAINTAINER: # x11@gentoo.org # @AUTHOR: # Original author: Martin Schlemmer -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 4 5 6 7 8 # @BLURB: This eclass can be used for packages that need a working X environment to build. - case ${EAPI} in - 6|7|8) ;; + 4|5|6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported." ;; esac @@ -35,12 +36,12 @@ _VIRTUALX_ECLASS=1 # (in EAPI-6: DEPEND) unless VIRTUALX_REQUIRED is set to "manual". # DEPRECATED: Pre-EAPI-8 you can specify the variable BEFORE inherit # to add more dependencies. -[[ ${EAPI} != [67] ]] && VIRTUALX_DEPEND="" +[[ ${EAPI} != [4567] ]] && VIRTUALX_DEPEND="" VIRTUALX_DEPEND+=" x11-base/xorg-server[xvfb] x11-apps/xhost " -[[ ${EAPI} != [67] ]] && readonly VIRTUALX_DEPEND +[[ ${EAPI} != [4567] ]] && readonly VIRTUALX_DEPEND [[ ${VIRTUALX_COMMAND} ]] && die "VIRTUALX_COMMAND has been removed and is a no-op" @@ -58,7 +59,7 @@ case ${VIRTUALX_REQUIRED} in ;; esac -[[ ${EAPI} == 6 ]] && DEPEND="${BDEPEND}" +[[ ${EAPI} == [456] ]] && DEPEND="${BDEPEND}" # @FUNCTION: virtx From a760bf297fd0e56478313ef6aa4d1030694a6808 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 7 Jan 2022 16:00:49 +0100 Subject: [PATCH 52/53] eclass: Drop another unused eclasses --- .../eclass/kde5-functions.eclass | 337 -------- .../portage-stable/eclass/kde5.eclass | 732 ------------------ 2 files changed, 1069 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/eclass/kde5-functions.eclass delete mode 100644 sdk_container/src/third_party/portage-stable/eclass/kde5.eclass diff --git a/sdk_container/src/third_party/portage-stable/eclass/kde5-functions.eclass b/sdk_container/src/third_party/portage-stable/eclass/kde5-functions.eclass deleted file mode 100644 index d2f85c077c..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/kde5-functions.eclass +++ /dev/null @@ -1,337 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: kde5-functions.eclass -# @MAINTAINER: -# kde@gentoo.org -# @SUPPORTED_EAPIS: 6 7 -# @BLURB: Common ebuild functions for packages based on KDE Frameworks 5. -# @DESCRIPTION: -# This eclass contains functions shared by the other KDE eclasses and forms -# part of their public API. -# -# This eclass should (almost) never be inherited directly by an ebuild. - -if [[ -z ${_KDE5_FUNCTIONS_ECLASS} ]]; then -_KDE5_FUNCTIONS_ECLASS=1 - -inherit toolchain-funcs - -case ${EAPI} in - 7) ;; - 6) inherit eapi7-ver ;; - *) die "EAPI=${EAPI:-0} is not supported" ;; -esac - -# @ECLASS-VARIABLE: KDE_BUILD_TYPE -# @DESCRIPTION: -# If PV matches "*9999*", this is automatically set to "live". -# Otherwise, this is automatically set to "release". -KDE_BUILD_TYPE="release" -if [[ ${PV} = *9999* ]]; then - KDE_BUILD_TYPE="live" -fi -export KDE_BUILD_TYPE - -case ${CATEGORY} in - kde-frameworks) - [[ ${KDE_BUILD_TYPE} = live ]] && : ${FRAMEWORKS_MINIMAL:=9999} - ;; - kde-plasma) - [[ ${PV} = 5.15.5 ]] && : ${QT_MINIMAL:=5.11.1} - [[ ${PV} = 5.16* ]] && : ${FRAMEWORKS_MINIMAL:=5.58.0} - [[ ${KDE_BUILD_TYPE} = live ]] && : ${FRAMEWORKS_MINIMAL:=9999} - : ${QT_MINIMAL:=5.12.3} - ;; -esac - -# @ECLASS-VARIABLE: QT_MINIMAL -# @DESCRIPTION: -# Minimum version of Qt to require. This affects add_qt_dep. -: ${QT_MINIMAL:=5.11.1} - -# @ECLASS-VARIABLE: FRAMEWORKS_MINIMAL -# @DESCRIPTION: -# Minimum version of Frameworks to require. This affects add_frameworks_dep. -: ${FRAMEWORKS_MINIMAL:=5.57.0} - -# @ECLASS-VARIABLE: PLASMA_MINIMAL -# @DESCRIPTION: -# Minimum version of Plasma to require. This affects add_plasma_dep. -: ${PLASMA_MINIMAL:=5.14.5} - -# @ECLASS-VARIABLE: KDE_APPS_MINIMAL -# @DESCRIPTION: -# Minimum version of KDE Applications to require. This affects add_kdeapps_dep. -: ${KDE_APPS_MINIMAL:=18.12.3} - -# @ECLASS-VARIABLE: KDE_GCC_MINIMAL -# @DEFAULT_UNSET -# @DESCRIPTION: -# Minimum version of active GCC to require. This is checked in kde5.eclass in -# kde5_pkg_pretend and kde5_pkg_setup. - -# @FUNCTION: _check_gcc_version -# @INTERNAL -# @DESCRIPTION: -# Determine if the current GCC version is acceptable, otherwise die. -_check_gcc_version() { - if [[ ${MERGE_TYPE} != binary && -v KDE_GCC_MINIMAL ]] && tc-is-gcc; then - - local version=$(gcc-version) - local major=${version%.*} - local minor=${version#*.} - local min_major=${KDE_GCC_MINIMAL%.*} - local min_minor=${KDE_GCC_MINIMAL#*.} - - debug-print "GCC version check activated" - debug-print "Version detected:" - debug-print " - Full: ${version}" - debug-print " - Major: ${major}" - debug-print " - Minor: ${minor}" - debug-print "Version required:" - debug-print " - Major: ${min_major}" - debug-print " - Minor: ${min_minor}" - - [[ ${major} -lt ${min_major} ]] || \ - ( [[ ${major} -eq ${min_major} && ${minor} -lt ${min_minor} ]] ) \ - && die "Sorry, but gcc-${KDE_GCC_MINIMAL} or later is required for this package (found ${version})." - fi -} - -# @FUNCTION: _add_category_dep -# @INTERNAL -# @DESCRIPTION: -# Implementation of add_plasma_dep, add_frameworks_dep, add_kdeapps_dep, -# and finally, add_qt_dep. -_add_category_dep() { - debug-print-function ${FUNCNAME} "$@" - - local category=${1} - local package=${2} - local use=${3} - local version=${4} - local slot=${5} - - if [[ -n ${use} ]] ; then - local use="[${use}]" - fi - - if [[ -n ${version} ]] ; then - local operator=">=" - local version="-${version}" - fi - - if [[ -n ${slot} ]] ; then - slot=":${slot}" - elif [[ ${SLOT%\/*} = 5 ]] ; then - slot=":${SLOT%\/*}" - fi - - echo " ${operator}${category}/${package}${version}${slot}${use}" -} - -# @FUNCTION: add_frameworks_dep -# @USAGE: [USE flags] [minimum version] [slot + operator] -# @DESCRIPTION: -# Create proper dependency for kde-frameworks/ dependencies. -# This takes 1 to 4 arguments. The first being the package name, the optional -# second is additional USE flags to append, and the optional third is the -# version to use instead of the automatic version (use sparingly). In addition, -# the optional fourth argument defines slot+operator instead of automatic slot -# (use even more sparingly). -# The output of this should be added directly to DEPEND/RDEPEND, and may be -# wrapped in a USE conditional (but not an || conditional without an extra set -# of parentheses). -add_frameworks_dep() { - debug-print-function ${FUNCNAME} "$@" - - if [[ $# -gt 4 ]]; then - die "${FUNCNAME} was called with too many arguments" - fi - - local version - - if [[ -n ${3} ]]; then - version=${3} - elif [[ ${CATEGORY} = kde-frameworks ]]; then - version=$(ver_cut 1-2) - elif [[ -z ${3} ]] ; then - version=${FRAMEWORKS_MINIMAL} - fi - - _add_category_dep kde-frameworks "${1}" "${2}" "${version}" "${4}" -} - -# @FUNCTION: add_plasma_dep -# @USAGE: [USE flags] [minimum version] [slot + operator] -# @DESCRIPTION: -# Create proper dependency for kde-plasma/ dependencies. -# This takes 1 to 4 arguments. The first being the package name, the optional -# second is additional USE flags to append, and the optional third is the -# version to use instead of the automatic version (use sparingly). In addition, -# the optional fourth argument defines slot+operator instead of automatic slot -# (use even more sparingly). -# The output of this should be added directly to DEPEND/RDEPEND, and may be -# wrapped in a USE conditional (but not an || conditional without an extra set -# of parentheses). -add_plasma_dep() { - debug-print-function ${FUNCNAME} "$@" - - if [[ $# -gt 4 ]]; then - die "${FUNCNAME} was called with too many arguments" - fi - - local version - - if [[ -n ${3} ]]; then - version=${3} - elif [[ ${CATEGORY} = kde-plasma ]]; then - version=$(ver_cut 1-3) - elif [[ -z ${3} ]] ; then - version=${PLASMA_MINIMAL} - fi - - _add_category_dep kde-plasma "${1}" "${2}" "${version}" "${4}" -} - -# @FUNCTION: add_kdeapps_dep -# @USAGE: [USE flags] [minimum version] [slot + operator] -# @DESCRIPTION: -# Create proper dependency for kde-apps/ dependencies. -# This takes 1 to 4 arguments. The first being the package name, the optional -# second is additional USE flags to append, and the optional third is the -# version to use instead of the automatic version (use sparingly). In addition, -# the optional fourth argument defines slot+operator instead of automatic slot -# (use even more sparingly). -# The output of this should be added directly to DEPEND/RDEPEND, and may be -# wrapped in a USE conditional (but not an || conditional without an extra set -# of parentheses). -add_kdeapps_dep() { - debug-print-function ${FUNCNAME} "$@" - - if [[ $# -gt 4 ]]; then - die "${FUNCNAME} was called with too many arguments" - fi - - local version - - if [[ -n ${3} ]]; then - version=${3} - elif [[ ${CATEGORY} = kde-apps ]]; then - version=$(ver_cut 1-3) - elif [[ -z ${3} ]] ; then - version=${KDE_APPS_MINIMAL} - fi - - _add_category_dep kde-apps "${1}" "${2}" "${version}" "${4}" -} - -# @FUNCTION: add_qt_dep -# @USAGE: [USE flags] [minimum version] [slot + operator] -# @DESCRIPTION: -# Create proper dependency for dev-qt/ dependencies. -# This takes 1 to 4 arguments. The first being the package name, the optional -# second is additional USE flags to append, and the optional third is the -# version to use instead of the automatic version (use sparingly). In addition, -# the optional fourth argument defines slot+operator instead of automatic slot -# (use even more sparingly). -# The output of this should be added directly to DEPEND/RDEPEND, and may be -# wrapped in a USE conditional (but not an || conditional without an extra set -# of parentheses). -add_qt_dep() { - debug-print-function ${FUNCNAME} "$@" - - if [[ $# -gt 4 ]]; then - die "${FUNCNAME} was called with too many arguments" - fi - - local version=${3} - local slot=${4} - - if [[ -z ${version} ]]; then - version=${QT_MINIMAL} - if [[ ${1} = qtwebkit ]]; then - version=5.9.1 - [[ ${EAPI} != 6 ]] && die "${FUNCNAME} is disallowed for 'qtwebkit' in EAPI 7 and later" - fi - fi - if [[ -z ${slot} ]]; then - slot="5" - fi - - _add_category_dep dev-qt "${1}" "${2}" "${version}" "${slot}" -} - -# @FUNCTION: get_kde_version [version] -# @DESCRIPTION: -# Translates an ebuild version into a major.minor KDE release version, taking -# into account KDE's prerelease versioning scheme. -# For example, get_kde_version 17.07.80 will return "17.08". -# If the version equals 9999, "live" is returned. -# If no version is specified, ${PV} is used. -get_kde_version() { - [[ ${EAPI} != 6 ]] && die "${FUNCNAME} is banned in EAPI 7 and later" - local ver=${1:-${PV}} - local major=$(ver_cut 1 ${ver}) - local minor=$(ver_cut 2 ${ver}) - local micro=$(ver_cut 3 ${ver}) - if [[ ${ver} == 9999 ]]; then - echo live - else - (( micro < 50 )) && echo ${major}.${minor} || echo ${major}.$((minor + 1)) - fi -} - -# @FUNCTION: kde_l10n2lingua -# @USAGE: ... -# @INTERNAL -# @DESCRIPTION: -# Output KDE lingua flag name(s) (without prefix(es)) appropriate for -# given l10n(s). -kde_l10n2lingua() { - [[ ${EAPI} != 6 ]] && die "${FUNCNAME} is banned in EAPI 7 and later" - local l - for l; do - case ${l} in - ca-valencia) echo ca@valencia;; - sr-ijekavsk) echo sr@ijekavian;; - sr-Latn-ijekavsk) echo sr@ijekavianlatin;; - sr-Latn) echo sr@latin;; - uz-Cyrl) echo uz@cyrillic;; - *) echo "${l/-/_}";; - esac - done -} - -# @FUNCTION: punt_bogus_dep -# @USAGE: -# @DESCRIPTION: -# Removes a specified dependency from a find_package call with multiple components. -punt_bogus_dep() { - local prefix=${1} - local dep=${2} - - if [[ ! -e "CMakeLists.txt" ]]; then - return - fi - - pcregrep -Mni "(?s)find_package\s*\(\s*${prefix}[^)]*?${dep}.*?\)" CMakeLists.txt > "${T}/bogus${dep}" - - # pcregrep returns non-zero on no matches/error - if [[ $? != 0 ]] ; then - return - fi - - local length=$(wc -l "${T}/bogus${dep}" | cut -d " " -f 1) - local first=$(head -n 1 "${T}/bogus${dep}" | cut -d ":" -f 1) - local last=$(( ${length} + ${first} - 1)) - - sed -e "${first},${last}s/${dep}//" -i CMakeLists.txt || die - - if [[ ${length} = 1 ]] ; then - sed -e "/find_package\s*(\s*${prefix}\(\s\+\(REQUIRED\|CONFIG\|COMPONENTS\|\${[A-Z0-9_]*}\)\)\+\s*)/Is/^/# removed by kde5-functions.eclass - /" -i CMakeLists.txt || die - fi -} - -fi diff --git a/sdk_container/src/third_party/portage-stable/eclass/kde5.eclass b/sdk_container/src/third_party/portage-stable/eclass/kde5.eclass deleted file mode 100644 index 4f38f47d60..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/kde5.eclass +++ /dev/null @@ -1,732 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: kde5.eclass -# @MAINTAINER: -# kde@gentoo.org -# @BLURB: Support eclass for packages that follow KDE packaging conventions. -# @DESCRIPTION: -# This eclass is intended to streamline the creation of ebuilds for packages -# that follow KDE upstream packaging conventions. It's primarily intended for -# the three upstream release groups (Frameworks, Plasma, Applications) but -# is also for any package that follows similar conventions. -# -# This eclass unconditionally inherits kde5-functions.eclass and all its public -# functions and variables may be considered as part of this eclass's API. -# -# This eclass unconditionally inherits cmake-utils.eclass and all its public -# variables and helper functions (not phase functions) may be considered as part -# of this eclass's API. -# -# This eclass's phase functions are not intended to be mixed and matched, so if -# any phase functions are overridden the version here should also be called. - -if [[ -z ${_KDE5_ECLASS} ]]; then -_KDE5_ECLASS=1 - -# @ECLASS-VARIABLE: VIRTUALX_REQUIRED -# @DESCRIPTION: -# For proper description see virtualx.eclass manpage. -# Here we redefine default value to be manual, if your package needs virtualx -# for tests you should proceed with setting VIRTUALX_REQUIRED=test. -: ${VIRTUALX_REQUIRED:=manual} - -inherit cmake-utils flag-o-matic kde5-functions virtualx xdg - -case ${EAPI} in - 6) inherit eapi7-ver eutils gnome2-utils ;; -esac - -if [[ ${KDE_BUILD_TYPE} = live ]]; then - inherit git-r3 -fi - -if [[ -v KDE_GCC_MINIMAL ]]; then - EXPORT_FUNCTIONS pkg_pretend -fi - -EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm - -# @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS -# @DESCRIPTION: -# If set to "false", do nothing. -# For any other value, assume the package is using KDEInstallDirs macro and switch -# KDE_INSTALL_USE_QT_SYS_PATHS to ON. -: ${ECM_KDEINSTALLDIRS:=true} - -# @ECLASS-VARIABLE: KDE_AUTODEPS -# @DESCRIPTION: -# If set to "false", do nothing. -# For any other value, add dependencies on dev-qt/qtcore:5, kde-frameworks/kf-env -# and kde-frameworks/extra-cmake-modules:5. Additionally, required blockers may -# be set depending on the value of CATEGORY. -: ${KDE_AUTODEPS:=true} - -# @ECLASS-VARIABLE: KDE_BLOCK_SLOT4 -# @DESCRIPTION: -# This variable only has any effect when when CATEGORY = "kde-apps" and -# KDE_AUTODEPS is also set. If set to "true", add RDEPEND block on kde-apps/${PN}:4 -: ${KDE_BLOCK_SLOT4:=true} - -# @ECLASS-VARIABLE: KDE_DEBUG -# @DESCRIPTION: -# If set to "false", add -DNDEBUG (via cmake-utils_src_configure) and -DQT_NO_DEBUG -# to CPPFLAGS. -# Otherwise, add debug to IUSE. -: ${KDE_DEBUG:=true} - -# @ECLASS-VARIABLE: KDE_DESIGNERPLUGIN -# @DESCRIPTION: -# If set to "false", do nothing. -# Otherwise, add "designer" to IUSE to toggle build of designer plugins -# and add the necessary DEPENDs. -: ${KDE_DESIGNERPLUGIN:=false} - -# @ECLASS-VARIABLE: KDE_EXAMPLES -# @DESCRIPTION: -# If set to "false", unconditionally ignore a top-level examples subdirectory. -# Otherwise, add "examples" to IUSE to toggle adding that subdirectory. -: ${KDE_EXAMPLES:=false} - -# @ECLASS-VARIABLE: KDE_HANDBOOK -# @DESCRIPTION: -# If set to "false", do nothing. -# Otherwise, add "+handbook" to IUSE, add the appropriate dependency, and -# generate and install KDE handbook. -# If set to "optional", config with -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON -# when USE=!handbook. In case package requires KF5KDELibs4Support, see next: -# If set to "forceoptional", remove a KF5DocTools dependency from the root -# CMakeLists.txt in addition to the above. -: ${KDE_HANDBOOK:=false} - -# @ECLASS-VARIABLE: KDE_DOC_DIR -# @DESCRIPTION: -# Specifies the location of the KDE handbook if not the default. -: ${KDE_DOC_DIR:=doc} - -# @ECLASS-VARIABLE: KDE_PO_DIRS -# @DESCRIPTION: -# Specifies the possible locations of KDE l10n files if not the default. -: ${KDE_PO_DIRS:="po poqm"} - -# @ECLASS-VARIABLE: KDE_QTHELP -# @DESCRIPTION: -# If set to "false", do nothing. -# Otherwise, add "doc" to IUSE, add the appropriate dependency, generate -# and install Qt compressed help files with -DBUILD_QCH=ON when USE=doc. -if [[ ${CATEGORY} = kde-frameworks ]]; then - : ${KDE_QTHELP:=true} -fi -: ${KDE_QTHELP:=false} - -# @ECLASS-VARIABLE: KDE_TEST -# @DESCRIPTION: -# If set to "false", do nothing. -# For any other value, add test to IUSE and add a dependency on dev-qt/qttest:5. -# If set to "optional", configure with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON -# when USE=!test. -# If set to "forceoptional", remove a Qt5Test dependency and comment test -# subdirs from the root CMakeLists.txt in addition to the above. -# If set to "forceoptional-recursive", remove Qt5Test dependencies and make -# autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt in ${S} -# and below conditional on BUILD_TESTING. This is always meant as a short-term -# fix and creates ${T}/${P}-tests-optional.patch to refine and submit upstream. -if [[ ${CATEGORY} = kde-frameworks ]]; then - : ${KDE_TEST:=true} -fi -: ${KDE_TEST:=false} - -# @ECLASS-VARIABLE: KDE_SELINUX_MODULE -# @DESCRIPTION: -# If set to "none", do nothing. -# For any other value, add selinux to IUSE, and depending on that useflag -# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND. -: ${KDE_SELINUX_MODULE:=none} - -# @ECLASS-VARIABLE: KDE_SUBSLOT -# @DESCRIPTION: -# If set to "false", do nothing. -# If set to "true", add a subslot to the package, where subslot is either -# defined as major.minor version for kde-*/ categories or ${PV} if other. -# For any other value, that value will be used as subslot. -: ${KDE_SUBSLOT:=false} - -# @ECLASS-VARIABLE: KDE_UNRELEASED -# @INTERNAL -# @DESCRIPTION -# An array of $CATEGORY-$PV pairs of packages that are unreleased upstream. -# Any package matching this will have fetch restriction enabled, and receive -# a proper error message via pkg_nofetch. -KDE_UNRELEASED=( ) - -HOMEPAGE="https://kde.org/" -LICENSE="GPL-2" - -SLOT=5 - -if [[ ${CATEGORY} = kde-frameworks ]]; then - KDE_SUBSLOT=true -fi - -case ${KDE_SUBSLOT} in - false) ;; - true) - case ${CATEGORY} in - kde-frameworks | \ - kde-plasma | \ - kde-apps) - SLOT+="/$(ver_cut 1-2)" - ;; - *) - SLOT+="/${PV}" - ;; - esac - ;; - *) - SLOT+="/${KDE_SUBSLOT}" - ;; -esac - -case ${KDE_AUTODEPS} in - false) ;; - *) - BDEPEND+=" $(add_frameworks_dep extra-cmake-modules)" - RDEPEND+=" >=kde-frameworks/kf-env-4" - COMMONDEPEND+=" $(add_qt_dep qtcore)" - - # all packages need breeze/oxygen icons for basic iconset, bug #564838 - if [[ ${PN} != breeze-icons && ${PN} != oxygen-icons ]]; then - RDEPEND+=" || ( $(add_frameworks_dep breeze-icons) kde-frameworks/oxygen-icons:* )" - fi - ;; -esac - -case ${KDE_DEBUG} in - false) ;; - *) - IUSE+=" debug" - ;; -esac - -case ${KDE_DESIGNERPLUGIN} in - false) ;; - *) - IUSE+=" designer" - BDEPEND+=" designer? ( $(add_frameworks_dep kdesignerplugin) )" -esac - -case ${KDE_EXAMPLES} in - false) ;; - *) - IUSE+=" examples" - ;; -esac - -case ${KDE_HANDBOOK} in - false) ;; - *) - IUSE+=" +handbook" - BDEPEND+=" handbook? ( $(add_frameworks_dep kdoctools) )" - ;; -esac - -case ${KDE_QTHELP} in - false) ;; - *) - IUSE+=" doc" - COMMONDEPEND+=" doc? ( $(add_qt_dep qt-docs) )" - BDEPEND+=" doc? ( - $(add_qt_dep qthelp) - >=app-doc/doxygen-1.8.13-r1 - )" - ;; -esac - -case ${KDE_TEST} in - false) ;; - *) - IUSE+=" test" - DEPEND+=" test? ( $(add_qt_dep qttest) )" - ;; -esac - -case ${KDE_SELINUX_MODULE} in - none) ;; - *) - IUSE+=" selinux" - RDEPEND+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )" - ;; -esac - -case ${EAPI} in - 6) DEPEND+=" ${BDEPEND}" ;; -esac - -DEPEND+=" ${COMMONDEPEND} dev-util/desktop-file-utils" -RDEPEND+=" ${COMMONDEPEND}" -unset COMMONDEPEND - -if [[ -n ${KMNAME} && ${KMNAME} != ${PN} && ${KDE_BUILD_TYPE} = release ]]; then - S=${WORKDIR}/${KMNAME}-${PV} -fi - -_kde_is_unreleased() { - local pair - for pair in "${KDE_UNRELEASED[@]}" ; do - if [[ "${pair}" = "${CATEGORY}-${PV}" ]]; then - return 0 - fi - done - - return 1 -} - -# Determine fetch location for released tarballs -_calculate_src_uri() { - debug-print-function ${FUNCNAME} "$@" - - local _kmname - - if [[ -n ${KMNAME} ]]; then - _kmname=${KMNAME} - else - _kmname=${PN} - fi - - case ${PN} in - kdelibs4support | \ - khtml | \ - kjs | \ - kjsembed | \ - kmediaplayer | \ - kross) - _kmname="portingAids/${_kmname}" - ;; - esac - - case ${CATEGORY} in - kde-apps) - case ${PV} in - ??.?.[6-9]? | ??.??.[6-9]? ) - SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" - RESTRICT+=" mirror" - ;; - *) - SRC_URI="mirror://kde/stable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" ;; - esac - ;; - kde-frameworks) - SRC_URI="mirror://kde/stable/frameworks/${PV%.*}/${_kmname}-${PV}.tar.xz" ;; - kde-plasma) - local plasmapv=$(ver_cut 1-3) - - case ${PV} in - 5.?.[6-9]? | 5.??.[6-9]? ) - # Plasma 5 beta releases - SRC_URI="mirror://kde/unstable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz" - RESTRICT+=" mirror" - ;; - *) - # Plasma 5 stable releases - SRC_URI="mirror://kde/stable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz" ;; - esac - ;; - esac - - if [[ ${PN} = kdevelop* ]]; then - case ${PV} in - *.*.[6-9]? ) - SRC_URI="mirror://kde/unstable/kdevelop/${PV}/src/${_kmname}-${PV}.tar.xz" - RESTRICT+=" mirror" - ;; - *) - SRC_URI="mirror://kde/stable/kdevelop/${PV}/src/${_kmname}-${PV}.tar.xz" ;; - esac - fi - - if _kde_is_unreleased ; then - RESTRICT+=" fetch" - fi -} - -# Determine fetch location for live sources -_calculate_live_repo() { - debug-print-function ${FUNCNAME} "$@" - - SRC_URI="" - - # @ECLASS-VARIABLE: EGIT_MIRROR - # @DESCRIPTION: - # This variable allows easy overriding of default kde mirror service - # (anongit) with anything else you might want to use. - EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org} - - local _kmname - - # @ECLASS-VARIABLE: EGIT_REPONAME - # @DESCRIPTION: - # This variable allows overriding of default repository - # name. Specify only if this differ from PN and KMNAME. - if [[ -n ${EGIT_REPONAME} ]]; then - # the repository and kmname different - _kmname=${EGIT_REPONAME} - elif [[ -n ${KMNAME} ]]; then - _kmname=${KMNAME} - else - _kmname=${PN} - fi - - if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then - EGIT_BRANCH="Applications/$(ver_cut 1-2)" - fi - - if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then - EGIT_BRANCH="Plasma/$(ver_cut 1-2)" - fi - - if [[ ${PV} != 9999 && ${PN} = kdevelop* ]]; then - EGIT_BRANCH="$(ver_cut 1-2)" - fi - - EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" -} - -case ${KDE_BUILD_TYPE} in - live) _calculate_live_repo ;; - *) _calculate_src_uri ;; -esac - -debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}" - -# @FUNCTION: kde5_pkg_pretend -# @DESCRIPTION: -# Checks if the active compiler meets the minimum version requirements. -# phase function is only exported if KDE_GCC_MINIMAL is defined. -kde5_pkg_pretend() { - debug-print-function ${FUNCNAME} "$@" - _check_gcc_version -} - -# @FUNCTION: kde5_pkg_setup -# @DESCRIPTION: -# Checks if the active compiler meets the minimum version requirements. -kde5_pkg_setup() { - debug-print-function ${FUNCNAME} "$@" - _check_gcc_version -} - -# @FUNCTION: kde5_pkg_nofetch -# @DESCRIPTION: -# Intended for use in the KDE overlay. If this package matches something in -# KDE_UNRELEASED, display a giant warning that the package has not yet been -# released upstream and should not be used. -kde5_pkg_nofetch() { - if ! _kde_is_unreleased ; then - return - fi - - eerror " _ _ _ _ ____ _____ _ _____ _ ____ _____ ____ " - eerror "| | | | \ | | _ \| ____| | | ____| / \ / ___|| ____| _ \ " - eerror "| | | | \| | |_) | _| | | | _| / _ \ \___ \| _| | | | |" - eerror "| |_| | |\ | _ <| |___| |___| |___ / ___ \ ___) | |___| |_| |" - eerror " \___/|_| \_|_| \_\_____|_____|_____/_/ \_\____/|_____|____/ " - eerror " " - eerror " ____ _ ____ _ __ _ ____ _____ " - eerror "| _ \ / \ / ___| |/ / / \ / ___| ____|" - eerror "| |_) / _ \| | | ' / / _ \| | _| _| " - eerror "| __/ ___ \ |___| . \ / ___ \ |_| | |___ " - eerror "|_| /_/ \_\____|_|\_\/_/ \_\____|_____|" - eerror - eerror "${CATEGORY}/${P} has not been released to the public yet" - eerror "and is only available to packagers right now." - eerror "" - eerror "This is not a bug. Please do not file bugs or contact upstream about this." - eerror "" - eerror "Please consult the upstream release schedule to see when this " - eerror "package is scheduled to be released:" - eerror "https://community.kde.org/Schedules" -} - -# @FUNCTION: kde5_src_unpack -# @DESCRIPTION: -# Unpack the sources, automatically handling both release and live ebuilds. -kde5_src_unpack() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${KDE_BUILD_TYPE} = live ]]; then - git-r3_src_unpack - else - default - fi -} - -# @FUNCTION: kde5_src_prepare -# @DESCRIPTION: -# Wrapper for cmake-utils_src_prepare with lots of extra logic for magic -# handling of linguas, tests, handbook etc. -kde5_src_prepare() { - debug-print-function ${FUNCNAME} "$@" - - cmake-utils_src_prepare - - # only build examples when required - if ! { in_iuse examples && use examples; } ; then - cmake_comment_add_subdirectory examples - fi - - # only enable handbook when required - if in_iuse handbook && ! use handbook ; then - cmake_comment_add_subdirectory ${KDE_DOC_DIR} - - if [[ ${KDE_HANDBOOK} = forceoptional ]] ; then - punt_bogus_dep KF5 DocTools - sed -i -e "/kdoctools_install/ s/^/#DONT/" CMakeLists.txt || die - fi - fi - - # drop translations when nls is not wanted - if in_iuse nls && ! use nls ; then - local po - for po in ${KDE_PO_DIRS}; do - if [[ -d ${po} ]] ; then - rm -r ${po} || die - fi - done - fi - - # enable only the requested translations when required - if [[ -v LINGUAS ]] ; then - local po - for po in ${KDE_PO_DIRS}; do - if [[ -d ${po} ]] ; then - pushd ${po} > /dev/null || die - local lang - for lang in *; do - if [[ -e ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then - case ${lang} in - cmake_modules | \ - CMakeLists.txt | \ - ${PN}.pot) ;; - *) rm -r ${lang} || die ;; - esac - if [[ -e CMakeLists.txt ]] ; then - cmake_comment_add_subdirectory ${lang} - sed -e "/add_subdirectory([[:space:]]*${lang}\/.*[[:space:]]*)/d" \ - -i CMakeLists.txt || die - fi - fi - done - popd > /dev/null || die - fi - done - fi - - if [[ ${KDE_BUILD_TYPE} = release && ${CATEGORY} != kde-apps ]] ; then - if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && -v LINGUAS ]] ; then - pushd ${KDE_DOC_DIR} > /dev/null || die - local lang - for lang in *; do - if ! has ${lang} ${LINGUAS} ; then - cmake_comment_add_subdirectory ${lang} - fi - done - popd > /dev/null || die - fi - fi - - # only build unit tests when required - if ! { in_iuse test && use test; } ; then - if [[ ${KDE_TEST} = forceoptional ]] ; then - punt_bogus_dep Qt5 Test - # if forceoptional, also cover non-kde categories - cmake_comment_add_subdirectory autotests test tests - elif [[ ${KDE_TEST} = forceoptional-recursive ]] ; then - punt_bogus_dep Qt5 Test - local f pf="${T}/${P}"-tests-optional.patch - touch ${pf} || die "Failed to touch patch file" - for f in $(find . -type f -name "CMakeLists.txt" -exec \ - grep -l "^\s*add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)" {} \;); do - cp ${f} ${f}.old || die "Failed to prepare patch origfile" - pushd ${f%/*} > /dev/null || die - punt_bogus_dep Qt5 Test - sed -i CMakeLists.txt -e \ - "/^#/! s/add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)/if(BUILD_TESTING)\n&\nendif()/" \ - || die - popd > /dev/null || die - diff -Naur ${f}.old ${f} 1>>${pf} - rm ${f}.old || die "Failed to clean up" - done - einfo "Build system was modified by KDE_TEST=forceoptional-recursive." - einfo "Unified diff file ready for pickup in:" - einfo " ${pf}" - einfo "Push it upstream to make this message go away." - elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then - cmake_comment_add_subdirectory autotests test tests - fi - fi - - # in frameworks, tests = manual tests so never build them - if [[ ${CATEGORY} = kde-frameworks ]] && [[ ${PN} != extra-cmake-modules ]]; then - cmake_comment_add_subdirectory tests - fi -} - -# @FUNCTION: kde5_src_configure -# @DESCRIPTION: -# Wrapper for cmake-utils_src_configure with extra logic for magic handling of -# handbook, tests etc. -kde5_src_configure() { - debug-print-function ${FUNCNAME} "$@" - - # we rely on cmake-utils.eclass to append -DNDEBUG too - if in_iuse debug && ! use debug; then - append-cppflags -DQT_NO_DEBUG - fi - - local cmakeargs - - if in_iuse test && ! use test ; then - cmakeargs+=( -DBUILD_TESTING=OFF ) - - if [[ ${KDE_TEST} = optional ]] ; then - cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON ) - fi - fi - - if in_iuse handbook && ! use handbook && [[ ${KDE_HANDBOOK} = optional ]] ; then - cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON ) - fi - - if in_iuse designer && ! use designer && [[ ${KDE_DESIGNERPLUGIN} != false ]] ; then - cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DesignerPlugin=ON ) - fi - - if [[ ${KDE_QTHELP} != false ]]; then - cmakeargs+=( -DBUILD_QCH=$(usex doc) ) - fi - - if [[ ${ECM_KDEINSTALLDIRS} != false ]] ; then - cmakeargs+=( - # install mkspecs in the same directory as qt stuff - -DKDE_INSTALL_USE_QT_SYS_PATHS=ON - ) - # move handbook outside of doc dir for at least two QA warnings, bug 667138 - [[ ${EAPI} != 6 ]] && cmakeargs+=( -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help" ) - fi - - # allow the ebuild to override what we set here - mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}") - - cmake-utils_src_configure -} - -# @FUNCTION: kde5_src_compile -# @DESCRIPTION: -# Wrapper for cmake-utils_src_compile. Currently doesn't do anything extra, but -# is included as part of the API just in case it's needed in the future. -kde5_src_compile() { - debug-print-function ${FUNCNAME} "$@" - - cmake-utils_src_compile "$@" -} - -# @FUNCTION: kde5_src_test -# @DESCRIPTION: -# Wrapper for cmake-utils_src_test with extra logic for magic handling of dbus -# and virtualx. -kde5_src_test() { - debug-print-function ${FUNCNAME} "$@" - - _test_runner() { - if [[ -n "${VIRTUALDBUS_TEST}" ]]; then - export $(dbus-launch) - fi - - cmake-utils_src_test - } - - # When run as normal user during ebuild development with the ebuild command, the - # kde tests tend to access the session DBUS. This however is not possible in a real - # emerge or on the tinderbox. - # > make sure it does not happen, so bad tests can be recognized and disabled - unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID - - if [[ ${VIRTUALX_REQUIRED} = always || ${VIRTUALX_REQUIRED} = test ]]; then - virtx _test_runner - else - _test_runner - fi - - if [[ -n "${DBUS_SESSION_BUS_PID}" ]] ; then - kill ${DBUS_SESSION_BUS_PID} - fi -} - -# @FUNCTION: kde5_src_install -# @DESCRIPTION: -# Wrapper for cmake-utils_src_install with extra logic to avoid compressing -# certain types of files. For example, khelpcenter is not able to read -# compressed handbooks. -kde5_src_install() { - debug-print-function ${FUNCNAME} "$@" - - cmake-utils_src_install - - # We don't want QCH and tags files to be compressed, because then - # cmake can't find the tags and qthelp viewers can't find the docs - local p=$(best_version dev-qt/qtcore:5) - local pv=$(echo ${p/%-r[0-9]*/} | rev | cut -d - -f 1 | rev) - if [[ ${pv} = 5.11* ]]; then - #todo: clean up trailing slash check when EAPI <7 is removed - if [[ -d ${ED%/}/usr/share/doc/qt-${pv} ]]; then - docompress -x /usr/share/doc/qt-${pv} - fi - fi - - if [[ ${EAPI} = 6 ]]; then - # We don't want /usr/share/doc/HTML to be compressed, - # because then khelpcenter can't find the docs - #todo: clean up trailing slash check when EAPI <7 is removed - if [[ -d ${ED%/}/usr/share/doc/HTML ]]; then - docompress -x /usr/share/doc/HTML - fi - fi -} - -# @FUNCTION: kde5_pkg_preinst -# @DESCRIPTION: -# Sets up environment variables required in kde5_pkg_postinst. -kde5_pkg_preinst() { - debug-print-function ${FUNCNAME} "$@" - - xdg_pkg_preinst -} - -# @FUNCTION: kde5_pkg_postinst -# @DESCRIPTION: -# Updates the various XDG caches (icon, desktop, mime) if necessary. -kde5_pkg_postinst() { - debug-print-function ${FUNCNAME} "$@" - - xdg_pkg_postinst - - if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then - if [[ ${KDE_BUILD_TYPE} = live ]]; then - echo - einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}" - einfo "Use it at your own risk." - einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!" - fi - fi -} - -# @FUNCTION: kde5_pkg_postrm -# @DESCRIPTION: -# Updates the various XDG caches (icon, desktop, mime) if necessary. -kde5_pkg_postrm() { - debug-print-function ${FUNCNAME} "$@" - - xdg_pkg_postrm -} - -fi From 6c824c916f805b5d16531b2868dc7c078c8c5507 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 7 Jan 2022 16:10:49 +0100 Subject: [PATCH 53/53] changelog: Add an update entry --- .../changelog/updates/2022-01-07-eclass-updates.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 sdk_container/src/third_party/portage-stable/changelog/updates/2022-01-07-eclass-updates.md diff --git a/sdk_container/src/third_party/portage-stable/changelog/updates/2022-01-07-eclass-updates.md b/sdk_container/src/third_party/portage-stable/changelog/updates/2022-01-07-eclass-updates.md new file mode 100644 index 0000000000..66ebece875 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/changelog/updates/2022-01-07-eclass-updates.md @@ -0,0 +1 @@ +- parted ([3.4](https://savannah.gnu.org/forum/forum.php?forum_id=9924) (includes [3.3](https://savannah.gnu.org/forum/forum.php?forum_id=9569)))