qalc: update from 9.9.11 to 1.0.0
This commit is contained in:
parent
1540c35c6d
commit
bc0e66beff
@ -1,39 +0,0 @@
|
||||
--- ../../build/qalc/cache/libqalculate-0.9.9/libqalculate/Calculator.cc 2016-07-16 14:49:15.000000000 +0200
|
||||
+++ ./libqalculate/Calculator.cc 2016-08-15 00:21:11.338822562 +0200
|
||||
@@ -203,8 +203,8 @@
|
||||
}
|
||||
|
||||
void *calculate_proc(void *pipe) {
|
||||
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
+ //pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
+ //pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
FILE *calculate_pipe = (FILE*) pipe;
|
||||
while(true) {
|
||||
bool b_parse = true;
|
||||
@@ -1616,7 +1616,7 @@
|
||||
if(calculate_thread_stopped) {
|
||||
b_busy = false;
|
||||
} else {
|
||||
- pthread_cancel(calculate_thread);
|
||||
+ pthread_kill(calculate_thread, 0);
|
||||
restoreState();
|
||||
stopped_messages_count.clear();
|
||||
stopped_warnings_count.clear();
|
||||
@@ -1640,14 +1640,14 @@
|
||||
tmp_rpn_mstruct = NULL;
|
||||
b_busy = false;
|
||||
calculate_thread_stopped = true;
|
||||
- pthread_exit(/* Solaris 2.6 needs a cast */ (void*) PTHREAD_CANCELED);
|
||||
+ pthread_exit(0);
|
||||
}
|
||||
bool Calculator::busy() {
|
||||
return b_busy;
|
||||
}
|
||||
void Calculator::terminateThreads() {
|
||||
if(!calculate_thread_stopped) {
|
||||
- pthread_cancel(calculate_thread);
|
||||
+ pthread_kill(calculate_thread, 0);
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- ../../build/qalc/cache/libqalculate-0.9.9/libqalculate/Number.cc 2016-06-02 18:40:18.000000000 +0200
|
||||
+++ ./libqalculate/Number.cc 2016-08-15 00:35:08.556225106 +0200
|
||||
@@ -2708,7 +2708,7 @@
|
||||
} catch(runtime_exception &e) {
|
||||
CALCULATOR->error(true, _("CLN Exception: %s"), e.what());
|
||||
}
|
||||
- pthread_testcancel();
|
||||
+ //pthread_testcancel();
|
||||
if(b_zero) {
|
||||
try {
|
||||
inr = cln::exquo(inr, last_prime);
|
@ -1,8 +1,8 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://qalculate.github.io/
|
||||
TERMUX_PKG_DESCRIPTION="Powerful and easy to use command line calculator"
|
||||
TERMUX_PKG_VERSION=0.9.11
|
||||
TERMUX_PKG_VERSION=1.0.0
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/Qalculate/libqalculate/releases/download/v${TERMUX_PKG_VERSION}/libqalculate-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=fb5014b04e0f80d85d85d96974c4d069a14791cb2d6aef016c72a24e30917f14
|
||||
TERMUX_PKG_SRCURL=https://github.com/Qalculate/libqalculate/releases/download/v${TERMUX_PKG_VERSION}a/libqalculate-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=7cc5a67356374d7f4fb20619dc4dd7976bbe9ae8d5bc3a40b44c46264de9549b
|
||||
TERMUX_PKG_DEPENDS="glib, gnuplot, libcln, ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
@ -1,49 +0,0 @@
|
||||
--- ../../build/qalc/cache/libqalculate-0.9.9/src/qalc.cc 2016-07-26 14:41:40.000000000 +0200
|
||||
+++ ./src/qalc.cc 2016-08-15 00:22:57.905765966 +0200
|
||||
@@ -295,7 +295,7 @@
|
||||
save_defs();
|
||||
}
|
||||
}
|
||||
- pthread_cancel(view_thread);
|
||||
+ pthread_kill(view_thread, 0);
|
||||
CALCULATOR->terminateThreads();
|
||||
}
|
||||
|
||||
@@ -1138,7 +1138,7 @@
|
||||
if(!cfile) {
|
||||
printf(_("Could not open \"%s\".\n"), command_file.c_str());
|
||||
if(!interactive_mode) {
|
||||
- pthread_cancel(view_thread);
|
||||
+ pthread_kill(view_thread, 0);
|
||||
CALCULATOR->terminateThreads();
|
||||
return 0;
|
||||
}
|
||||
@@ -1166,7 +1166,7 @@
|
||||
execute_expression(interactive_mode);
|
||||
}
|
||||
if(!interactive_mode) {
|
||||
- pthread_cancel(view_thread);
|
||||
+ pthread_kill(view_thread, 0);
|
||||
CALCULATOR->terminateThreads();
|
||||
return 0;
|
||||
}
|
||||
@@ -2619,7 +2619,7 @@
|
||||
}
|
||||
|
||||
void on_abort_command() {
|
||||
- pthread_cancel(command_thread);
|
||||
+ pthread_kill(command_thread, 0);
|
||||
CALCULATOR->restoreState();
|
||||
CALCULATOR->clearBuffers();
|
||||
b_busy = false;
|
||||
@@ -2629,8 +2629,8 @@
|
||||
|
||||
void *command_proc(void *pipe) {
|
||||
|
||||
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
+ //pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
+ //pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
FILE *command_pipe = (FILE*) pipe;
|
||||
|
||||
while(true) {
|
22
packages/qalc/util.cc.patch
Normal file
22
packages/qalc/util.cc.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- ../libqalculate-1.0.0/libqalculate/util.cc 2017-07-16 12:48:15.000000000 +0200
|
||||
+++ ./libqalculate/util.cc 2017-08-08 23:15:29.000000000 +0200
|
||||
@@ -937,8 +937,8 @@
|
||||
}
|
||||
|
||||
void Thread::enableAsynchronousCancel() {
|
||||
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
+ //pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
+ //pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
}
|
||||
|
||||
void *Thread::doRun(void *data) {
|
||||
@@ -960,7 +960,7 @@
|
||||
}
|
||||
|
||||
bool Thread::cancel() {
|
||||
- int ret = pthread_cancel(m_thread);
|
||||
+ int ret = pthread_kill(m_thread, 0);
|
||||
running = (ret != 0);
|
||||
return !running;
|
||||
}
|
Loading…
Reference in New Issue
Block a user