plan port

This commit is contained in:
angelos 1998-05-20 07:46:06 +00:00
parent 649db4986a
commit 6c1dcac08f
15 changed files with 433 additions and 0 deletions

20
misc/plan/Makefile Normal file
View File

@ -0,0 +1,20 @@
# OpenBSD makefile for: plan
# Version required: 1.6
# Date created: May 20 1998
# Whom: Angelos D. Keromytis
#
# $OpenBSD: Makefile,v 1.1.1.1 1998/05/20 07:46:06 angelos Exp $
#
DISTNAME= plan-1.6.1
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_XCONTRIB}
MASTER_SITE_SUBDIR= applications
MAINTAINER= angelos@openbsd.org
REQUIRES_MOTIF= yes
MAN1= netplan.1 plan.1
MAN4= plan.4
.include <bsd.port.mk>

1
misc/plan/files/md5 Normal file
View File

@ -0,0 +1 @@
MD5 (plan-1.6.1.tar.gz) = 0003e582b34a80c1250cf7d3c476e7c2

View File

@ -0,0 +1,20 @@
*** Makefile.orig Sun Apr 14 21:37:39 1996
--- Makefile Sun Apr 14 21:37:32 1996
***************
*** 0 ****
--- 1,15 ----
+ #
+ # Makefile for NEdit text editor
+ #
+ # targets: sgi_nedit, hp_nedit, ultrix_nedit, ibm_nedit, sunos_nedit,
+ # solaris_nedit, dec_nedit, linux_nedit, freebsd_nedit
+ #
+ # Builds an intermediate library in util directory, then builds
+ # the nedit executable in the source directory
+ #
+
+ all:
+ (cd src; make openbsd)
+
+ install::
+ (cd src; make install)

152
misc/plan/patches/patch-ab Normal file
View File

@ -0,0 +1,152 @@
--- src/Makefile.orig Sun Apr 13 21:50:29 1997
+++ src/Makefile Thu Jun 19 14:11:42 1997
@@ -6,16 +6,22 @@
# DO NOT put a blank between the path and the #, or you'll get compile errors.
#
-DIR = /usr/local/bin# # user-callable executable (plan)
-LIB = /usr/local/lib# # auxiliary programs (pland, notifier, netplan)
-HELP = $(LIB)# # help file (plan.help)
-MAN = /usr/man/local/man# # unformatted nroff manpage (plan.[14])
-# MAN = /usr/local/man/man# # for linux
+PLANBASE = /usr/local#
+DOCBASE = $(PLANBASE)/share/doc/plan#
+NETPLAN = $(PLANBASE)/share# # netplan directory
+ECHO = echo
+DIR = $(PLANBASE)/bin# # user-callable executable (plan)
+LIB = $(DIR)# # auxiliary programs (pland, notifier, netplan)
+EXAMPLES = $(DOCBASE)/examples# # Example holiday files
+DOCS = $(DOCBASE)# # doc files
+HELP = $(DOCBASE)# # help file (plan.help)
+#MAN = /usr/man/local/man# # unformatted nroff manpage (plan.[14])
+MAN = $(PLANBASE)/man/man# # for linux and freebsd
CATMAN = /usr/catman/local/cat# # formatted manpage (plan.[14])
INCDIR =# # extra cc options, e.g. "-I/var/include"
-NOB_UID = 60001# # numerical user ID of <nobody> account
-NOB_GID = 60001# # default numerical group ID of <nobody> account
-CPP_PATH="/lib/cpp -P -I$(HELP)"# used by plan to pre-process holiday files,
+NOB_UID = 65534# # numerical user ID of <nobody> account
+NOB_GID = 65534# # default numerical group ID of <nobody> account
+CPP_PATH="/usr/bin/cpp -P -I$(DOCS)"# used by plan to pre-process holiday files,
# # plan will check if this file really exists
ESCTOISOLATIN=\"\\033\(B\"# # switching to ISO8859-1
ESCTOJISLATIN=\"\\033\(J\"# # switching to JIS X0201-1976 roman
@@ -26,9 +32,9 @@
# -DLOCALE_SJIS=\"ja_JP.SJIS\" -DLOCALE_EUC=\"ja_JP.EUC\"
# # JAPAN requires X11R5 and a Japanese env.
-DEBUG = -s
+#DEBUG = -s
#DEBUG = -g
-#DEBUG = -O2 -s # do NOT define -O2 on DEC OSF/1 machines!
+DEBUG = -O2 -s # do NOT define -O2 on DEC OSF/1 machines!
#DEFTARGET = sgi
DEFTARGET = help
@@ -55,6 +61,8 @@
# -DVARARGS use pre-ANSI varargs instead of stdargs
# -DDESTROYBUG fixes Linux XtDestroyWidget bug that kills plan when a
# Done button is used. WARNING: introduces a memory leak
+# -DSTDLIBMALLOC do not include <malloc.h>, use <stdlib.h> instead,
+# (FreeBSD)
#
# Note for HP systems: if you have the PROG-AUX option, remove -DNOREGEX
# from HP_C, and add -lPW to HP_L1. On Suns, try removing -DNOREGEX (and
@@ -105,6 +113,9 @@
BSDIG_C = -ansi -I/usr/X11/include -DBSD -DRABBITS -DNOLOCK -DNOREGEX -Dbsdi
NBSD_C = -ansi -I/usr/X11R6/include -DBSD -DRABBITS -DNOLOCK -DNOREGEX\
-DNO_MOTIF
+OBSD_C = $(CFLAGS) -ansi -I/usr/X11R6/include -DBSD -DFLOCK -DRABBITS -Dopenbsd -DSTDLIBMALLOC
+IBM_C = -O -I/usr/include/X11 -D_ALL_SOURCE -DIBM -DAIXV3 -DNOMSEP -DRABBITS
+PS2_C = -O -I/usr/include/X11 -D_POSIX_SOURCE\
LINUX_C = -D_POSIX_SOURCE -DNOLOCK -DLINUX
SVR4_C = -DSVR4 -DSYSV -DOLDTZ -DUSERAND -DPID_T=long -DNOMSEP
NEWS_C = -DNEWSOS4 -DNOMSEP -DSUN -DBSD -DRABBITS -DPID_T="int" -Dconst=""
@@ -181,6 +192,8 @@
BSDIG_L2= -L/usr/X11/lib -lc
NBSD_L1 = -L/usr/X11R6/lib -lXm -lXt -lX11
NBSD_L2 = -L/usr/X11R6/lib -lc
+OBSD_L1 = -L/usr/X11R6/lib ${MOTIFLIB} -lXt -lX11 -lXext -lc
+OBSD_L2 = -lc
LINUX_L1= -L/usr/lib/X11R6/lib -lXm -lXt -lX11 -lXpm -lc -lXext
LINUX_L2= -lc
SVR4_L1 = -lXm -lXt -lX11 -lgen -lsocket -lnsl
@@ -240,6 +253,7 @@
@echo " make bsdi BSDI/386"
@echo " make bsdig BSDI/386 with gcc"
# @echo " make netbsd NetBSD/i386 1.0A (maybe others too)"
+ @echo " make freebsd FreeBSD 2.x"
@echo " make svr4 SVR4 Using gcc"
@echo " make news4 Sony NEWS-OS4.x"
@echo " make news4g Sony NEWS-OS4.x with gcc"
@@ -349,6 +363,9 @@
netbsd:
env CF="$(NBSD_C)" L1F="$(NBSD_L1)" L2F="$(NBSD_L2)" MYCC=gcc $(MAKE) all
+openbsd:
+ env CF="$(OBSD_C)" L1F="$(OBSD_L1)" L2F="$(OBSD_L2)" MYCC=${CC} make all
+
svr4:
env CF="$(SVR4_C)" L1F="$(SVR4_L1)" L2F="$(SVR4_L2)" MYCC=gcc make all
@@ -451,13 +468,13 @@
$(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -c -DLIB=\"$(LIB)\" $<
holiday.o: holiday.c Makefile
- $(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -DCPP_PATH=\"$(CPP_PATH)\" -c -DLIB=\"$(LIB)\" $<
+ $(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -DCPP_PATH=\"$(CPP_PATH)\" -c -DLIB=\"$(DOCS)\" $<
util.o: util.c
$(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -c -DPATH=\"$(LIB):$(DIR):$(HELP)\" $<
netplan.o: netplan.c netplan_if.h
- $(MYCC) $(DEBUG) $(CF) -DNOBODY_UID=$(NOB_UID) -DNOBODY_GID=$(NOB_GID) $(INCDIR) -c -DLIB=\"$(LIB)\" $<
+ $(MYCC) $(DEBUG) $(CF) -DNOBODY_UID=$(NOB_UID) -DNOBODY_GID=$(NOB_GID) $(INCDIR) -c -DLIB=\"$(NETPLAN)\" $<
# $(MYCC) $(DEBUG) $(CF) -DNOBODY_UID=`grep nobody /etc/passwd | head -1 | awk -F: '{print $$3}'` -DNOBODY_GID=`grep nobody /etc/passwd | head -1 | awk -F: '{print $$4}'` $(INCDIR) -c -DLIB=\"$(LIB)\" $<
parser.c: parser.y
@@ -480,31 +497,25 @@
#---------------------------------------------------------------
install:
- cp plan $(DIR)
- -rm -f $(DIR)/pland $(DIR)/notifier
- cp pland notifier netplan ../misc/plan_cal.ps $(LIB)
- -test x$(JAPAN) != x && cp ../misc/plan_calSJ.ps $(LIB)
- cp ../misc/plan.help $(HELP)
- -strip $(DIR)/plan $(LIB)/pland $(LIB)/notifier $(LIB)/netplan
- -chmod 755 $(DIR)/plan $(LIB)/pland $(LIB)/notifier $(LIB)/netplan
- -chmod 644 $(HELP)/plan.help $(LIB)/plan_cal.ps
- -test x$(JAPAN) != x && chmod 644 $(LIB)/plan_calSJ.ps
- -mkdir $(LIB)/netplan.dir
- -chmod 777 $(LIB)/netplan.dir
+ ${INSTALL} -d $(DOCBASE)
+ ${INSTALL} -d $(EXAMPLES)
+ ${INSTALL} -c pland $(DIR)
+ ${INSTALL} -c -m 755 notifier netplan plan ../misc/Killpland $(LIB)
+ ${INSTALL} -c -m 644 ../misc/plan.help ../misc/plan_cal.ps \
+ ../misc/Monochrome ../misc/BlackWhite $(DOCS)
+ ${INSTALL} -c -m 755 ../misc/Mkdoc ../misc/Mkdoc.nawk $(DOCS)
+ ${INSTALL} -d $(NETPLAN)/netplan.dir
+ -chmod 777 $(NETPLAN)/netplan.dir
-test -x `which nroff` && nroff -man ../misc/plan.1 >../misc/plan.1cat
-test -x `which nroff` && nroff -man ../misc/plan.4 >../misc/plan.4cat
-test -x `which nroff` && nroff -man ../misc/netplan.1 >../misc/netplan.1cat
-test -d $(MAN)1 && cp ../misc/plan.1 $(MAN)1/plan.1
-test -d $(MAN)4 && cp ../misc/plan.4 $(MAN)4/plan.4
-test -d $(MAN)1 && cp ../misc/netplan.1 $(MAN)1/netplan.1
- -test -d $(CATMAN)1 && cp ../misc/plan.1cat $(CATMAN)1/plan.1
- -test -d $(CATMAN)4 && cp ../misc/plan.4cat $(CATMAN)4/plan.4
- -test -d $(CATMAN)1 && cp ../misc/netplan.1cat $(CATMAN)1/netplan.1
- -test -f ${HOME}/.holiday || cp ../holiday/holiday_german ${HOME}/.holiday
- -test `uname` = IRIX && mkdir $$HOME/.icons
- -test `uname` = IRIX && cp ../misc/Plan.icon $$HOME/.icons/Plan.icon
- @echo ""
- @echo "use ../holiday/* as templates for your ~/.holiday file"
+ ${INSTALL} -c -m 644 ../README $(DOCBASE)
+ ${INSTALL} -c -m 644 ../holiday/holiday_* $(EXAMPLES)
+ ${ECHO} ""
+ ${ECHO} "Use " $(EXAMPLES)"/holiday/* as templates for your ~/.holiday file"
clean:
-rm -f *.o

View File

@ -0,0 +1,50 @@
--- src/daemon.c.orig Tue Apr 1 14:40:28 1997
+++ src/daemon.c Sun Jun 22 14:17:04 1997
@@ -68,6 +68,14 @@
void *toplevel = 0; /* dummy for formfile.c */
#endif
+#if (defined BSD && !defined OSF)
+typedef union wait wait_type;
+#define WAIT_STATUS(x) (x.w_status)
+#else
+typedef int wait_type;
+#define WAIT_STATUS(x) (x)
+#endif
+
static void popup_window(), send_mail(), write_script(), exec_program();
static char *get_subject(), *get_subtitle(), *get_icontitle();
#ifdef MIPS
@@ -210,6 +218,7 @@
sleep(twait);
#endif
refresh_lock(LOCK_PATH);
+#ifndef RABBITS
#ifdef SUN
if (pw) {
struct utmp ut;
@@ -259,6 +268,7 @@
}
}
#endif
+#endif
total_wait -= twait;
}
}
@@ -411,12 +421,10 @@
int sig;
{
char path[40]; /* script to delete */
-#if (defined BSD && !defined OSF)
- union wait dummy;
-#else
- int dummy;
-#endif
- sprintf(path, "/tmp/pland%d", wait(&dummy));
+ wait_type dummy;
+
+ sprintf(path, "/tmp/pland%d", wait(&WAIT_STATUS(dummy)));
+
if (debug)
printf("%s: deleting script \"%s\"\n", progname, path);
(void)unlink(path);

View File

@ -0,0 +1,25 @@
*** src/help.c.orig Sun Apr 21 21:21:57 1996
--- src/help.c Wed Jul 31 19:23:30 1996
***************
*** 15,22 ****
*/
#include <stdio.h>
! #ifndef NEWSOS4
#include <malloc.h>
#endif
#include <Xm/Xm.h>
#include <Xm/DialogS.h>
--- 15,26 ----
*/
#include <stdio.h>
! #ifdef STDLIBMALLOC
! #include <stdlib.h>
! #else
! #ifndef NEWSOS4
#include <malloc.h>
+ #endif
#endif
#include <Xm/Xm.h>
#include <Xm/DialogS.h>

View File

@ -0,0 +1,25 @@
--- src/holiday.c.orig Thu Apr 3 21:51:40 1997
+++ src/holiday.c Thu Jun 19 14:13:49 1997
@@ -17,9 +17,13 @@
#include <stdio.h>
#include <unistd.h>
#include <time.h>
+#ifdef STDLIBMALLOC
+#include <stdlib.h>
+#else
#ifndef NEWSOS4
#include <malloc.h>
#endif
+#endif
#ifdef CPP_PATH
#include <sys/types.h>
#include <sys/stat.h>
@@ -43,7 +47,7 @@
static int calc_easter();
-#if defined(bsdi) || defined(linux) || defined(__NetBSD__)
+#if defined(bsdi) || defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
int yylineno;
#else
extern int yylineno; /* current line # being parsed */

View File

@ -0,0 +1,37 @@
*** src/netplan.c.orig Sun Apr 14 19:54:00 1996
--- src/netplan.c Sun Apr 14 19:57:23 1996
***************
*** 197,203 ****
if (FD_ISSET(fd_inet, &rd)) { /* connect */
n = sizeof(addr);
! if ((fd = accept(fd_inet, &addr, &n)) < 0)
perror(progname);
FD_SET(fd, &rd0);
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, 4);
--- 197,204 ----
if (FD_ISSET(fd_inet, &rd)) { /* connect */
n = sizeof(addr);
! fd = accept(fd_inet, (struct sockaddr *)&addr, &n);
! if (fd < 0)
perror(progname);
FD_SET(fd, &rd0);
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, 4);
***************
*** 277,283 ****
addr.sin_family = AF_INET;
addr.sin_port = serv ? serv->s_port : PORT;
addr.sin_addr.s_addr = INADDR_ANY;
! if (bind(fd, &addr, sizeof(addr)))
fatal("cannot bind to port %d, is another daemon running?",
addr.sin_port);
if (listen(fd, 100))
--- 278,284 ----
addr.sin_family = AF_INET;
addr.sin_port = serv ? serv->s_port : PORT;
addr.sin_addr.s_addr = INADDR_ANY;
! if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)))
fatal("cannot bind to port %d, is another daemon running?",
addr.sin_port);
if (listen(fd, 100))

View File

@ -0,0 +1,19 @@
*** src/sublist.c.orig Sun Apr 14 16:38:13 1996
--- src/sublist.c Sun Apr 14 16:38:34 1996
***************
*** 23,29 ****
#define regcmp re_comp
#define regex re_exec
#endif
! #ifdef linux
#define regcmp regcomp
#define regex regexec
#endif
--- 23,29 ----
#define regcmp re_comp
#define regex re_exec
#endif
! #if defined(linux) || defined(freebsd) || defined(openbsd)
#define regcmp regcomp
#define regex regexec
#endif

View File

@ -0,0 +1,15 @@
*** src/weekcalc.c.orig Thu Feb 6 16:08:42 1997
--- src/weekcalc.c Wed Apr 2 16:19:42 1997
***************
*** 9,14 ****
--- 9,18 ----
#include <stdio.h>
#include <stdlib.h>
+ #ifdef STDLIBMALLOC
+ #include <stdlib.h>
+ #else
#ifndef NEWSOS4
#include <malloc.h>
+ #endif
#endif
#include <time.h>

View File

@ -0,0 +1,15 @@
*** src/yovcalc.c.orig Thu Feb 6 16:08:47 1997
--- src/yovcalc.c Wed Apr 2 16:22:30 1997
***************
*** 9,14 ****
--- 9,18 ----
#include <stdio.h>
#include <stdlib.h>
+ #ifdef STDLIBMALLOC
+ #include <stdlib.h>
+ #else
#ifndef NEWSOS4
#include <malloc.h>
+ #endif
#endif
#include <time.h>

View File

@ -0,0 +1,15 @@
*** src/daycalc.c.orig Wed Apr 2 16:51:43 1997
--- src/daycalc.c Wed Apr 2 16:52:23 1997
***************
*** 9,14 ****
--- 9,18 ----
#include <stdio.h>
#include <stdlib.h>
+ #ifdef STDLIBMALLOC
+ #include <stdlib.h>
+ #else
#ifndef NEWSOS4
#include <malloc.h>
+ #endif
#endif
#include <time.h>

1
misc/plan/pkg/COMMENT Normal file
View File

@ -0,0 +1 @@
An X/Motif schedule planner with calendar

6
misc/plan/pkg/DESCR Normal file
View File

@ -0,0 +1,6 @@
Plan is a schedule planner based on X/Motif. It displays a month calendar
similar to xcal, but every day box is large enough to show appointments in
small print. By pressing on a day box, the appointments for that day can be
listed and edited.
This port requires Motif to build.

32
misc/plan/pkg/PLIST Normal file
View File

@ -0,0 +1,32 @@
bin/plan
bin/netplan
bin/notifier
bin/pland
bin/Killpland
share/doc/plan/Mkdoc
share/doc/plan/Mkdoc.nawk
share/doc/plan/plan.help
share/doc/plan/plan_cal.ps
share/doc/plan/examples/holiday_australia
share/doc/plan/examples/holiday_bavarian
share/doc/plan/examples/holiday_canada
share/doc/plan/examples/holiday_dutch
share/doc/plan/examples/holiday_french
share/doc/plan/examples/holiday_frswiss
share/doc/plan/examples/holiday_german
share/doc/plan/examples/holiday_italy
share/doc/plan/examples/holiday_japan
share/doc/plan/examples/holiday_quebec
share/doc/plan/examples/holiday_spain
share/doc/plan/examples/holiday_swedish
share/doc/plan/examples/holiday_uk
share/doc/plan/examples/holiday_us
share/doc/plan/BlackWhite
share/doc/plan/Monochrome
share/doc/plan/README
man/man1/netplan.1
man/man1/plan.1
man/man4/plan.4
@dirrm share/netplan.dir
@dirrm share/doc/plan/examples
@dirrm share/doc/plan