git: 822b0e7aebed - main - math/libdivide: fix build with clang 19

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Mon, 18 Nov 2024 22:52:11 UTC
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=822b0e7aebed327a924dc812b43c7cce2b19f7ea

commit 822b0e7aebed327a924dc812b43c7cce2b19f7ea
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-18 08:57:47 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-18 22:51:34 +0000

    math/libdivide: fix build with clang 19
    
    Clang 19 has become more strict about errors in member functions, which
    results in errors building math/libdivide:
    
      /wrkdirs/usr/ports/math/libdivide/work/libdivide-5.0/libdivide.h:3020:41: error: no member named 'denom' in 'divider<T, ALGO>'
       3020 |         return div.denom.magic == other.denom.magic && div.denom.more == other.denom.more;
            |                                   ~~~~~ ^
      /wrkdirs/usr/ports/math/libdivide/work/libdivide-5.0/libdivide.h:3020:80: error: no member named 'denom' in 'divider<T, ALGO>'
       3020 |         return div.denom.magic == other.denom.magic && div.denom.more == other.denom.more;
            |                                                                          ~~~~~ ^
    
    The member function `operator==()` should refer to `other.div.denom`
    instead. Upstream fixed this in
    https://github.com/ridiculousfish/libdivide/commit/fa020f3, so import it
    as a patch.
    
    PR:             282827
    Approved by:    thierry (maintainer)
    MFH:            2024Q4
---
 math/libdivide/Makefile | 3 +++
 math/libdivide/distinfo | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/math/libdivide/Makefile b/math/libdivide/Makefile
index 764f37805bd0..0a6fa1743e9e 100644
--- a/math/libdivide/Makefile
+++ b/math/libdivide/Makefile
@@ -3,6 +3,9 @@ DISTVERSION=	5.0
 PORTREVISION=	1
 CATEGORIES=	math
 
+PATCH_SITES=	https://github.com/ridiculousfish/${PORTNAME}/commit/
+PATCHFILES+=	fa020f3b3e7ab3e80a2b23ab70bad0f46dbab795.patch:-p1 # https://github.com/ridiculousfish/libdivide/pull/113
+
 MAINTAINER=	thierry@FreeBSD.org
 COMMENT=	Fast prime counting function implementations
 WWW=		https://libdivide.com/
diff --git a/math/libdivide/distinfo b/math/libdivide/distinfo
index ac6777060bdd..50777c6cc211 100644
--- a/math/libdivide/distinfo
+++ b/math/libdivide/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1638115355
+TIMESTAMP = 1731919803
 SHA256 (ridiculousfish-libdivide-5.0_GH0.tar.gz) = 01ffdf90bc475e42170741d381eb9cfb631d9d7ddac7337368bcd80df8c98356
 SIZE (ridiculousfish-libdivide-5.0_GH0.tar.gz) = 680611
+SHA256 (fa020f3b3e7ab3e80a2b23ab70bad0f46dbab795.patch) = 47ed962063ff09c4030a95297803e99b5899795bcaba7630fa3c5e0f80f583dd
+SIZE (fa020f3b3e7ab3e80a2b23ab70bad0f46dbab795.patch) = 829