ports/math/libdivide/Makefile
Dimitry Andric 822b0e7aeb 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
2024-11-18 23:51:34 +01:00

38 lines
885 B
Makefile

PORTNAME= libdivide
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/
LICENSE= ZLIB BSL
LICENSE_COMB= multi
USE_GITHUB= yes
GH_ACCOUNT= ridiculousfish
USES= cmake compiler:c++11-lang
NO_ARCH= yes
# NEON support requires arm64
CMAKE_OFF_armv6= LIBDIVIDE_NEON
CMAKE_OFF_armv7= LIBDIVIDE_NEON
CMAKE_OFF= ${CMAKE_OFF_${ARCH}}
PLIST_FILES= include/libdivide.h \
lib/cmake/libdivide/libdivideConfig.cmake \
lib/cmake/libdivide/libdivideConfigVersion.cmake
OPTIONS_DEFINE= NATIVE
NATIVE_CMAKE_BOOL= FREEBSD_NATIVE
do-test:
${CONFIGURE_WRKSRC}/tester
.include <bsd.port.mk>