app-emulation/dosemu: tweak to support non-bash '/bin/sh'
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 29 Oct 2016 10:04:31 +0000 (11:04 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 29 Oct 2016 10:34:39 +0000 (11:34 +0100)
Package-Manager: portage-2.3.2

app-emulation/dosemu/dosemu-1.4.1_pre20091009.ebuild
app-emulation/dosemu/dosemu-1.4.1_pre20130107-r3.ebuild
app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-dash.patch [new file with mode: 0644]

index 83615529e1d3b5f84705c84aa6d5d177da65b693..5a56b8d95e3a2a4e01d2137f2842f5999bd4adbc 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -35,6 +35,7 @@ S="${WORKDIR}/${PN}"
 
 src_compile() {
        epatch "${FILESDIR}"/${P}-flex.patch #437074
+       epatch "${FILESDIR}"/${P}-dash.patch
 
        # Has problems with -O3 on some systems
        replace-flags -O[3-9] -O2
index 10215903c61f25a8744b290331adf658cefaa484..4f04b5dde367402bf245ea3dd9c8250766e350a4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -45,6 +45,7 @@ S="${WORKDIR}/${PN}-code-${COMMIT}"
 
 src_prepare() {
        epatch "${FILESDIR}"/${P}-fortify.patch
+       epatch "${FILESDIR}"/${PN}-1.4.1_pre20091009-dash.patch
 
        # 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-dash.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-dash.patch
new file mode 100644 (file)
index 0000000..c48712e
--- /dev/null
@@ -0,0 +1,10 @@
+Dash does not support 'echo -n' and breaks default config sourcing.
+diff --git a/default-configure b/default-configure
+index 9e4b78b..a749f63 100755
+--- a/default-configure
++++ b/default-configure
+@@ -30,3 +30,3 @@ done
+ CONF=`cat $CONF_FILE`
+-CONF=`echo -n "$CONF"| sed '/^config {/d' | sed '/^}/d' | tr '\n' ' ' `
++CONF=`printf "%s" "$CONF"| sed '/^config {/d' | sed '/^}/d' | tr '\n' ' ' `
+