diff --git a/hugin.changes b/hugin.changes index 193aa07..e2738d3 100644 --- a/hugin.changes +++ b/hugin.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 2 12:29:44 UTC 2022 - Paolo Stivanin + +- Add xdg-data.patch: fixes bsc#1204546 + ------------------------------------------------------------------- Mon Oct 17 07:41:24 UTC 2022 - pgajdos@suse.com diff --git a/hugin.spec b/hugin.spec index 5cc6d04..2a02737 100644 --- a/hugin.spec +++ b/hugin.spec @@ -31,6 +31,7 @@ Group: Productivity/Graphics/Other URL: http://hugin.sourceforge.net/ Source: https://downloads.sourceforge.net/project/%{name}/%{name}/%{name}-%{mversion}/%{name}-%{version}.tar.bz2 Patch0: hugin.appdata.patch +Patch1: xdg-data.patch BuildRequires: Mesa-devel BuildRequires: OpenEXR-devel BuildRequires: cmake >= 3.1.0 diff --git a/xdg-data.patch b/xdg-data.patch new file mode 100644 index 0000000..91161ed --- /dev/null +++ b/xdg-data.patch @@ -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())