From e5200c5396a20d8e10d3983b9871d5196e735d61 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 03:47:07 +0100 Subject: [PATCH] update to 1.0.3 [release 1.0.3-1mamba;Sun Dec 27 2020] --- libappimage-1.0.3-gcc-10.patch | 50 ++++++++++++++++++++++++++++++++++ libappimage.spec | 18 ++++++------ 2 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 libappimage-1.0.3-gcc-10.patch diff --git a/libappimage-1.0.3-gcc-10.patch b/libappimage-1.0.3-gcc-10.patch new file mode 100644 index 0000000..d715544 --- /dev/null +++ b/libappimage-1.0.3-gcc-10.patch @@ -0,0 +1,50 @@ +diff --git a/src/libappimage/utils/StringSanitizer.cpp b/src/libappimage/utils/StringSanitizer.cpp +index fee9f7d..521d82e 100644 +--- a/src/libappimage/utils/StringSanitizer.cpp ++++ b/src/libappimage/utils/StringSanitizer.cpp +@@ -13,6 +13,20 @@ std::string StringSanitizer::sanitizeForPath() { + std::vector buffer{}; + buffer.reserve(input_.size()); + ++ // these three lists can be used to compose alphabets for sanitization ++ static constexpr std::initializer_list asciiLetters_ = { ++ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', ++ 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', ++ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', ++ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ++ }; ++ static constexpr std::initializer_list asciiDigits_ = { ++ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ++ }; ++ static constexpr std::initializer_list pathSafeChars_ = { ++ '.', '-', '_' ++ }; ++ + // first of all, we compose an alphabet of safe characters + // all characters not contained in this alphabet will be replaced by some safe character, e.g., an underscore (_) + std::vector safeAlphabet{asciiDigits_.size() + asciiLetters_.size() + pathSafeChars_.size()}; +diff --git a/src/libappimage/utils/StringSanitizer.h b/src/libappimage/utils/StringSanitizer.h +index 5301ec1..9919ed6 100644 +--- a/src/libappimage/utils/StringSanitizer.h ++++ b/src/libappimage/utils/StringSanitizer.h +@@ -10,20 +10,6 @@ class StringSanitizer { + private: + std::string input_; + +- // these three lists can be used to compose alphabets for sanitization +- static constexpr std::initializer_list asciiLetters_ = { +- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', +- 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', +- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', +- 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', +- }; +- static constexpr std::initializer_list asciiDigits_ = { +- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', +- }; +- static constexpr std::initializer_list pathSafeChars_ = { +- '.', '-', '_' +- }; +- + public: + /** + * Default constructor. diff --git a/libappimage.spec b/libappimage.spec index df03efe..c7b2054 100644 --- a/libappimage.spec +++ b/libappimage.spec @@ -1,14 +1,14 @@ Name: libappimage -Version: 1.0.2 -Release: 2mamba +Version: 1.0.3 +Release: 1mamba Summary: Implements functionality for dealing with AppImage files Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://appimage.org -## GITSOURCE https://github.com/AppImage/libappimage.git v1.0.2 Source: https://github.com/AppImage/libappimage.git/v%{version}/libappimage-%{version}.tar.bz2 +Patch0: libappimage-1.0.3-gcc-10.patch License: MIT ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -30,8 +30,7 @@ Implements functionality for dealing with AppImage files. Group: Development/Libraries Summary: Development files for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} -## note: you can add this requirement if .pc files are provided by this package -#Requires: pkg-config +Requires: pkg-config %description devel This package contains libraries and header files for developing applications that use %{name}. @@ -40,13 +39,11 @@ This package contains libraries and header files for developing applications tha %prep %setup -q +%patch0 -p1 %build %cmake -d build \ -\ -%ifarch arm - -DCMAKE_CXX_FLAGS="%{optflags} -Wno-narrowing" -%endif + -DCMAKE_CXX_FLAGS="%{optflags} -Wno-narrowing -fcommon" %make @@ -84,6 +81,9 @@ This package contains libraries and header files for developing applications tha %doc README.md %changelog +* Sun Dec 27 2020 Silvan Calarco 1.0.3-1mamba +- update to 1.0.3 + * Tue Nov 12 2019 Silvan Calarco 1.0.2-2mamba - added debug package