summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-shells/schily-tools/files/fix_read.patch25
-rw-r--r--app-shells/schily-tools/schily-tools-2016.07.25-r1.ebuild (renamed from app-shells/schily-tools/schily-tools-2016.07.25.ebuild)3
2 files changed, 27 insertions, 1 deletions
diff --git a/app-shells/schily-tools/files/fix_read.patch b/app-shells/schily-tools/files/fix_read.patch
new file mode 100644
index 00000000..5d1e2f08
--- /dev/null
+++ b/app-shells/schily-tools/files/fix_read.patch
@@ -0,0 +1,25 @@
+# Fix "read a" (with one variable) in bosh
+--- 1/sh/name.c
++++ 1/sh/name.c
+@@ -527,7 +527,7 @@
+ else if (ch == 'r')
+ nextwchar = readwc;
+ }
+- namec -= optv.optind;
++ namec -= --optv.optind;
+ names += optv.optind;
+ }
+
+@@ -535,10 +535,9 @@
+ a[0] = UC repname;
+ a[1] = NULL;
+ names = a;
+- }
+-#else
+- names++;
++ } else
+ #endif
++ names++;
+ ifs = ifsnod.namval;
+ if (ifs == NULL)
+ ifs = (unsigned char *)sptbnl;
diff --git a/app-shells/schily-tools/schily-tools-2016.07.25.ebuild b/app-shells/schily-tools/schily-tools-2016.07.25-r1.ebuild
index 5d385ba0..b828feb9 100644
--- a/app-shells/schily-tools/schily-tools-2016.07.25.ebuild
+++ b/app-shells/schily-tools/schily-tools-2016.07.25-r1.ebuild
@@ -17,7 +17,7 @@ HOMEPAGE="https://sourceforge.net/projects/schilytools/"
KEYWORDS="~amd64 ~x86"
IUSE="acl caps static-libs system-libschily system-star xattr"
-PATCHES=("$FILESDIR"/setuarg.patch)
+PATCHES=("$FILESDIR"/setuarg.patch "$FILESDIR"/fix_read.patch)
add_iuse_expand() {
local i j
@@ -159,6 +159,7 @@ targets() {
src_prepare() {
default
+ CPPFLAGS='-DPOSIX_BOTH_PATH="/bin/sh"'${CPPFLAGS:+\ }${CPPFLAGS}
src_schily_prepare
filter-flags -fPIE -pie -flto* -fwhole-program -fno-common
cd "${S}" || die