commit:     1782ca0aa847a7f2c537326c57839f198b138d0a
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 29 10:20:26 2016 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Oct 29 10:34:39 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1782ca0a

app-emulation/dosemu: backported glibc detection, bug #597880

Reported-by: gentoo <AT> moin.fi
Bug: https://bugs.gentoo.org/597880

Package-Manager: portage-2.3.2

 .../dosemu/dosemu-1.4.1_pre20091009.ebuild         |  5 +++-
 .../files/dosemu-1.4.1_pre20091009-fix-glibc.patch | 35 ++++++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/app-emulation/dosemu/dosemu-1.4.1_pre20091009.ebuild 
b/app-emulation/dosemu/dosemu-1.4.1_pre20091009.ebuild
index 5a56b8d..39b9815 100644
--- a/app-emulation/dosemu/dosemu-1.4.1_pre20091009.ebuild
+++ b/app-emulation/dosemu/dosemu-1.4.1_pre20091009.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-inherit eutils flag-o-matic
+inherit autotools eutils flag-o-matic
 
 P_FD="dosemu-freedos-1.0-bin"
 DESCRIPTION="DOS Emulator"
@@ -36,6 +36,9 @@ S="${WORKDIR}/${PN}"
 src_compile() {
        epatch "${FILESDIR}"/${P}-flex.patch #437074
        epatch "${FILESDIR}"/${P}-dash.patch
+       epatch "${FILESDIR}"/${P}-fix-glibc.patch #597880
+
+       eautoreconf
 
        # Has problems with -O3 on some systems
        replace-flags -O[3-9] -O2

diff --git 
a/app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-fix-glibc.patch 
b/app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-fix-glibc.patch
new file mode 100644
index 00000000..62a4319
--- /dev/null
+++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-fix-glibc.patch
@@ -0,0 +1,35 @@
+The patch is a subset of
+
+    commit b028d3fd33b004ac61583927884a64577e2d64c3
+    Author: Bart Oldeman <[email protected]>
+    Date:   Sun Dec 23 22:08:11 2012 -0500
+
+to fix glibc detection for
+Bug: https://bugs.gentoo.org/597880
+diff --git a/configure.ac b/configure.ac
+index 70bc154..b8da5e2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -644,19 +640,9 @@ if test "$GCC" = "yes" ; then
+   fi
+ 
+   AC_MSG_CHECKING(for glibc...)
+-  set `printf '%b\n' '#include <features.h>\nXXAaZZ __GLIBC__ XXBbZZ 
__GLIBC_MINOR__'|${CC-cc} -E -|awk '/XXAaZZ/ {print $2 " " $4}'`
+-  major=$1; minor=$2
+-  if test "$major" = "__GLIBC__"; then
+-    AC_MSG_ERROR([Sorry, you need glibc-2.1.3 or newer.])
+-  else
+-    if test "$minor" = "__GLIBC_MINOR__"; then
+-      minor=0;
+-    fi
+-    GLIBC_VERSION_CODE=$((($major * 1000) + $minor))
+-    AC_MSG_RESULT([yes, version code $GLIBC_VERSION_CODE])
+-    if test $GLIBC_VERSION_CODE -lt 2001; then
+-      AC_MSG_ERROR([Sorry, you need glibc-2.1.3 or newer.])
+-    fi
++  set `printf '%b\n' '#include <features.h>\nXXAaZZ __GLIBC__'|${CC-cc} -E 
-|awk '/XXAaZZ/ {print $2}'`
++  if test "$1" = "__GLIBC__"; then
++    AC_MSG_ERROR([Sorry, you need glibc.])
+   fi
+ fi
+ 

Reply via email to