diff --git a/math/clrng/Makefile b/math/clrng/Makefile index 100cf831a945..b2b80b038c99 100644 --- a/math/clrng/Makefile +++ b/math/clrng/Makefile @@ -1,44 +1,41 @@ PORTNAME= clrng DISTVERSIONPREFIX= v DISTVERSION= 1.0.0-beta PORTREVISION= 4 CATEGORIES= math MAINTAINER= ports@FreeBSD.org COMMENT= Library for uniform random number generation in OpenCL WWW= https://github.com/clMathLibraries/clRNG LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE DEPRECATED= Abandoned upstream, does not build with CMake 4 EXPIRATION_DATE=2026-11-30 -ONLY_FOR_ARCHS= amd64 i386 powerpc powerpc64 powerpc64le powerpcspe -ONLY_FOR_ARCHS_REASON= this code has only been tested on x86 and powerpc platforms - BUILD_DEPENDS= opencl>=0:devel/opencl LIB_DEPENDS= libOpenCL.so:devel/ocl-icd RUN_DEPENDS= opencl>=0:devel/opencl USE_GITHUB= yes GH_ACCOUNT= clMathLibraries GH_PROJECT= clRNG USES= cmake compiler:c++11-lang USE_LDCONFIG= yes CMAKE_ARGS+= -DBUILD_CLIENT=OFF \ -DBUILD_TEST=OFF \ -DSUFFIX_LIB="" \ -DSUFFIX_BIN="" CMAKE_SOURCE_PATH= ${WRKSRC}/src .include .if ${CHOSEN_COMPILER_TYPE} == gcc CFLAGS+= -Wno-expansion-to-defined .endif .include diff --git a/math/clrng/files/patch-src_cl_include_private_Random123_features_gccfeatures.h b/math/clrng/files/patch-src_cl_include_private_Random123_features_gccfeatures.h index b5e36d2787a1..a65152d63e68 100644 --- a/math/clrng/files/patch-src_cl_include_private_Random123_features_gccfeatures.h +++ b/math/clrng/files/patch-src_cl_include_private_Random123_features_gccfeatures.h @@ -1,11 +1,21 @@ ---- src/cl/include/private/Random123/features/gccfeatures.h.orig 2020-01-02 12:50:28 UTC +--- src/cl/include/private/Random123/features/gccfeatures.h.orig 2015-05-01 01:08:38 UTC +++ src/cl/include/private/Random123/features/gccfeatures.h -@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O - Please let the authors know of any successes (or failures). */ - #endif +@@ -34,17 +34,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O + + #define R123_GNUC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) + +-#if !defined(__x86_64__) && !defined(__i386__) && !defined(__powerpc__) +-# error "This code has only been tested on x86 and powerpc platforms." +-#include +-{ /* maybe an unbalanced brace will terminate the compilation */ +- /* Feel free to try the Random123 library on other architectures by changing +- the conditions that reach this error, but you should consider it a +- porting exercise and expect to encounter bugs and deficiencies. +- Please let the authors know of any successes (or failures). */ +-#endif -#ifdef __powerpc__ +#if defined(__powerpc__) && !defined(__clang__) #include #endif diff --git a/math/clrng/files/patch-src_library_mrg32k3a.c b/math/clrng/files/patch-src_library_mrg32k3a.c new file mode 100644 index 000000000000..161f0cd2300d --- /dev/null +++ b/math/clrng/files/patch-src_library_mrg32k3a.c @@ -0,0 +1,30 @@ +--- src/library/mrg32k3a.c.orig 2026-09-06 13:27:06 UTC ++++ src/library/mrg32k3a.c +@@ -404,21 +404,21 @@ clrngStatus clrngMrg32k3aWriteStreamInfo(const clrngMr + // The Initial state of the Stream + fprintf(file, "\n initial = { "); + for (size_t i = 0; i < 3; i++) +- fprintf(file, "%lu, ", stream->initial.g1[i]); ++ fprintf(file, "%ju, ", (uintmax_t)stream->initial.g1[i]); + + for (size_t i = 0; i < 2; i++) +- fprintf(file, "%lu, ", stream->initial.g2[i]); ++ fprintf(file, "%ju, ", (uintmax_t)stream->initial.g2[i]); + +- fprintf(file, "%lu }\n", stream->initial.g2[2]); ++ fprintf(file, "%ju }\n", (uintmax_t)stream->initial.g2[2]); + //The Current state of the Stream + fprintf(file, "\n Current = { "); + for (size_t i = 0; i < 3; i++) +- fprintf(file, "%lu, ", stream->current.g1[i]); ++ fprintf(file, "%ju, ", (uintmax_t)stream->current.g1[i]); + + for (size_t i = 0; i < 2; i++) +- fprintf(file, "%lu, ", stream->current.g2[i]); ++ fprintf(file, "%ju, ", (uintmax_t)stream->current.g2[i]); + +- fprintf(file, "%lu }\n", stream->current.g2[2]); ++ fprintf(file, "%ju }\n", (uintmax_t)stream->current.g2[2]); + + return CLRNG_SUCCESS; + }