extra/cantor to 18.08.0-5

This commit is contained in:
Kevin Mihelich 2018-08-21 00:06:46 +00:00
parent 73ebea8a3c
commit ac4f5d7973
2 changed files with 38 additions and 3 deletions

View file

@ -8,7 +8,7 @@
pkgname=cantor
pkgver=18.08.0
pkgrel=4
pkgrel=5
pkgdesc="KDE Frontend to Mathematical Software"
url="https://kde.org/applications/education/cantor/"
arch=(x86_64)
@ -24,12 +24,13 @@ optdepends=('maxima: Maxima backend'
'python2: Python 2 backend'
'sagemath: SageMath backend')
source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig}
cantor-julia.patch::"https://cgit.kde.org/cantor.git/patch/?id=90b001d1" cantor-julia-0.7.patch sage-8.3.patch)
cantor-julia.patch::"https://cgit.kde.org/cantor.git/patch/?id=90b001d1" cantor-julia-0.7.patch sage-8.3.patch cantor-julia-1.0.patch)
sha256sums=('be6167ec88504091e9fa9914e0bd1fbb13637fb2b2b228c9274225db6dc85823'
'SKIP'
'366e1a734a968c4a933e91342308e4d18108c1bc023572848747ca6a2ec656f7'
'cf031eb1891a97f964c9147a4ff4d7e69f3821eee8fb5dab0693c6483dacd4ee'
'78c90097749e53433641b3acfd637b2aaa12f04c03a304b71c2cc5a5672cb4de')
'78c90097749e53433641b3acfd637b2aaa12f04c03a304b71c2cc5a5672cb4de'
'81b6752473657318d91e748c6c1799cdd285037fa1bdfad29d401cacf9d98f7b')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid <aacid@kde.org>
F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck@kde.org>
@ -39,6 +40,7 @@ prepare() {
cd $pkgname-$pkgver
patch -p1 -i ../cantor-julia.patch # Fix julia backend build
patch -p1 -i ../cantor-julia-0.7.patch # support julia>=0.7
patch -p1 -i ../cantor-julia-1.0.patch # support julia>=1.0
patch -p1 -i ../sage-8.3.patch # fix sagemath backend with 8.3
}

View file

@ -0,0 +1,33 @@
diff --git a/cmake/FindJulia.cmake b/cmake/FindJulia.cmake
index 2d4e1f6a..7f3d7a82 100644
--- a/cmake/FindJulia.cmake
+++ b/cmake/FindJulia.cmake
@@ -61,8 +61,14 @@ endif()
#
# Julia library location
#
+if(${JULIA_VERSION_STRING} VERSION_LESS 0.7.0)
+ set(JULIA_LIBDL_COMMAND "abspath(dirname(Libdl.dlpath(\"libjulia\")))")
+else()
+ set(JULIA_LIBDL_COMMAND "using Libdl; abspath(dirname(Libdl.dlpath(\"libjulia\")))")
+endif()
+
execute_process(
- COMMAND ${JULIA_EXECUTABLE} -E "abspath(dirname(Libdl.dlpath(\"libjulia\")))"
+ COMMAND ${JULIA_EXECUTABLE} -E ${JULIA_LIBDL_COMMAND}
OUTPUT_VARIABLE JULIA_LIBRARY_DIR
RESULT_VARIABLE RESULT
)
diff --git a/src/backends/julia/juliaserver/juliaserver.cpp b/src/backends/julia/juliaserver/juliaserver.cpp
index 5369fe50..0a1e8889 100644
--- a/src/backends/julia/juliaserver/juliaserver.cpp
+++ b/src/backends/julia/juliaserver/juliaserver.cpp
@@ -43,7 +43,7 @@ JuliaServer::~JuliaServer()
void JuliaServer::login(const QString &path) const
{
-#if JULIA_VERSION_MINOR > 5
+#if (JULIA_VERSION_MAJOR > 0 || JULIA_VERSION_MINOR > 5)
Q_UNUSED(path)
jl_init();
#else