summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/autotools.eclass2
-rw-r--r--eclass/epatch.eclass6
-rw-r--r--eclass/haskell-cabal.eclass6
-rw-r--r--eclass/ruby-ng.eclass2
-rw-r--r--eclass/toolchain-funcs.eclass32
-rw-r--r--eclass/user.eclass16
-rw-r--r--x11-misc/alock/alock-1.0.0-r1.ebuild3
-rw-r--r--x11-misc/alock/files/no-which.patch30
8 files changed, 76 insertions, 21 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index b8eeb55fd8f2..d6c5b7f0ec0d 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -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,}; }
diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass
index 5d18befe55b9..6a9c460da0a3 100644
--- a/eclass/epatch.eclass
+++ b/eclass/epatch.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
# @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}!"
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index ae3229cc2676..64dcabb852b1 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.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
# @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' \
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index 70cb5be74b87..f0d6c4f6f6c4 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -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
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 77fb304940b2..54d4b0912a6e 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -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
diff --git a/eclass/user.eclass b/eclass/user.eclass
index aab549d0c473..906e84e83c69 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -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>"
diff --git a/x11-misc/alock/alock-1.0.0-r1.ebuild b/x11-misc/alock/alock-1.0.0-r1.ebuild
index 33a86aadaf0a..476253fafdaa 100644
--- a/x11-misc/alock/alock-1.0.0-r1.ebuild
+++ b/x11-misc/alock/alock-1.0.0-r1.ebuild
@@ -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() {
diff --git a/x11-misc/alock/files/no-which.patch b/x11-misc/alock/files/no-which.patch
new file mode 100644
index 000000000000..1764be32c82d
--- /dev/null
+++ b/x11-misc/alock/files/no-which.patch
@@ -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