SHA256
1
0
forked from pool/hugin

Accepting request 1032873 from home:polslinux:branches:graphics

- Add xdg-data.patch: fixes bsc#1204546

OBS-URL: https://build.opensuse.org/request/show/1032873
OBS-URL: https://build.opensuse.org/package/show/graphics/hugin?expand=0&rev=122
This commit is contained in:
Petr Gajdos 2022-11-03 08:49:10 +00:00 committed by Git OBS Bridge
parent fdb4f53849
commit 7e9984b413
3 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Nov 2 12:29:44 UTC 2022 - Paolo Stivanin <info@paolostivanin.com>
- Add xdg-data.patch: fixes bsc#1204546
-------------------------------------------------------------------
Mon Oct 17 07:41:24 UTC 2022 - pgajdos@suse.com

View File

@ -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

23
xdg-data.patch Normal file
View File

@ -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())