Merge updates from master

This commit is contained in:
Repository mirror & CI
2022-05-16 23:38:00 +00:00
8 changed files with 76 additions and 21 deletions

View File

@@ -283,7 +283,7 @@ _at_uses_pkg() {
for macro ; do
args+=( -e "^[[:space:]]*${macro}\>" )
done
egrep -q "${args[@]}" configure.??
grep -E -q "${args[@]}" configure.??
fi
}
_at_uses_autoheader() { _at_uses_pkg A{C,M}_CONFIG_HEADER{S,}; }

View File

@@ -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
# @ECLASS: epatch.eclass
@@ -285,13 +285,13 @@ epatch() {
# people could (accidently) patch files in the root filesystem.
# Or trigger other unpleasantries #237667. So disallow -p0 on
# such patches.
local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')
local abs_paths=$(grep -E -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')
if [[ -n ${abs_paths} ]] ; then
count=1
printf "NOTE: skipping -p0 due to absolute paths in patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}"
fi
# Similar reason, but with relative paths.
local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}")
local rel_paths=$(grep -E -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}")
if [[ -n ${rel_paths} ]] ; then
echo
eerror "Rejected Patch: ${patchname}!"

View File

@@ -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
# @ECLASS: haskell-cabal.eclass
@@ -288,8 +288,8 @@ cabal-show-brokens() {
elog "ghc-pkg check: 'checking for other broken packages:'"
# pretty-printer
$(ghc-getghcpkg) check 2>&1 \
| egrep -v '^Warning: haddock-(html|interfaces): ' \
| egrep -v '^Warning: include-dirs: ' \
| grep -E -v '^Warning: haddock-(html|interfaces): ' \
| grep -E -v '^Warning: include-dirs: ' \
| head -n 20
cabal-die-if-nonempty 'broken' \

View File

@@ -604,7 +604,7 @@ _each_ruby_check_install() {
# that's what changes between two implementations (otherwise you'd get false
# positives now that Ruby 1.9.2 installs with the same sitedir as 1.8)
${scancmd} -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \
| fgrep -v "${libruby_soname}" \
| grep -F -v "${libruby_soname}" \
| grep -E -v "${RUBY_QA_ALLOWED_LIBS}" \
> "${T}"/ruby-ng-${_ruby_implementation}-mislink.log

View File

@@ -1,4 +1,4 @@
# Copyright 2002-2021 Gentoo Authors
# Copyright 2002-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: toolchain-funcs.eclass
@@ -569,11 +569,12 @@ tc-ld-force-bfd() {
fi
}
# @FUNCTION: tc-has-openmp
# @FUNCTION: _tc-has-openmp
# @INTERNAL
# @USAGE: [toolchain prefix]
# @DESCRIPTION:
# See if the toolchain supports OpenMP.
tc-has-openmp() {
_tc-has-openmp() {
local base="${T}/test-tc-openmp"
cat <<-EOF > "${base}.c"
#include <omp.h>
@@ -593,6 +594,16 @@ tc-has-openmp() {
return ${ret}
}
# @FUNCTION: tc-has-openmp
# @DEPRECATED: tc-check-openmp
# @USAGE: [toolchain prefix]
# @DESCRIPTION:
# See if the toolchain supports OpenMP. This function is deprecated and will be
# removed on 2023-01-01.
tc-has-openmp() {
_tc-has-openmp "$@"
}
# @FUNCTION: tc-check-openmp
# @DESCRIPTION:
# Test for OpenMP support with the current compiler and error out with
@@ -600,8 +611,21 @@ tc-has-openmp() {
# OpenMP support that has been requested by the ebuild. Using this function
# to test for OpenMP support should be preferred over tc-has-openmp and
# printing a custom message, as it presents a uniform interface to the user.
#
# You should test for any necessary OpenMP support in pkg_pretend in order to
# warn the user of required toolchain changes. You must still check for OpenMP
# support at build-time, e.g.
# @CODE
# pkg_pretend() {
# [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
# }
#
# pkg_setup() {
# [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
# }
# @CODE
tc-check-openmp() {
if ! tc-has-openmp; then
if ! _tc-has-openmp; then
eerror "Your current compiler does not support OpenMP!"
if tc-is-gcc; then

View File

@@ -31,12 +31,12 @@ _USER_ECLASS=1
inherit user-info
# @FUNCTION: _assert_pkg_ebuild_phase
# @FUNCTION: _user_assert_pkg_phase
# @INTERNAL
# @USAGE: <calling func name>
# @DESCRIPTION:
# Raises an alert if the phase is not suitable for user.eclass usage.
_assert_pkg_ebuild_phase() {
_user_assert_pkg_phase() {
case ${EBUILD_PHASE} in
setup|preinst|postinst|prerm|postrm) ;;
*)
@@ -89,7 +89,7 @@ enewuser() {
ewarn "Insufficient privileges to execute ${FUNCNAME[0]}"
return 0
fi
_assert_pkg_ebuild_phase ${FUNCNAME}
_user_assert_pkg_phase ${FUNCNAME}
local create_home=1 force_uid=
while [[ ${1} == -* ]]; do
@@ -262,7 +262,7 @@ enewgroup() {
ewarn "Insufficient privileges to execute ${FUNCNAME[0]}"
return 0
fi
_assert_pkg_ebuild_phase ${FUNCNAME}
_user_assert_pkg_phase ${FUNCNAME}
local force_gid=
while [[ ${1} == -* ]]; do
@@ -365,7 +365,7 @@ enewgroup() {
# If the new home directory does not exist, it is created.
# Any previously existing home directory is NOT moved.
esethome() {
_assert_pkg_ebuild_phase ${FUNCNAME}
_user_assert_pkg_phase ${FUNCNAME}
# get the username
local euser=${1}; shift
@@ -451,7 +451,7 @@ esethome() {
# Required parameters is the username and the new shell.
# Specify -1 if you want to set shell to platform-specific nologin.
esetshell() {
_assert_pkg_ebuild_phase ${FUNCNAME}
_user_assert_pkg_phase ${FUNCNAME}
# get the username
local euser=${1}; shift
@@ -528,7 +528,7 @@ esetshell() {
# Update the comment field in a platform-agnostic way.
# Required parameters is the username and the new comment.
esetcomment() {
_assert_pkg_ebuild_phase ${FUNCNAME}
_user_assert_pkg_phase ${FUNCNAME}
# get the username
local euser=${1}; shift
@@ -602,7 +602,7 @@ esetcomment() {
# Required parameters is the username and the new list of groups,
# primary group first.
esetgroups() {
_assert_pkg_ebuild_phase ${FUNCNAME}
_user_assert_pkg_phase ${FUNCNAME}
[[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <user> <groups>"

View File

@@ -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
EAPI=7
@@ -33,6 +33,7 @@ PATCHES=(
"${FILESDIR}"/tidy-printf.patch
"${FILESDIR}"/fix-aliasing.patch
"${FILESDIR}"/no-xf86misc.patch
"${FILESDIR}"/no-which.patch
)
src_configure() {

View File

@@ -0,0 +1,30 @@
https://bugs.gentoo.org/844886
--- a/configure
+++ b/configure
@@ -26,7 +26,7 @@ msg_chkfor() {
check_docs() {
msg_chkfor "asciidoc"
- if which asciidoc 1> /dev/null 2>&3
+ if command -v asciidoc 1> /dev/null 2>&3
then
echo "ok."
echo "#_______________________" >&4
@@ -40,7 +40,7 @@ check_docs() {
check_tools() {
msg_chkfor "compiler $CC"
- if which "$CC" 1> /dev/null 2>&3
+ if command -v "$CC" 1> /dev/null 2>&3
then
echo "ok."
echo "---------------------------------" 1>&3
@@ -56,7 +56,7 @@ check_tools() {
check_imlib2() {
msg_chkfor "imlib2-config"
- if which imlib2-config 1> /dev/null 2>&3
+ if command -v imlib2-config 1> /dev/null 2>&3
then
echo "ok."
cat << EOF > tmp.c