sc-im: Add dependencies

This commit is contained in:
Tee KOBAYASHI 2022-02-14 00:18:01 +09:00 committed by xtkoba
parent 8a22a4dcec
commit 18eacda09a
3 changed files with 46 additions and 9 deletions

View File

@ -1,7 +1,7 @@
--- src/Makefile 2018-02-23 06:49:41.666712787 +0000
+++ src/src/Makefile 2018-02-23 06:49:53.650717771 +0000
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,7 @@
name = scim
name = sc-im
# The base directory where everything should be installed.
-prefix = /usr/local
@ -9,7 +9,7 @@
EXDIR = $(prefix)/bin
HELPDIR = $(prefix)/share/$(name)
@@ -13,10 +13,11 @@
@@ -20,10 +20,11 @@
# Change these to your liking or use `make CC=gcc` etc
#CC = cc
@ -31,9 +31,23 @@
# Used for date formatting with C-d shortcut using you local d_fmt
CFLAGS += -DUSELOCALE
# Comment out to enable mouse support on virtual terminal.
@@ -166,6 +167,9 @@
gram.c : gram.y
$(YACC) -d $<
@@ -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 < $< > $@
+gram.y :
+ $(YACC) gram.y

View File

@ -3,11 +3,11 @@ TERMUX_PKG_DESCRIPTION="An improved version of sc, a spreadsheet calculator"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.8.2
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/andmarti1424/sc-im/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7f00c98601e7f7709431fb4cbb83707c87016a3b015d48e5a7c2f018eff4b7f7
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libandroid-support, libandroid-wordexp, libzip, ncurses"
TERMUX_PKG_DEPENDS="libandroid-support, libandroid-wordexp, liblua51, libxls, libxlsxwriter, libxml2, libzip, ncurses"
TERMUX_PKG_SUGGESTS="gnuplot"
TERMUX_PKG_BUILD_IN_SRC=true

View File

@ -0,0 +1,23 @@
--- a/src/xls.c
+++ b/src/xls.c
@@ -71,6 +71,11 @@
* \return -1 on error
*/
+#ifdef USELOCALE
+#include <locale.h>
+#include <langinfo.h>
+#endif
+
int open_xls(char * fname, char * encoding) {
#ifdef XLS
@@ -78,8 +83,6 @@
char fmt[15] = "%d/%m/%Y";
#ifdef USELOCALE
- #include <locale.h>
- #include <langinfo.h>
char * loc = NULL;
char * f = NULL;
loc = setlocale(LC_TIME, "");