diff options
-rw-r--r-- | net-mail/safecat/files/safecat-1.13-head-tail-POSIX.patch | 45 | ||||
-rw-r--r-- | net-mail/safecat/safecat-1.13.ebuild | 41 |
2 files changed, 64 insertions, 22 deletions
diff --git a/net-mail/safecat/files/safecat-1.13-head-tail-POSIX.patch b/net-mail/safecat/files/safecat-1.13-head-tail-POSIX.patch new file mode 100644 index 000000000000..59bd33b0f760 --- /dev/null +++ b/net-mail/safecat/files/safecat-1.13-head-tail-POSIX.patch @@ -0,0 +1,45 @@ +--- a/make-compile.sh ++++ b/make-compile.sh +@@ -1 +1 @@ +-echo exec "$CC" "`head -1 conf-includes`" -c '${1+"$@"}' ++echo exec "$CC" "`head -n 1 conf-includes`" -c '${1+"$@"}' +--- a/Makefile ++++ b/Makefile +@@ -17,8 +17,8 @@ + auto-ccld.sh: \ + conf-cc conf-ld warn-auto.sh + ( cat warn-auto.sh; \ +- echo CC=\'`head -1 conf-cc`\'; \ +- echo LD=\'`head -1 conf-ld`\'; \ ++ echo CC=\'`head -n 1 conf-cc`\'; \ ++ echo LD=\'`head -n 1 conf-ld`\'; \ + ) > auto-ccld.sh + + auto-str: \ +@@ -31,7 +31,7 @@ + + auto_home.c: \ + auto-str conf-root +- ./auto-str auto_home `head -1 conf-root` > auto_home.c ++ ./auto-str auto_home `head -n 1 conf-root` > auto_home.c + + auto_home.o: \ + compile auto_home.c +@@ -161,7 +161,7 @@ + maildir: \ + warn-auto.sh maildir.sh conf-root + cat warn-auto.sh maildir.sh \ +- | sed s}HOME}"`head -1 conf-root`"}g \ ++ | sed s}HOME}"`head -n 1 conf-root`"}g \ + > maildir + chmod 755 maildir + +@@ -407,7 +407,7 @@ + version.h: \ + conf-version + @echo 'static const char *const version_string="$$Version:' \ +- `head -1 conf-version` 'built' `date +"%b %d, %Y"` at \ ++ `head -n 1 conf-version` 'built' `date +"%b %d, %Y"` at \ + `date +"%H:%M"`'$$";' > version.h + + writefile.o: \ diff --git a/net-mail/safecat/safecat-1.13.ebuild b/net-mail/safecat/safecat-1.13.ebuild index 78dc3a099424..7dbf9cc60c48 100644 --- a/net-mail/safecat/safecat-1.13.ebuild +++ b/net-mail/safecat/safecat-1.13.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI="3" +EAPI=6 -inherit fixheadtails eutils toolchain-funcs flag-o-matic +inherit toolchain-funcs -DESCRIPTION="Safecat implements qmail's maildir algorithm, copying standard input safely to a specified directory" +DESCRIPTION="Safecat implements qmail's maildir algorithm, safely copying standard input" HOMEPAGE="http://www.jeenyus.net/linux/software/safecat.html" SRC_URI="http://www.jeenyus.net/linux/software/${PN}/${P}.tar.gz" @@ -18,35 +18,32 @@ RESTRICT="test" DEPEND="sys-apps/groff" RDEPEND="" -src_prepare() { +PATCHES=( # applying maildir-patch - epatch "${FILESDIR}"/safecat-1.11-gentoo.patch - + "${FILESDIR}"/safecat-1.11-gentoo.patch # Fix parallel make errors - epatch "${FILESDIR}"/${P}-makefile.patch + "${FILESDIR}"/${P}-makefile.patch + # Fix POSIX head/tail syntax + "${FILESDIR}"/${P}-head-tail-POSIX.patch +) - ht_fix_file Makefile make-compile.sh +src_prepare() { + default - sed -ni '/man\|doc/!p' hier.c + sed -ni '/man\|doc/!p' hier.c || die # Fix implicit decleration - sed -i -e '/include <signal.h>/ a #include <stdlib.h>' \ - safecat.c + sed '/include <signal.h>/ a #include <stdlib.h>' -i safecat.c || die } src_configure() { - # safecat segfaults on gcc-4.0 x86 with -Os, seems to be okay with -O2 - if [[ $(gcc-major-version).$(gcc-minor-version) == 4.0 ]]; then - replace-flags -Os -O2 - fi - - echo "${D}/usr" > conf-root - echo "$(tc-getCC) ${CFLAGS}" > conf-cc - echo "$(tc-getCC) ${LDFLAGS}" > conf-ld + echo "${D}/usr" > conf-root || die + echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die } src_install() { - emake setup check || die - dodoc CHANGES README + emake setup check + einstalldocs doman maildir.1 safecat.1 } |