commit:     c3698637e23ca9396bf1e924be07692701735411
Author:     Keri Harris <keri <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 08:12:23 2022 +0000
Commit:     Keri Harris <keri <AT> gentoo <DOT> org>
CommitDate: Sat May 21 08:12:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3698637

dev-lang/cxprolog: printf fixes for MUSL

Closes: https://bugs.gentoo.org/834101
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Keri Harris <keri <AT> gentoo.org>

 dev-lang/cxprolog/cxprolog-0.98.2.ebuild                  |  1 +
 dev-lang/cxprolog/files/cxprolog-0.98.2-printf-musl.patch | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/dev-lang/cxprolog/cxprolog-0.98.2.ebuild 
b/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
index 24deb0a98e0e..494d1b7aef2b 100644
--- a/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
+++ b/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
@@ -32,6 +32,7 @@ S="${WORKDIR}"/${P}
 
 src_prepare() {
        eapply "${FILESDIR}"/${P}-portage.patch
+       eapply "${FILESDIR}"/${P}/printf-musl.patch
        eapply "${FILESDIR}"/${P}-test-io.patch
        eapply_user
 

diff --git a/dev-lang/cxprolog/files/cxprolog-0.98.2-printf-musl.patch 
b/dev-lang/cxprolog/files/cxprolog-0.98.2-printf-musl.patch
new file mode 100644
index 000000000000..f55595461a80
--- /dev/null
+++ b/dev-lang/cxprolog/files/cxprolog-0.98.2-printf-musl.patch
@@ -0,0 +1,14 @@
+--- cxprolog-0.98.2.orig/src/Number.c  2016-01-23 22:07:48.000000000 +0100
++++ cxprolog-0.98.2/src/Number.c       2022-05-21 10:03:54.275367970 +0200
+@@ -282,9 +282,9 @@
+ {
+ #if HAS_LONG_DOUBLE_OPS
+       if( precision > 0 )
+-              return GStrFormat("%%.%dllg", precision) ;
++              return GStrFormat("%%.%dLg", precision) ;
+       else
+-              return GStrFormat("%%.%dllf", -precision) ;
++              return GStrFormat("%%.%dLf", -precision) ;
+ #else
+       if( precision > 0 )
+               return GStrFormat("%%.%dlg", precision) ;

Reply via email to