commit:     1d3c32911700b0ebdcff3e07f0d0fe4d85a4621c
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Mon Jul 17 08:24:29 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Jul 18 05:22:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d3c3291

net-mail/mboxgrep: Fix call to undeclared library function strcmp

Closes: https://bugs.gentoo.org/897938
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/31618
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../files/mboxgrep-0.7.9-musl-missing-strcmp.patch | 11 +++++
 net-mail/mboxgrep/mboxgrep-0.7.9-r3.ebuild         | 49 ++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/net-mail/mboxgrep/files/mboxgrep-0.7.9-musl-missing-strcmp.patch 
b/net-mail/mboxgrep/files/mboxgrep-0.7.9-musl-missing-strcmp.patch
new file mode 100644
index 000000000000..b2b66d7e5be3
--- /dev/null
+++ b/net-mail/mboxgrep/files/mboxgrep-0.7.9-musl-missing-strcmp.patch
@@ -0,0 +1,11 @@
+Bug: https://bugs.gentoo.org/897938
+--- a/src/getopt.c
++++ b/src/getopt.c
+@@ -52,6 +52,7 @@ char *alloca ();
+ #endif
+ 
+ #include <stdio.h>
++#include <string.h>
+ 
+ /* Comment out all this code if we are using the GNU C Library, and are not
+    actually compiling the library itself.  This code is part of the GNU C

diff --git a/net-mail/mboxgrep/mboxgrep-0.7.9-r3.ebuild 
b/net-mail/mboxgrep/mboxgrep-0.7.9-r3.ebuild
new file mode 100644
index 000000000000..5f3ed4e4956c
--- /dev/null
+++ b/net-mail/mboxgrep/mboxgrep-0.7.9-r3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit autotools
+
+DESCRIPTION="Grep for mbox files"
+SRC_URI="mirror://sourceforge/mboxgrep/${P}.tar.gz"
+HOMEPAGE="https://datatipp.se/mboxgrep/";
+
+SLOT="0"
+LICENSE="GPL-2+"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="dmalloc"
+
+RDEPEND="
+       app-arch/bzip2
+       dev-libs/libpcre
+       sys-libs/zlib
+       dmalloc? ( dev-libs/dmalloc )
+"
+DEPEND="
+       ${RDEPEND}
+"
+PATCHES=(
+       "${FILESDIR}"/${P}-_DEFAULT_SOURCE.patch
+       "${FILESDIR}"/${P}-fno-common.patch
+       "${FILESDIR}"/${P}-ldflags.patch
+       "${FILESDIR}"/${PN}-0.7.9-musl-missing-strcmp.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               $(use_with dmalloc no yes)
+}
+
+src_install() {
+       emake \
+               prefix="${D}"/usr \
+               mandir="${D}"/usr/share/man \
+               infodir="${D}"/usr/share/info \
+               install
+       dodoc ChangeLog NEWS TODO README
+}

Reply via email to