Andreas Wacknitz
2024-03-24 0f829040b2aa138f680cf8db0787781b294cbe18
rtorrent: re-add string manipulation patch which is according to alp still needed

1 files added
3 files modified
36 ■■■■■ changed files
components/network/rtorrent/Makefile 2 ●●● patch | view | raw | blame | history
components/network/rtorrent/manifests/sample-manifest.p5m 2 ●●● patch | view | raw | blame | history
components/network/rtorrent/patches/string_manip.patch 30 ●●●●● patch | view | raw | blame | history
components/network/rtorrent/pkg5 2 ●●● patch | view | raw | blame | history
components/network/rtorrent/Makefile
@@ -28,7 +28,7 @@
COMPONENT_NAME=        rtorrent
COMPONENT_VERSION=    0.9.8
COMPONENT_REVISION= 2
COMPONENT_REVISION= 3
COMPONENT_SUMMARY=    rtorrent - a BitTorrent client for ncurses
COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_PROJECT_URL=    https://rakshasa.github.io/rtorrent/
components/network/rtorrent/manifests/sample-manifest.p5m
@@ -10,7 +10,7 @@
#
#
# Copyright 2023 <contributor>
# Copyright 2024 <contributor>
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
components/network/rtorrent/patches/string_manip.patch
New file
@@ -0,0 +1,30 @@
--- rtorrent-0.9.3/rak/string_manip.h.orig    2013-10-04 22:39:31.185674832 +0400
+++ rtorrent-0.9.3/rak/string_manip.h    2013-10-04 22:40:52.599710992 +0400
@@ -190,9 +190,10 @@
 OutputIterator
 copy_escape_html(InputIterator first, InputIterator last, OutputIterator dest) {
   while (first != last) {
-    if (std::isalpha(*first, std::locale::classic()) ||
-        std::isdigit(*first, std::locale::classic()) ||
-        *first == '-') {
+    if (isascii(*first)&&
+         (std::isalpha(*first, std::locale::classic()) ||
+          std::isdigit(*first, std::locale::classic()) ||
+          *first == '-')) {
       *(dest++) = *first;
     } else {
@@ -211,9 +212,10 @@
 OutputIterator
 copy_escape_html(InputIterator first1, InputIterator last1, OutputIterator first2, OutputIterator last2) {
   while (first1 != last1) {
-    if (std::isalpha(*first1, std::locale::classic()) ||
-        std::isdigit(*first1, std::locale::classic()) ||
-        *first1 == '-') {
+    if (isascii(*first1)&&
+          (std::isalpha(*first1, std::locale::classic()) ||
+          std::isdigit(*first1, std::locale::classic()) ||
+          *first1 == '-')) {
       if (first2 == last2) break; else *(first2++) = *first1;
     } else {
components/network/rtorrent/pkg5
@@ -12,4 +12,4 @@
        "network/rtorrent"
    ],
    "name": "rtorrent"
}
}