From eca8c2f2ee918f49809f163a9399117b81f833af Mon Sep 17 00:00:00 2001 From: dugsong Date: Tue, 26 Oct 1999 14:20:07 +0000 Subject: [PATCH] w3m port --- www/w3m/Makefile | 23 +++++++++++++++++ www/w3m/files/md5 | 3 +++ www/w3m/patches/patch-aa | 36 +++++++++++++++++++++++++++ www/w3m/patches/patch-ab | 54 ++++++++++++++++++++++++++++++++++++++++ www/w3m/patches/patch-ac | 24 ++++++++++++++++++ www/w3m/pkg/COMMENT | 1 + www/w3m/pkg/DESCR | 13 ++++++++++ www/w3m/pkg/PLIST | 21 ++++++++++++++++ www/w3m/pkg/SECURITY | 9 +++++++ 9 files changed, 184 insertions(+) create mode 100644 www/w3m/Makefile create mode 100644 www/w3m/files/md5 create mode 100644 www/w3m/patches/patch-aa create mode 100644 www/w3m/patches/patch-ab create mode 100644 www/w3m/patches/patch-ac create mode 100644 www/w3m/pkg/COMMENT create mode 100644 www/w3m/pkg/DESCR create mode 100644 www/w3m/pkg/PLIST create mode 100644 www/w3m/pkg/SECURITY diff --git a/www/w3m/Makefile b/www/w3m/Makefile new file mode 100644 index 00000000000..d3b7c75d539 --- /dev/null +++ b/www/w3m/Makefile @@ -0,0 +1,23 @@ +# Makefile for: w3m +# Version required: 991008 +# Date created: 08 Oct 1999 +# Who: dugsong@monkey.org +# +# $OpenBSD: Makefile,v 1.1.1.1 1999/10/26 14:20:07 dugsong Exp $ + +DISTNAME= w3m-991008 + +CATEGORIES= www + +MASTER_SITES= ftp://ei5nazha.yz.yamagata-u.ac.jp/w3m/ \ + ftp://ftp.firedrake.org/w3m/ \ + http://www.instinct.org/~pgl/w3m/ + +MAINTAINER= dugsong@monkey.org + +WRKSRC= ${WRKDIR}/w3m + +NO_CONFIGURE= yes + + +.include diff --git a/www/w3m/files/md5 b/www/w3m/files/md5 new file mode 100644 index 00000000000..d70ddfc9aa4 --- /dev/null +++ b/www/w3m/files/md5 @@ -0,0 +1,3 @@ +SHA1 (w3m-991008.tar.gz) = 05ed1ecff841c9392608107d5d7414a41f13dc58 +RMD160 (w3m-991008.tar.gz) = d10050662b9caedb70b4a60eeab5c0c2b720a708 +MD5 (w3m-991008.tar.gz) = f8a8e520d8acc1f6964602aaf2fa1212 diff --git a/www/w3m/patches/patch-aa b/www/w3m/patches/patch-aa new file mode 100644 index 00000000000..45750cf1193 --- /dev/null +++ b/www/w3m/patches/patch-aa @@ -0,0 +1,36 @@ +--- XMakefile.orig Fri Oct 8 08:19:52 1999 ++++ XMakefile Fri Oct 8 22:06:01 1999 +@@ -15,7 +15,8 @@ + INCLUDES=-I. + + DEFS=$(INCLUDES) #-DSTR_DEBUG # -DDEBUG +-CFLAGS=$(MYCFLAGS) $(DEFS) ++CFLAGS+=$(MYCFLAGS) $(DEFS) ++PREFIX?=/usr/local + LIBS=$(GCLIB) -lm $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) + + $(TARGET): $(ALLOBJS) $(GCTARGET) +@@ -27,15 +28,14 @@ + cd gc; make CC='$(CC) $(MYCFLAGS)' + + install: $(TARGET) +- -mkdir $(DESTDIR)$(BIN_DIR) +- -mkdir $(DESTDIR)$(HELP_DIR) +- cp $(TARGET) $(DESTDIR)$(BIN_DIR) +- cp w3mhelp_en.html $(DESTDIR)$(HELP_DIR) +- cp w3mhelp_ja.html $(DESTDIR)$(HELP_DIR) +- cp w3mhelp-lynx_en.html $(DESTDIR)$(HELP_DIR) +- cp w3mhelp-lynx_ja.html $(DESTDIR)$(HELP_DIR) +- cp $(HELP_FILE) $(DESTDIR)$(HELP_DIR)/w3mhelp.html +- chmod go+r $(DESTDIR)$(HELP_DIR)/w3mhelp.html ++ -mkdir -p -m 755 $(BIN_DIR) ++ -mkdir -p -m 755 $(HELP_DIR) ++ -mkdir -p -m 755 $(DOC_DIR) ++ install -c -m 755 $(TARGET) $(BIN_DIR) ++ install -c -m 644 w3mhelp*.html $(HELP_DIR) ++ ln -s $(HELP_DIR)/$(HELP_FILE) $(HELP_DIR)/w3mhelp.html ++ install -c -m 644 doc/* $(DOC_DIR) ++ mv $(DOC_DIR)/w3m.1 $(PREFIX)/man/man1 + + uninstall: + -$(RM) $(BIN_DIR)/$(TARGET) diff --git a/www/w3m/patches/patch-ab b/www/w3m/patches/patch-ab new file mode 100644 index 00000000000..f9e16548c95 --- /dev/null +++ b/www/w3m/patches/patch-ab @@ -0,0 +1,54 @@ +--- config.h.orig Thu Oct 7 05:29:53 1999 ++++ config.h Sat Oct 9 01:21:22 1999 +@@ -28,37 +28,37 @@ + /**********************************************************/ + #ifdef makefile_parameter + +-BIN_DIR = /usr/local/bin +-HELP_DIR = /usr/local/lib +-HELP_FILE = w3mhelp_ja.html +-SYS_LIBRARIES = -lbsd -lnsl -ltermcap -L/usr/local/ssl/lib -lssl -lcrypto ++BIN_DIR = $(PREFIX)/bin ++HELP_DIR = $(PREFIX)/share/w3m ++HELP_FILE = w3mhelp-lynx_en.html ++DOC_DIR = $(PREFIX)/share/doc/w3m ++SYS_LIBRARIES = -lcurses + LOCAL_LIBRARIES = + CC = gcc +-MYCFLAGS = -g -I./gc -I/usr/local/ssl/include -I/usr/local/ssl/include/openssl +-KEYBIND_SRC = keybind.c +-KEYBIND_OBJ = keybind.o ++MYCFLAGS = -DHELP_FILE="\"$(PREFIX)/share/w3m/w3mhelp.html\"" -I./gc ++KEYBIND_SRC = keybind_lynx.c ++KEYBIND_OBJ = keybind_lynx.o + EXT= + GCLIB=gc/gc.a + GCTARGET=gc/gc.a + #else + + +-#define DISPLAY_CODE 'E' ++#define DISPLAY_CODE 'x' + + #define JA 0 + #define EN 1 +-#define LANG JA +-#define KANJI_SYMBOLS ++#define LANG EN ++#undef KANJI_SYMBOLS + #define COLOR + #undef MOUSE + #define MENU + #define USE_COOKIE +-#define USE_SSL ++#undef USE_SSL + +-#define DEF_EDITOR "/bin/vi" +-#define DEF_MAILER "/bin/mail" ++#define DEF_EDITOR "/usr/bin/vi" ++#define DEF_MAILER "/usr/bin/mail" + #define DEF_EXT_BROWSER "/usr/bin/lynx" +-#define HELP_FILE "/usr/local/lib/w3mhelp.html" + #define BOOKMARK "~/.w3m/bookmark.html" + #define KEYMAP_FILE "~/.w3m/keymap" + #define MENU_FILE "~/.w3m/menu" diff --git a/www/w3m/patches/patch-ac b/www/w3m/patches/patch-ac new file mode 100644 index 00000000000..8ea57565405 --- /dev/null +++ b/www/w3m/patches/patch-ac @@ -0,0 +1,24 @@ +--- main.c.orig Sat Oct 9 00:04:43 1999 ++++ main.c Sat Oct 9 00:10:21 1999 +@@ -47,10 +47,21 @@ + # include "gc_private.h" + int real_main(int,char**,char**); + ++/* Out-of-memory handler for GC. */ ++void * ++die_oom(size_t bytes) ++{ ++ fprintf(stderr, "Out of memory: %d bytes unavailable!\n", bytes); ++ exit(1); ++} ++ + int + main(int argc, char **argv, char **envp) + { + int dummy; ++ ++ /* Set up to die if we run out of memory. */ ++ GC_oom_fn = die_oom; + GC_stackbottom = (ptr_t)(&dummy); + return(real_main(argc, argv, envp)); + } diff --git a/www/w3m/pkg/COMMENT b/www/w3m/pkg/COMMENT new file mode 100644 index 00000000000..99a9da40b22 --- /dev/null +++ b/www/w3m/pkg/COMMENT @@ -0,0 +1 @@ +text-based web browser/pager diff --git a/www/w3m/pkg/DESCR b/www/w3m/pkg/DESCR new file mode 100644 index 00000000000..67c738d1a7c --- /dev/null +++ b/www/w3m/pkg/DESCR @@ -0,0 +1,13 @@ + +[ http://ei5nazha.yz.yamagata-u.ac.jp/~aito/w3m/eng/ ] + +w3m is a pager/text-based WWW browser. It is a similar application to +Lynx, but it has several features Lynx doesn't have. + + w3m can render table. + w3m can render frame. (it converts the frames into a table) + w3m can display documents given from standard input easily. + w3m is small. Binary size of w3m on Sparc workstation is under + 300KByte. + +-d. diff --git a/www/w3m/pkg/PLIST b/www/w3m/pkg/PLIST new file mode 100644 index 00000000000..05fb400e100 --- /dev/null +++ b/www/w3m/pkg/PLIST @@ -0,0 +1,21 @@ +bin/w3m +share/w3m/w3mhelp-lynx_en.html +share/w3m/w3mhelp-lynx_ja.html +share/w3m/w3mhelp_en.html +share/w3m/w3mhelp_ja.html +share/w3m/w3mhelp.html +@dirrm share/w3m +share/doc/w3m/FAQ.html +share/doc/w3m/MANUAL.html +share/doc/w3m/MANUAL_lynx.html +share/doc/w3m/README +share/doc/w3m/README.cygwin +share/doc/w3m/README.dict +share/doc/w3m/README.func +share/doc/w3m/STORY.html +share/doc/w3m/keymap.default +share/doc/w3m/keymap.lynx +share/doc/w3m/menu.default +share/doc/w3m/menu.submenu +@dirrm share/doc/w3m +man/man1/w3m.1 diff --git a/www/w3m/pkg/SECURITY b/www/w3m/pkg/SECURITY new file mode 100644 index 00000000000..8d361269115 --- /dev/null +++ b/www/w3m/pkg/SECURITY @@ -0,0 +1,9 @@ +this code is a total nightmare. + +a pain to read, and lots of strcpy/strcat/sprintf's which actually +turn out to be okay, after adding a die-when-out-of-memory callback +for the boehm garbage collector. + +there are undoubtedly other issues with this code. caveat user. + +-d.