This commit is contained in:
dugsong 1999-10-26 14:20:07 +00:00
parent 9a4f9c8a35
commit eca8c2f2ee
9 changed files with 184 additions and 0 deletions

23
www/w3m/Makefile Normal file
View File

@ -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 <bsd.port.mk>

3
www/w3m/files/md5 Normal file
View File

@ -0,0 +1,3 @@
SHA1 (w3m-991008.tar.gz) = 05ed1ecff841c9392608107d5d7414a41f13dc58
RMD160 (w3m-991008.tar.gz) = d10050662b9caedb70b4a60eeab5c0c2b720a708
MD5 (w3m-991008.tar.gz) = f8a8e520d8acc1f6964602aaf2fa1212

36
www/w3m/patches/patch-aa Normal file
View File

@ -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)

54
www/w3m/patches/patch-ab Normal file
View File

@ -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"

24
www/w3m/patches/patch-ac Normal file
View File

@ -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));
}

1
www/w3m/pkg/COMMENT Normal file
View File

@ -0,0 +1 @@
text-based web browser/pager

13
www/w3m/pkg/DESCR Normal file
View File

@ -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.

21
www/w3m/pkg/PLIST Normal file
View File

@ -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

9
www/w3m/pkg/SECURITY Normal file
View File

@ -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.