diff options
Diffstat (limited to 'user')
-rw-r--r-- | user/libqalculate/APKBUILD | 8 | ||||
-rw-r--r-- | user/libqalculate/without-readline.patch | 262 |
2 files changed, 3 insertions, 267 deletions
diff --git a/user/libqalculate/APKBUILD b/user/libqalculate/APKBUILD index 313c3f823..0a02a5926 100644 --- a/user/libqalculate/APKBUILD +++ b/user/libqalculate/APKBUILD @@ -1,8 +1,8 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libqalculate -pkgver=2.8.0 -pkgrel=1 +pkgver=2.8.1 +pkgrel=0 pkgdesc="Library implementing a powerful, versatile desktop calculator" url="https://qalculate.github.io/" arch="all" @@ -13,7 +13,6 @@ depends_dev="gmp-dev mpfr-dev" makedepends="$depends_dev curl-dev icu-dev intltool libxml2-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang qalc" source="https://github.com/Qalculate/libqalculate/releases/download/v$pkgver/libqalculate-$pkgver.tar.gz - without-readline.patch " build() { @@ -44,5 +43,4 @@ qalc() { mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } -sha512sums="4e38b2086850b7f4ce4de0061232ac36bcdb83f0be3c6d412183087b2c7f94955b08054ad572a1f0dabff732cb82ee41c387eb906209ccadba6477cc019a3e72 libqalculate-2.8.0.tar.gz -9bedf6666a761411ab95add94fd1936864d3f1b6d0aeff4e304f272b7fcd2aec07f830f3bb27956bf792b2b5069fd9e20c7d920d3903e4d89be163b6f1ea2474 without-readline.patch" +sha512sums="a258bf4f67db70263626ac77822afc75fd7a9e5af2feb1930314daff219865b28c43e82fef6ceae4f3f23957447d6eaebdc709e606d28457bca0f47eefb9274a libqalculate-2.8.1.tar.gz" diff --git a/user/libqalculate/without-readline.patch b/user/libqalculate/without-readline.patch deleted file mode 100644 index 329cbb866..000000000 --- a/user/libqalculate/without-readline.patch +++ /dev/null @@ -1,262 +0,0 @@ -From 9398f8f70a98e731e29f58439bdc75faa554dd04 Mon Sep 17 00:00:00 2001 -From: Hanna K <hanna.knutsson@protonmail.com> -Date: Wed, 31 Oct 2018 08:27:06 +0100 -Subject: [PATCH] Fix compilation without readline; Use bold text for mode - headings - ---- - src/qalc.cc | 118 ++++++++++++++++------------------------------------ - 1 file changed, 37 insertions(+), 81 deletions(-) - -diff --git a/src/qalc.cc b/src/qalc.cc -index 0621913..db15a1a 100644 ---- a/src/qalc.cc -+++ b/src/qalc.cc -@@ -409,10 +409,12 @@ bool check_exchange_rates() { - #ifdef HAVE_LIBREADLINE - # define CHECK_IF_SCREEN_FILLED if(!cfile) {rcount++; if(rcount + 3 >= rows) {FPUTS_UNICODE(_("\nPress Enter to continue."), stdout); fflush(stdout); rl_read_key(); puts(""); rcount = 1;}} - # define CHECK_IF_SCREEN_FILLED_PUTS(x) if(!cfile) {rcount += countRows(x, cols); if(rcount + 2 >= rows) {FPUTS_UNICODE(_("\nPress Enter to continue."), stdout); fflush(stdout); rl_read_key(); puts(""); rcount = 1;}} PUTS_UNICODE(x); -+# define CHECK_IF_SCREEN_FILLED_HEADING(x) rcount += 2; CHECK_IF_SCREEN_FILLED; if(rcount > 1) {puts("");} PUTS_BOLD(x); puts(""); if(rcount == 1) {rcount = 3;} - # define INIT_SCREEN_CHECK int rows, cols, rcount = 0; if(!cfile) rl_get_screen_size(&rows, &cols); - #else - # define CHECK_IF_SCREEN_FILLED - # define CHECK_IF_SCREEN_FILLED_PUTS(x) PUTS_UNICODE(x); -+# define CHECK_IF_SCREEN_FILLED_HEADING(x) puts(""); PUTS_BOLD(x); puts(""); - # define INIT_SCREEN_CHECK {} - #endif - -@@ -907,7 +909,7 @@ void set_option(string str) { - #define STR_AND_TABS_T3(x) str = x; pctl = unicode_length(str); if(pctl >= 16) {str += "\t";} else if(pctl >= 8) {str += "\t\t";} else {str += "\t\t\t";} - #define STR_AND_TABS_T4(x) str = x; pctl = unicode_length(str); if(pctl >= 24) {str += "\t";} else if(pctl >= 16) {str += "\t\t";} else if(pctl >= 8) {str += "\t\t\t";} else {str += "\t\t\t\t";} - #define PRINT_AND_COLON_TABS(x) FPUTS_UNICODE(x, stdout); pctl = unicode_length_check(x); if(pctl >= 32) fputs("\t", stdout); else if(pctl >= 24) fputs("\t\t", stdout); else if(pctl >= 16) fputs("\t\t\t", stdout); else if(pctl >= 8) fputs("\t\t\t\t", stdout); else fputs("\t\t\t\t\t", stdout); --#define PUTS_BOLD(x) str = "\033[1m"; str += x; str += "\033[0m"; puts(str.c_str()); -+#define PUTS_BOLD(x) str = "\033[1m"; str += x; str += "\033[0m"; PUTS_UNICODE(str.c_str()); - - bool equalsIgnoreCase(const string &str1, const string &str2, size_t i2, size_t i2_end, size_t minlength) { - if(str1.empty() || str2.empty()) return false; -@@ -2318,12 +2320,11 @@ int main(int argc, char *argv[]) { - //qalc command - } else if(EQUALS_IGNORECASE_AND_LOCAL(str, "mode", _("mode"))) { - INIT_SCREEN_CHECK -- puts(""); CHECK_IF_SCREEN_FILLED -+ - int pctl; - -- PUTS_UNICODE(_("Algebraic Mode")); -- puts(""); -- rcount += 2; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Algebraic Mode")); -+ - PRINT_AND_COLON_TABS(_("algebra mode")); - switch(evalops.structuring) { - case STRUCTURING_NONE: {PUTS_UNICODE(_("none")); break;} -@@ -2355,11 +2356,8 @@ int main(int argc, char *argv[]) { - if(value.empty()) value = _("unknown"); - PRINT_AND_COLON_TABS(_("assumptions")); PUTS_UNICODE(value.c_str()); CHECK_IF_SCREEN_FILLED - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Calculation")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Calculation")); -+ - PRINT_AND_COLON_TABS(_("angle unit")); - switch(evalops.parse_options.angle_unit) { - case ANGLE_UNIT_RADIANS: {PUTS_UNICODE(_("rad")); break;} -@@ -2378,11 +2376,8 @@ int main(int argc, char *argv[]) { - PRINT_AND_COLON_TABS(_("interval")); PUTS_UNICODE(b2oo(CALCULATOR->usesIntervalArithmetic(), false)); CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("precision")) printf("%i\n", CALCULATOR->getPrecision()); CHECK_IF_SCREEN_FILLED - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Enabled Objects")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Enabled Objects")); -+ - PRINT_AND_COLON_TABS(_("calculate functions")); PUTS_UNICODE(b2oo(evalops.calculate_functions, false)); CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("calculate variables")); PUTS_UNICODE(b2oo(evalops.calculate_variables, false)); CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("complex numbers")); PUTS_UNICODE(b2oo(evalops.allow_complex, false)); CHECK_IF_SCREEN_FILLED -@@ -2393,11 +2388,8 @@ int main(int argc, char *argv[]) { - PRINT_AND_COLON_TABS(_("variables")); PUTS_UNICODE(b2oo(evalops.parse_options.variables_enabled, false)); CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("variable units")); PUTS_UNICODE(b2oo(CALCULATOR->variableUnitsEnabled(), false)); CHECK_IF_SCREEN_FILLED - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Generic Display Options")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Generic Display Options")); -+ - PRINT_AND_COLON_TABS(_("abbreviations")); PUTS_UNICODE(b2oo(printops.abbreviate_names, false)); CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("division sign")); - switch(printops.division_sign) { -@@ -2420,11 +2412,8 @@ int main(int argc, char *argv[]) { - PRINT_AND_COLON_TABS(_("spell out logical")); PUTS_UNICODE(b2oo(printops.spell_out_logical_operators, false)); CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("unicode")); PUTS_UNICODE(b2oo(printops.use_unicode_signs, false)); CHECK_IF_SCREEN_FILLED - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Numerical Display")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Numerical Display")); -+ - PRINT_AND_COLON_TABS(_("base")); - switch(printops.base) { - case BASE_ROMAN_NUMERALS: {PUTS_UNICODE(_("roman")); break;} -@@ -2513,11 +2502,8 @@ int main(int argc, char *argv[]) { - PRINT_AND_COLON_TABS(_("show ending zeroes")); PUTS_UNICODE(b2oo(printops.show_ending_zeroes, false)); CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("two's complement")); PUTS_UNICODE(b2oo(printops.twos_complement, false)); CHECK_IF_SCREEN_FILLED - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Parsing")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Parsing")); -+ - PRINT_AND_COLON_TABS(_("decimal comma")); - if(b_decimal_comma < 0) {PUTS_UNICODE(_("locale"));} - else if(b_decimal_comma == 0) {PUTS_UNICODE(_("off"));} -@@ -2552,11 +2538,8 @@ int main(int argc, char *argv[]) { - CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("rpn syntax")); PUTS_UNICODE(b2oo(evalops.parse_options.rpn, false)); CHECK_IF_SCREEN_FILLED - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Units")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Units")); -+ - PRINT_AND_COLON_TABS(_("all prefixes")); PUTS_UNICODE(b2oo(printops.use_all_prefixes, false)); CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("autoconversion")); - switch(evalops.auto_post_conversion) { -@@ -2583,11 +2566,8 @@ int main(int argc, char *argv[]) { - } - CHECK_IF_SCREEN_FILLED - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Other")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Other")); -+ - PRINT_AND_COLON_TABS(_("rpn")); PUTS_UNICODE(b2oo(rpn_mode, false)); CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("save definitions")); PUTS_UNICODE(b2yn(save_defs_on_exit, false)); CHECK_IF_SCREEN_FILLED - PRINT_AND_COLON_TABS(_("save mode")); PUTS_UNICODE(b2yn(save_mode_on_exit, false)); CHECK_IF_SCREEN_FILLED -@@ -3011,11 +2991,8 @@ int main(int argc, char *argv[]) { - CHECK_IF_SCREEN_FILLED_PUTS(""); - CHECK_IF_SCREEN_FILLED_PUTS(_("Available options and accepted values are (the current value is marked with '*'):")); - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Algebraic Mode")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Algebraic Mode")); -+ - STR_AND_TABS_2(_("algebra mode"), evalops.structuring, _("none"), _("simplify"), _("factorize")); - STR_AND_TABS_BOOL(_("assume nonzero denominators"), evalops.assume_denominators_nonzero); - STR_AND_TABS_BOOL(_("warn nonzero denominators"), evalops.warn_about_denominators_assumed_nonzero); -@@ -3049,21 +3026,15 @@ int main(int argc, char *argv[]) { - if(ass->type() == ASSUMPTION_TYPE_INTEGER) str += "*"; - str += ")"; CHECK_IF_SCREEN_FILLED_PUTS(str.c_str()); - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Calculation")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Calculation")); -+ - STR_AND_TABS_3(_("angle unit"), evalops.parse_options.angle_unit, _("none"), _("radians"), _("degrees"), _("gradians")); - STR_AND_TABS_2(_("approximation"), evalops.approximation, _("exact"), _("try exact"), _("approximate")); - STR_AND_TABS_BOOL(_("interval"), CALCULATOR->usesIntervalArithmetic()); - STR_AND_TABS(_("precision")); str += "(> 0) "; str += i2s(CALCULATOR->getPrecision()); str += "*"; CHECK_IF_SCREEN_FILLED_PUTS(str.c_str()); - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Enabled Objects")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Enabled Objects")); -+ - STR_AND_TABS_BOOL(_("calculate functions"), evalops.calculate_functions); - STR_AND_TABS_BOOL(_("calculate variables"), evalops.calculate_variables); - STR_AND_TABS_BOOL(_("complex numbers"), evalops.allow_complex); -@@ -3074,11 +3045,8 @@ int main(int argc, char *argv[]) { - STR_AND_TABS_BOOL(_("variables"), evalops.parse_options.variables_enabled); - STR_AND_TABS_BOOL(_("variable units"), CALCULATOR->variableUnitsEnabled()); - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Generic Display Options")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Generic Display Options")); -+ - STR_AND_TABS_BOOL(_("abbreviations"), printops.abbreviate_names); - STR_AND_TABS_2(_("division sign"), printops.division_sign, "/", SIGN_DIVISION_SLASH, SIGN_DIVISION); - STR_AND_TABS_BOOL(_("excessive parentheses"), printops.excessive_parenthesis); -@@ -3088,12 +3056,9 @@ int main(int argc, char *argv[]) { - STR_AND_TABS_BOOL(_("spacious"), printops.spacious); - STR_AND_TABS_BOOL(_("spell out logical"), printops.spell_out_logical_operators); - STR_AND_TABS_BOOL(_("unicode"), printops.use_unicode_signs); -- -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Numerical Display")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Numerical Display")); -+ - STR_AND_TABS(_("base")); str += "(2 - 36"; str += ", "; str += _("bin"); - if(printops.base == BASE_BINARY) str += "*"; - str += ", "; str += _("oct"); -@@ -3154,11 +3119,8 @@ int main(int argc, char *argv[]) { - STR_AND_TABS_BOOL(_("show ending zeroes"), printops.show_ending_zeroes); - STR_AND_TABS_BOOL(_("two's complement"), printops.twos_complement); - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Parsing")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Parsing")); -+ - STR_AND_TABS(_("decimal comma")); str += "("; str += _("locale"); - if(b_decimal_comma < 0) str += "*"; - str += ", "; str += _("off"); -@@ -3191,11 +3153,8 @@ int main(int argc, char *argv[]) { - STR_AND_TABS_2(_("read precision"), evalops.parse_options.read_precision, _("off"), _("always"), _("when decimals")) - STR_AND_TABS_BOOL(_("rpn syntax"), evalops.parse_options.rpn); - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Units")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Units")); -+ - STR_AND_TABS_BOOL(_("all prefixes"), printops.use_all_prefixes); - STR_AND_TABS(_("autoconversion")); - str += (_("none")); -@@ -3222,11 +3181,8 @@ int main(int argc, char *argv[]) { - if(auto_update_exchange_rates > 0) {str += " "; str += i2s(auto_update_exchange_rates); str += "*";} - CHECK_IF_SCREEN_FILLED_PUTS(str.c_str()); - -- rcount += 2; CHECK_IF_SCREEN_FILLED -- if(rcount > 1) puts(""); -- PUTS_UNICODE(_("Other")); -- puts(""); -- if(rcount == 1) rcount = 3; -+ CHECK_IF_SCREEN_FILLED_HEADING(_("Other")); -+ - STR_AND_TABS_BOOL(_("rpn"), rpn_mode); - STR_AND_TABS_YESNO(_("save definitions"), save_defs_on_exit); - STR_AND_TABS_YESNO(_("save mode"), save_mode_on_exit); |