[gentoo-dev] Last rites: dev-ruby/iobuffer
# Hans de Graaff (2022-12-05) # This package has been subsumed into its only consumer: # dev-ruby/nio4r. It is no longer developed, and its last standalone # release was 11 years ago. Removal in 30 days. dev-ruby/iobuffer signature.asc Description: This is a digitally signed message part
[gentoo-dev] [PATCH] llvm.eclass: Set LLVM_SLOT in pkg_setup()
Set LLVM_SLOT in pkg_setup() to the selected LLVM slot, for inspection from the package. For example, it can be used to easily compare the version number. Split get_llvm_slot() out of get_llvm_prefix() to factor out the common code. Signed-off-by: Michał Górny --- eclass/llvm.eclass | 53 ++ 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass index 16596ec2ea66..92c05c308f91 100644 --- a/eclass/llvm.eclass +++ b/eclass/llvm.eclass @@ -87,11 +87,10 @@ DEPEND="!!sys-devel/llvm:0" # Correct values of LLVM slots, newest first. declare -g -r _LLVM_KNOWN_SLOTS=( {16..8} ) -# @FUNCTION: get_llvm_prefix +# @FUNCTION: get_llvm_slot # @USAGE: [-b|-d] [] -# @DESCRIPTION: # Find the newest LLVM install that is acceptable for the package, -# and print an absolute path to it. +# and print its major version number (i.e. slot). # # If -b is specified, the checks are performed relative to BROOT, # and BROOT-path is returned. This is appropriate when your package @@ -114,7 +113,7 @@ declare -g -r _LLVM_KNOWN_SLOTS=( {16..8} ) # is acceptable, false otherwise. If llvm_check_deps() is not defined, # the function defaults to checking whether sys-devel/llvm:${LLVM_SLOT} # is installed. -get_llvm_prefix() { +get_llvm_slot() { debug-print-function ${FUNCNAME} "${@}" local hv_switch=-d @@ -126,23 +125,12 @@ get_llvm_prefix() { shift done - local prefix= - if [[ ${EAPI} != 6 ]]; then - case ${hv_switch} in - -b) - prefix=${BROOT} - ;; - -d) - prefix=${ESYSROOT} - ;; - esac - else + if [[ ${EAPI} == 6 ]]; then case ${hv_switch} in -b) die "${FUNCNAME} -b is not supported in EAPI ${EAPI}" ;; -d) - prefix=${EPREFIX} hv_switch= ;; esac @@ -168,7 +156,7 @@ get_llvm_prefix() { has_version ${hv_switch} "sys-devel/llvm:${slot}" || continue fi - echo "${prefix}/usr/lib/llvm/${slot}" + echo "${slot}" return done @@ -180,6 +168,31 @@ get_llvm_prefix() { die "No LLVM slot${1:+ <= ${1}} satisfying the package's dependencies found installed!" } +# @FUNCTION: get_llvm_prefix +# @USAGE: [-b|-d] [] +# @DESCRIPTION: +# Find the newest LLVM install that is acceptable for the package, +# and print an absolute path to it. +# +# The options and behavior is the same as for get_llvm_slot. +get_llvm_prefix() { + debug-print-function ${FUNCNAME} "${@}" + + local prefix=${EPREFIX} + if [[ ${EAPI} != 6 ]]; then + case ${1} in + -b) + prefix=${BROOT} + ;; + *) + prefix=${ESYSROOT} + ;; + esac + fi + + echo "${prefix}/usr/lib/llvm/$(get_llvm_slot "${@}")" +} + # @FUNCTION: llvm_fix_clang_version # @USAGE: ... # @DESCRIPTION: @@ -256,12 +269,16 @@ llvm_pkg_setup() { debug-print-function ${FUNCNAME} "${@}" if [[ ${MERGE_TYPE} != binary ]]; then + LLVM_SLOT=$(get_llvm_slot "${LLVM_MAX_SLOT}") + llvm_fix_clang_version CC CPP CXX # keep in sync with profiles/features/llvm/make.defaults! llvm_fix_tool_path ADDR2LINE AR AS LD NM OBJCOPY OBJDUMP RANLIB llvm_fix_tool_path READELF STRINGS STRIP - local llvm_path=$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin + local prefix=${EPREFIX} + [[ ${EAPI} != 6 ]] && prefix=${ESYSROOT} + local llvm_path=${prefix}/usr/lib/llvm/${LLVM_SLOT}/bin local IFS=: local split_path=( ${PATH} ) local new_path=() -- 2.38.1
[gentoo-dev] [PATCH 4/4] postgres.eclass: stop using which(1)
It's non-portable and we're looking to remove it from @system. Bug: https://bugs.gentoo.org/646588 Signed-off-by: Sam James --- eclass/postgres.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/postgres.eclass b/eclass/postgres.eclass index 3ae1c49adc68..8e204e2ade8c 100644 --- a/eclass/postgres.eclass +++ b/eclass/postgres.eclass @@ -106,7 +106,7 @@ postgres_check_slot() { fi # Don't die because we can't run postgresql-config during pretend. - [[ "$EBUILD_PHASE" = "pretend" && -z "$(which postgresql-config 2> /dev/null)" ]] \ + [[ "$EBUILD_PHASE" = "pretend" && -z "$(type -P postgresql-config 2> /dev/null)" ]] \ && return 0 if has $(postgresql-config show 2> /dev/null) "${POSTGRES_COMPAT[@]}"; then @@ -148,7 +148,7 @@ postgres_pkg_setup() { fi export PG_SLOT=${best_slot} - export PG_CONFIG=$(which pg_config${best_slot//./}) + export PG_CONFIG=$(type -P pg_config${best_slot//./}) local pg_pkg_config_path="$(${PG_CONFIG} --libdir)/pkgconfig" if [[ -n "${PKG_CONFIG_PATH}" ]]; then -- 2.38.1
[gentoo-dev] [PATCH 3/4] postgres-multi.eclass: stop using which(1)
It's non-portable and we're looking to remove it from @system. Bug: https://bugs.gentoo.org/646588 Signed-off-by: Sam James --- eclass/postgres-multi.eclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass index c73f33c71b49..9dcf22e64a12 100644 --- a/eclass/postgres-multi.eclass +++ b/eclass/postgres-multi.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 inherit multibuild postgres @@ -58,7 +58,7 @@ export _POSTGRES_INTERSECT_SLOTS=( ) _postgres-multi_multibuild_wrapper() { debug-print-function ${FUNCNAME} "${@}" export PG_SLOT=${MULTIBUILD_VARIANT} - export PG_CONFIG=$(which pg_config${MULTIBUILD_VARIANT//./}) + export PG_CONFIG=$(type -P pg_config${MULTIBUILD_VARIANT//./}) if [[ -n ${PKG_CONFIG_PATH} ]] ; then PKG_CONFIG_PATH="$(${PG_CONFIG} --libdir)/pkgconfig:${PKG_CONFIG_PATH}" else @@ -139,7 +139,7 @@ postgres-multi_src_prepare() { # Portage, but won't be caught by /usr/bin/ebuild) local slot for slot in ${_POSTGRES_INTERSECT_SLOTS[@]} ; do - if [[ -z $(which pg_config${slot/.} 2> /dev/null) ]] ; then + if [[ -z $(type -P pg_config${slot/.} 2> /dev/null) ]] ; then eerror eerror "postgres_targets_postgres${slot/.} use flag is enabled, but hasn't been emerged." eerror -- 2.38.1
[gentoo-dev] [PATCH 2/4] usr-ldscript.eclass: stop using which(1)
It's non-portable and we're looking to remove it from @system. Bug: https://bugs.gentoo.org/646588 Signed-off-by: Sam James --- eclass/usr-ldscript.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/usr-ldscript.eclass b/eclass/usr-ldscript.eclass index a8229ed2ac2e..c821abd60846 100644 --- a/eclass/usr-ldscript.eclass +++ b/eclass/usr-ldscript.eclass @@ -70,7 +70,7 @@ gen_usr_ldscript() { # If they're using gold, manually invoke the old bfd. #487696 local d="${T}/bfd-linker" mkdir -p "${d}" - ln -sf $(which ${CHOST}-ld.bfd) "${d}"/ld + ln -sf $(type -P ${CHOST}-ld.bfd) "${d}"/ld flags+=( -B"${d}" ) fi output_format=$($(tc-getCC) "${flags[@]}" 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') -- 2.38.1
[gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: stop using which(1)
It's non-portable and we're looking to remove it from @system. Bug: https://bugs.gentoo.org/487696 Bug: https://bugs.gentoo.org/646588 Signed-off-by: Sam James --- eclass/toolchain-funcs.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index fea2a6885c46..6fa103fc110e 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -609,7 +609,7 @@ tc-ld-force-bfd() { # to its value (like multilib). #545218 local ld=$(tc-getLD "$@") local bfd_ld="${ld%% *}.bfd" - local path_ld=$(which "${bfd_ld}" 2>/dev/null) + local path_ld=$(type -P "${bfd_ld}" 2>/dev/null) [[ -e ${path_ld} ]] && export LD=${bfd_ld} # Set up LDFLAGS to select bfd based on the gcc / clang version. @@ -1154,7 +1154,7 @@ gen_usr_ldscript() { # If they're using gold, manually invoke the old bfd. #487696 local d="${T}/bfd-linker" mkdir -p "${d}" - ln -sf $(which ${CHOST}-ld.bfd) "${d}"/ld + ln -sf $(type -P ${CHOST}-ld.bfd) "${d}"/ld flags+=( -B"${d}" ) fi output_format=$($(tc-getCC) "${flags[@]}" 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') -- 2.38.1
[gentoo-dev] Last rites: app-editors/elvis
No releases since 2003 (!), upstream effectively dead, no Unicode support, EAPI 6. Removal in 30 days (#884429) -- Marecki OpenPGP_signature Description: OpenPGP digital signature