diff --git a/packages/sc-im/build.sh b/packages/sc-im/build.sh index 364ed52de..143b29517 100644 --- a/packages/sc-im/build.sh +++ b/packages/sc-im/build.sh @@ -3,14 +3,15 @@ TERMUX_PKG_DESCRIPTION="An improved version of sc, a spreadsheet calculator" TERMUX_PKG_LICENSE="BSD" TERMUX_PKG_MAINTAINER="Leonid Plyushch " TERMUX_PKG_VERSION=0.7.0 -TERMUX_PKG_REVISION=5 +TERMUX_PKG_REVISION=6 TERMUX_PKG_SRCURL=https://github.com/andmarti1424/sc-im/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=87225918cb6f52bbc068ee6b12eaf176c7c55ba9739b29ca08cb9b6699141cad TERMUX_PKG_DEPENDS="libandroid-support, libzip, ncurses" +TERMUX_PKG_SUGGESTS="gnuplot" TERMUX_PKG_BUILD_IN_SRC=true termux_step_post_configure() { - CFLAGS+=" $CPPFLAGS -I$TERMUX_PREFIX/include/libandroid-support -I$TERMUX_PKG_BUILDER_DIR" + CFLAGS+=" $CPPFLAGS -I$TERMUX_PREFIX/include/libandroid-support -I$TERMUX_PKG_BUILDER_DIR -DGNUPLOT" cp $TERMUX_PKG_BUILDER_DIR/wordexp.c . cp -rf src/* . } diff --git a/packages/sc-im/clipboard.c.patch b/packages/sc-im/clipboard.c.patch new file mode 100644 index 000000000..4e98125f8 --- /dev/null +++ b/packages/sc-im/clipboard.c.patch @@ -0,0 +1,12 @@ +diff -uNr sc-im-0.7.0/src/clipboard.c sc-im-0.7.0.mod/src/clipboard.c +--- sc-im-0.7.0/src/clipboard.c 2017-12-13 19:48:59.000000000 +0200 ++++ sc-im-0.7.0.mod/src/clipboard.c 2019-12-23 14:13:09.827265417 +0200 +@@ -68,7 +68,7 @@ + if (! strlen(get_conf_value("default_paste_from_clipboard_cmd"))) return -1; + + // create tmp file +- char template[] = "/tmp/sc-im-clipboardXXXXXX"; ++ char template[] = "@TERMUX_PREFIX@/tmp/sc-im-clipboardXXXXXX"; + int fd = mkstemp(template); + if (fd == -1) { + sc_error("Error while pasting from clipboard"); diff --git a/packages/sc-im/plot.c.patch b/packages/sc-im/plot.c.patch new file mode 100644 index 000000000..eb2ac4128 --- /dev/null +++ b/packages/sc-im/plot.c.patch @@ -0,0 +1,12 @@ +diff -uNr sc-im-0.7.0/src/plot.c sc-im-0.7.0.mod/src/plot.c +--- sc-im-0.7.0/src/plot.c 2017-12-13 19:48:59.000000000 +0200 ++++ sc-im-0.7.0.mod/src/plot.c 2019-12-23 14:13:03.731217357 +0200 +@@ -111,7 +111,7 @@ + int plot(char * s, int r, int c, int rf, int cf) { + #ifdef GNUPLOT + // create tmp file +- char datafile[] = "/tmp/sc-im-plotdataXXXXXX"; ++ char datafile[] = "@TERMUX_PREFIX@/tmp/sc-im-plotdataXXXXXX"; + int fd = mkstemp(datafile); + if (fd == -1) { + sc_error("Error while creating temp file for plot");