commit 76f4302bec1c1217dbfb3a4147cc8862bf3780531ea4d982616dfee43c8354d6
Author: Christophe Giboudeaux <christophe@krop.fr>
Date:   Wed Jan 13 17:07:32 2021 +0000

    Accepting request 862929 from home:wolfi323:branches:KDE:Extra
    
    - New package kseexpr, to be used by krita (4.4.2)
    
    OBS-URL: https://build.opensuse.org/request/show/862929
    OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kseexpr?expand=0&rev=1

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..9b03811
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,23 @@
+## Default LFS
+*.7z filter=lfs diff=lfs merge=lfs -text
+*.bsp filter=lfs diff=lfs merge=lfs -text
+*.bz2 filter=lfs diff=lfs merge=lfs -text
+*.gem filter=lfs diff=lfs merge=lfs -text
+*.gz filter=lfs diff=lfs merge=lfs -text
+*.jar filter=lfs diff=lfs merge=lfs -text
+*.lz filter=lfs diff=lfs merge=lfs -text
+*.lzma filter=lfs diff=lfs merge=lfs -text
+*.obscpio filter=lfs diff=lfs merge=lfs -text
+*.oxt filter=lfs diff=lfs merge=lfs -text
+*.pdf filter=lfs diff=lfs merge=lfs -text
+*.png filter=lfs diff=lfs merge=lfs -text
+*.rpm filter=lfs diff=lfs merge=lfs -text
+*.tbz filter=lfs diff=lfs merge=lfs -text
+*.tbz2 filter=lfs diff=lfs merge=lfs -text
+*.tgz filter=lfs diff=lfs merge=lfs -text
+*.ttf filter=lfs diff=lfs merge=lfs -text
+*.txz filter=lfs diff=lfs merge=lfs -text
+*.whl filter=lfs diff=lfs merge=lfs -text
+*.xz filter=lfs diff=lfs merge=lfs -text
+*.zip filter=lfs diff=lfs merge=lfs -text
+*.zst filter=lfs diff=lfs merge=lfs -text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..57affb6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.osc
diff --git a/Fix-possible-compiler-error.patch b/Fix-possible-compiler-error.patch
new file mode 100644
index 0000000..360bd46
--- /dev/null
+++ b/Fix-possible-compiler-error.patch
@@ -0,0 +1,55 @@
+From 2d20eb59a09d16cb37f1cc58c916af22c71107c0 Mon Sep 17 00:00:00 2001
+From: Wolfgang Bauer <wbauer@tmo.at>
+Date: Wed, 13 Jan 2021 13:33:05 +0100
+Subject: [PATCH] Fix possible compiler error
+
+`KSeExpr::Utils::parseRangeComment()` is called with `float` parameters
+from other parts of the code.
+
+But `float_t` is not necessarily the same as `float` (the standard
+defines it as "floating type at least as wide as float").
+Worse, it may actually be the same as `double_t`, for which
+`KSeExpr::Utils::parseRangeComment()` has an overload as well.
+
+On openSUSE Tumbleweed i586 in particular, both are defined to `long
+double`, which means that both overloads are actually the same resulting
+in compiler errors.
+
+To avoid the problem, change `float_t` to `float` in the function
+signature.
+
+BUG: 431436
+---
+ src/KSeExprUI/Utils.cpp | 2 +-
+ src/KSeExprUI/Utils.h   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/KSeExprUI/Utils.cpp b/src/KSeExprUI/Utils.cpp
+index ac42022..f23fdbd 100644
+--- a/src/KSeExprUI/Utils.cpp
++++ b/src/KSeExprUI/Utils.cpp
+@@ -34,7 +34,7 @@ bool KSeExpr::Utils::parseRangeComment(const std::string &comment, double_t &fro
+     return false;
+ }
+ 
+-bool KSeExpr::Utils::parseRangeComment(const std::string &comment, float_t &from, float_t &to)
++bool KSeExpr::Utils::parseRangeComment(const std::string &comment, float &from, float &to)
+ {
+     if (comment.find_first_of('#') != 0) {
+         return false;
+diff --git a/src/KSeExprUI/Utils.h b/src/KSeExprUI/Utils.h
+index 39f5c2a..a82b699 100644
+--- a/src/KSeExprUI/Utils.h
++++ b/src/KSeExprUI/Utils.h
+@@ -11,7 +11,7 @@ namespace KSeExpr
+     namespace Utils
+     {
+         bool parseRangeComment(const std::string &comment, double_t &from, double_t &to);
+-        bool parseRangeComment(const std::string &comment, float_t &from, float_t &to);
++        bool parseRangeComment(const std::string &comment, float &from, float &to);
+         bool parseRangeComment(const std::string &comment, int32_t &from, int32_t &to);
+         bool parseTypeNameComment(const std::string &comment, std::string &type, std::string &name);
+         bool parseLabelComment(const std::string &comment, std::string &label);
+-- 
+2.26.2
+
diff --git a/Fix-translation-lookup-in-stock-Linux-deployments.patch b/Fix-translation-lookup-in-stock-Linux-deployments.patch
new file mode 100644
index 0000000..c86526f
--- /dev/null
+++ b/Fix-translation-lookup-in-stock-Linux-deployments.patch
@@ -0,0 +1,43 @@
+From 27355bcea93bab88954188cd53f1dce2796a0a49 Mon Sep 17 00:00:00 2001
+From: "L. E. Segovia" <amy@amyspark.me>
+Date: Tue, 1 Dec 2020 01:23:31 +0000
+Subject: [PATCH] Fix translation lookup in stock Linux deployments
+
+BUG: 429782
+---
+ src/KSeExprUI/ECMQmLoader-seexpr2_qt.cpp | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/src/KSeExprUI/ECMQmLoader-seexpr2_qt.cpp b/src/KSeExprUI/ECMQmLoader-seexpr2_qt.cpp
+index 0bddaf2..6781bdf 100644
+--- a/src/KSeExprUI/ECMQmLoader-seexpr2_qt.cpp
++++ b/src/KSeExprUI/ECMQmLoader-seexpr2_qt.cpp
+@@ -35,9 +35,13 @@ namespace {
+             return false;
+         }
+ #else
+-        const QString fullPath = QStandardPaths::locate(QStandardPaths::DataLocation, subPath);
++        // Use application's own data directory (e.g. Krita on AppImage, Windows)
++        QString fullPath = QStandardPaths::locate(QStandardPaths::DataLocation, subPath);
+         if (fullPath.isEmpty()) {
+-            return false;
++            // Try falling back to stock folder
++            fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, subPath);
++            if (fullPath.isEmpty())
++                return false;
+         }
+ #endif
+         QTranslator *translator = new QTranslator(QCoreApplication::instance());
+@@ -61,7 +65,8 @@ namespace {
+ #if defined(Q_OS_ANDROID)
+         const auto paths = QStringLiteral("assets:/share/");
+ #else
+-        const auto paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation);
++        auto paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation);
++        paths << QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
+ #endif
+         dbgSeExpr << "Base paths for translations: " << paths;
+ 
+-- 
+GitLab
+
diff --git a/kseexpr-4.0.1.0.tar.gz b/kseexpr-4.0.1.0.tar.gz
new file mode 100644
index 0000000..cb7d9ec
--- /dev/null
+++ b/kseexpr-4.0.1.0.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:13b8455883001668f5d79c5734821c1ad2a0fbc91d019af085bb7e31cf6ce926
+size 895833
diff --git a/kseexpr.changes b/kseexpr.changes
new file mode 100644
index 0000000..84779e8
--- /dev/null
+++ b/kseexpr.changes
@@ -0,0 +1,9 @@
+-------------------------------------------------------------------
+Wed Jan 13 12:42:40 UTC 2021 - Wolfgang Bauer <wbauer@tmo.at>
+
+- Initial package
+- Add Fix-translation-lookup-in-stock-Linux-deployments.patch to
+  fix loading the translations (kde#429782)
+- Add Fix-possible-compiler-error.patch to fix compiler errors on
+  i586 (kde#431436)
+
diff --git a/kseexpr.spec b/kseexpr.spec
new file mode 100644
index 0000000..8817f70
--- /dev/null
+++ b/kseexpr.spec
@@ -0,0 +1,106 @@
+#
+# spec file for package kseexpr
+#
+# Copyright (c) 2021 SUSE LLC
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
+
+
+%define sover 4_0_1_0
+%if %pkg_vcmp extra-cmake-modules >= 5.64
+%bcond_without lang
+%else
+%bcond_with lang
+%endif
+Name:           kseexpr
+Version:        4.0.1.0
+Release:        0
+Summary:        The embeddable expression engine fork for Krita
+License:        GPL-3.0-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT
+Group:          Productivity/Graphics/Other
+URL:            https://invent.kde.org/graphics/kseexpr/
+Source0:        https://download.kde.org/stable/%{name}/%{name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM
+Patch0:         Fix-translation-lookup-in-stock-Linux-deployments.patch
+# PATCH-FIX-OPENSUSE
+Patch1:         Fix-possible-compiler-error.patch
+BuildRequires:  extra-cmake-modules
+BuildRequires:  cmake(Qt5Core)
+BuildRequires:  cmake(Qt5Gui)
+BuildRequires:  cmake(Qt5LinguistTools)
+BuildRequires:  cmake(Qt5Widgets)
+
+%description
+This is the fork of Disney Animation's SeExpr expression
+library (https://wdas.github.io/SeExpr), that is used in Krita.
+
+SeExpr is an embeddable, arithmetic expression language
+that enables flexible artistic control and customization
+in creating computer graphics images. Example uses
+include procedural geometry synthesis, image synthesis,
+simulation control, crowd animation, and geometry deformation.
+
+%package -n libKSeExpr%{sover}
+Summary:        %{name} libraries
+Group:          System/Libraries
+# for the lang package to be installable
+Provides:       %{name} = %{version}
+
+%description  -n libKSeExpr%{sover}
+Runtime libraries for %{name}.
+
+%package devel
+Summary:        Development files for %{name}
+Group:          Development/Libraries/C and C++
+Requires:       libKSeExpr%{sover} = %{version}
+
+%description devel
+Development headers and libraries for %{name}.
+
+%lang_package
+
+%prep
+%autosetup -p1
+
+%build
+%cmake
+%cmake_build
+
+%install
+%cmake_install
+
+%if %{with lang}
+%find_lang seexpr2 %{name}.lang --with-qt
+%endif
+
+%post -n libKSeExpr%{sover} -p /sbin/ldconfig
+%postun -n libKSeExpr%{sover} -p /sbin/ldconfig
+
+%files -n libKSeExpr%{sover}
+%license LICENSES/*
+%{_libdir}/libKSeExpr.so.%{version}
+%{_libdir}/libKSeExprUI.so.%{version}
+
+%files devel
+%{_datadir}/cmake/KSeExpr/
+%{_datadir}/pkgconfig/kseexpr.pc
+%{_includedir}/KSeExpr/
+%{_includedir}/KSeExprUI/
+%{_libdir}/libKSeExpr.so
+%{_libdir}/libKSeExprUI.so
+
+%if %{with lang}
+%files lang -f %{name}.lang
+%endif
+
+%changelog