pkgsrc-Changes archive

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

CVS commit: pkgsrc/geography/proj



Module Name:    pkgsrc
Committed By:   gdt
Date:           Thu Jul  3 23:40:38 UTC 2025

Modified Files:
        pkgsrc/geography/proj: Makefile distinfo
        pkgsrc/geography/proj/patches: patch-src_iso19111_internal.cpp
Added Files:
        pkgsrc/geography/proj/patches: patch-src_dmstor.cpp
Removed Files:
        pkgsrc/geography/proj/patches: patch-src_iso19111_coordinatesystem.cpp

Log Message:
geography/proj: Adjust ctype(3) approach to follow upstream

Upstream prefers a slightly different fix.  Plus, I found another
issue, patched here and filed upstream.

proj tests now pass on NetBSD current amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 pkgsrc/geography/proj/Makefile
cvs rdiff -u -r1.31 -r1.32 pkgsrc/geography/proj/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/geography/proj/patches/patch-src_dmstor.cpp
cvs rdiff -u -r1.2 -r0 \
    pkgsrc/geography/proj/patches/patch-src_iso19111_coordinatesystem.cpp
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/geography/proj/patches/patch-src_iso19111_internal.cpp

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

Modified files:

Index: pkgsrc/geography/proj/Makefile
diff -u pkgsrc/geography/proj/Makefile:1.55 pkgsrc/geography/proj/Makefile:1.56
--- pkgsrc/geography/proj/Makefile:1.55 Thu Jul  3 17:39:44 2025
+++ pkgsrc/geography/proj/Makefile      Thu Jul  3 23:40:38 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.55 2025/07/03 17:39:44 gdt Exp $
+# $NetBSD: Makefile,v 1.56 2025/07/03 23:40:38 gdt Exp $
 
 VERSION_BASE=  9.6.2
 # Accommodate testing RCs (names like 9.0RC1, unpacking to 9.0).
@@ -7,7 +7,7 @@ VERSION=        ${VERSION_BASE}${VERSION_RC}
 WRKFINAL=      proj-${VERSION_BASE}
 WRKSRC=                ${WRKDIR}/${WRKFINAL}
 DISTNAME=      proj-${VERSION}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    geography
 MASTER_SITES=  https://download.osgeo.org/proj/
 DISTFILES=     ${DISTNAME}${EXTRACT_SUFX}

Index: pkgsrc/geography/proj/distinfo
diff -u pkgsrc/geography/proj/distinfo:1.31 pkgsrc/geography/proj/distinfo:1.32
--- pkgsrc/geography/proj/distinfo:1.31 Thu Jul  3 17:55:04 2025
+++ pkgsrc/geography/proj/distinfo      Thu Jul  3 23:40:38 2025
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.31 2025/07/03 17:55:04 gdt Exp $
+$NetBSD: distinfo,v 1.32 2025/07/03 23:40:38 gdt Exp $
 
 BLAKE2s (proj-9.6.2.tar.gz) = 364c54c5ff51db558399f9dfa8855a6700902f85ef6c83a920739d40b0394c12
 SHA512 (proj-9.6.2.tar.gz) = f868c27f07544ac5b998f8f10d25033438f68dbce9b8eebe39fe72f8df02cd660eb54e706eac31674829d0a5fdb0aeb0358355bee187d92afc1be9f33bc42416
 Size (proj-9.6.2.tar.gz) = 6394614 bytes
-SHA1 (patch-src_iso19111_coordinatesystem.cpp) = 5d22a7df7878f8773b3fff00d780b8926c49d549
-SHA1 (patch-src_iso19111_internal.cpp) = 6cb455a20d0d1fec0a62c165836bd93d5fadfb76
+SHA1 (patch-src_dmstor.cpp) = d373128b36619193e4f0b64630785c03d654935a
+SHA1 (patch-src_iso19111_internal.cpp) = bf2ccd10d2cc61a4fe71cf16b1f120a47bd47b53

Index: pkgsrc/geography/proj/patches/patch-src_iso19111_internal.cpp
diff -u pkgsrc/geography/proj/patches/patch-src_iso19111_internal.cpp:1.2 pkgsrc/geography/proj/patches/patch-src_iso19111_internal.cpp:1.3
--- pkgsrc/geography/proj/patches/patch-src_iso19111_internal.cpp:1.2   Thu Jul  3 17:55:04 2025
+++ pkgsrc/geography/proj/patches/patch-src_iso19111_internal.cpp       Thu Jul  3 23:40:38 2025
@@ -1,26 +1,32 @@
-$NetBSD: patch-src_iso19111_internal.cpp,v 1.2 2025/07/03 17:55:04 gdt Exp $
+$NetBSD: patch-src_iso19111_internal.cpp,v 1.3 2025/07/03 23:40:38 gdt Exp $
 
-Fix ctype abuse, which causes test failures on NetBSD-current (11).
+Fix ctype usage.
 
-https://github.com/OSGeo/PROJ/issues/4537
+From https://github.com/OSGeo/PROJ/pull/4539
 
---- src/iso19111/internal.cpp.orig     2025-07-03 13:10:59.122964425 +0000
+--- src/iso19111/internal.cpp.orig     2025-04-01 21:34:48.000000000 +0000
 +++ src/iso19111/internal.cpp
-@@ -130,7 +130,7 @@ std::string tolower(const std::string &s
+@@ -129,8 +129,9 @@ std::string tolower(const std::string &s
+ 
  {
      std::string ret(str);
-     for (size_t i = 0; i < ret.size(); i++)
+-    for (size_t i = 0; i < ret.size(); i++)
 -        ret[i] = static_cast<char>(::tolower(ret[i]));
-+        ret[i] = static_cast<char>(::tolower((unsigned char) ret[i]));
++    for (char &ch : ret)
++        ch =
++            (ch >= 'A' && ch <= 'Z') ? static_cast<char>(ch + ('a' - 'A')) : ch;
      return ret;
  }
  
-@@ -145,7 +145,7 @@ std::string toupper(const std::string &s
+@@ -144,8 +145,9 @@ std::string toupper(const std::string &s
+ 
  {
      std::string ret(str);
-     for (size_t i = 0; i < ret.size(); i++)
+-    for (size_t i = 0; i < ret.size(); i++)
 -        ret[i] = static_cast<char>(::toupper(ret[i]));
-+        ret[i] = static_cast<char>(::toupper((unsigned char) ret[i]));
++    for (char &ch : ret)
++        ch =
++            (ch >= 'a' && ch <= 'z') ? static_cast<char>(ch - ('a' - 'A')) : ch;
      return ret;
  }
  

Added files:

Index: pkgsrc/geography/proj/patches/patch-src_dmstor.cpp
diff -u /dev/null pkgsrc/geography/proj/patches/patch-src_dmstor.cpp:1.1
--- /dev/null   Thu Jul  3 23:40:38 2025
+++ pkgsrc/geography/proj/patches/patch-src_dmstor.cpp  Thu Jul  3 23:40:38 2025
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_dmstor.cpp,v 1.1 2025/07/03 23:40:38 gdt Exp $
+
+Fix ctype usage.
+
+Submitted to https://github.com/OSGeo/PROJ/pull/4539
+
+--- src/dmstor.cpp.orig        2025-04-01 21:34:48.000000000 +0000
++++ src/dmstor.cpp
+@@ -46,7 +46,7 @@ double dmstor_ctx(PJ_CONTEXT *ctx, const
+      * It is possible that a really odd input (like lots of leading zeros)
+      * could be truncated in copying into work.  But ...
+      */
+-    while ((isgraph(*p) || *p == DEG_SIGN1 || *p == DEG_SIGN2) && --n)
++    while ((isgraph((unsigned char) *p) || *p == DEG_SIGN1 || *p == DEG_SIGN2) && --n)
+         *s++ = *p++;
+     *s = '\0';
+     int sign = *(s = work);



Home | Main Index | Thread Index | Old Index