Fix MASTER_SITES

Divide patch-aa into patch-a[b-g]

PR: 16865
Submitted by: KATO Tsuguru <tkato@prontomail.ne.jp>
No response from: maintainer
This commit is contained in:
Satoshi Taoka
2000-02-21 16:44:15 +00:00
parent 4923e5cdab
commit 111db80c3d
8 changed files with 319 additions and 9 deletions
+5 -7
View File
@@ -6,10 +6,10 @@
# $FreeBSD$
#
DISTNAME= luna19
DISTNAME= luna19s
PKGNAME= luna-1.9
CATEGORIES= astro games
MASTER_SITES= ftp://ftp.ae.keio.ac.jp/pub/msdos/utils/
MASTER_SITES= ftp://ftp.vector.co.jp/pack/dos/edu/science/space/
EXTRACT_SUFX= .lzh
MAINTAINER= rewsirow@ff.iij4u.or.jp
@@ -17,12 +17,10 @@ MAINTAINER= rewsirow@ff.iij4u.or.jp
BUILD_DEPENDS= lha:${PORTSDIR}/archivers/lha
EXTRACT_CMD= lha
EXTRACT_BEFORE_ARGS= xfw=${WRKDIR}
EXTRACT_BEFORE_ARGS= xtfqw=${WRKDIR}
EXTRACT_AFTER_ARGS= # empty
PATCH_STRIP= -p1
post-extract:
@${ECHO_MSG} "===> Removing object files for ${DISTNAME}"
@(cd ${WRKDIR}/luna19/iprintf; ${RM} -fr *.o)
NO_WRKSUBDIR= yes
MAKEFILE= makefile
.include <bsd.port.mk>
+1 -1
View File
@@ -1 +1 @@
MD5 (luna19.lzh) = 128166e7c6f94f37717adf17cb10f36d
MD5 (luna19s.lzh) = 07b2c53ccb7b5d4761412f569c0531bd
+92
View File
@@ -0,0 +1,92 @@
--- makefile.orig Sun May 24 03:57:22 1992
+++ makefile Mon Feb 21 02:45:58 2000
@@ -2,23 +2,24 @@
# Makefile for luna using BSD cc
#
-MAKEFILE = Makefile
+#MAKEFILE = Makefile
OPTDEF = -DBOX
# MSDOS
-CC = cl
-CFLAGS = -Ox -AS -DANSI -W4 $(OPTDEF)
-LD = link
-LDFLAGS = -NOI
-O = .obj
-EXE = .exe
+#CC = cl
+#CFLAGS = -Ox -AS -DANSI -W4 $(OPTDEF)
+#LD = link
+#LDFLAGS = -NOI
+#O = .obj
+#EXE = .exe
# UNIX
-#CC = cc
-#CFLAGS = -Ox -DUNIX $(OPTDEF)
-#LD = cc
-#LDFLAGS =
-#O = .o
-#EXE =
+CC ?= cc
+CFLAGS += -DUNIX $(OPTDEF)
+LD = cc
+LDFLAGS =
+O = .o
+EXE =
+IANSILIB = iprintf/iansilib.o
# The program name
PROG = luna$(EXE)
@@ -26,7 +27,8 @@
# All modules
SRCS = famplan.c luna.c pyramid.c
OBJS = famplan$(O) luna$(O) pyramid$(O)
-OBJSIP = iprintf/idoprnt$(O) iprintf/iprintf$(O) iprintf/isprintf$(O)
+OBJSIP = iprintf/idoprnt$(O) iprintf/iprintf$(O) iprintf/isprintf$(O) \
+ $(IANSILIB)
HDRS = luna.h
HDRSPR = pyramid.h
HDRSIP = iprintf/iansilib.h iprintf/iprint.h
@@ -35,13 +37,18 @@
#
all : $(PROG)
+install:
+ ${BSD_INSTALL_PROGRAM} $(PROG) ${PREFIX}/bin
+clean:
+ rm -fr $(OBJS) $(OBJSIP) $(PROG)
+
# MSDOS
-$(PROG) : $(OBJS) $(OBJSIP)
- $(LD) @link.i
+#$(PROG) : $(OBJS) $(OBJSIP)
+# $(LD) @link.i
# $(LD) $(LDFLAGS) $(OBJS) $(OBJSIP), $(PROG);
# UNIX
-#$(PROG) : $(OBJS) $(OBJSIP)
-# $(LD) -o $(PROG) $(OBJS) $(OBJSIP) $(LDFLAGS)
+$(PROG) : $(OBJS) $(OBJSIP)
+ $(LD) -o $(PROG) $(OBJS) $(OBJSIP) $(LDFLAGS)
$(OBJS) : $(HDRS)
@@ -50,13 +57,13 @@
$(OBJS) : $(MAKEFILE)
# UNIX
-#$(OBJSIP) : $(HDRSIP)
-# ( cd iprintf; make )
+$(OBJSIP) : $(HDRSIP)
+ ( cd iprintf; ${MAKE} )
# MSDOS
$(OBJSIP) : $(HDRSIP)
- cd iprintf
- make
- cd ..
+# cd iprintf
+# make
+# cd ..
#
# Other dependencies
#
+103
View File
@@ -0,0 +1,103 @@
--- luna.c.orig Mon May 25 01:01:32 1992
+++ luna.c Mon Feb 21 02:23:14 2000
@@ -30,22 +30,38 @@
int argc;
char **argv;
{
- int aotmoon, i;
- struct tm *localtmp, *algotmp;
- char *chp;
+ int aotmoon, tzhere,
+ i;
+ struct tm *localtmp, algotm;
+ char *chp, *envp, *tzname;
- getoptions(argc, argv, &localtmp, &algotmp);
+ getoptions(argc, argv, &localtmp);
+ envp = getenv("TZ");
+ if ((envp = getenv("TZ")) == NULL ||
+ (chp = strchr(envp, '-')) == NULL && (chp = strchr(envp, '+')) == NULL
+ ) {
+ tzhere = TZ_DFL;
+ } else {
+ tzhere = atoi(chp);
+ }
+ tzconv(&algotm, localtmp, tzhere - TZ_ALGO);
+/*printf("%d %d:%d\n", algotm.tm_mday, algotm.tm_hour, algotm.tm_min);*/
+
for (i = 0; i < bdate; i++) {
if (extluna) {
aotmoon = getext(localtmp -> tm_year, localtmp -> tm_mon,
localtmp -> tm_mday);
} else {
- aotmoon = getmoon(algotmp -> tm_year, algotmp -> tm_yday);
+ aotmoon = getmoon(algotm.tm_year, algotm.tm_yday);
}
+
+ if ((tzname = getenv("TZ")) == NULL) {
+ tzname = TZNAME_DFL;
+ }
chp = Asctime(localtmp);
chp[LASCTIME - 2] = 0;
- printf("%s", chp);
+ printf("%s %3.3s", chp, tzname);
if (numonly) {
printf(" ");
@@ -62,10 +78,11 @@
today = FALSE;
tomorrow(localtmp);
- tomorrow(algotmp);
+ tomorrow(&algotm);
}
exit(0);
+/* NEVERREACHED */
}
@@ -177,18 +194,15 @@
void
-getoptions(argc, argv, localtmpp, algotmpp)
+getoptions(argc, argv, localtmpp)
int argc;
char **argv;
struct tm **localtmpp;
- struct tm **algotmpp;
{
- int argnum[3], argnumcnt,
- tzhere;
- char *chp, *envp;
+ int argnum[3], argnumcnt;
+ char *chp;
register int j, i;
BOOLEAN namedmon, followname;
- static struct tm algotm;
struct tm *localtmp;
argnumcnt = 0;
@@ -375,20 +389,7 @@
localtmp -> tm_yday
= ymd2yday(localtmp -> tm_year, localtmp -> tm_mon,
localtmp -> tm_mday);
-
- envp = getenv("TZ");
- if ((envp = getenv("TZ")) == NULL ||
- (chp = strchr(envp, '-')) == NULL && (chp = strchr(envp, '+')) == NULL
- ) {
- tzhere = TZ_DFL;
- } else {
- tzhere = atoi(chp);
- }
- tzconv(&algotm, localtmp, tzhere - TZ_ALGO);
-printf("%d %d:%d\n", algotm.tm_mday, algotm.tm_hour, algotm.tm_min);
-
*localtmpp = localtmp;
- *algotmpp = &algotm;
return;
}
+55
View File
@@ -0,0 +1,55 @@
--- pyramid.h.orig Mon May 25 01:24:12 1992
+++ pyramid.h Mon Feb 21 02:23:55 2000
@@ -14,13 +14,16 @@
# include <dos.h>
# include <stdlib.h>
# include <string.h>
-# define LASCTIME (30)
+# define LASCTIME (26)
#else /* UNIX */
-# include <sys/time.h>
+/*# include <sys/time.h>*/
+# include <time.h>
typedef time_t Time_t;
# include <memory.h>
-# define LASCTIME (30)
+# define LASCTIME (26)
+ extern char *asctime();
+ extern char *getenv();
#endif /* MSDOS or not */
typedef long ABDATE;
@@ -52,15 +55,6 @@
# if defined(MSDOS)
extern char *Asctime(struct tm *tmp);
extern char *capitalize(char *chp);
-# define Tolower(cc) tolower(cc)
-# define Toupper(cc) toupper(cc)
-# else /* MSDOS */
-# define Asctime asctime
-/*# define Tolower(cc) \
-/* (('A' <= (cc) && (cc) <= 'Z') ? ((cc) - 'A' + 'a') : (cc))
-/*# define Toupper(cc) \
-/* (('a' <= (cc) && (cc) <= 'z') ? ((cc) - 'a' + 'A') : (cc))
- */
# endif /* ANSI and MSDOS */
#else /* ANSI */
@@ -69,3 +63,16 @@
extern void tzconv();
extern void tomorrow();
#endif /* ANSI or not */
+
+
+#if defined(MSDOS)
+# define Tolower(cc) tolower(cc)
+# define Toupper(cc) toupper(cc)
+
+#else
+# define Asctime asctime
+# define Tolower(cc) \
+ (('A' <= (cc) && (cc) <= 'Z') ? ((cc) - 'A' + 'a') : (cc))
+# define Toupper(cc) \
+ (('a' <= (cc) && (cc) <= 'z') ? ((cc) - 'a' + 'A') : (cc))
+#endif /* MSDOS */
+33
View File
@@ -0,0 +1,33 @@
--- pyramid.c.orig Mon May 25 01:26:10 1992
+++ pyramid.c Mon Feb 21 02:23:51 2000
@@ -67,7 +67,7 @@
Time_t ltime;
time(&ltime);
- return (localtime(ltime));
+ return (localtime(&ltime));
#endif /* MSDOS or UNIX */
}
@@ -197,19 +197,14 @@
Asctime(struct tm *tmp)
{
static char s[LASCTIME];
- char *tzname;
- if ((tzname = getenv("TZ")) == NULL) {
- tzname = TZNAME_DFL;
- }
- sprintf(s, "%s %s %2d %02d:%02d:%02d %4d %3.3s\n",
+ sprintf(s, "%s %s %2d %4d %02d:%02d:%02d\n",
downame[ymd2wday(tmp -> tm_year, tmp -> tm_mon,
tmp -> tm_mday)],
capitalize(monname[tmp -> tm_mon]),
tmp -> tm_mday,
- tmp -> tm_hour, tmp -> tm_min, tmp -> tm_sec,
tmp -> tm_year + 1900,
- tzname
+ tmp -> tm_hour, tmp -> tm_min, tmp -> tm_sec,
);
return (s);
+30
View File
@@ -0,0 +1,30 @@
--- iprintf/makefile.orig Sun May 10 03:03:06 1992
+++ iprintf/makefile Sat Feb 12 23:27:55 2000
@@ -3,11 +3,11 @@
#
# MSDOS
-CC = cl
-CFLAGS = -Ox -AS -DANSI -W4
+#CC = cl
+#CFLAGS = -Ox -AS -DANSI -W4
# UNIX
-#CC = cc
-#CFLAGS = -O -DUNIX
+CC ?= cc
+CFLAGS += -DUNIX
#
# All modules
@@ -15,9 +15,9 @@
SRCS = iansilib.c idoprnt.c iprintf.c isprintf.c
# MSDOS
-OBJS = iansilib.obj idoprnt.obj iprintf.obj isprintf.obj
+#OBJS = iansilib.obj idoprnt.obj iprintf.obj isprintf.obj
# UNIX
-#OBJS = iansilib.o idoprnt.o iprintf.o isprintf.o
+OBJS = iansilib.o idoprnt.o iprintf.o isprintf.o
HDRS = iansilib.h iprint.h
#
-1
View File
@@ -1,2 +1 @@
bin/luna
@comment man/ja_JP.euc/cat1/luna.1.gz