From 497799a8a0e461a399dcf4a55f5fdff71c55acde Mon Sep 17 00:00:00 2001 From: David Beauchamp Date: Fri, 3 Dec 2021 19:26:10 -0500 Subject: [PATCH] extra/cantor to 21.08.3-2 --- extra/cantor/PKGBUILD | 2 +- extra/cantor/cantor-julia-1.6.patch | 70 ----------------------------- extra/cantor/cantor-julia-1.7.patch | 15 +++++++ 3 files changed, 16 insertions(+), 71 deletions(-) delete mode 100644 extra/cantor/cantor-julia-1.6.patch create mode 100644 extra/cantor/cantor-julia-1.7.patch diff --git a/extra/cantor/PKGBUILD b/extra/cantor/PKGBUILD index 378b0ba6e..0c5da0e11 100644 --- a/extra/cantor/PKGBUILD +++ b/extra/cantor/PKGBUILD @@ -7,7 +7,7 @@ pkgname=cantor pkgver=21.08.3 -pkgrel=1 +pkgrel=2 pkgdesc='KDE Frontend to Mathematical Software' url='https://apps.kde.org/cantor/' arch=(x86_64) diff --git a/extra/cantor/cantor-julia-1.6.patch b/extra/cantor/cantor-julia-1.6.patch deleted file mode 100644 index e02721268..000000000 --- a/extra/cantor/cantor-julia-1.6.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/cmake/FindJulia.cmake b/cmake/FindJulia.cmake -index c7f64746..aba71a2d 100644 ---- a/cmake/FindJulia.cmake -+++ b/cmake/FindJulia.cmake -@@ -80,16 +80,46 @@ if(RESULT EQUAL 0) - CACHE PATH "Julia library directory") - endif() - -+if(NOT ${JULIA_VERSION_STRING} VERSION_LESS 1.6.0) -+ set(JULIA_INTERNAL_LIBDL_COMMAND "using Libdl\; abspath(dirname(Libdl.dlpath(\"libjulia-internal\")))") -+ execute_process( -+ COMMAND ${JULIA_EXECUTABLE} -E ${JULIA_INTERNAL_LIBDL_COMMAND} -+ OUTPUT_VARIABLE JULIA_INTERNAL_LIBRARY_DIR -+ RESULT_VARIABLE RESULT -+ ) -+ -+ if(RESULT EQUAL 0) -+ string(REGEX REPLACE "\"" "" JULIA_INTERNAL_LIBRARY_DIR ${JULIA_INTERNAL_LIBRARY_DIR}) -+ string(STRIP ${JULIA_INTERNAL_LIBRARY_DIR} JULIA_INTERNAL_LIBRARY_DIR) -+ set(JULIA_INTERNAL_LIBRARY_DIR ${JULIA_INTERNAL_LIBRARY_DIR} -+ CACHE PATH "Julia internal library directory") -+ endif() -+endif() -+ - find_library( JULIA_LIBRARY - NAMES julia - PATHS ${JULIA_LIBRARY_DIR} - ) - -+if(NOT ${JULIA_VERSION_STRING} VERSION_LESS 1.6.0) -+ find_library( JULIA_INTERNAL_LIBRARY -+ NAMES julia-internal -+ PATHS ${JULIA_INTERNAL_LIBRARY_DIR} -+ ) -+endif() - --include(FindPackageHandleStandardArgs) --find_package_handle_standard_args( -- Julia -- REQUIRED_VARS JULIA_LIBRARY JULIA_LIBRARY_DIR JULIA_INCLUDE_DIRS -- VERSION_VAR JULIA_VERSION_STRING -- FAIL_MESSAGE "Julia not found" --) -+if(${JULIA_VERSION_STRING} VERSION_LESS 1.6.0) -+ find_package_handle_standard_args( -+ Julia -+ REQUIRED_VARS JULIA_LIBRARY JULIA_INCLUDE_DIRS -+ VERSION_VAR JULIA_VERSION_STRING -+ FAIL_MESSAGE "Julia not found" -+ ) -+else() -+ find_package_handle_standard_args( -+ Julia -+ REQUIRED_VARS JULIA_LIBRARY JULIA_INTERNAL_LIBRARY JULIA_INCLUDE_DIRS -+ VERSION_VAR JULIA_VERSION_STRING -+ FAIL_MESSAGE "Julia not found" -+ ) -+endif() -diff --git a/src/backends/julia/juliaserver/CMakeLists.txt b/src/backends/julia/juliaserver/CMakeLists.txt -index 7301eca0..f12628e1 100644 ---- a/src/backends/julia/juliaserver/CMakeLists.txt -+++ b/src/backends/julia/juliaserver/CMakeLists.txt -@@ -8,6 +8,7 @@ add_executable(cantor_juliaserver ${JuliaServer_SRCS}) - - target_link_libraries(cantor_juliaserver - ${JULIA_LIBRARY} -+ ${JULIA_INTERNAL_LIBRARY} - Qt5::Widgets - Qt5::DBus - ) diff --git a/extra/cantor/cantor-julia-1.7.patch b/extra/cantor/cantor-julia-1.7.patch new file mode 100644 index 000000000..554e5a260 --- /dev/null +++ b/extra/cantor/cantor-julia-1.7.patch @@ -0,0 +1,15 @@ +diff --git a/src/backends/julia/juliaserver/juliaserver.cpp b/src/backends/julia/juliaserver/juliaserver.cpp +index c68fd46f..e2995cb7 100644 +--- a/src/backends/julia/juliaserver/juliaserver.cpp ++++ b/src/backends/julia/juliaserver/juliaserver.cpp +@@ -91,7 +91,9 @@ void JuliaServer::runJuliaCommand(const QString &command) + + if (jl_exception_occurred()) { // If exception occurred + // Show it to user in stderr +-#if QT_VERSION_CHECK(JULIA_VERSION_MAJOR, JULIA_VERSION_MINOR, 0) >= QT_VERSION_CHECK(1, 1, 0) ++#if QT_VERSION_CHECK(JULIA_VERSION_MAJOR, JULIA_VERSION_MINOR, 0) >= QT_VERSION_CHECK(1, 7, 0) ++ jl_value_t *ex = jl_current_task->ptls->previous_exception; ++#elif QT_VERSION_CHECK(JULIA_VERSION_MAJOR, JULIA_VERSION_MINOR, 0) >= QT_VERSION_CHECK(1, 1, 0) + jl_value_t *ex = jl_get_ptls_states()->previous_exception; + #else + jl_value_t *ex = jl_exception_in_transit;