[graphics/krita/krita/4.3] 3rdparty/ext_seexpr: SeExpr: use alpha release package

L. E. Segovia null at kde.org
Sat Sep 5 14:36:03 BST 2020


Git commit 7f3b50da9b6c30077e92f977bfa332a33b442ebb by L. E. Segovia.
Committed on 05/09/2020 at 13:33.
Pushed by lsegovia into branch 'krita/4.3'.

SeExpr: use alpha release package

This includes the following patches:

- use application-specific data directory for translations
- patch static library out (ECM's generated loader is stripped by the
linker)

CCMAIL: kimageshop at kde.org

A  +34   -0    3rdparty/ext_seexpr/0001-Use-application-specific-data-directory-for-translat.patch
A  +46   -0    3rdparty/ext_seexpr/0002-Remove-static-library-support.patch
M  +7    -4    3rdparty/ext_seexpr/CMakeLists.txt

https://invent.kde.org/graphics/krita/commit/7f3b50da9b6c30077e92f977bfa332a33b442ebb

diff --git a/3rdparty/ext_seexpr/0001-Use-application-specific-data-directory-for-translat.patch b/3rdparty/ext_seexpr/0001-Use-application-specific-data-directory-for-translat.patch
new file mode 100644
index 0000000000..c5dfc4a695
--- /dev/null
+++ b/3rdparty/ext_seexpr/0001-Use-application-specific-data-directory-for-translat.patch
@@ -0,0 +1,34 @@
+From 6e1bb4fa407b6be69a2c2a5a1a0a596cdcae9926 Mon Sep 17 00:00:00 2001
+From: "L. E. Segovia" <amy at amyspark.me>
+Date: Thu, 3 Sep 2020 21:56:57 +0000
+Subject: [PATCH] Use application-specific data directory for translations
+
+---
+ src/SeExpr2/UI/ECMQmLoader-seexpr2_qt.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/SeExpr2/UI/ECMQmLoader-seexpr2_qt.cpp b/src/SeExpr2/UI/ECMQmLoader-seexpr2_qt.cpp
+index 5f4c3e2..21730a5 100644
+--- a/src/SeExpr2/UI/ECMQmLoader-seexpr2_qt.cpp
++++ b/src/SeExpr2/UI/ECMQmLoader-seexpr2_qt.cpp
+@@ -35,7 +35,7 @@ namespace {
+             return false;
+         }
+ #else
+-        const QString fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, subPath);
++        const QString fullPath = QStandardPaths::locate(QStandardPaths::DataLocation, subPath);
+         if (fullPath.isEmpty()) {
+             return false;
+         }
+@@ -61,7 +61,7 @@ namespace {
+ #if defined(Q_OS_ANDROID)
+         const auto paths = QStringLiteral("assets:/share/");
+ #else
+-        const auto paths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
++        const auto paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation);
+ #endif
+         dbgSeExpr << "Base paths for translations: " << paths;
+ 
+-- 
+2.28.0
+
diff --git a/3rdparty/ext_seexpr/0002-Remove-static-library-support.patch b/3rdparty/ext_seexpr/0002-Remove-static-library-support.patch
new file mode 100644
index 0000000000..714e551a7e
--- /dev/null
+++ b/3rdparty/ext_seexpr/0002-Remove-static-library-support.patch
@@ -0,0 +1,46 @@
+From 21c0cc198c994be76d38b6378c93340e1d7bbc59 Mon Sep 17 00:00:00 2001
+From: "L. E. Segovia" <amy at amyspark.me>
+Date: Thu, 3 Sep 2020 23:00:04 -0300
+Subject: [PATCH] Remove static library support
+
+Q_COREAPP_STARTUP_FUNCTION, which is used by ECM's generated translation
+loader, gets automatically stripped when using a static library.
+
+See
+https://doc.qt.io/qt-5/qcoreapplication.html#Q_COREAPP_STARTUP_FUNCTION
+.
+---
+ src/SeExpr2/UI/CMakeLists.txt | 17 +++--------------
+ 1 file changed, 3 insertions(+), 14 deletions(-)
+
+diff --git a/src/SeExpr2/UI/CMakeLists.txt b/src/SeExpr2/UI/CMakeLists.txt
+index 3274a41..919b79e 100644
+--- a/src/SeExpr2/UI/CMakeLists.txt
++++ b/src/SeExpr2/UI/CMakeLists.txt
+@@ -160,20 +160,9 @@ if (Qt5_FOUND OR QT4_FOUND)
+             ${SeExpr2Editor_QM_LOADER})
+     endif()
+ 
+-    if (WIN32)
+-        add_library(SeExpr2Editor ${EDITOR_CPPS} ${EDITOR_MOC_SRCS}
+-                    ${ANIMLIB_SRCS}
+-                    ${editor_parser_cpp})
+-        generate_export_header(SeExpr2Editor
+-                               BASE_NAME SeExpr2Editor
+-                               EXPORT_MACRO_NAME SeExpr2Editor
+-                               EXPORT_FILE_NAME SeExpr2Editor_Export.h
+-                               STATIC_DEFINE SeExpr2Editor_BUILT_AS_STATIC )
+-    else()
+-        add_library(SeExpr2Editor SHARED ${EDITOR_CPPS} ${EDITOR_MOC_SRCS}
+-                    ${ANIMLIB_SRCS}
+-                    ${editor_parser_cpp})
+-    endif()
++    add_library(SeExpr2Editor SHARED ${EDITOR_CPPS} ${EDITOR_MOC_SRCS}
++                ${ANIMLIB_SRCS}
++                ${editor_parser_cpp})
+ 
+     set_property(TARGET SeExpr2Editor PROPERTY VERSION ${SeExpr2_VERSION})
+     set_property(TARGET SeExpr2Editor PROPERTY SOVERSION 3)
+-- 
+2.27.0.windows.1
+
diff --git a/3rdparty/ext_seexpr/CMakeLists.txt b/3rdparty/ext_seexpr/CMakeLists.txt
index d441ebd79f..2dc2583066 100644
--- a/3rdparty/ext_seexpr/CMakeLists.txt
+++ b/3rdparty/ext_seexpr/CMakeLists.txt
@@ -1,12 +1,15 @@
 SET(PREFIX_ext_seexpr "${EXTPREFIX}" )
 ExternalProject_Add(
     ext_seexpr
-    GIT_REPOSITORY https://invent.kde.org/graphics/seexpr.git
-    GIT_TAG b807bfebfec9edc4197ca3561f53625895edc96e
+    DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
+    URL https://files.kde.org/krita/build/dependencies/seexpr-3.4.4.0-alpha.1.tar.gz
+    URL_MD5 35b415bcbd278ccd5ef5220b8b0595fe
+
+    PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Use-application-specific-data-directory-for-translat.patch
+        COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Remove-static-library-support.patch
 
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_seexpr} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DFLAVOR=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DBOOST_INCLUDE_DIR=${PREFIX_ext_seexpr}/include -DBOOST_ROOT=${PREFIX_ext_seexpr} -DBOOST_LIB_DIR=${PREFIX_ext_seexpr}/lib -DENABLE_LLVM_BACKEND=OFF -DENABLE_SSE4=OFF -DBUILD_DOC=OFF -DBUILD_TESTS=OFF -DBUILD_UTILS=OFF -DUSE_PYTHON=OFF
 
     UPDATE_COMMAND ""
-    # TODO when moving this library to a packaged release, please add ext_extra_cmake_modules so that translations can be built in
-    DEPENDS ext_qt
+    DEPENDS ext_qt ext_extra_cmake_modules
 )


More information about the kimageshop mailing list