kseexpr, add embeddable expression engine fork for Krita (Qt5+Qt6) (#12565)

This commit is contained in:
Schrijvers Luc
2025-07-10 09:19:54 +02:00
committed by GitHub
parent 2d39e2590a
commit a1f2b2237f
4 changed files with 301 additions and 0 deletions

View File

@@ -0,0 +1,106 @@
SUMMARY="The embeddable expression engine fork for Krita"
DESCRIPTION="This repository hosts the fork of Disney Animation's SeExpr expression library: \
https://wdas.github.io/SeExpr, that is used in Krita.
This fork was created as part of the GSoC 2020 project, Dynamic Fill Layers in Krita using \
SeExpr: https://summerofcode.withgoogle.com/archive/2020/projects/6233717216903168/, to enable \
the provision of fixes and translations needed to embed SeExpr into the Krita painting suite."
HOMEPAGE="https://invent.kde.org/graphics/kseexpr"
COPYRIGHT="2011-2019 Disney Enterprises, Inc.
2019 Christoph Cullmann
2019 Gernot Gebhard
2020-2021 L. E. Segovia"
LICENSE="Apache v2
GNU GPL v3
MIT"
REVISION="1"
SOURCE_URI="https://invent.kde.org/graphics/kseexpr/-/archive/v$portVersion/kseexpr-v$portVersion.tar.bz2"
CHECKSUM_SHA256="f6a6bcf432f8874241aec0bb7157bad3a093f9ca9e644aa3bc8078b982809715"
SOURCE_DIR="kseexpr-v$portVersion"
PATCHES="kseexpr-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
kseexpr_qt5$secondaryArchSuffix = $portVersion
lib:libKSeExpr$secondaryArchSuffix = $libVersionCompat
lib:libKSeExprUI$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libKF5I18n$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
"
PROVIDES_devel="
kseexpr_qt5${secondaryArchSuffix}_devel = $portVersion
devel:libKSeExpr$secondaryArchSuffix = $libVersionCompat
devel:libKSeExprUI$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
kseexpr_qt5$secondaryArchSuffix == $portVersion base
"
CONFLICTS_devel="
kseexpr_qt6${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
extra_cmake_modules$secondaryArchSuffix
# qt5_tools${secondaryArchSuffix}_devel
devel:libKF5I18n$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:bison
cmd:cmake
cmd:dot
cmd:doxygen
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:msgfmt$secondaryArchSuffix
cmd:msgmerge$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake \
-Wno-dev
make -C build $jobArgs
}
INSTALL()
{
make -C build install
sed -e "s|\(\${_IMPORT_PREFIX}\)/include|\1/$relativeIncludeDir|" -i \
"$libDir"/cmake/KSeExpr/KSeExprTargets.cmake
prepareInstalledDevelLibs \
libKSeExpr \
libKSeExprUI
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make check
}

View File

@@ -0,0 +1,103 @@
SUMMARY="The embeddable expression engine fork for Krita"
DESCRIPTION="This repository hosts the fork of Disney Animation's SeExpr expression library: \
https://wdas.github.io/SeExpr, that is used in Krita.
This fork was created as part of the GSoC 2020 project, Dynamic Fill Layers in Krita using \
SeExpr: https://summerofcode.withgoogle.com/archive/2020/projects/6233717216903168/, to enable \
the provision of fixes and translations needed to embed SeExpr into the Krita painting suite."
HOMEPAGE="https://invent.kde.org/graphics/kseexpr"
COPYRIGHT="2011-2019 Disney Enterprises, Inc.
2019 Christoph Cullmann
2019 Gernot Gebhard
2020-2021 L. E. Segovia"
LICENSE="Apache v2
GNU GPL v3
MIT"
REVISION="1"
SOURCE_URI="https://invent.kde.org/graphics/kseexpr/-/archive/v$portVersion/kseexpr-v$portVersion.tar.bz2"
CHECKSUM_SHA256="866facdecd34b2757402af6f858654b02a669c59d7be2d25477275a576d29fbf"
SOURCE_DIR="kseexpr-v$portVersion"
PATCHES="kseexpr-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
kseexpr_qt6$secondaryArchSuffix = $portVersion
lib:libKSeExpr$secondaryArchSuffix = $libVersionCompat
lib:libKSeExprUI$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libKF6I18n$secondaryArchSuffix
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
lib:libQt6Widgets$secondaryArchSuffix
"
PROVIDES_devel="
kseexpr_qt6${secondaryArchSuffix}_devel = $portVersion
devel:libKSeExpr$secondaryArchSuffix = $libVersionCompat
devel:libKSeExprUI$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
kseexpr_qt6$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
extra_cmake_modules$secondaryArchSuffix
qt6_tools${secondaryArchSuffix}_devel
devel:libKF6I18n$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libQt6Core$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:bison
cmd:cmake
cmd:dot
cmd:doxygen
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:msgfmt$secondaryArchSuffix
cmd:msgmerge$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake \
-Wno-dev
make -C build $jobArgs
}
INSTALL()
{
make -C build install
sed -e "s|\(\${_IMPORT_PREFIX}\)/include|\1/$relativeIncludeDir|" -i \
"$libDir"/cmake/KSeExpr/KSeExprTargets.cmake
prepareInstalledDevelLibs \
libKSeExpr \
libKSeExprUI
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make check
}

View File

@@ -0,0 +1,46 @@
From 6ba0cb9d62c75e6db7ca5d8aa63912ff08a19411 Mon Sep 17 00:00:00 2001
From: Luc Schrijvers <begasus@gmail.com>
Date: Wed, 26 Mar 2025 17:29:18 +0100
Subject: We don't do -ldl
diff --git a/src/KSeExpr/CMakeLists.txt b/src/KSeExpr/CMakeLists.txt
index 27549b8..2727f80 100644
--- a/src/KSeExpr/CMakeLists.txt
+++ b/src/KSeExpr/CMakeLists.txt
@@ -82,7 +82,9 @@ if (NOT WIN32)
if (NOT APPLE)
set_source_files_properties(interpreter.cpp PROPERTIES COMPILE_OPTIONS "-rdynamic")
endif()
+ if (NOT HAIKU)
target_link_libraries(KSeExpr "dl")
+ endif()
else()
add_library(KSeExpr STATIC ${KSeExpr_SOURCES} ${parser_cpp})
endif()
--
2.48.1
From 3196285ec01406ba46837afe465092bccb7193b5 Mon Sep 17 00:00:00 2001
From: Luc Schrijvers <begasus@gmail.com>
Date: Wed, 26 Mar 2025 17:50:34 +0100
Subject: Fix install path for pkgconfig file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fe14b8..514e927 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -261,7 +261,7 @@ endif()
# all exported targets are found by export() below.
configure_file("cmake/kseexpr.pc.in" "kseexpr.pc" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/kseexpr.pc"
- COMPONENT devel DESTINATION share/pkgconfig)
+ COMPONENT devel DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
write_basic_package_version_file("kseexpr-config-version.cmake" VERSION ${${PROJECT_NAME}_VERSION} COMPATIBILITY SameMajorVersion)
--
2.48.1

View File

@@ -0,0 +1,46 @@
From 7d22110ffbd415d98bf8d98fea670fa6a68b42f2 Mon Sep 17 00:00:00 2001
From: Luc Schrijvers <begasus@gmail.com>
Date: Wed, 26 Mar 2025 17:29:18 +0100
Subject: We don't do -ldl
diff --git a/src/KSeExpr/CMakeLists.txt b/src/KSeExpr/CMakeLists.txt
index 27549b8..2727f80 100644
--- a/src/KSeExpr/CMakeLists.txt
+++ b/src/KSeExpr/CMakeLists.txt
@@ -82,7 +82,9 @@ if (NOT WIN32)
if (NOT APPLE)
set_source_files_properties(interpreter.cpp PROPERTIES COMPILE_OPTIONS "-rdynamic")
endif()
+ if (NOT HAIKU)
target_link_libraries(KSeExpr "dl")
+ endif()
else()
add_library(KSeExpr STATIC ${KSeExpr_SOURCES} ${parser_cpp})
endif()
--
2.48.1
From d3a8f196f3d3b2bf3e33570f556ea5f96f5ed2d5 Mon Sep 17 00:00:00 2001
From: Luc Schrijvers <begasus@gmail.com>
Date: Wed, 26 Mar 2025 17:50:34 +0100
Subject: Fix install path for pkgconfig file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49f904e..f84a879 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -261,7 +261,7 @@ endif()
# all exported targets are found by export() below.
configure_file("cmake/kseexpr.pc.in" "kseexpr.pc" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/kseexpr.pc"
- COMPONENT devel DESTINATION share/pkgconfig)
+ COMPONENT devel DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
write_basic_package_version_file("kseexpr-config-version.cmake" VERSION ${${PROJECT_NAME}_VERSION} COMPATIBILITY SameMajorVersion)
--
2.48.1