[arch-commits] Commit in libappimage/repos/extra-x86_64 (3 files)
Antonio Rojas
arojas at archlinux.org
Sat Jul 25 22:32:00 UTC 2020
Date: Saturday, July 25, 2020 @ 22:32:00
Author: arojas
Revision: 392545
archrelease: copy trunk to extra-x86_64
Added:
libappimage/repos/extra-x86_64/PKGBUILD
(from rev 392544, libappimage/trunk/PKGBUILD)
libappimage/repos/extra-x86_64/libappimage-gcc10.patch
(from rev 392544, libappimage/trunk/libappimage-gcc10.patch)
Deleted:
libappimage/repos/extra-x86_64/PKGBUILD
-------------------------+
PKGBUILD | 71 ++++++++++++++++++++++------------------------
libappimage-gcc10.patch | 50 ++++++++++++++++++++++++++++++++
2 files changed, 85 insertions(+), 36 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-07-25 22:31:48 UTC (rev 392544)
+++ PKGBUILD 2020-07-25 22:32:00 UTC (rev 392545)
@@ -1,36 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-
-pkgname=libappimage
-pkgver=1.0.2
-pkgrel=3
-pkgdesc="Reference implementation of the AppImage specification"
-arch=(x86_64)
-url="https://appimage.org/"
-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')
-
-prepare() {
- mkdir -p build
-}
-
-build() {
- cd build
- cmake ../$pkgname-$pkgver \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
- -DUSE_SYSTEM_XZ=ON \
- -DUSE_SYSTEM_SQUASHFUSE=ON \
- -DUSE_SYSTEM_LIBARCHIVE=ON \
- -DUSE_SYSTEM_BOOST=ON \
- -DUSE_SYSTEM_XDGUTILS=ON \
- -DBUILD_TESTING=OFF
- make
-}
-
-package() {
- cd build
- make DESTDIR="$pkgdir" install
-}
Copied: libappimage/repos/extra-x86_64/PKGBUILD (from rev 392544, libappimage/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-07-25 22:32:00 UTC (rev 392545)
@@ -0,0 +1,35 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgname=libappimage
+pkgver=1.0.3
+pkgrel=1
+pkgdesc="Reference implementation of the AppImage specification"
+arch=(x86_64)
+url="https://appimage.org/"
+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"
+ libappimage-gcc10.patch)
+sha256sums=('36a2a3c5a158301d7ed6d6996a82ac953549c99232b5b88d116e99f42175bc6b'
+ 'bd2eb7a270c5e75f55d5d2be1aba4e9b12815c1ad826eb403a66f111e89dcca9')
+
+prepare() {
+ patch -d $pkgname-$pkgver -p1 -i ../libappimage-gcc10.patch # Fix build with GCC 10
+}
+
+build() {
+ cmake -B build -S $pkgname-$pkgver \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DUSE_SYSTEM_XZ=ON \
+ -DUSE_SYSTEM_SQUASHFUSE=ON \
+ -DUSE_SYSTEM_LIBARCHIVE=ON \
+ -DUSE_SYSTEM_BOOST=ON \
+ -DUSE_SYSTEM_XDGUTILS=ON \
+ -DBUILD_TESTING=OFF
+ cmake --build build
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+}
Copied: libappimage/repos/extra-x86_64/libappimage-gcc10.patch (from rev 392544, libappimage/trunk/libappimage-gcc10.patch)
===================================================================
--- libappimage-gcc10.patch (rev 0)
+++ libappimage-gcc10.patch 2020-07-25 22:32:00 UTC (rev 392545)
@@ -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.
More information about the arch-commits
mailing list