commit:     a6189bb7d505d5020bc4031568d55835ae99dedf
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 14 08:45:52 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Dec 14 08:46:06 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6189bb7

app-emulation/qemu: use tool-prefixed 'strings'

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/759310
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 app-emulation/qemu/files/qemu-5.2.0-strings.patch | 23 +++++++++++++++++++++++
 app-emulation/qemu/qemu-5.2.0-r1.ebuild           |  3 ++-
 app-emulation/qemu/qemu-9999.ebuild               |  3 ++-
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/app-emulation/qemu/files/qemu-5.2.0-strings.patch 
b/app-emulation/qemu/files/qemu-5.2.0-strings.patch
new file mode 100644
index 00000000000..0b3dcdce78c
--- /dev/null
+++ b/app-emulation/qemu/files/qemu-5.2.0-strings.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/759310
+--- a/configure
++++ b/configure
+@@ -521,6 +521,7 @@ ld="${LD-${cross_prefix}ld}"
+ ranlib="${RANLIB-${cross_prefix}ranlib}"
+ nm="${NM-${cross_prefix}nm}"
+ strip="${STRIP-${cross_prefix}strip}"
++strings="${STRINGS-${cross_prefix}strings}"
+ windres="${WINDRES-${cross_prefix}windres}"
+ pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
+ query_pkg_config() {
+@@ -2265,9 +2266,9 @@ int main(int argc, char *argv[]) {
+ EOF
+ 
+ if compile_object ; then
+-    if strings -a $TMPO | grep -q BiGeNdIaN ; then
++    if $strings -a $TMPO | grep -q BiGeNdIaN ; then
+         bigendian="yes"
+-    elif strings -a $TMPO | grep -q LiTtLeEnDiAn ; then
++    elif $strings -a $TMPO | grep -q LiTtLeEnDiAn ; then
+         bigendian="no"
+     else
+         echo big/little test failed

diff --git a/app-emulation/qemu/qemu-5.2.0-r1.ebuild 
b/app-emulation/qemu/qemu-5.2.0-r1.ebuild
index 7c4861c024b..1e1391ca41b 100644
--- a/app-emulation/qemu/qemu-5.2.0-r1.ebuild
+++ b/app-emulation/qemu/qemu-5.2.0-r1.ebuild
@@ -226,6 +226,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
        "${FILESDIR}"/${PN}-5.2.0-cleaner-werror.patch
        "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch
+       "${FILESDIR}"/${PN}-5.2.0-strings.patch
 )
 
 QA_PREBUILT="
@@ -360,7 +361,7 @@ src_prepare() {
        default
 
        # Use correct toolchain to fix cross-compiling
-       tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB
+       tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
        export WINDRES=${CHOST}-windres
 
        # Verbose builds

diff --git a/app-emulation/qemu/qemu-9999.ebuild 
b/app-emulation/qemu/qemu-9999.ebuild
index ac31c2cc447..d9b98ce0aa0 100644
--- a/app-emulation/qemu/qemu-9999.ebuild
+++ b/app-emulation/qemu/qemu-9999.ebuild
@@ -224,6 +224,7 @@ RDEPEND="${CDEPEND}
 
 PATCHES=(
        "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
+       "${FILESDIR}"/${PN}-5.2.0-strings.patch
 )
 
 QA_PREBUILT="
@@ -358,7 +359,7 @@ src_prepare() {
        default
 
        # Use correct toolchain to fix cross-compiling
-       tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB
+       tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
        export WINDRES=${CHOST}-windres
 
        # Verbose builds

Reply via email to