extra/cantor to 24.08.2-2

This commit is contained in:
Kevin Mihelich 2024-10-11 10:34:24 +00:00
parent 70152ed717
commit ea9f449976
3 changed files with 28 additions and 4 deletions

View file

@ -1,7 +1,7 @@
pkgbase = cantor
pkgdesc = KDE Frontend to Mathematical Software
pkgver = 24.08.2
pkgrel = 1
pkgrel = 2
url = https://apps.kde.org/cantor/
arch = x86_64
groups = kde-applications
@ -49,10 +49,12 @@ pkgbase = cantor
optdepends = julia: Julia backend
source = https://download.kde.org/stable/release-service/24.08.2/src/cantor-24.08.2.tar.xz
source = https://download.kde.org/stable/release-service/24.08.2/src/cantor-24.08.2.tar.xz.sig
source = julia-1.11.patch
validpgpkeys = CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7
validpgpkeys = F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87
validpgpkeys = D81C0CB38EB725EF6691C385BB463350D6EF31EF
sha256sums = 080c73b405ca2d854972d08c1cdbc7554e99f3d314e37ae6f9ef3249a802bc78
sha256sums = SKIP
sha256sums = d291557fe2fd6ec7872c1145f48132e017d408c28eb45b62ee4be0329c854a86
pkgname = cantor

View file

@ -7,7 +7,7 @@
pkgname=cantor
pkgver=24.08.2
pkgrel=1
pkgrel=2
pkgdesc='KDE Frontend to Mathematical Software'
url='https://apps.kde.org/cantor/'
arch=(x86_64)
@ -51,13 +51,19 @@ optdepends=('maxima: Maxima backend'
'sagemath: SageMath backend')
groups=(kde-applications
kde-education)
source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig})
source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig}
julia-1.11.patch)
sha256sums=('080c73b405ca2d854972d08c1cdbc7554e99f3d314e37ae6f9ef3249a802bc78'
'SKIP')
'SKIP'
'd291557fe2fd6ec7872c1145f48132e017d408c28eb45b62ee4be0329c854a86')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid <aacid@kde.org>
F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87 # Christoph Feck <cfeck@kde.org>
D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker@kde.org>
prepare() {
patch -d $pkgname-$pkgver -p1 < julia-1.11.patch # Fix build with julia 1.11
}
build() {
cmake -B build -S $pkgname-$pkgver \
-DBUILD_TESTING=OFF

View file

@ -0,0 +1,16 @@
diff --git a/src/backends/julia/juliaserver/juliaserver.cpp b/src/backends/julia/juliaserver/juliaserver.cpp
index 0eda2322..c84495c8 100644
--- a/src/backends/julia/juliaserver/juliaserver.cpp
+++ b/src/backends/julia/juliaserver/juliaserver.cpp
@@ -188,7 +188,11 @@ void JuliaServer::parseJlModule(jl_module_t* module, bool parseValue)
jl_function_t* jl_names_function = jl_get_function(jl_base_module, "names");
jl_value_t* names = jl_call1(jl_names_function, (jl_value_t*)module);
+#if QT_VERSION_CHECK(JULIA_VERSION_MAJOR, JULIA_VERSION_MINOR, 0) >= QT_VERSION_CHECK(1, 11, 0)
+ jl_value_t **data = (jl_value_t**)jl_array_data(names, void);
+#else
jl_value_t **data = (jl_value_t**)jl_array_data(names);
+#endif
for (size_t i = 0; i < jl_array_len(names); i++)
{
bool isBindingResolved = (bool)jl_binding_resolved_p(module, (jl_sym_t*)(data[i]));