new package: catgirl

This commit is contained in:
Tee KOBAYASHI 2022-04-02 07:53:36 +09:00 committed by xtkoba
parent 7bdbf3f3df
commit 175bdbb4a6
5 changed files with 69 additions and 0 deletions

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

@ -0,0 +1,13 @@
TERMUX_PKG_HOMEPAGE=https://git.causal.agency/catgirl
TERMUX_PKG_DESCRIPTION="A TLS-only terminal IRC client"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.1
TERMUX_PKG_SRCURL=https://git.causal.agency/catgirl/snapshot/catgirl-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=a68bfb82f625bcdf7bc5b7a6e1528fe3559bcded41f0d3c972f8b7e918bcee8e
TERMUX_PKG_DEPENDS="libandroid-support, libretls, ncurses, openssl"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--mandir=$TERMUX_PREFIX/share/man
"
TERMUX_PKG_EXTRA_MAKE_ARGS="catgirl"

View File

@ -0,0 +1,11 @@
--- a/catgirl.1
+++ b/catgirl.1
@@ -874,7 +874,7 @@
The shell used by
.Ic /exec .
The default is
-.Pa /bin/sh .
+.Pa @TERMUX_PREFIX@/bin/sh .
.It Ev USER
The default nickname.
.El

View File

@ -0,0 +1,15 @@
--- a/chat.h
+++ b/chat.h
@@ -39,6 +39,12 @@
#include <time.h>
#include <wchar.h>
+#ifdef __ANDROID__
+static void *(*volatile explicit_memset)(void *, int, size_t) = memset;
+#undef explicit_bzero
+#define explicit_bzero(s, n) explicit_memset(s, 0, n)
+#endif
+
#define ARRAY_LEN(a) (sizeof(a) / sizeof(a[0]))
#define BIT(x) x##Bit, x = 1 << x##Bit, x##Bit_ = x##Bit

View File

@ -0,0 +1,11 @@
--- a/command.c
+++ b/command.c
@@ -494,7 +494,7 @@
dup2(execPipe[1], STDOUT_FILENO);
dup2(utilPipe[1], STDERR_FILENO);
- const char *shell = getenv("SHELL") ?: "/bin/sh";
+ const char *shell = getenv("SHELL") ?: "@TERMUX_PREFIX@/bin/sh";
execl(shell, shell, "-c", params, NULL);
warn("%s", shell);
_exit(EX_UNAVAILABLE);

View File

@ -0,0 +1,19 @@
--- a/xdg.c
+++ b/xdg.c
@@ -49,14 +49,14 @@
.envHome = "XDG_CONFIG_HOME",
.envDirs = "XDG_CONFIG_DIRS",
.defHome = ".config",
- .defDirs = "/etc/xdg",
+ .defDirs = "@TERMUX_PREFIX@/etc/xdg",
};
static const struct Base Data = {
.envHome = "XDG_DATA_HOME",
.envDirs = "XDG_DATA_DIRS",
.defHome = ".local/share",
- .defDirs = "/usr/local/share:/usr/share",
+ .defDirs = "@TERMUX_PREFIX@/local/share:@TERMUX_PREFIX@/share",
};
static char *basePath(