This commit is contained in:
Fredrik Fornwall 2015-11-19 17:53:41 -05:00
parent a110240408
commit ecb2ad164a
5 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,14 @@
diff -u -r ../w3m-0.5.3/Makefile.in ./Makefile.in
--- ../w3m-0.5.3/Makefile.in 2011-01-04 04:22:18.000000000 -0500
+++ ./Makefile.in 2015-11-19 17:27:59.073507125 -0500
@@ -176,8 +176,8 @@
./mktable$(EXT) 100 functable.tab > $@
-rm -f functable.tab
-mktable$(EXT): mktable.o dummy.o Str.o hash.o myctype.o
- $(CC) $(CFLAGS) -o mktable mktable.o dummy.o Str.o hash.o myctype.o $(LDFLAGS) $(LIBS) $(GC_LIBS)
+mktable$(EXT): mktable.c Str.c hash.c myctype.c
+ gcc -DGC_free=free -DGC_malloc=malloc -DGC_malloc_atomic=malloc -D'GC_init(arg)=' -o mktable mktable.c Str.c hash.c myctype.c
$(BOOKMARKER): w3mbookmark.o dummy.o $(ALIB)
$(CC) $(CFLAGS) -o $(BOOKMARKER) w3mbookmark.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)

7
packages/w3m/build.sh Normal file
View File

@ -0,0 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://w3m.sourceforge.net/
TERMUX_PKG_DESCRIPTION="Text based Web browser and pager"
TERMUX_PKG_VERSION=0.5.3
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/w3m/w3m/w3m-$TERMUX_PKG_VERSION/w3m-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_DEPENDS="libgc, ncurses, openssl"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_func_setpgrp_void=yes"

25
packages/w3m/file.c.patch Normal file
View File

@ -0,0 +1,25 @@
diff -u -r ../w3m-0.5.3/file.c ./file.c
--- ../w3m-0.5.3/file.c 2011-01-04 04:22:21.000000000 -0500
+++ ./file.c 2015-11-19 17:37:37.536882299 -0500
@@ -1513,6 +1513,21 @@
return hauth->scheme ? hauth : NULL;
}
+#ifdef __ANDROID__
+static char* getpass(const char* prompt) {
+ static char chars[128];
+ int len = 0;
+ while (1) {
+ char c = fgetc(stdin);
+ if (c == '\r' || c == '\n' || c == 0) break;
+ chars[len++] = c;
+ if (len == sizeof(chars)-1) break;
+ }
+ chars[len] = 0;
+ return chars;
+}
+#endif
+
static void
getAuthCookie(struct http_auth *hauth, char *auth_header,
TextList *extra_header, ParsedURL *pu, HRequest *hr,

25
packages/w3m/ftp.c.patch Normal file
View File

@ -0,0 +1,25 @@
diff -u -r ../w3m-0.5.3/ftp.c ./ftp.c
--- ../w3m-0.5.3/ftp.c 2011-01-04 04:22:21.000000000 -0500
+++ ./ftp.c 2015-11-19 17:38:19.404593027 -0500
@@ -342,6 +342,21 @@
ftp_close(&current_ftp);
}
+#ifdef __ANDROID__
+static char* getpass(const char* prompt) {
+ static char chars[128];
+ int len = 0;
+ while (1) {
+ char c = fgetc(stdin);
+ if (c == '\r' || c == '\n' || c == 0) break;
+ chars[len++] = c;
+ if (len == sizeof(chars)-1) break;
+ }
+ chars[len] = 0;
+ return chars;
+}
+#endif
+
InputStream
openFTPStream(ParsedURL *pu, URLFile *uf)
{

14
packages/w3m/main.c.patch Normal file
View File

@ -0,0 +1,14 @@
Fix compiling with newer libgc version.
diff -u -r ../w3m-0.5.3/main.c ./main.c
--- ../w3m-0.5.3/main.c 2011-01-04 04:42:19.000000000 -0500
+++ ./main.c 2015-11-19 17:34:47.045885249 -0500
@@ -833,7 +833,7 @@
mySignal(SIGPIPE, SigPipe);
#endif
- orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
+ GC_set_warn_proc(wrap_GC_warn_proc);
err_msg = Strnew();
if (load_argc == 0) {
/* no URL specified */