diff options
author | trevor <trevor@FreeBSD.org> | 2001-02-01 07:14:09 +0800 |
---|---|---|
committer | trevor <trevor@FreeBSD.org> | 2001-02-01 07:14:09 +0800 |
commit | d6c7c78d8ba677f560d9c9d9e3fed084b21e9560 (patch) | |
tree | 5dab4d8f3baf5d3ad231d4e71ae00fca778f15a1 | |
parent | aaa505c4a6688e540d812cc70bf1a50630305e50 (diff) | |
download | freebsd-ports-gnome-d6c7c78d8ba677f560d9c9d9e3fed084b21e9560.tar.gz freebsd-ports-gnome-d6c7c78d8ba677f560d9c9d9e3fed084b21e9560.tar.zst freebsd-ports-gnome-d6c7c78d8ba677f560d9c9d9e3fed084b21e9560.zip |
new port of wb0, a Web browser for the VGA console which can display
pictures
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/wb0/Makefile | 48 | ||||
-rw-r--r-- | www/wb0/distinfo | 1 | ||||
-rw-r--r-- | www/wb0/files/patch-Makefile | 30 | ||||
-rw-r--r-- | www/wb0/files/patch-etc_wb0_wb0.config | 7 | ||||
-rw-r--r-- | www/wb0/files/patch-watcher.c | 139 | ||||
-rw-r--r-- | www/wb0/pkg-comment | 1 | ||||
-rw-r--r-- | www/wb0/pkg-descr | 9 |
8 files changed, 236 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index 0ad849da37d9..5ac186fbf9b7 100644 --- a/www/Makefile +++ b/www/Makefile @@ -213,6 +213,7 @@ SUBDIR += w3m SUBDIR += w3m-ssl SUBDIR += w3mir + SUBDIR += wb0 SUBDIR += wcol SUBDIR += web2ldap SUBDIR += web500gw diff --git a/www/wb0/Makefile b/www/wb0/Makefile new file mode 100644 index 000000000000..f9c08c842c21 --- /dev/null +++ b/www/wb0/Makefile @@ -0,0 +1,48 @@ +# New ports collection makefile for: wb0 +# Date created: 2001-01-31 +# Whom: trevor +# +# $FreeBSD$ +# + +PORTNAME= wb0 +PORTVERSION= 000324 +CATEGORIES= www +MASTER_SITES= ftp://atrey.karlin.mff.cuni.cz/pub/local/clock/wb0/ +EXTRACT_SUFX= .tgz + +MAINTAINER= trevor@FreeBSD.org + +RUN_DEPENDS= lynx:${PORTSDIR}/www/lynx-current +LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ + vga.1:${PORTSDIR}/graphics/svgalib \ + png.4:${PORTSDIR}/graphics/png + +DOCDIR= share/doc/${PORTNAME} +PLIST= ${WRKDIR}/pkg-plist + +post-patch: + ${PERL} -pi -e 's|/etc/wb0|${LOCALBASE}/etc|g ; \ + s|/usr/local/src/wb0/font/bit|${LOCALBASE}/share/wb0/|g' \ + ${WRKSRC}/wb0.c + +pre-install: + ${ECHO} bin/wb0 > ${PLIST} +.if !defined(NOPORTDOCS) + ${ECHO} ${DOCDIR}/wb0.config.README >> ${PLIST} + ${ECHO} @dirrm ${DOCDIR} >> ${PLIST} +.endif + ${ECHO} etc/wb0.config >> ${PLIST} + for i in `find ${PREFIX}/share/wb0 -type f`; \ + do ${ECHO} share/wb0/`${BASENAME} $${i}` >> ${PLIST}; \ + done + ${ECHO} @dirrm share/wb0 >> ${PLIST} + +post-install: +.if !defined(NOPORTDOCS) + ${MKDIR} ${PREFIX}/${DOCDIR}/ + ${INSTALL_DATA} ${WRKSRC}/etc/wb0/wb0.config.README \ + ${PREFIX}/${DOCDIR} +.endif + +.include <bsd.port.mk> diff --git a/www/wb0/distinfo b/www/wb0/distinfo new file mode 100644 index 000000000000..53b89f2483cd --- /dev/null +++ b/www/wb0/distinfo @@ -0,0 +1 @@ +MD5 (wb0-000324.tgz) = d5c810cf28c314776a74ddd663bfdfff diff --git a/www/wb0/files/patch-Makefile b/www/wb0/files/patch-Makefile new file mode 100644 index 000000000000..f5c6ab7ca19f --- /dev/null +++ b/www/wb0/files/patch-Makefile @@ -0,0 +1,30 @@ +--- Makefile.orig Mon Dec 6 00:45:08 1999 ++++ Makefile Wed Jan 31 14:58:33 2001 +@@ -1,16 +1,17 @@ +- +-CFLAGS=-O2 -Wall -fomit-frame-pointer -malign-functions=0 +-LDFLAGS= -lm -s -lvga -lvgagl -ljpeg -lpng -lz ++PREFIX?= /usr/local ++CFLAGS+= -I${LOCALBASE}/include ++LDFLAGS= -L${LOCALBASE}/lib -lm -s -lvga -lvgagl -ljpeg -lpng -lz + + all: wb0 +- ++ + install: +- mkdir -p /etc/wb0 +- cp ./etc/wb0/* /etc/wb0 +- cp ./wb0 /usr/local/bin/wb0 +- echo "path `pwd`/data/" >>/etc/wb0/wb0.config +- chmod a+s /usr/local/bin/wb0 +- chown root:root /usr/local/bin/wb0 ++ mkdir -p ${PREFIX}/share/wb0 ++ cp ./wb0 ${PREFIX}/bin ++ cp ./etc/wb0/wb0.config ${PREFIX}/etc/ ++ cp ./data/* ${PREFIX}/share/wb0/ ++ echo "path ${PREFIX}/share/wb0/" >>${PREFIX}/etc/wb0.config ++ chmod a+s ${PREFIX}/bin/wb0 ++ chown root:wheel ${LOCALBASE}/bin/wb0 + + pkfont: pkfont.c + diff --git a/www/wb0/files/patch-etc_wb0_wb0.config b/www/wb0/files/patch-etc_wb0_wb0.config new file mode 100644 index 000000000000..ced1e204bd5f --- /dev/null +++ b/www/wb0/files/patch-etc_wb0_wb0.config @@ -0,0 +1,7 @@ +--- etc/wb0/wb0.config.orig Mon Dec 6 00:45:07 1999 ++++ etc/wb0/wb0.config Wed Jan 31 13:54:55 2001 +@@ -20,4 +20,3 @@ + shift_b 0 + + +-path /usr/local/src/wb0-991204/data/ diff --git a/www/wb0/files/patch-watcher.c b/www/wb0/files/patch-watcher.c new file mode 100644 index 000000000000..9d14d789c541 --- /dev/null +++ b/www/wb0/files/patch-watcher.c @@ -0,0 +1,139 @@ +--- watcher.c.orig Mon Dec 6 00:45:07 1999 ++++ watcher.c Wed Jan 31 13:42:20 2001 +@@ -2,7 +2,7 @@ + /* (c) 1999 Clocksoft */ + /* Watcher -- watches for incoming data and keyhits */ + +-#define OTHK ++//#define OTHK + //#define WATCHDOG + /* When no keyboard scan is performed during 10 seconds, the program ends. */ + +@@ -11,6 +11,7 @@ + #include <sys/types.h> + #include <unistd.h> + #include <stdlib.h> ++#include <term.h> + #include <sys/stat.h> + #include <fcntl.h> + #include <string.h> +@@ -18,10 +19,15 @@ + #include <vgakeyboard.h> + #include <signal.h> + #include <sys/ioctl.h> +-#ifndef OTHK +-#include <linux/kd.h> ++#ifdef __FreeBSD__ ++#include <sys/ioctl_compat.h> ++#include <machine/pcvt_ioctl.h> ++#include <sys/kbio.h> + #endif ++#ifdef LINUX ++#include <linux/kd.h> + #include <sys/vt.h> ++#endif + #include <sys/wait.h> + + #include "gvars.h" +@@ -38,9 +44,7 @@ + #define FILE_BUFFER_SIZE 4096 + #define min(x,y) ((x)<(y)?(x):(y)) + +-#ifndef OTHK + extern int __svgalib_tty_fd; +-#endif + + /********************* Global variables for watcher ***************************/ + +@@ -138,7 +142,7 @@ + int + reset_keyboard(void) + { +- #ifdef OTHK ++ #if 0//def OTHK + keyboard_close(); + #else + if (ioctl(__svgalib_tty_fd,KDSKBMODE,old_keyboard_mode)) +@@ -658,11 +662,11 @@ + close(fds[1]); + if (content_type==WAI_HTML||content_type==WAI_TEXT) + { +- execlp("lynx","lynx","-dump","-raw","-cfg=/etc/wb0/wb0.lynx.cfg",filename,NULL); ++ execlp("lynx","lynx","-dump","-raw","",filename,NULL); + } + else + { +- execlp("lynx","lynx","-source","-cfg=/etc/wb0/wb0.lynx.cfg",filename,NULL); ++ execlp("lynx","lynx","-source","",filename,NULL); + } + fprintf(stderr,"Unable to execlp lynx.\n"); + _exit(-1); /* Error */ +@@ -941,7 +945,11 @@ + { + /* alt-f1 ... alt-f10, alt-f11 ... alt-f12 */ + int vt; ++#ifdef __FreeBSD__ ++ struct screeninfo vts; ++#else + struct vt_stat vts; ++#endif + + if (k>=87) + {vt=11+k-87; +@@ -949,22 +957,30 @@ + else + {vt=1+k-59; + } ++#ifdef __FreeBSD__ ++ if (ioctl(__svgalib_tty_fd,VGAGETSCREEN,&vts)) ++#else + #ifdef OTHK + ioctl(keyboard_fd,VT_GETSTATE,&vts); + #else + ioctl(__svgalib_tty_fd,VT_GETSTATE,&vts); + #endif + if (vt!=vts.v_active) ++#endif + { + rightshift=leftshift=rightalt=leftalt=leftctrl=rightctrl=capslock=0; + #ifdef DEBUG_VT + printf("Trying to switch VT.\n"); + #endif ++#ifdef __FreeBSD__ ++ ioctl(__svgalib_tty_fd,VT_ACTIVATE,vt); ++#else + #ifdef OTHK + ioctl(keyboard_fd,VT_ACTIVATE,vt); + #else + ioctl(__svgalib_tty_fd,VT_ACTIVATE,vt); + #endif ++#endif + } + } + break; +@@ -1399,8 +1415,13 @@ + int + set_keyboard(void) + { ++#ifdef __FreeBSD__ ++ int sigs[]={SIGINT,SIGQUIT,SIGTERM,SIGSEGV,SIGHUP,SIGILL,SIGABRT,SIGFPE, ++ SIGBUS,SIGUSR1,SIGURG,SIGALRM}; ++#else + int sigs[]={SIGINT,SIGQUIT,SIGTERM,SIGSEGV,SIGHUP,SIGILL,SIGABRT,SIGFPE, + SIGBUS,SIGPWR,SIGSTKFLT,SIGALRM}; ++#endif + int *p; + int i; + +@@ -1436,7 +1457,11 @@ + return 1; + } + } ++#ifdef __FreeBSD__ ++ if (ioctl(__svgalib_tty_fd,KDSKBMODE,CBREAK)) ++#else + if (ioctl(__svgalib_tty_fd,KDSKBMODE,K_MEDIUMRAW)) ++#endif + { + fprintf(stderr,"Unable to set keyboard to medium-raw mode.\n"); + return 1; diff --git a/www/wb0/pkg-comment b/www/wb0/pkg-comment new file mode 100644 index 000000000000..b8d6c5369ee5 --- /dev/null +++ b/www/wb0/pkg-comment @@ -0,0 +1 @@ +Web browser for svgalib which can show pictures diff --git a/www/wb0/pkg-descr b/www/wb0/pkg-descr new file mode 100644 index 000000000000..a2d2fb6716e0 --- /dev/null +++ b/www/wb0/pkg-descr @@ -0,0 +1,9 @@ +This is a Web browser for the VGA console. It can display pictures. +It uses libjpeg, libpng, Lynx, and svgalib. + +If you have difficulties, try running it with the "m321" option. + +WWW: http://atrey.karlin.mff.cuni.cz/~clock/twibright/wb0 + +Trevor Johnson +trevor@FreeBSD.org |