diff options
author | Martin Väth <martin@mvath.de> | 2016-08-21 18:03:13 +0200 |
---|---|---|
committer | Martin Väth <martin@mvath.de> | 2016-08-21 18:03:13 +0200 |
commit | 5d1a4adf5578ec1c3994432432d953801186164d (patch) | |
tree | 4a8940c653d727f21593fb8b51c90a22902ae42d | |
parent | media-tv/sundtek-tv: Restore previous versions for testing (diff) | |
download | mv-5d1a4adf5578ec1c3994432432d953801186164d.tar.gz mv-5d1a4adf5578ec1c3994432432d953801186164d.tar.bz2 mv-5d1a4adf5578ec1c3994432432d953801186164d.zip |
Set DO_POSIX_SH do not set DO_POSIX_PATH. Fix -fstrict-aliasing
-rw-r--r-- | app-shells/schily-tools/files/bosh-strict-aliasing.patch | 24 | ||||
-rw-r--r-- | app-shells/schily-tools/schily-tools-2016.08.19.ebuild | 18 |
2 files changed, 33 insertions, 9 deletions
diff --git a/app-shells/schily-tools/files/bosh-strict-aliasing.patch b/app-shells/schily-tools/files/bosh-strict-aliasing.patch new file mode 100644 index 00000000..84c10808 --- /dev/null +++ b/app-shells/schily-tools/files/bosh-strict-aliasing.patch @@ -0,0 +1,24 @@ +Fix -fstrict-aliasing with gcc-6. Martin Väth <martin at mvath.de> +--- 1/sh/cmd.c ++++ 1/sh/cmd.c +@@ -497,7 +497,7 @@ + struct argnod **argtail; + struct argnod **argset = 0; + #ifndef ARGS_RIGHT_TO_LEFT +- struct argnod **argstail = (struct argnod **)&argset; ++ struct argnod **argstail = 0; + #endif + int keywd = 1; + unsigned char *com; +@@ -584,7 +584,10 @@ + #else + argp->argnxt = + (struct argnod *)0; +- *argstail = argp; ++ if (argstail) ++ *argstail = argp; ++ else ++ argset = (struct argnod **)argp; + argstail = &argp->argnxt; + #endif + } else { diff --git a/app-shells/schily-tools/schily-tools-2016.08.19.ebuild b/app-shells/schily-tools/schily-tools-2016.08.19.ebuild index 798fa861..46312d95 100644 --- a/app-shells/schily-tools/schily-tools-2016.08.19.ebuild +++ b/app-shells/schily-tools/schily-tools-2016.08.19.ebuild @@ -15,10 +15,10 @@ SRC_URI="mirror://sourceforge/schilytools/${MY_P}.tar.bz2" DESCRIPTION="Many tools from Joerg Schilling, including a POSIX compliant Bourne Shell" HOMEPAGE="https://sourceforge.net/projects/schilytools/" KEYWORDS="~amd64 ~x86" -IUSE="acl caps +posix static-libs system-libschily system-star xattr" +IUSE="acl caps static-libs system-libschily system-star xattr" #PATCHES=(-p0 "$DISTDIR"/${MY_P}.patch) -#PATCHES=("$FILESDIR"/pipe.patch) +PATCHES=("$FILESDIR"/bosh-strict-aliasing.patch) add_iuse_expand() { local i j @@ -84,7 +84,7 @@ cdrtools_os() { echo "${os}" } -src_schily_prepare() { +src_schily_prepare() ( gnuconfig_update # Remove profiled make files. @@ -142,7 +142,7 @@ src_schily_prepare() { -e "s|^\(DEFINSGRP=\).*|\1\t0|" \ -e '/^DEFUMASK/s,002,022,g' \ Defaults.${os} || die "sed Schily make setup" -} +) targets="" @@ -162,12 +162,12 @@ src_prepare() { default filter-flags -fPIE -pie -flto* -fwhole-program -fno-common src_schily_prepare - cd "${S}" || die - sed -ie '1s!man1/sh\.1!man1/bosh.1!' -- "${S}/sh/"{jsh,pfsh}.1 || die - sed -ie '/[+][=] -DPOSIX_BOSH_PATH/iCPPOPTS += -DPOSIX_BOSH_PATH=\\"'"${EPREFIX}"'/bin/sh\\"' \ + sed -i -e '1s!man1/sh\.1!man1/bosh.1!' -- "${S}/sh/"{jsh,pfsh}.1 || die + sed -i \ + -e '/-DDO_POSIX_SH/s/^[#]//' \ + -e '/-DDO_POSIX_PATH/s/^/\#/' \ + -e '/[+][=] -DPOSIX_BOSH_PATH/iCPPOPTS += -DPOSIX_BOSH_PATH=\\"'"${EPREFIX}"'/bin/sh\\"' \ -- "${S}/sh/"Makefile || die - ! use posix || sed -ie 's/^\#ifdef[ ]*DO_POSIX_PATH$/flags2 |= posixflg;\n\#if 0/' \ - -- "${S}/sh/"main.c || die mkdir UNUSED_TARGETS || die mv TARGETS/[0-9][0-9]* UNUSED_TARGETS || die targets inc |