Date: Saturday, July 25, 2020 @ 22:31:48 Author: arojas Revision: 392544
Update to 1.0.3 Added: libappimage/trunk/libappimage-gcc10.patch Modified: libappimage/trunk/PKGBUILD -------------------------+ PKGBUILD | 21 +++++++++---------- libappimage-gcc10.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 11 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-07-25 21:56:17 UTC (rev 392543) +++ PKGBUILD 2020-07-25 22:31:48 UTC (rev 392544) @@ -1,8 +1,8 @@ # Maintainer: Antonio Rojas <aro...@archlinux.org> pkgname=libappimage -pkgver=1.0.2 -pkgrel=3 +pkgver=1.0.3 +pkgrel=1 pkgdesc="Reference implementation of the AppImage specification" arch=(x86_64) url="https://appimage.org/" @@ -9,18 +9,18 @@ license=(GPL) depends=(libarchive squashfuse boost-libs librsvg) makedepends=(cmake wget vim desktop-file-utils boost xdg-utils-cxx) -source=($pkgname-$pkgver.tar.gz::"https://github.com/AppImage/libappimage/archive/v$pkgver.tar.gz") -sha256sums=('250230db5b1cbace039ec0d70ea020a0f37c4fe867656d88d330017117da37eb') +source=($pkgname-$pkgver.tar.gz::"https://github.com/AppImage/libappimage/archive/v$pkgver.tar.gz" + libappimage-gcc10.patch) +sha256sums=('36a2a3c5a158301d7ed6d6996a82ac953549c99232b5b88d116e99f42175bc6b' + 'bd2eb7a270c5e75f55d5d2be1aba4e9b12815c1ad826eb403a66f111e89dcca9') prepare() { - mkdir -p build + patch -d $pkgname-$pkgver -p1 -i ../libappimage-gcc10.patch # Fix build with GCC 10 } build() { - cd build - cmake ../$pkgname-$pkgver \ + cmake -B build -S $pkgname-$pkgver \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ -DUSE_SYSTEM_XZ=ON \ -DUSE_SYSTEM_SQUASHFUSE=ON \ -DUSE_SYSTEM_LIBARCHIVE=ON \ @@ -27,10 +27,9 @@ -DUSE_SYSTEM_BOOST=ON \ -DUSE_SYSTEM_XDGUTILS=ON \ -DBUILD_TESTING=OFF - make + cmake --build build } package() { - cd build - make DESTDIR="$pkgdir" install + DESTDIR="$pkgdir" cmake --install build } Added: libappimage-gcc10.patch =================================================================== --- libappimage-gcc10.patch (rev 0) +++ libappimage-gcc10.patch 2020-07-25 22:31:48 UTC (rev 392544) @@ -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<std::string::value_type> buffer{}; + buffer.reserve(input_.size()); + ++ // these three lists can be used to compose alphabets for sanitization ++ static constexpr std::initializer_list<std::string::value_type> 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<std::string::value_type> asciiDigits_ = { ++ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ++ }; ++ static constexpr std::initializer_list<std::string::value_type> 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<std::string::value_type> 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<std::string::value_type> 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<std::string::value_type> asciiDigits_ = { +- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', +- }; +- static constexpr std::initializer_list<std::string::value_type> pathSafeChars_ = { +- '.', '-', '_' +- }; +- + public: + /** + * Default constructor.