public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/mpfr/files/, dev-libs/mpfr/
@ 2021-11-06  0:46 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-11-06  0:46 UTC (permalink / raw
  To: gentoo-commits

commit:     eaeb1debfeed05ba266e4a1b1674eacff1d0f414
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  6 00:39:02 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov  6 00:45:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eaeb1deb

dev-libs/mpfr: partially revert patch10 (drop doc changes) from 4.1.0_p13

Avoid trying to invoke texinfo during bootstrap.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...mpfr-4.1.0_p13-revert-doc-changes-patch10.patch | 105 +++++++++++++++++++++
 dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild             |   9 +-
 2 files changed, 113 insertions(+), 1 deletion(-)

diff --git a/dev-libs/mpfr/files/mpfr-4.1.0_p13-revert-doc-changes-patch10.patch b/dev-libs/mpfr/files/mpfr-4.1.0_p13-revert-doc-changes-patch10.patch
new file mode 100644
index 00000000000..304cc27f3fa
--- /dev/null
+++ b/dev-libs/mpfr/files/mpfr-4.1.0_p13-revert-doc-changes-patch10.patch
@@ -0,0 +1,105 @@
+From: Sam James <sam@gentoo.org>
+Date: Sat, 6 Nov 2021 00:34:22 +0000
+Subject: [PATCH] Revert doc changes from mpfr-4.1.0-patch10
+
+We don't want to invoke	texinfo	via maintainer-mode because
+of some	(somewhat minor) changes to the	manual from patch10.
+
+See: https://archives.gentoo.org/gentoo-releng-autobuilds/message/c2dd39fc4ebc849db6bb0f551739e2ed
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ doc/mpfr.info | 46 +++++++++++++++++++++-------------------------
+ doc/mpfr.texi |  6 ------
+ 2 files changed, 21 insertions(+), 31 deletions(-)
+
+diff --git a/doc/mpfr.info b/doc/mpfr.info
+index 062c0c4..264896d 100644
+--- a/doc/mpfr.info
++++ b/doc/mpfr.info
+@@ -3217,11 +3217,7 @@ destroying, garbaging) is left to the application.
+ 
+    Each function in this interface is also implemented as a macro for
+ efficiency reasons: for example ‘mpfr_custom_init (s, p)’ uses the
+-macro, while ‘(mpfr_custom_init) (s, p)’ uses the function.  Note that
+-the macro may evaluate arguments multiple times (or none).  Moreover,
+-macros implementing functions with the ‘void’ return type may not be
+-used in contexts where an expression is expected, e.g., inside
+-‘for(...)’ or before a comma operator.
++macro, while ‘(mpfr_custom_init) (s, p)’ uses the function.
+ 
+    Note 1: MPFR functions may still initialize temporary floating-point
+ numbers using ‘mpfr_init’ and similar functions.  See Custom Allocation
+@@ -4583,13 +4579,13 @@ Function and Type Index
+                                                               (line 115)
+ * mpfr_csch:                             Transcendental Functions.
+                                                               (line 180)
+-* mpfr_custom_get_exp:                   Custom Interface.    (line  80)
+-* mpfr_custom_get_kind:                  Custom Interface.    (line  70)
+-* mpfr_custom_get_significand:           Custom Interface.    (line  75)
+-* mpfr_custom_get_size:                  Custom Interface.    (line  41)
+-* mpfr_custom_init:                      Custom Interface.    (line  45)
+-* mpfr_custom_init_set:                  Custom Interface.    (line  52)
+-* mpfr_custom_move:                      Custom Interface.    (line  89)
++* mpfr_custom_get_exp:                   Custom Interface.    (line  76)
++* mpfr_custom_get_kind:                  Custom Interface.    (line  66)
++* mpfr_custom_get_significand:           Custom Interface.    (line  71)
++* mpfr_custom_get_size:                  Custom Interface.    (line  37)
++* mpfr_custom_init:                      Custom Interface.    (line  41)
++* mpfr_custom_init_set:                  Custom Interface.    (line  48)
++* mpfr_custom_move:                      Custom Interface.    (line  85)
+ * MPFR_DECL_INIT:                        Initialization Functions.
+                                                               (line  77)
+ * mpfr_digamma:                          Transcendental Functions.
+@@ -5169,19 +5165,19 @@ Node: Exception Related Functions\x7f145661
+ Node: Memory Handling Functions\x7f155904
+ Node: Compatibility with MPF\x7f157792
+ Node: Custom Interface\x7f160961
+-Node: Internals\x7f165852
+-Node: API Compatibility\x7f167396
+-Node: Type and Macro Changes\x7f169344
+-Node: Added Functions\x7f172527
+-Node: Changed Functions\x7f177334
+-Node: Removed Functions\x7f184693
+-Node: Other Changes\x7f185423
+-Node: MPFR and the IEEE 754 Standard\x7f187124
+-Node: Contributors\x7f189741
+-Node: References\x7f192880
+-Node: GNU Free Documentation License\x7f194761
+-Node: Concept Index\x7f217355
+-Node: Function and Type Index\x7f223428
++Node: Internals\x7f165592
++Node: API Compatibility\x7f167136
++Node: Type and Macro Changes\x7f169084
++Node: Added Functions\x7f172267
++Node: Changed Functions\x7f177074
++Node: Removed Functions\x7f184433
++Node: Other Changes\x7f185163
++Node: MPFR and the IEEE 754 Standard\x7f186864
++Node: Contributors\x7f189481
++Node: References\x7f192620
++Node: GNU Free Documentation License\x7f194501
++Node: Concept Index\x7f217095
++Node: Function and Type Index\x7f223168
+ \x1f
+ End Tag Table
+ 
+diff --git a/doc/mpfr.texi b/doc/mpfr.texi
+index b26555a..54b6aa8 100644
+--- a/doc/mpfr.texi
++++ b/doc/mpfr.texi
+@@ -3817,12 +3817,6 @@ to the application.
+ Each function in this interface is also implemented as a macro for
+ efficiency reasons: for example @code{mpfr_custom_init (s, p)}
+ uses the macro, while @code{(mpfr_custom_init) (s, p)} uses the function.
+-Note that the macro may evaluate arguments multiple times (or none).
+-Moreover, macros implementing functions with the @code{void} return type
+-may not be used in contexts where an expression is expected, e.g., inside
+-@code{for(...)} or before a comma operator.
+-@c These limitations with macros cannot be avoided in a C90 compatible way.
+-@c In the future, inline functions could be used.
+ 
+ Note 1: MPFR functions may still initialize temporary floating-point numbers
+ using @code{mpfr_init} and similar functions. See Custom Allocation (GNU MP)@.
+-- 
+2.33.1
+

diff --git a/dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild b/dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild
index 8c516b676e7..5907ed5bf1a 100644
--- a/dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild
+++ b/dev-libs/mpfr/mpfr-4.1.0_p13-r1.ebuild
@@ -7,6 +7,9 @@ inherit multilib-minimal
 
 # Upstream distribute patches before a new release is made
 # See https://www.mpfr.org/mpfr-current/#bugs for the latest version (and patches)
+
+# Check whether any patches touch e.g. manuals!
+# https://archives.gentoo.org/gentoo-releng-autobuilds/message/c2dd39fc4ebc849db6bb0f551739e2ed
 MY_PV=$(ver_cut 1-3)
 MY_PATCH=$(ver_cut 5-)
 MY_P=${PN}-${MY_PV}
@@ -44,6 +47,10 @@ PATCHES=()
 if [[ ${PV} == *_p* ]] ; then
 	# Apply the upstream patches released out of band
 	PATCHES+=( "${DISTDIR}"/ )
+
+	# One-off partial revert of 4.1.0_p13's patch10
+	# Won't be needed on next release.
+	PATCHES+=( "${FILESDIR}"/${P}-revert-doc-changes-patch10.patch )
 fi
 
 HTML_DOCS=( doc/FAQ.html )
@@ -57,7 +64,7 @@ multilib_src_configure() {
 }
 
 multilib_src_install_all() {
-	rm "${ED}"/usr/share/doc/"${P}"/COPYING*
+	rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
 
 	if ! use static-libs ; then
 		find "${ED}"/usr -name '*.la' -delete || die


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/mpfr/files/, dev-libs/mpfr/
@ 2025-03-06  1:23 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-03-06  1:23 UTC (permalink / raw
  To: gentoo-commits

commit:     59d77345086feb6141a77a48f0dbb359c9979aff
Author:     Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com>
AuthorDate: Mon Mar  3 12:04:25 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar  6 01:21:55 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59d77345

dev-libs/mpfr: add patch to workaround clang breakage

Add a workaround patch used by Yocto to fix the clang
breakage. This patch can be dropped once upstream mpfr
fixes the breakage using one of the solutions proposed
in the glibc bug report:

https://sourceware.org/bugzilla/show_bug.cgi?id=32750

Closes: https://bugs.gentoo.org/949962
Signed-off-by: Adrian Ratiu <adrian.ratiu <AT> collabora.com>
Closes: https://github.com/gentoo/gentoo/pull/40865
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...h.h-to-use-predefined-_Float128-definitio.patch | 48 ++++++++++++++++++++++
 dev-libs/mpfr/mpfr-4.2.1.ebuild                    |  1 +
 2 files changed, 49 insertions(+)

diff --git a/dev-libs/mpfr/files/mpfr-4.2.1-include-math.h-to-use-predefined-_Float128-definitio.patch b/dev-libs/mpfr/files/mpfr-4.2.1-include-math.h-to-use-predefined-_Float128-definitio.patch
new file mode 100644
index 000000000000..abf08eec1e73
--- /dev/null
+++ b/dev-libs/mpfr/files/mpfr-4.2.1-include-math.h-to-use-predefined-_Float128-definitio.patch
@@ -0,0 +1,48 @@
+From dd0bbbeae865561be679baa680e8c5135fe9dc5e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 26 Dec 2024 19:44:12 -0800
+Subject: [PATCH] include math.h to use predefined _Float128 definition
+
+glibc has added this patch [1] which defines __HAVE_FLOAT128 for clang
+therefore include math.h to avoid defining _Float128 during configure if
+not needed.
+
+This is a workaround until mpfr upstream does a proper fix. For more
+context see the relevant glibc bug report [2].
+
+[1] https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=sysdeps/x86/bits/floatn.h;h=ba030d270a73c71f166083b30dbaf89371ff49fa;hp=e661abaea469b8b916fd312cc42382ad4c5e220f;hb=d773aff467840f5ed305e40c180466e90bd88183;hpb=b2556550a0f952b2a841a0b4bddc999c2df1b233
+[2] https://sourceware.org/bugzilla/show_bug.cgi?id=32750
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
+---
+ acinclude.m4 | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index d5b5b4bdb..c9e882cdd 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -793,8 +793,9 @@ dnl the "undefined reference" error disappear.
+ if test "$enable_float128" != no; then
+    AC_MSG_CHECKING(if _Float128 with hex constants is supported)
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
+-volatile _Float128 x = 0x1.fp+16383f128;
+-return x == 0;
++     #include <math.h>
++     volatile _Float128 x = 0x1.fp+16383f128;
++     return x == 0;
+ ]])],
+       [AC_MSG_RESULT(yes)
+        AC_DEFINE([MPFR_WANT_FLOAT128],1,[Build float128 functions])],
+@@ -804,6 +805,7 @@ dnl Use the q suffix in this case.
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #define _Float128 __float128
+ ]], [[
++#include <math.h>
+ volatile _Float128 x = 0x1.fp+16383q;
+ return x == 0;
+ ]])],
+-- 
+2.30.2
+

diff --git a/dev-libs/mpfr/mpfr-4.2.1.ebuild b/dev-libs/mpfr/mpfr-4.2.1.ebuild
index cc2b0bfe6d38..69efa49c43da 100644
--- a/dev-libs/mpfr/mpfr-4.2.1.ebuild
+++ b/dev-libs/mpfr/mpfr-4.2.1.ebuild
@@ -61,6 +61,7 @@ PATCHES=(
 	"${MY_PATCHES[@]}"
 
 	# Additional patches
+	${FILESDIR}/${PN}-4.2.1-include-math.h-to-use-predefined-_Float128-definitio.patch
 )
 
 HTML_DOCS=( doc/FAQ.html )


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-06  1:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-06  1:23 [gentoo-commits] repo/gentoo:master commit in: dev-libs/mpfr/files/, dev-libs/mpfr/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2021-11-06  0:46 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox