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 17:39:44 UTC 2025

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

Log Message:
geography/proj: Add patches to fix ctype(3) abuse

Fixes pkg/59490, qgis failure to build on NetBSD-current.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 pkgsrc/geography/proj/Makefile
cvs rdiff -u -r1.29 -r1.30 pkgsrc/geography/proj/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/geography/proj/patches/patch-src_iso19111_coordinatesystem.cpp \
    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.54 pkgsrc/geography/proj/Makefile:1.55
--- pkgsrc/geography/proj/Makefile:1.54 Fri Jun  6 13:22:51 2025
+++ pkgsrc/geography/proj/Makefile      Thu Jul  3 17:39:44 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.54 2025/06/06 13:22:51 gdt Exp $
+# $NetBSD: Makefile,v 1.55 2025/07/03 17:39:44 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=  0
+PKGREVISION=   1
 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.29 pkgsrc/geography/proj/distinfo:1.30
--- pkgsrc/geography/proj/distinfo:1.29 Fri Jun  6 13:22:51 2025
+++ pkgsrc/geography/proj/distinfo      Thu Jul  3 17:39:44 2025
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.29 2025/06/06 13:22:51 gdt Exp $
+$NetBSD: distinfo,v 1.30 2025/07/03 17:39:44 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) = 805b19d1dd5e4cf9f6d198fb77bb911f49fb7b71
+SHA1 (patch-src_iso19111_internal.cpp) = 52e583393e37c5f6bc5a629a4bfecda58439d71b

Added files:

Index: pkgsrc/geography/proj/patches/patch-src_iso19111_coordinatesystem.cpp
diff -u /dev/null pkgsrc/geography/proj/patches/patch-src_iso19111_coordinatesystem.cpp:1.1
--- /dev/null   Thu Jul  3 17:39:44 2025
+++ pkgsrc/geography/proj/patches/patch-src_iso19111_coordinatesystem.cpp       Thu Jul  3 17:39:44 2025
@@ -0,0 +1,62 @@
+$NetBSD: patch-src_iso19111_coordinatesystem.cpp,v 1.1 2025/07/03 17:39:44 gdt Exp $
+
+Fix ctype abuse.
+
+Not yet filed upstream.
+
+--- src/iso19111/coordinatesystem.cpp.orig     2025-07-03 13:25:01.929435443 +0000
++++ src/iso19111/coordinatesystem.cpp
+@@ -402,7 +402,7 @@ void CoordinateSystemAxis::_exportToWKT(
+     if (!axisName.empty()) {
+         if (isWKT2) {
+             axisDesignation =
+-                tolower(axisName.substr(0, 1)) + axisName.substr(1);
++                internal::tolower(axisName.substr(0, 1)) + axisName.substr(1);
+         } else {
+             if (axisName == "Geodetic latitude") {
+                 axisDesignation = "Latitude";
+@@ -1423,7 +1423,7 @@ ParametricCS::create(const util::Propert
+ // ---------------------------------------------------------------------------
+ 
+ AxisDirection::AxisDirection(const std::string &nameIn) : CodeList(nameIn) {
+-    auto lowerName = tolower(nameIn);
++    auto lowerName = internal::tolower(nameIn);
+     assert(registry.find(lowerName) == registry.end());
+     registry[lowerName] = this;
+ }
+@@ -1443,7 +1443,7 @@ AxisDirection::valueOf(const std::string
+ // ---------------------------------------------------------------------------
+ 
+ RangeMeaning::RangeMeaning(const std::string &nameIn) : CodeList(nameIn) {
+-    auto lowerName = tolower(nameIn);
++    auto lowerName = internal::tolower(nameIn);
+     assert(registry.find(lowerName) == registry.end());
+     registry[lowerName] = this;
+ }
+@@ -1456,7 +1456,7 @@ RangeMeaning::RangeMeaning() : CodeList(
+ 
+ //! @cond Doxygen_Suppress
+ const RangeMeaning *RangeMeaning::valueOf(const std::string &nameIn) noexcept {
+-    auto iter = registry.find(tolower(nameIn));
++    auto iter = registry.find(internal::tolower(nameIn));
+     if (iter == registry.end())
+         return nullptr;
+     return iter->second;
+@@ -1468,7 +1468,7 @@ const RangeMeaning *RangeMeaning::valueO
+ 
+ AxisDirectionWKT1::AxisDirectionWKT1(const std::string &nameIn)
+     : CodeList(nameIn) {
+-    auto lowerName = tolower(nameIn);
++    auto lowerName = internal::tolower(nameIn);
+     assert(registry.find(lowerName) == registry.end());
+     registry[lowerName] = this;
+ }
+@@ -1476,7 +1476,7 @@ AxisDirectionWKT1::AxisDirectionWKT1(con
+ // ---------------------------------------------------------------------------
+ 
+ const AxisDirectionWKT1 *AxisDirectionWKT1::valueOf(const std::string &nameIn) {
+-    auto iter = registry.find(tolower(nameIn));
++    auto iter = registry.find(internal::tolower(nameIn));
+     if (iter == registry.end())
+         return nullptr;
+     return iter->second;
Index: pkgsrc/geography/proj/patches/patch-src_iso19111_internal.cpp
diff -u /dev/null pkgsrc/geography/proj/patches/patch-src_iso19111_internal.cpp:1.1
--- /dev/null   Thu Jul  3 17:39:44 2025
+++ pkgsrc/geography/proj/patches/patch-src_iso19111_internal.cpp       Thu Jul  3 17:39:44 2025
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_iso19111_internal.cpp,v 1.1 2025/07/03 17:39:44 gdt Exp $
+
+Fix ctype abuse, which causes test failures on NetBSD-current (11).
+
+Not yet reported upstream.
+
+--- src/iso19111/internal.cpp.orig     2025-07-03 13:10:59.122964425 +0000
++++ src/iso19111/internal.cpp
+@@ -130,7 +130,7 @@ std::string tolower(const std::string &s
+ {
+     std::string ret(str);
+     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]));
+     return ret;
+ }
+ 
+@@ -145,7 +145,7 @@ std::string toupper(const std::string &s
+ {
+     std::string ret(str);
+     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]));
+     return ret;
+ }
+ 



Home | Main Index | Thread Index | Old Index