Skip to content

Commit

Permalink
app-shells/ksh: Fix build with GCC 5
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/555670

Package-Manager: portage-2.2.26_p3
  • Loading branch information
floppym committed Nov 29, 2015
1 parent ba86eb3 commit c7dc706
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
24 changes: 24 additions & 0 deletions app-shells/ksh/files/cpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
iffe depends on cc -E not inserting newlines between tokens

https://build.opensuse.org/package/view_file/home:Andreas_Schwab:Factory/ksh/cpp.patch?expand=1

--- a/src/cmd/INIT/iffe.sh
+++ b/src/cmd/INIT/iffe.sh
@@ -3427,7 +3427,7 @@
(eval "$src") <&$nullin || e=1
;;
mac*|nomac*)
- if compile $cc -E $tmp.c <&$nullin >$tmp.i
+ if compile $cc -E -P $tmp.c <&$nullin >$tmp.i
then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i
else e=1
fi
@@ -3718,7 +3718,7 @@
<<\"#define $v\">> $v <<\"/* native $v */\">>
<<\"#endif\">>
#endif" > $tmp.c
- if compile $cc -E $tmp.c <&$nullin >$tmp.i
+ if compile $cc -E -P $tmp.c <&$nullin >$tmp.i
then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i > $tmp.t
if test -s $tmp.t
then success
3 changes: 2 additions & 1 deletion app-shells/ksh/ksh-93.20140625.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

Expand Down Expand Up @@ -29,6 +29,7 @@ src_prepare() {
bin/package src/cmd/INIT/package.sh || die

epatch "${FILESDIR}"/${PN}-prefix.patch
epatch "${FILESDIR}"/cpp.patch
eprefixify src/cmd/ksh93/data/msg.c
}

Expand Down

0 comments on commit c7dc706

Please sign in to comment.