From 884f8870068948533236a25cc27df9d2c4822208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Oth=C3=B3n=20Mart=C3=ADnez=20Vera?= Date: Wed, 10 Aug 2022 16:26:27 -0500 Subject: [PATCH] net-mail/fdm: fixes for musl libc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch includes: * upstream patch to remove include * upstream patch to fix base64.c added twice (+ required autoreconf) * adds sys-libs/queue-standalone as a dependency when compiled for musl Signed-off-by: Cristian Othón Martínez Vera Bug: 713514 --- net-mail/fdm/fdm-2.0-r1.ebuild | 9 +++++- net-mail/fdm/files/fdm-2.0-base64-twice.patch | 20 ++++++++++++ net-mail/fdm/files/fdm-2.0-base64.patch | 32 +++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 net-mail/fdm/files/fdm-2.0-base64-twice.patch create mode 100644 net-mail/fdm/files/fdm-2.0-base64.patch diff --git a/net-mail/fdm/fdm-2.0-r1.ebuild b/net-mail/fdm/fdm-2.0-r1.ebuild index a98298a350e..5c8432e8a0f 100644 --- a/net-mail/fdm/fdm-2.0-r1.ebuild +++ b/net-mail/fdm/fdm-2.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -15,6 +15,7 @@ IUSE="examples pcre" DEPEND=" dev-libs/openssl:0= sys-libs/tdb + elibc_musl? ( sys-libs/queue-standalone ) pcre? ( dev-libs/libpcre ) " RDEPEND=" @@ -23,10 +24,16 @@ RDEPEND=" acct-user/fdm " +PATCHES=( + "${FILESDIR}/${P}-base64.patch" + "${FILESDIR}/${P}-base64-twice.patch" +) + DOCS=( CHANGES README TODO MANUAL ) src_prepare() { default + autoreconf # Change user '_fdm' to 'fdm' sed -e 's/_fdm/fdm/g' -i fdm.h || die diff --git a/net-mail/fdm/files/fdm-2.0-base64-twice.patch b/net-mail/fdm/files/fdm-2.0-base64-twice.patch new file mode 100644 index 00000000000..65161c0e496 --- /dev/null +++ b/net-mail/fdm/files/fdm-2.0-base64-twice.patch @@ -0,0 +1,20 @@ +From 519e41833c1f7d353c09d8d51bfd6d13d0cfc16c Mon Sep 17 00:00:00 2001 +From: Nicholas Marriott +Date: Mon, 18 Feb 2019 22:26:29 +0000 +Subject: [PATCH] Do not add base64.c twice, from Rosen Penev. + +--- + Makefile.am | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 611ae87..e9f2f64 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -123,6 +123,3 @@ endif + if NO_STRTONUM + nodist_fdm_SOURCES += compat/strtonum.c + endif +-if NO_B64_NTOP +-nodist_fdm_SOURCES += compat/base64.c +-endif diff --git a/net-mail/fdm/files/fdm-2.0-base64.patch b/net-mail/fdm/files/fdm-2.0-base64.patch new file mode 100644 index 00000000000..221d7d41afc --- /dev/null +++ b/net-mail/fdm/files/fdm-2.0-base64.patch @@ -0,0 +1,32 @@ +From 3232e537ccaba4417b25d9d70264e4a5533042da Mon Sep 17 00:00:00 2001 +From: Nicholas Marriott +Date: Mon, 18 Mar 2019 13:04:00 +0000 +Subject: [PATCH] Fix bas64 declarations, from makepost at firemail dot cc. + +--- + fdm.h | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/fdm.h b/fdm.h +index 41eaa37..511a7b1 100644 +--- a/fdm.h ++++ b/fdm.h +@@ -20,7 +20,6 @@ + #define FDM_H + + #include +-#include + #include + + #ifdef HAVE_QUEUE_H +@@ -725,8 +724,8 @@ size_t strlcat(char *, const char *, size_t); + + #ifndef HAVE_B64_NTOP + /* base64.c */ +-int b64_ntop(src, srclength, target, targsize); +-int b64_pton(src, target, targsize); ++int b64_ntop(u_char const *, size_t, char *, size_t); ++int b64_pton(char const *, u_char *, size_t); + #endif + + /* shm.c */ -- 2.35.1