aboutsummaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorSatoshi Taoka <taoka@FreeBSD.org>1999-03-18 05:51:46 +0000
committerSatoshi Taoka <taoka@FreeBSD.org>1999-03-18 05:51:46 +0000
commit7e7b6c424cfe1cf59b22ebc135c87d8880b1df0b (patch)
treecf972c205a6f772e3ee39afcf3e2b9b5c1e8a58a /comms
parent1866e87c1a73008ffcdc2e271debd2d8834f2f96 (diff)
downloadports-7e7b6c424cfe1cf59b22ebc135c87d8880b1df0b.tar.gz
ports-7e7b6c424cfe1cf59b22ebc135c87d8880b1df0b.zip
Notes
Diffstat (limited to 'comms')
-rw-r--r--comms/asmodem/Makefile24
-rw-r--r--comms/asmodem/distinfo1
-rw-r--r--comms/asmodem/files/patch-aa114
-rw-r--r--comms/asmodem/files/patch-ab25
-rw-r--r--comms/asmodem/pkg-comment1
-rw-r--r--comms/asmodem/pkg-descr6
-rw-r--r--comms/asmodem/pkg-plist2
7 files changed, 173 insertions, 0 deletions
diff --git a/comms/asmodem/Makefile b/comms/asmodem/Makefile
new file mode 100644
index 000000000000..2763286540c6
--- /dev/null
+++ b/comms/asmodem/Makefile
@@ -0,0 +1,24 @@
+# New ports collection makefile for: asmodem
+# Version required: 0.6
+# Date created: 11 May 1998
+# Whom: Sean Cole <scole@aracnet.com>
+#
+# $Id$
+#
+
+DISTNAME= asmodem-0.6
+CATEGORIES= comms x11
+MASTER_SITES= ftp://afterstep.foo.net/pub/AfterStep/apps/asmodem/ \
+ ftp://ftp.cs.tu-berlin.de/pub/X/afterstep/apps/asmodem/
+
+MAINTAINER= ports@FreeBSD.ORG
+
+LIB_DEPENDS= Xpm.4:${PORTSDIR}/graphics/xpm
+
+USE_GMAKE= yes
+USE_IMAKE= yes
+
+post-install:
+ strip ${PREFIX}/bin/asmodem
+
+.include <bsd.port.mk>
diff --git a/comms/asmodem/distinfo b/comms/asmodem/distinfo
new file mode 100644
index 000000000000..e4b5c71c7967
--- /dev/null
+++ b/comms/asmodem/distinfo
@@ -0,0 +1 @@
+MD5 (asmodem-0.6.tar.gz) = 601b8cc81a741011046b5dfcb3224f22
diff --git a/comms/asmodem/files/patch-aa b/comms/asmodem/files/patch-aa
new file mode 100644
index 000000000000..1ab65d00646a
--- /dev/null
+++ b/comms/asmodem/files/patch-aa
@@ -0,0 +1,114 @@
+--- asmodem-0.6/asmodem.c Mon May 11 15:38:04 1998
++++ asmodem.c Mon May 11 15:58:52 1998
+@@ -22,8 +22,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
+-#include <linux/ppp_defs.h>
+-
++#include <net/if_ppp.h>
+
+ /* XPM struct and icons ******************************************************/
+ typedef struct _XpmIcon {
+@@ -58,7 +57,7 @@
+ #define DEFINTERVAL 3 /* Default interval 2 sec */
+ #define TRUE 1;
+ #define FALSE 0;
+-#define DEFAULTMODEM "/var/lock/LCK..modem"
++#define DEFAULTMODEM "/var/run/cuaa1.if"
+
+ int withdrawn= FALSE;
+ Display *Disp;
+@@ -109,8 +108,8 @@
+ fprintf(stderr,"options:\n");
+ fprintf(stderr," -w withdrawn mode (For WindowMaker's Dock)\n");
+ fprintf(stderr," -s transparent edge mode\n");
+- fprintf(stderr," -m <file> modem lockfile (ie /var/lock/LCK..cua1) \n");
+- fprintf(stderr," default is /var/lock/LCK..modem (/dev/modem) \n");
++ fprintf(stderr," -m <file> modem lockfile (ie /var/lock/LCK..modem) \n");
++ fprintf(stderr," default is /var/run/cuaa1.if \n");
+ fprintf(stderr," -u <sec> update frequency (default 5 sec)\n");
+ fprintf(stderr," -p [+|-]x[+|-]y position of asmodem\n");
+ fprintf(stderr," -d <program> program to execute on click while disconnected (dial?)\n");
+@@ -293,7 +292,7 @@
+ {
+ XEvent Event;
+ XpmIcon Prev;
+- struct ifreq ifreq;
++ struct ifpppstatsreq ifreq;
+ struct ppp_stats stats;
+ int rb, tb;
+
+@@ -309,13 +308,14 @@
+ }
+ //fprintf(stderr, "x ");
+ if (CarrierOn) {
+- memset(&ifreq, 0, sizeof(ifreq));
+- strcpy(ifreq.ifr_ifrn.ifrn_name, "ppp0");
+- ifreq.ifr_ifru.ifru_data = (caddr_t)&stats;
+- if ((ioctl(sock,SIOCDEVPRIVATE,(caddr_t)&ifreq) < 0)){
++ memset(&ifreq, 0, sizeof(ifreq));
++
++ strcpy(ifreq.ifr_name, "ppp0");
++ if ((ioctl(sock,SIOCGPPPSTATS,&ifreq) < 0)){
+ fprintf(stderr, "asmodem: ioctl f*cked\n");
+ prb = ptb = 0;
+ } else {
++ stats = ifreq.stats;
+ rb = stats.p.ppp_ibytes;
+ tb = stats.p.ppp_obytes;
+ if (rb > prb) {
+@@ -398,14 +398,14 @@
+ /****************************************************************************/
+ int IsNewMail(char *Mbox)
+ {
++
+ FILE* MailFile;
+ int Ret = 0;
+ char Buffer[30] = "";
+ int WasStatus = 1;
+ int NewMailn = 0;
+
+- MailFile = fopen(Mbox, "r");
+-
++/* MailFile = fopen(Mbox, "r");
+ while(!feof(MailFile))
+ {
+ fgets(Buffer, 29, MailFile);
+@@ -420,6 +420,8 @@
+ fclose(MailFile);
+
+ return (NewMailn||!WasStatus);
++*/
++ return 0;
+ }
+
+ /****************************************************************************/
+@@ -427,8 +429,9 @@
+ {
+ FILE* MailFile = 0;
+ int Ret = 0;
++
++/* MailFile = fopen(Mbox, "r");
+
+- MailFile = fopen(Mbox, "r");
+ if(MailFile == 0)
+ Ret = 0;
+ else
+@@ -441,7 +444,15 @@
+ }
+ fclose(MailFile);
+
+- return Ret;
++ return Ret;
++*/
++
++ if ((MailFile=fopen(Mbox,"r"))==NULL)
++ return 0;
++ else {
++ fclose(MailFile);
++ return 1;
++ }
+ }
+
+ /****************************************************************************/
diff --git a/comms/asmodem/files/patch-ab b/comms/asmodem/files/patch-ab
new file mode 100644
index 000000000000..38ffd94830ad
--- /dev/null
+++ b/comms/asmodem/files/patch-ab
@@ -0,0 +1,25 @@
+--- asmodem-0.6/asmodem.man Mon May 11 17:01:06 1998
++++ asmodem.man Mon May 11 17:23:34 1998
+@@ -1,4 +1,4 @@
+-.TH asmodem 0.4 "15 Sept 1996" asmail
++.TH asmodem 0.6 "15 Sept 1996" asmail
+ .UC
+ .SH NAME
+ \fBasmail\fP \- AfterStep Modem
+@@ -102,10 +102,16 @@
+ asmodem: http://www.cs.hope.edu/~malda/
+ .RE
+ asmail:http://www.rby.hk-r.se/~pt95pli/
++.RE
++afterstep:http://www.afterstep.org/
++.SH FREEBSD PORT
+
++Note that the FreeBSD port uses /var/run/cuaa1.if as its default lockfile and the names of the serial devices (modems) are spelled with two aa's (e.g. /dev/cuaa1 ).
+
++Modified May 1998 for FreeBSD.
+
+
++
+
+
+
diff --git a/comms/asmodem/pkg-comment b/comms/asmodem/pkg-comment
new file mode 100644
index 000000000000..a48eaca76b64
--- /dev/null
+++ b/comms/asmodem/pkg-comment
@@ -0,0 +1 @@
+Displays the modem status, designed to match AfterStep
diff --git a/comms/asmodem/pkg-descr b/comms/asmodem/pkg-descr
new file mode 100644
index 000000000000..1cca9e9b2835
--- /dev/null
+++ b/comms/asmodem/pkg-descr
@@ -0,0 +1,6 @@
+Asmodem displays the modem status in an Afterstep type window. It was
+adapted from asmail. It indicates the status of your modem with 3
+blinking lights that indicate when the modem is connected, transmitting,
+and receiving. It is especially useful for internal modems.
+It can execute programs to dial, re-dial, and hang-up when clicked on.
+It only works on device ppp0.
diff --git a/comms/asmodem/pkg-plist b/comms/asmodem/pkg-plist
new file mode 100644
index 000000000000..23617dee8afd
--- /dev/null
+++ b/comms/asmodem/pkg-plist
@@ -0,0 +1,2 @@
+bin/asmodem
+man/man1/asmodem.1.gz