[Midnightbsd-cvs] mports [24271] trunk/astro/luna: fix build

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 9 12:22:38 EDT 2018


Revision: 24271
          http://svnweb.midnightbsd.org/mports/?rev=24271
Author:   laffer1
Date:     2018-09-09 12:22:38 -0400 (Sun, 09 Sep 2018)
Log Message:
-----------
fix build

Modified Paths:
--------------
    trunk/astro/luna/Makefile

Added Paths:
-----------
    trunk/astro/luna/files/patch-iprintf_iprintf.c
    trunk/astro/luna/files/patch-iprintf_isprintf.c
    trunk/astro/luna/files/patch-iprintf_makefile
    trunk/astro/luna/files/patch-luna.c
    trunk/astro/luna/files/patch-luna.h
    trunk/astro/luna/files/patch-makefile
    trunk/astro/luna/files/patch-pyramid.c
    trunk/astro/luna/files/patch-pyramid.h

Removed Paths:
-------------
    trunk/astro/luna/files/patch-ab
    trunk/astro/luna/files/patch-ac
    trunk/astro/luna/files/patch-ae
    trunk/astro/luna/files/patch-af
    trunk/astro/luna/files/patch-ag
    trunk/astro/luna/files/patch-iprintf-iprintf.c
    trunk/astro/luna/files/patch-iprintf-isprintf.c

Modified: trunk/astro/luna/Makefile
===================================================================
--- trunk/astro/luna/Makefile	2018-09-09 16:14:28 UTC (rev 24270)
+++ trunk/astro/luna/Makefile	2018-09-09 16:22:38 UTC (rev 24271)
@@ -1,21 +1,17 @@
-# New ports collection makefile for:	luna
-# Date created:		03 July 1996
-# Whom:			ABURAYER Rewsirow <rewsirow at ff.iij4u.or.jp>
-#
 # $MidnightBSD$
 # $FreeBSD: ports/astro/luna/Makefile,v 1.15 2006/05/03 05:14:05 edwin Exp $
-#
 
 PORTNAME=	luna
 PORTVERSION=	1.9
 PORTREVISION=	1
 CATEGORIES=	astro games
-MASTER_SITES=	http://ftp.vector.co.jp/pack/dos/edu/science/space/
+MASTER_SITES=	http://ftp.vector.co.jp/00/48/300/
 DISTNAME=	luna19s
 EXTRACT_SUFX=	.lzh
 
 MAINTAINER=	ports at MidnightBSD.org
 COMMENT=	Display the moon's phase
+
 LICENSE=	unknown
 
 EXTRACT_DEPENDS=	lha:${PORTSDIR}/archivers/lha
@@ -24,7 +20,9 @@
 EXTRACT_BEFORE_ARGS=	xtfqw=${WRKDIR}
 EXTRACT_AFTER_ARGS=	# empty
 
-NO_WRKSUBDIR=	yes
+FAKE_OPTS=	trueprefix
+WRKSRC=	${WRKDIR}
+
 PLIST_FILES=	bin/luna
 MAKEFILE=	makefile
 

Deleted: trunk/astro/luna/files/patch-ab
===================================================================
--- trunk/astro/luna/files/patch-ab	2018-09-09 16:14:28 UTC (rev 24270)
+++ trunk/astro/luna/files/patch-ab	2018-09-09 16:22:38 UTC (rev 24271)
@@ -1,92 +0,0 @@
---- 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
- #

Deleted: trunk/astro/luna/files/patch-ac
===================================================================
--- trunk/astro/luna/files/patch-ac	2018-09-09 16:14:28 UTC (rev 24270)
+++ trunk/astro/luna/files/patch-ac	2018-09-09 16:22:38 UTC (rev 24271)
@@ -1,103 +0,0 @@
---- 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;
- }

Deleted: trunk/astro/luna/files/patch-ae
===================================================================
--- trunk/astro/luna/files/patch-ae	2018-09-09 16:14:28 UTC (rev 24270)
+++ trunk/astro/luna/files/patch-ae	2018-09-09 16:22:38 UTC (rev 24271)
@@ -1,55 +0,0 @@
---- 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 */

Deleted: trunk/astro/luna/files/patch-af
===================================================================
--- trunk/astro/luna/files/patch-af	2018-09-09 16:14:28 UTC (rev 24270)
+++ trunk/astro/luna/files/patch-af	2018-09-09 16:22:38 UTC (rev 24271)
@@ -1,33 +0,0 @@
---- 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);

Deleted: trunk/astro/luna/files/patch-ag
===================================================================
--- trunk/astro/luna/files/patch-ag	2018-09-09 16:14:28 UTC (rev 24270)
+++ trunk/astro/luna/files/patch-ag	2018-09-09 16:22:38 UTC (rev 24271)
@@ -1,30 +0,0 @@
---- 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
- #

Deleted: trunk/astro/luna/files/patch-iprintf-iprintf.c
===================================================================
--- trunk/astro/luna/files/patch-iprintf-iprintf.c	2018-09-09 16:14:28 UTC (rev 24270)
+++ trunk/astro/luna/files/patch-iprintf-iprintf.c	2018-09-09 16:22:38 UTC (rev 24271)
@@ -1,56 +0,0 @@
---- iprintf/iprintf.c.orig	Thu Apr 23 16:23:14 1992
-+++ iprintf/iprintf.c	Sat Nov 22 04:11:33 2003
-@@ -13,7 +13,7 @@
- #if defined(ANSI)
- # include	<stdarg.h>
- #elif defined(UNIX)
--# include	<varargs.h>
-+# include	<stdarg.h>
- #else
-   Error : varargs.h or stdarg.h is required to compile this.
- #endif	/* ANSI or UNIX */
-@@ -52,44 +52,21 @@
- }
- 
- 
--#if defined(ANSI)
- int
- iprintf(char *format, ...)
--#elif defined(UNIX)
--int
--iprintf(format, va_alist)
--	char	*format;
--	va_dcl
--#endif	/* ANSI or UNIX */
- {
- 	va_list args;
- 
--#if defined(ANSI)
- 	va_start (args, format);
--#elif defined(UNIX)
--	va_start(args);
--#endif	/* ANSI or UNIX */
- 	return (ivprintf(format, args));
- }
- 
- 
--#if defined(ANSI)
- int
- ifprintf(FILE *stream, char *format, ...)
--#elif defined(UNIX)
--int
--ifprintf(stream, format, va_alist)
--	FILE	*stream;
--	char	*format;
--	va_dcl
--#endif	/* UNIX */
- {
- 	va_list args;
- 
--#if defined(ANSI)
- 	va_start (args, format);
--#elif defined(UNIX)
--	va_start(args);
--#endif	/* ANSI or UNIX */
- 	return (ivfprintf(stream, format, args));
- }

Deleted: trunk/astro/luna/files/patch-iprintf-isprintf.c
===================================================================
--- trunk/astro/luna/files/patch-iprintf-isprintf.c	2018-09-09 16:14:28 UTC (rev 24270)
+++ trunk/astro/luna/files/patch-iprintf-isprintf.c	2018-09-09 16:22:38 UTC (rev 24271)
@@ -1,64 +0,0 @@
---- iprintf/isprintf.c.orig	Thu Apr 23 16:23:16 1992
-+++ iprintf/isprintf.c	Sat Nov 22 04:13:54 2003
-@@ -8,13 +8,7 @@
- 
- 
- #include <stdio.h>
--#if defined(ANSI)
- # include	<stdarg.h>
--#elif defined(UNIX)
--# include	<varargs.h>
--#else
--  Error : varargs.h or stdarg.h is required to compile this.
--#endif	/* ANSI or UNIX */
- 
- 
- #if defined(ANSI)
-@@ -49,47 +43,22 @@
- }
-     
- 
--#if defined(ANSI)
- int
- isprintf(char *buf, char *format, ...)
--#elif defined(UNIX)
--int
--isprintf(buf, format, va_alist)
--	char	*buf;
--	char	*format;
--	va_dcl
--#endif	/* ANSI or UNIX */
- {
- 	int		n;
- 	va_list	args;
- 
--#if defined(ANSI)
- 	va_start (args, format);
--#elif defined(UNIX)
--	va_start(args);
--#endif	/* ANSI or UNIX */
- 	buf[n = idoprnt(i_sputn, buf, format, args)] = '\0';
- 	return (n);
- }
-     
- 
--#if defined(ANSI)
- int
- ivsprintf(char *buf, char *format, va_list args)
--#elif defined(UNIX)
--int
--ivsprintf(buf, format, va_alist)
--	char	*buf;
--	char	*format;
--	va_dcl
--#endif	/* ANSI or UNIX */
- {
- 	int		n;
--#if defined(UNIX)
--	va_list	args;
--
--	va_start(args);
--#endif	/* UNIX */
- 	buf[n = idoprnt(i_sputn, buf, format, args)] = '\0';
- 	return (n);
- }

Added: trunk/astro/luna/files/patch-iprintf_iprintf.c
===================================================================
--- trunk/astro/luna/files/patch-iprintf_iprintf.c	                        (rev 0)
+++ trunk/astro/luna/files/patch-iprintf_iprintf.c	2018-09-09 16:22:38 UTC (rev 24271)
@@ -0,0 +1,56 @@
+--- iprintf/iprintf.c.orig	2016-07-26 13:07:24 UTC
++++ iprintf/iprintf.c
+@@ -13,7 +13,7 @@
+ #if defined(ANSI)
+ # include	<stdarg.h>
+ #elif defined(UNIX)
+-# include	<varargs.h>
++# include	<stdarg.h>
+ #else
+   Error : varargs.h or stdarg.h is required to compile this.
+ #endif	/* ANSI or UNIX */
+@@ -52,44 +52,21 @@ i_fputn(stream, string, count, total_cou
+ }
+ 
+ 
+-#if defined(ANSI)
+ int
+ iprintf(char *format, ...)
+-#elif defined(UNIX)
+-int
+-iprintf(format, va_alist)
+-	char	*format;
+-	va_dcl
+-#endif	/* ANSI or UNIX */
+ {
+ 	va_list args;
+ 
+-#if defined(ANSI)
+ 	va_start (args, format);
+-#elif defined(UNIX)
+-	va_start(args);
+-#endif	/* ANSI or UNIX */
+ 	return (ivprintf(format, args));
+ }
+ 
+ 
+-#if defined(ANSI)
+ int
+ ifprintf(FILE *stream, char *format, ...)
+-#elif defined(UNIX)
+-int
+-ifprintf(stream, format, va_alist)
+-	FILE	*stream;
+-	char	*format;
+-	va_dcl
+-#endif	/* UNIX */
+ {
+ 	va_list args;
+ 
+-#if defined(ANSI)
+ 	va_start (args, format);
+-#elif defined(UNIX)
+-	va_start(args);
+-#endif	/* ANSI or UNIX */
+ 	return (ivfprintf(stream, format, args));
+ }


Property changes on: trunk/astro/luna/files/patch-iprintf_iprintf.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/astro/luna/files/patch-iprintf_isprintf.c
===================================================================
--- trunk/astro/luna/files/patch-iprintf_isprintf.c	                        (rev 0)
+++ trunk/astro/luna/files/patch-iprintf_isprintf.c	2018-09-09 16:22:38 UTC (rev 24271)
@@ -0,0 +1,64 @@
+--- iprintf/isprintf.c.orig	2016-07-26 13:07:24 UTC
++++ iprintf/isprintf.c
+@@ -8,13 +8,7 @@
+ 
+ 
+ #include <stdio.h>
+-#if defined(ANSI)
+ # include	<stdarg.h>
+-#elif defined(UNIX)
+-# include	<varargs.h>
+-#else
+-  Error : varargs.h or stdarg.h is required to compile this.
+-#endif	/* ANSI or UNIX */
+ 
+ 
+ #if defined(ANSI)
+@@ -49,47 +43,22 @@ i_sputn(dest, string, count, total_count
+ }
+     
+ 
+-#if defined(ANSI)
+ int
+ isprintf(char *buf, char *format, ...)
+-#elif defined(UNIX)
+-int
+-isprintf(buf, format, va_alist)
+-	char	*buf;
+-	char	*format;
+-	va_dcl
+-#endif	/* ANSI or UNIX */
+ {
+ 	int		n;
+ 	va_list	args;
+ 
+-#if defined(ANSI)
+ 	va_start (args, format);
+-#elif defined(UNIX)
+-	va_start(args);
+-#endif	/* ANSI or UNIX */
+ 	buf[n = idoprnt(i_sputn, buf, format, args)] = '\0';
+ 	return (n);
+ }
+     
+ 
+-#if defined(ANSI)
+ int
+ ivsprintf(char *buf, char *format, va_list args)
+-#elif defined(UNIX)
+-int
+-ivsprintf(buf, format, va_alist)
+-	char	*buf;
+-	char	*format;
+-	va_dcl
+-#endif	/* ANSI or UNIX */
+ {
+ 	int		n;
+-#if defined(UNIX)
+-	va_list	args;
+-
+-	va_start(args);
+-#endif	/* UNIX */
+ 	buf[n = idoprnt(i_sputn, buf, format, args)] = '\0';
+ 	return (n);
+ }


Property changes on: trunk/astro/luna/files/patch-iprintf_isprintf.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/astro/luna/files/patch-iprintf_makefile
===================================================================
--- trunk/astro/luna/files/patch-iprintf_makefile	                        (rev 0)
+++ trunk/astro/luna/files/patch-iprintf_makefile	2018-09-09 16:22:38 UTC (rev 24271)
@@ -0,0 +1,30 @@
+--- iprintf/makefile.orig	2016-07-26 13:07:24 UTC
++++ iprintf/makefile
+@@ -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 @@ CFLAGS = -Ox -AS -DANSI -W4
+ 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
+ #


Property changes on: trunk/astro/luna/files/patch-iprintf_makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/astro/luna/files/patch-luna.c
===================================================================
--- trunk/astro/luna/files/patch-luna.c	                        (rev 0)
+++ trunk/astro/luna/files/patch-luna.c	2018-09-09 16:22:38 UTC (rev 24271)
@@ -0,0 +1,109 @@
+--- luna.c.orig	2016-07-26 13:07:24 UTC
++++ luna.c
+@@ -25,27 +25,43 @@
+ #include	"luna.h"
+ 
+ 
+-void
++int
+ main(argc, argv)
+ 	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 @@ main(argc, argv)
+ 
+ 		today = FALSE;
+ 		tomorrow(localtmp);
+-		tomorrow(algotmp);
++		tomorrow(&algotm);
+ 	}
+ 
+ 	exit(0);
++/* NEVERREACHED */
+ }
+ 
+ 
+@@ -177,18 +194,15 @@ usage()
+ 
+ 
+ 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 @@ getoptions(argc, argv, localtmpp, algotm
+ 	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;
+ }


Property changes on: trunk/astro/luna/files/patch-luna.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/astro/luna/files/patch-luna.h
===================================================================
--- trunk/astro/luna/files/patch-luna.h	                        (rev 0)
+++ trunk/astro/luna/files/patch-luna.h	2018-09-09 16:22:38 UTC (rev 24271)
@@ -0,0 +1,20 @@
+--- luna.h.orig	2016-07-26 13:07:24 UTC
++++ luna.h
+@@ -32,7 +32,7 @@ typedef enum {
+ 
+ 
+ #if defined(ANSI)
+-	extern void		main(int argc, char **argv);
++	extern int		main(int argc, char **argv);
+ 	extern void		drawluna(int aotmoon);
+ 	extern void		usage(void);
+ 	extern void		getoptions(int argc, char **argv,
+@@ -40,7 +40,7 @@ typedef enum {
+ 	extern int		getext(int year, int mon, int day);
+ 	extern void		printextstate(int age);
+ #else
+-	extern void		main();
++	extern int		main();
+ 	extern void		drawluna();
+ 	extern void		usage();
+ 	extern void		getoptions();


Property changes on: trunk/astro/luna/files/patch-luna.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/astro/luna/files/patch-makefile
===================================================================
--- trunk/astro/luna/files/patch-makefile	                        (rev 0)
+++ trunk/astro/luna/files/patch-makefile	2018-09-09 16:22:38 UTC (rev 24271)
@@ -0,0 +1,92 @@
+--- makefile.orig	2016-07-26 13:07:24 UTC
++++ makefile
+@@ -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 @@ PROG = luna$(EXE)
+ # 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 @@ HDRSIP = iprintf/iansilib.h iprintf/ipri
+ #
+ all : $(PROG)
+ 
++install:
++	${BSD_INSTALL_PROGRAM} $(PROG) ${DESTDIR}${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 @@ luna$(O) pyramid$(O) : $(HDRSPR)
+ $(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
+ #


Property changes on: trunk/astro/luna/files/patch-makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/astro/luna/files/patch-pyramid.c
===================================================================
--- trunk/astro/luna/files/patch-pyramid.c	                        (rev 0)
+++ trunk/astro/luna/files/patch-pyramid.c	2018-09-09 16:22:38 UTC (rev 24271)
@@ -0,0 +1,33 @@
+--- pyramid.c.orig	2016-07-26 13:07:24 UTC
++++ pyramid.c
+@@ -67,7 +67,7 @@ getlocaltm()
+ 	Time_t		ltime;
+ 
+ 	time(&ltime);
+-	return (localtime(ltime));
++	return (localtime(&ltime));
+ #endif	/* MSDOS or UNIX */
+ }
+ 
+@@ -197,19 +197,14 @@ char *
+ 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);


Property changes on: trunk/astro/luna/files/patch-pyramid.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/astro/luna/files/patch-pyramid.h
===================================================================
--- trunk/astro/luna/files/patch-pyramid.h	                        (rev 0)
+++ trunk/astro/luna/files/patch-pyramid.h	2018-09-09 16:22:38 UTC (rev 24271)
@@ -0,0 +1,55 @@
+--- pyramid.h.orig	2016-07-26 13:07:24 UTC
++++ pyramid.h
+@@ -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 @@ typedef long	ABDATE;
+ # 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 @@ typedef long	ABDATE;
+  	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 */


Property changes on: trunk/astro/luna/files/patch-pyramid.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list