new package: catdoc

This commit is contained in:
Tee KOBAYASHI 2022-01-13 07:03:00 +09:00 committed by Leonid Pliushch
parent 5de39a445c
commit 637ea742fe
2 changed files with 27 additions and 0 deletions

13
packages/catdoc/build.sh Normal file
View File

@ -0,0 +1,13 @@
TERMUX_PKG_HOMEPAGE=http://www.wagner.pp.ru/~vitus/software/catdoc/
TERMUX_PKG_DESCRIPTION="Program which reads MS-Word file and prints readable ASCII text to stdout"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.95
TERMUX_PKG_SRCURL=http://ftp.wagner.pp.ru/pub/catdoc/catdoc-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=514a84180352b6bf367c1d2499819dfa82b60d8c45777432fa643a5ed7d80796
TERMUX_PKG_DEPENDS="libandroid-glob"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
LDFLAGS+=" -landroid-glob"
}

View File

@ -0,0 +1,14 @@
--- a/src/confutil.c
+++ b/src/confutil.c
@@ -103,7 +103,11 @@
#ifndef __TURBOC__
if (!setlocale(LC_CTYPE,"")) return;
#endif
+#ifdef __ANDROID__
+ codeset = "UTF-8";
+#else
codeset = nl_langinfo(CODESET);
+#endif
if (!strncmp(codeset,"ISO",3)||!strncmp(codeset,"iso",3)) {
codeset+=3;
if (*codeset=='-') codeset++;