[arch-commits] Commit in hugin/trunk (PKGBUILD xdg-data.patch)

Laurent Carlier lcarlier at gemini.archlinux.org
Thu Aug 11 06:57:27 UTC 2022


    Date: Thursday, August 11, 2022 @ 06:57:26
  Author: lcarlier
Revision: 1265159

upgpkg: hugin 2021.0.0-5: fix unset XDG_DATA_HOME crash

Added:
  hugin/trunk/xdg-data.patch
Modified:
  hugin/trunk/PKGBUILD

----------------+
 PKGBUILD       |   14 +++++++++++---
 xdg-data.patch |   23 +++++++++++++++++++++++
 2 files changed, 34 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-11 06:56:47 UTC (rev 1265158)
+++ PKGBUILD	2022-08-11 06:57:26 UTC (rev 1265159)
@@ -7,7 +7,7 @@
 
 pkgname=hugin
 pkgver=2021.0.0
-pkgrel=4
+pkgrel=5
 pkgdesc="Panorama photo stitcher"
 arch=(x86_64)
 url="http://hugin.sourceforge.net/"
@@ -20,9 +20,17 @@
             'dcraw: RAW import using dcraw'
             'darktable: RAW import using darktable'
             'rawtherapee: RAW import using rawtherapee')
-source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('047aea8a7fa47844b34ef27c19d3b697e84939dcb1fdbbeb2c204621b66eead9')
+source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+        xdg-data.patch)
+sha256sums=('047aea8a7fa47844b34ef27c19d3b697e84939dcb1fdbbeb2c204621b66eead9'
+            'c3eecff24cb12df44aa2bec923cd9c56f386d82d5efcae53fde1db6840a6be42')
 
+prepare() {
+  cd ${pkgname}-${pkgver}
+
+  patch -Np1 -i ../xdg-data.patch
+}
+
 build() {
   cmake -B build -S ${pkgname}-${pkgver} \
     -DCMAKE_INSTALL_PREFIX=/usr \

Added: xdg-data.patch
===================================================================
--- xdg-data.patch	                        (rev 0)
+++ xdg-data.patch	2022-08-11 06:57:26 UTC (rev 1265159)
@@ -0,0 +1,23 @@
+# HG changeset patch
+# User tmodes
+# Date 1658245150 -7200
+#      Tue Jul 19 17:39:10 2022 +0200
+# Node ID edfddc6070ca6d4223d359fb4b38273a5aed2f2d
+# Parent  490baa16aae6680792d31316be12a75b50236baa
+Fixes crash when environment variable XDG_DATA_HOME is not set
+
+diff -r 490baa16aae6 -r edfddc6070ca src/hugin_base/hugin_utils/utils.cpp
+--- a/src/hugin_base/hugin_utils/utils.cpp	Thu May 26 18:58:52 2022 +0200
++++ b/src/hugin_base/hugin_utils/utils.cpp	Tue Jul 19 17:39:10 2022 +0200
+@@ -472,9 +472,9 @@
+ #else
+ #ifdef USE_XDG_DIRS
+     char *xdgDataDir = getenv("XDG_DATA_HOME");
+-    if (strlen(xdgDataDir) == 0)
++    if (xdgDataDir == NULL || strlen(xdgDataDir) == 0)
+     {
+-        // no XDG_DATA_HOME enviroment variable set
++        // no XDG_DATA_HOME enviroment variable set or empty variable
+         // use $HOME/.local/share instead
+         const  std::string homeDir = GetHomeDir();
+         if (homeDir.empty())



More information about the arch-commits mailing list