app-shells/dash: make dumb-echo patch optional
authorMike Gilbert <floppym@gentoo.org>
Mon, 31 Oct 2016 14:36:48 +0000 (10:36 -0400)
committerMike Gilbert <floppym@gentoo.org>
Mon, 31 Oct 2016 14:41:13 +0000 (10:41 -0400)
ACKed by Lars (polynomial-c).

Bug: https://bugs.gentoo.org/590696
Package-Manager: portage-2.3.2_p1

app-shells/dash/dash-0.5.9.1-r1.ebuild [moved from app-shells/dash/dash-0.5.9.1.ebuild with 94% similarity]
app-shells/dash/metadata.xml

similarity index 94%
rename from app-shells/dash/dash-0.5.9.1.ebuild
rename to app-shells/dash/dash-0.5.9.1-r1.ebuild
index 39d1f83baaa8bccf6e461a6893849e432e57581f..4942b9dca7263a30d549452803436dff156d1d4d 100644 (file)
@@ -21,7 +21,7 @@ fi
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="libedit static"
+IUSE="dumb-echo libedit static"
 
 RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )"
 DEPEND="${RDEPEND}
@@ -31,7 +31,6 @@ DEPEND="${RDEPEND}
 #S=${WORKDIR}/${MY_P}
 
 PATCHES=(
-       "${FILESDIR}"/${PN}-0.5.9.1-dumb-echo.patch #337329 #527848
        "${FILESDIR}"/${PN}-0.5.8.1-eval-warnx.patch
 )
 
@@ -42,6 +41,9 @@ src_prepare() {
        fi
        epatch "${PATCHES[@]}"
 
+       #337329 #527848
+       use dumb-echo && epatch "${FILESDIR}"/${PN}-0.5.9.1-dumb-echo.patch
+
        # Fix the invalid sort
        sed -i -e 's/LC_COLLATE=C/LC_ALL=C/g' src/mkbuiltins
 
index ce044cc24186dd15acdf12e6a152cdd96550a115..0a565e1c2ab578d5ac6cdfdb90e003d38537f27a 100644 (file)
@@ -8,4 +8,7 @@
        <upstream>
                <remote-id type="cpe">cpe:/a:dash:dash</remote-id>
        </upstream>
+       <use>
+               <flag name="dumb-echo">Disable echo -n for added fun</flag>
+       </use>
 </pkgmetadata>