Skip to content

Commit

Permalink
bump(main/sc-im): 0.8.4
Browse files Browse the repository at this point in the history
* Use LUA_PKGNAME to select lua version instead of patching makefile.
  That option for make was added in the following upstream commit
  andmarti1424/sc-im@5c2e0a1

* Update lua dependency to lua5.4.

* Fix the following compiler error with interp.c and modified langinfo.h.
  langinfo.h:107:1: error: function definition is not allowed here
  • Loading branch information
Biswa96 committed Aug 16, 2024
1 parent b4ff901 commit 2f4b0b9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
14 changes: 0 additions & 14 deletions packages/sc-im/Makefile.patch
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,6 @@
# Used for date formatting with C-d shortcut using you local d_fmt
CFLAGS += -DUSELOCALE
# Comment out to enable mouse support on virtual terminal.
@@ -134,10 +135,10 @@
endif

# NOTE: lua support
- ifneq ($(shell pkg-config --exists lua || echo 'no'),no) # Check for user's default lua
- CFLAGS += -DXLUA $(shell pkg-config --cflags lua)
+ ifneq ($(shell pkg-config --exists lua51 || echo 'no'),no) # Check for user's default lua
+ CFLAGS += -DXLUA $(shell pkg-config --cflags lua51)
ifneq ($(shell uname -s),Darwin)
- LDLIBS += $(shell pkg-config --libs lua) -Wl,--export-dynamic
+ LDLIBS += $(shell pkg-config --libs lua51) -Wl,--export-dynamic
else
LDLIBS += $(shell pkg-config --libs lua) -rdynamic
endif
@@ -213,6 +214,9 @@
statres.h : gram.y sres.sed
sed -f sres.sed < $< > $@
Expand Down
10 changes: 6 additions & 4 deletions packages/sc-im/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ TERMUX_PKG_HOMEPAGE=https://github.com/andmarti1424/sc-im
TERMUX_PKG_DESCRIPTION="An improved version of sc, a spreadsheet calculator"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.8.3
TERMUX_PKG_REVISION=3
TERMUX_PKG_VERSION="0.8.4"
TERMUX_PKG_SRCURL=https://github.com/andmarti1424/sc-im/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=5568f9987b6d26535c0e7a427158848f1bc03d829f74e41cbcf007d8704e9bd3
TERMUX_PKG_SHA256=ebb1f10006fe49f964a356494f96d86a4f06eb018659e3b9bde63b25c03abdf0
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libandroid-support, libandroid-wordexp, liblua51, libxls, libxlsxwriter, libxml2, libzip, ncurses"
TERMUX_PKG_DEPENDS="libandroid-support, libandroid-wordexp, liblua54, libxls, libxlsxwriter, libxml2, libzip, ncurses"
TERMUX_PKG_SUGGESTS="gnuplot"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="
LUA_PKGNAME=lua54
"

termux_step_pre_configure() {
CFLAGS+=" $CPPFLAGS -I$TERMUX_PREFIX/include/libandroid-support -DGNUPLOT"
Expand Down
22 changes: 22 additions & 0 deletions packages/sc-im/src-interp.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- a/src/interp.c
+++ b/src/interp.c
@@ -1540,6 +1540,10 @@
return;
}

+#ifdef USELOCALE
+#include <locale.h>
+#include <langinfo.h>
+#endif

/**
* \brief slet()
@@ -1609,8 +1613,6 @@
// reconvert numeric value based on locale's D_FMT format instead of current format
char * f = &v->format[1];
#ifdef USELOCALE
- #include <locale.h>
- #include <langinfo.h>
char * loc = NULL;
f = NULL;
loc = setlocale(LC_TIME, "");

0 comments on commit 2f4b0b9

Please sign in to comment.