pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/geography/R-s2



Module Name:    pkgsrc
Committed By:   he
Date:           Sat Oct  8 20:02:06 UTC 2022

Modified Files:
        pkgsrc/geography/R-s2: Makefile distinfo
Added Files:
        pkgsrc/geography/R-s2/patches:
            patch-src_s2_util_math_exactfloat_exactfloat.cc

Log Message:
geography/R-s2: import fix for "not old" openssl on 32-bit hosts.

Ref.
https://github.com/r-spatial/s2/commit/3e791194ceb348a81d6317438e2bfe9e4a2ff1e3


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/geography/R-s2/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/geography/R-s2/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/geography/R-s2/patches/patch-src_s2_util_math_exactfloat_exactfloat.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/geography/R-s2/Makefile
diff -u pkgsrc/geography/R-s2/Makefile:1.2 pkgsrc/geography/R-s2/Makefile:1.3
--- pkgsrc/geography/R-s2/Makefile:1.2  Mon Aug 22 22:21:53 2022
+++ pkgsrc/geography/R-s2/Makefile      Sat Oct  8 20:02:06 2022
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2022/08/22 22:21:53 tnn Exp $
+# $NetBSD: Makefile,v 1.3 2022/10/08 20:02:06 he Exp $
 
 R_PKGNAME=     s2
 R_PKGVER=      1.0.6
+PKGREVISION=   1
 CATEGORIES=    geography
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -14,4 +15,5 @@ USE_LANGUAGES=        c c++
 .include "../../devel/R-Rcpp/buildlink3.mk"
 .include "../../geography/R-wk/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
+.include "../../mk/atomic64.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/geography/R-s2/distinfo
diff -u pkgsrc/geography/R-s2/distinfo:1.3 pkgsrc/geography/R-s2/distinfo:1.4
--- pkgsrc/geography/R-s2/distinfo:1.3  Tue Oct 26 10:45:07 2021
+++ pkgsrc/geography/R-s2/distinfo      Sat Oct  8 20:02:06 2022
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 10:45:07 nia Exp $
+$NetBSD: distinfo,v 1.4 2022/10/08 20:02:06 he Exp $
 
 BLAKE2s (R/s2_1.0.6.tar.gz) = abef7cb812ef604615cf4741c66cc4062796708c3ae8191b91d236303c436fda
 SHA512 (R/s2_1.0.6.tar.gz) = 4529179020f7503217cdfe1d139135a79c622bc38472627d4a1f86181ba825e5dc5f833a9ffb9be6cb272647fb61765bd6b5db89b6f46015ebcf0e996b93b623
 Size (R/s2_1.0.6.tar.gz) = 1605788 bytes
+SHA1 (patch-src_s2_util_math_exactfloat_exactfloat.cc) = 7dda8c6095ac4f07f2bdc0e9801bb055acf808e7

Added files:

Index: pkgsrc/geography/R-s2/patches/patch-src_s2_util_math_exactfloat_exactfloat.cc
diff -u /dev/null pkgsrc/geography/R-s2/patches/patch-src_s2_util_math_exactfloat_exactfloat.cc:1.1
--- /dev/null   Sat Oct  8 20:02:06 2022
+++ pkgsrc/geography/R-s2/patches/patch-src_s2_util_math_exactfloat_exactfloat.cc       Sat Oct  8 20:02:06 2022
@@ -0,0 +1,48 @@
+$NetBSD: patch-src_s2_util_math_exactfloat_exactfloat.cc,v 1.1 2022/10/08 20:02:06 he Exp $
+
+Import fix from upstream for newer openssl on 32-bit hosts, ref.
+
+https://github.com/r-spatial/s2/commit/3e791194ceb348a81d6317438e2bfe9e4a2ff1e3
+
+--- src/s2/util/math/exactfloat/exactfloat.cc.orig     2021-01-04 12:00:17.000000000 +0000
++++ src/s2/util/math/exactfloat/exactfloat.cc
+@@ -93,6 +93,7 @@ inline static void BN_ext_set_uint64(BIG
+ #endif
+ }
+ 
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ // Return the absolute value of a BIGNUM as a 64-bit unsigned integer.
+ // Requires that BIGNUM fits into 64 bits.
+ inline static uint64 BN_ext_get_uint64(const BIGNUM* bn) {
+@@ -108,8 +109,6 @@ inline static uint64 BN_ext_get_uint64(c
+ #endif
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+-
+ // Count the number of low-order zero bits in the given BIGNUM (ignoring its
+ // sign).  Returns 0 if the argument is zero.
+ static int BN_ext_count_low_zero_bits(const BIGNUM* bn) {
+@@ -130,6 +129,22 @@ static int BN_ext_count_low_zero_bits(co
+ 
+ #else  // OPENSSL_VERSION_NUMBER >= 0x10100000L
+ 
++// Return the absolute value of a BIGNUM as a 64-bit unsigned integer.
++// Requires that BIGNUM fits into 64 bits.
++inline static uint64 BN_ext_get_uint64(const BIGNUM* bn) {
++  uint64 r;
++#ifdef IS_LITTLE_ENDIAN
++  S2_CHECK_EQ(BN_bn2lebinpad(bn, reinterpret_cast<unsigned char*>(&r),
++                             sizeof(r)), sizeof(r));
++#elif IS_BIG_ENDIAN
++  S2_CHECK_EQ(BN_bn2binpad(bn, reinterpret_cast<unsigned char*>(&r),
++                           sizeof(r)), sizeof(r));
++#else
++#error one of IS_LITTLE_ENDIAN or IS_BIG_ENDIAN should be defined!
++#endif
++  return r;
++}
++
+ static int BN_ext_count_low_zero_bits(const BIGNUM* bn) {
+   // In OpenSSL >= 1.1, BIGNUM is an opaque type, so d and top
+   // cannot be accessed.  The bytes must be copied out at a ~25%



Home | Main Index | Thread Index | Old Index