From fb8013d3521d8c7d31a1d2bc3eaad9ef3faf99f8 Mon Sep 17 00:00:00 2001 From: Pascal Jäger Date: Sun, 23 Oct 2022 09:16:58 +0200 Subject: app-misc/egads: revbump, make build clang16 compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: https://bugs.gentoo.org/312983 Closes: https://bugs.gentoo.org/870853 Signed-off-by: Pascal Jäger Closes: https://github.com/gentoo/gentoo/pull/27910 Signed-off-by: Sam James --- app-misc/egads/egads-0.9.5-r1.ebuild | 51 ------------------ app-misc/egads/egads-0.9.5-r2.ebuild | 62 ++++++++++++++++++++++ .../egads-0.9.5-make-build-work-with-clang16.patch | 16 ++++++ 3 files changed, 78 insertions(+), 51 deletions(-) delete mode 100644 app-misc/egads/egads-0.9.5-r1.ebuild create mode 100644 app-misc/egads/egads-0.9.5-r2.ebuild create mode 100644 app-misc/egads/files/egads-0.9.5-make-build-work-with-clang16.patch (limited to 'app-misc') diff --git a/app-misc/egads/egads-0.9.5-r1.ebuild b/app-misc/egads/egads-0.9.5-r1.ebuild deleted file mode 100644 index 032827037c57..000000000000 --- a/app-misc/egads/egads-0.9.5-r1.ebuild +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs - -DESCRIPTION="Entropy Gathering And Distribution System" -HOMEPAGE="http://www.securesoftware.com/download_egads.htm" -SRC_URI="http://www.securesoftware.com/${PN}/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~ppc x86" - -EGADS_DATADIR=/var/run/egads - -src_prepare() { - default - sed -i \ - -e '/^BINDIR/d' \ - -e '/^LIBDIR/d' \ - -e '/^INCLUDEDIR/d' \ - "${S}"/Makefile.in || die "Failed to fix Makefile.in" - tc-export CC AR RANLIB -} - -src_configure() { - econf \ - --with-egads-datadir="${EGADS_DATADIR}" \ - --with-bindir="${EPREFIX}"/usr/sbin \ - --disable-static -} - -src_compile() { - emake LIBDIR="/usr/$(get_libdir)" -} - -src_install() { - keepdir ${EGADS_DATADIR} - fperms +t ${EGADS_DATADIR} - # NOT parallel safe, and no DESTDIR support - emake -j1 install \ - BINDIR="${D}"/usr/sbin \ - LIBDIR="${D}"/usr/$(get_libdir) \ - INCLUDEDIR="${D}"/usr/include - - dodoc README* doc/*.txt doc/*.html - - find "${ED}" -name '*.la' -delete || die -} diff --git a/app-misc/egads/egads-0.9.5-r2.ebuild b/app-misc/egads/egads-0.9.5-r2.ebuild new file mode 100644 index 000000000000..521388fd56d9 --- /dev/null +++ b/app-misc/egads/egads-0.9.5-r2.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs flag-o-matic + +DESCRIPTION="Entropy Gathering And Distribution System" +HOMEPAGE="http://www.securesoftware.com" +SRC_URI="http://www.securesoftware.com/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" + +EGADS_DATADIR=/var/run/egads + +PATCHES=( + "${FILESDIR}"/${P}-make-build-work-with-clang16.patch +) + +src_prepare() { + default + + rm aclocal.m4 || die + + eautoreconf + + sed -i \ + -e '/^BINDIR/d' \ + -e '/^LIBDIR/d' \ + -e '/^INCLUDEDIR/d' \ + "${S}"/Makefile.in || die "Failed to fix Makefile.in" +} + +src_configure() { + tc-export CC AR RANLIB + + # bug #312983 + append-flags -fno-strict-aliasing + + econf --with-egads-datadir="${EGADS_DATADIR}" +} + +src_compile() { + emake LIBDIR="/usr/$(get_libdir)" +} + +src_install() { + keepdir ${EGADS_DATADIR} + fperms +t ${EGADS_DATADIR} + + # NOT parallel safe, and no DESTDIR support + emake -j1 install \ + BINDIR="${D}"/usr/sbin \ + LIBDIR="${D}"/usr/$(get_libdir) \ + INCLUDEDIR="${D}"/usr/include + + dodoc README* doc/*.txt doc/*.html + + find "${ED}" -name '*.la' -delete || die +} diff --git a/app-misc/egads/files/egads-0.9.5-make-build-work-with-clang16.patch b/app-misc/egads/files/egads-0.9.5-make-build-work-with-clang16.patch new file mode 100644 index 000000000000..4f1b99c8f319 --- /dev/null +++ b/app-misc/egads/files/egads-0.9.5-make-build-work-with-clang16.patch @@ -0,0 +1,16 @@ +Clang16 does not allow K&R C function declarations by default. This changes the declaration to a modern C function declaration. + +Signed-off-by: Pascal Jäger + +--- a/sha1.c ++++ b/sha1.c +@@ -131,8 +131,7 @@ void SHAInit(SHA_CTX *shsInfo) + + Note that this corrupts the shsInfo->data area */ + +-static void SHSTransform( digest, data ) +- UINT4 *digest, *data ; ++static void SHSTransform(UINT4 *digest,UINT4 *data) + { + UINT4 A, B, C, D, E; /* Local vars */ + UINT4 eData[ 16 ]; /* Expanded data */ -- cgit v1.2.3-65-gdbad