pkgsrc-Changes archive

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

CVS commit: pkgsrc/math/R



Module Name:    pkgsrc
Committed By:   markd
Date:           Thu Feb 15 07:48:50 UTC 2024

Modified Files:
        pkgsrc/math/R: Makefile distinfo
Added Files:
        pkgsrc/math/R/patches: patch-src_main_character.c

Log Message:
R: fix dealing with conflict with NetBSD function strtoi()

Just rename the C level function strtoi() to not conflict with the
NetBSD function.  Don't also change the name of the R level funstion.


To generate a diff of this commit:
cvs rdiff -u -r1.250 -r1.251 pkgsrc/math/R/Makefile
cvs rdiff -u -r1.102 -r1.103 pkgsrc/math/R/distinfo
cvs rdiff -u -r0 -r1.7 pkgsrc/math/R/patches/patch-src_main_character.c

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

Modified files:

Index: pkgsrc/math/R/Makefile
diff -u pkgsrc/math/R/Makefile:1.250 pkgsrc/math/R/Makefile:1.251
--- pkgsrc/math/R/Makefile:1.250        Mon Jan  8 07:18:26 2024
+++ pkgsrc/math/R/Makefile      Thu Feb 15 07:48:50 2024
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.250 2024/01/08 07:18:26 mef Exp $
+# $NetBSD: Makefile,v 1.251 2024/02/15 07:48:50 markd Exp $
 
 #
 # If updating this package, please try to ensure PLIST.Darwin is kept in sync
 # to avoid unnecessarily breaking macOS users.
 #
 DISTNAME=      R-4.3.2
+PKGREVISION=   1
 CATEGORIES=    math
 MASTER_SITES=  ${MASTER_SITE_R_CRAN:=base/R-4/}
 
@@ -159,30 +160,6 @@ SUBST_STAGE.fixwrap=       post-build
 SUBST_FILES.fixwrap=   libtool
 SUBST_SED.fixwrap=     -e "s,${WRAPPER_BINDIR}/libtool,${PKG_LIBTOOL},g"
 
-SUBST_CLASSES+=                strtoi
-SUBST_STAGE.strtoi=    pre-configure
-SUBST_MESSAGE.strtoi=  Renaming strtoi to strtoiR to avoid conflict
-SUBST_FILES.strtoi=    \
-       tests/reg-tests-1d.R \
-       doc/NEWS.3 \
-       doc/html/NEWS.2.html \
-       doc/html/NEWS.3.html \
-       doc/NEWS.2 \
-       doc/NEWS.3.Rd \
-       doc/NEWS.2.Rd \
-       src/include/Internal.h \
-       src/library/base/man/hexmode.Rd \
-       src/library/base/man/octmode.Rd \
-       src/library/base/man/strtoi.Rd \
-       src/library/base/R/octhex.R \
-       src/library/base/R/version.R \
-       src/library/base/R/character.R \
-       src/gnuwin32/Rdll.hide \
-       src/main/names.c \
-       src/main/character.c
-
-SUBST_SED.strtoi=      -e "s,strtoi,strtoiR,g"
-
 BUILDLINK_API_DEPENDS.bzip2+=  bzip2>=1.0.5
 
 # failed to convert strong functions and variables: Invalid type identifier

Index: pkgsrc/math/R/distinfo
diff -u pkgsrc/math/R/distinfo:1.102 pkgsrc/math/R/distinfo:1.103
--- pkgsrc/math/R/distinfo:1.102        Mon Jan  8 23:15:39 2024
+++ pkgsrc/math/R/distinfo      Thu Feb 15 07:48:50 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.102 2024/01/08 23:15:39 mef Exp $
+$NetBSD: distinfo,v 1.103 2024/02/15 07:48:50 markd Exp $
 
 BLAKE2s (R-4.3.2.tar.gz) = a79080d65222ec6698175c037390e666385567b1e123acf6ce1e33ee3f122005
 SHA512 (R-4.3.2.tar.gz) = 125114357f20d4a3248aee86727768d1dc15e07e44353f8a68fe2ef1fedae508e85d944301d00c0edd61e8b012b0b3cdcde53ac60be903713f96542d83ad5b1d
@@ -6,3 +6,4 @@ Size (R-4.3.2.tar.gz) = 35039225 bytes
 SHA1 (patch-configure.ac) = 3cd063c424b7b9674f434d49c771b76dde73ac5c
 SHA1 (patch-m4_R.m4) = 48a1d38b5505cbb87bd2c156f262680156c07a02
 SHA1 (patch-src_library_stats_src_Makefile.in) = 4eb93292858392792c37a706399e2cef91821bbe
+SHA1 (patch-src_main_character.c) = c1be2cae404ecbdd547343b70e9d072e9e1d5549

Added files:

Index: pkgsrc/math/R/patches/patch-src_main_character.c
diff -u /dev/null pkgsrc/math/R/patches/patch-src_main_character.c:1.7
--- /dev/null   Thu Feb 15 07:48:50 2024
+++ pkgsrc/math/R/patches/patch-src_main_character.c    Thu Feb 15 07:48:50 2024
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_main_character.c,v 1.7 2024/02/15 07:48:50 markd Exp $
+
+rename strtoi() to avoild conflict with NetBSD function.
+
+--- src/main/character.c.orig  2023-07-04 22:15:01.000000000 +0000
++++ src/main/character.c
+@@ -1749,7 +1749,7 @@ attribute_hidden SEXP do_strtrim(SEXP ca
+     return s;
+ }
+ 
+-static int strtoi(SEXP s, int base)
++static int strtoiR(SEXP s, int base)
+ {
+     if(s == NA_STRING || CHAR(s)[0] == '\0') return(NA_INTEGER);
+ 
+@@ -1782,7 +1782,7 @@ attribute_hidden SEXP do_strtoi(SEXP cal
+ 
+     PROTECT(ans = allocVector(INTSXP, n = LENGTH(x)));
+     for(i = 0; i < n; i++)
+-      INTEGER(ans)[i] = strtoi(STRING_ELT(x, i), base);
++      INTEGER(ans)[i] = strtoiR(STRING_ELT(x, i), base);
+     UNPROTECT(1);
+ 
+     return ans;



Home | Main Index | Thread Index | Old Index