pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/xphoon Drag this kicking and screaming into the Ce...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d068a36ee360
branches:  trunk
changeset: 545191:d068a36ee360
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Mon Jul 28 02:45:56 2008 +0000

description:
Drag this kicking and screaming into the Century of the Fruitbat.
 - ANSIfy.
 - Use standard headers instead of rolling custom wrong decls.
 - Don't use void main.
 - Fix y2038 bugs.
 - Prune dead code.
 - Stop using outdated timezone interfaces.
 - Don't need libcompat any more.
 - Generally clean up build.

Should fix broken build on Linux, probably other non-BSD OSes as well.

PKGREVISION++.

diffstat:

 x11/xphoon/Makefile         |   10 +--
 x11/xphoon/distinfo         |   12 ++-
 x11/xphoon/patches/patch-aa |   13 ----
 x11/xphoon/patches/patch-ab |   64 +++++++++++++++----
 x11/xphoon/patches/patch-ac |  119 +++++++++++++++++++++++++++++++-----
 x11/xphoon/patches/patch-ad |   70 +++++++++++++++++++++
 x11/xphoon/patches/patch-ae |   24 +++++++
 x11/xphoon/patches/patch-af |  141 ++++++++++++++++++++++++++++++++++++++++++++
 x11/xphoon/patches/patch-ag |   33 ++++++++++
 x11/xphoon/patches/patch-ah |   16 ++++
 10 files changed, 446 insertions(+), 56 deletions(-)

diffs (truncated from 603 to 300 lines):

diff -r a951f983c25f -r d068a36ee360 x11/xphoon/Makefile
--- a/x11/xphoon/Makefile       Mon Jul 28 02:12:57 2008 +0000
+++ b/x11/xphoon/Makefile       Mon Jul 28 02:45:56 2008 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.26 2008/07/14 12:56:20 joerg Exp $
+# $NetBSD: Makefile,v 1.27 2008/07/28 02:45:56 dholland Exp $
 #
 
 DISTNAME=      xphoon.tar
 PKGNAME=       xphoon-19910918
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    x11
 MASTER_SITES=  ftp://ftp.x.org/R5contrib/
 EXTRACT_SUFX=  .Z
@@ -16,18 +16,12 @@
 WRKSRC=                ${WRKDIR}/xphoon
 USE_IMAKE=     yes
 
-MAKE_FLAGS+=   EXTRA_LOCAL_LIBS=${EXTRA_LOCAL_LIBS:Q}
-
 .include "../../mk/bsd.prefs.mk"
 
 .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32"
 GCC_REQD+=     2.95.3
 .endif
 
-.if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly" || ${OPSYS} == "FreeBSD"
-EXTRA_LOCAL_LIBS=      -lcompat
-.endif
-
 .include "../../x11/libXext/buildlink3.mk"
 .include "../../x11/libX11/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r a951f983c25f -r d068a36ee360 x11/xphoon/distinfo
--- a/x11/xphoon/distinfo       Mon Jul 28 02:12:57 2008 +0000
+++ b/x11/xphoon/distinfo       Mon Jul 28 02:45:56 2008 +0000
@@ -1,8 +1,12 @@
-$NetBSD: distinfo,v 1.2 2005/02/23 17:36:25 wiz Exp $
+$NetBSD: distinfo,v 1.3 2008/07/28 02:45:56 dholland Exp $
 
 SHA1 (xphoon.tar.Z) = 1f267a69be8b00c07d2bce97623b8eba100eac42
 RMD160 (xphoon.tar.Z) = 920b2fe6eaa47a98d6e6e3f8eff8034c0c7764ed
 Size (xphoon.tar.Z) = 95407 bytes
-SHA1 (patch-aa) = c033d65d9190b963912ed6726922acbfe5b44dc9
-SHA1 (patch-ab) = 1aa0b58125cf41bb94c708bd53402357ec031423
-SHA1 (patch-ac) = 37b241180fad657de9d40b0acc02f91fe87afd62
+SHA1 (patch-ab) = 94647ef046da68e750a2cbe387d1e775483b208c
+SHA1 (patch-ac) = fbed89ba75f4dea2e9ecb3f865b6e1499e0e4245
+SHA1 (patch-ad) = 24bc9922d8adc84b0598d0d75a6794913e776abb
+SHA1 (patch-ae) = c331c6fc4568312e586cf0827e206df157826f2b
+SHA1 (patch-af) = 540e43756f62600f4152507b5548079b64413d2c
+SHA1 (patch-ag) = ba81413b85506e4f5eeb4b5d12a9a8fc71465018
+SHA1 (patch-ah) = 72d418638535f56147ad2d624a7ecf70cc407102
diff -r a951f983c25f -r d068a36ee360 x11/xphoon/patches/patch-aa
--- a/x11/xphoon/patches/patch-aa       Mon Jul 28 02:12:57 2008 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2001/07/18 14:27:31 nra Exp $
-
---- Imakefile.orig     Wed Sep 18 21:57:31 1991
-+++ Imakefile
-@@ -11,7 +11,7 @@
- 
- 
- INCLUDES =            -I. -I$(TOP) -I$(TOP)/X11 -I$(TOP)/X11/bitmaps
--LOCAL_LIBRARIES =     $(XLIB)
-+LOCAL_LIBRARIES =     $(XLIB) $(EXTRA_LOCAL_LIBS)
- DEPLIBS =             $(DEPXLIB)
- LDLIBS =              -lm
- 
diff -r a951f983c25f -r d068a36ee360 x11/xphoon/patches/patch-ab
--- a/x11/xphoon/patches/patch-ab       Mon Jul 28 02:12:57 2008 +0000
+++ b/x11/xphoon/patches/patch-ab       Mon Jul 28 02:45:56 2008 +0000
@@ -1,23 +1,59 @@
-$NetBSD: patch-ab,v 1.1.1.1 2001/07/18 14:27:31 nra Exp $
+$NetBSD: patch-ab,v 1.2 2008/07/28 02:45:56 dholland Exp $
 
---- dtime.c.orig       Sat Sep 14 07:15:25 1991
-+++ dtime.c
-@@ -26,13 +26,17 @@
- #include <sys/timeb.h>
- #endif /*SYS5*/
- 
-+#include <sys/param.h>
-+
-+#if !(defined(BSD) && (BSD >= 199306))
- extern long time();
- struct tm* localtime();
-+#endif
+--- dtime.c.orig       1991-09-14 01:15:25.000000000 -0400
++++ dtime.c    2008-07-27 22:02:34.000000000 -0400
+@@ -19,36 +19,23 @@ static char rcsid[] =
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <time.h>
+-#ifdef  SYS5
+-extern int daylight;
+-extern long timezone;
+-#else /*SYS5*/
+-#include <sys/timeb.h>
+-#endif /*SYS5*/
+-
+-extern long time();
+-struct tm* localtime();
  
  struct tws*
- dtwstime()
+-dtwstime()
++dtwstime(void)
      {
 -    long clock;
 +    time_t clock;
  
      (void) time( &clock );
      return dlocaltime( &clock );
+     }
+ 
+ struct tws*
+-dlocaltime( clock )
+-    long* clock;
++dlocaltime( time_t *clock )
+     {
+     register struct tm* tm;
+-#ifndef SYS5
+-    struct timeb tb;
+-#endif not SYS5
+     static struct tws tw;
+ 
+-    if ( clock == (long*) 0 )
++    if ( clock == NULL )
+       return (struct tws*) 0;
+     tw.tw_flags = TW_NULL;
+ 
+@@ -63,13 +50,6 @@ dlocaltime( clock )
+     tw.tw_yday = tm->tm_yday;
+     if ( tm->tm_isdst )
+       tw.tw_flags |= TW_DST;
+-#ifndef  SYS5
+-    ftime( &tb );
+-    tw.tw_zone = -tb.timezone;
+-#else   SYS5
+-    tzset();
+-    tw.tw_zone = -( timezone / 60 );
+-#endif  SYS5
+     tw.tw_flags &= ~TW_SDAY;
+     tw.tw_flags |= TW_SEXP;
+     tw.tw_clock = *clock;
diff -r a951f983c25f -r d068a36ee360 x11/xphoon/patches/patch-ac
--- a/x11/xphoon/patches/patch-ac       Mon Jul 28 02:12:57 2008 +0000
+++ b/x11/xphoon/patches/patch-ac       Mon Jul 28 02:45:56 2008 +0000
@@ -1,25 +1,52 @@
-$NetBSD: patch-ac,v 1.1.1.1 2001/07/18 14:27:31 nra Exp $
+$NetBSD: patch-ac,v 1.2 2008/07/28 02:45:56 dholland Exp $
 
---- xphoon.c.orig      Wed Sep 18 21:57:37 1991
-+++ xphoon.c
-@@ -31,9 +31,16 @@
+--- xphoon.c.orig      1991-09-18 15:57:37.000000000 -0400
++++ xphoon.c   2008-07-27 22:02:33.000000000 -0400
+@@ -31,22 +31,22 @@ static char rcsid[] =
  
  /* Externals. */
  
-+#include <sys/param.h>
-+
-+#if (defined(BSD) && (BSD >= 199306))
+-extern char* malloc();
+-extern long time();
+-extern long random();
+-
+-extern void getbits();
+-extern double jtime();
+-extern double phase();
 +#include <stdlib.h>
 +#include <time.h>
-+#else
- extern char* malloc();
- extern long time();
- extern long random();
-+#endif
++#include "xphoon.h"
+ 
+ 
+ /* Forward routines. */
  
- extern void getbits();
- extern double jtime();
-@@ -65,7 +72,7 @@
+-static void xinit();
+-static void make_star_tiles();
+-static void hack_bits();
+-static void set_root();
+-static void cleanup();
++static void xinit(char *display_name);
++static void make_star_tiles(void);
++static void hack_bits(struct tws *t, 
++                    int bits_w, int bits_h, 
++                    char *bits,
++                    int cx, int cy, int r,
++                    int blackflag, int demoflag);
++static void set_root(int bits_w, int bits_h, char *bits, int cx, int cy, int r);
++static void cleanup(void);
+ 
+ 
+ /* Routines. */
+@@ -54,7 +54,7 @@ static void cleanup();
+ static char* argv0;
+ static int seed;
+ 
+-void
++int
+ main( argc, argv )
+     int argc;
+     char** argv;
+@@ -65,7 +65,7 @@ main( argc, argv )
      int blackflag, demoflag;
      int printpid;
      char* display_name;
@@ -28,7 +55,7 @@
      int pid, tty;
      int size;
      char* mooncopy;
-@@ -190,6 +197,7 @@
+@@ -190,6 +190,7 @@ usage:
        (void) fflush( stdout );
  
        /* Go stealth (ditch our controlling tty). */
@@ -36,7 +63,7 @@
        tty = open( "/dev/tty", 0 );
        if ( tty < 0 )
            {
-@@ -207,6 +215,9 @@
+@@ -207,6 +208,9 @@ usage:
                }
            (void) close( tty );
            }
@@ -46,3 +73,61 @@
        }
  
      size = BitmapSize( moon_w, moon_h );
+@@ -246,8 +250,7 @@ static GC copygc;
+ static GC clipgc;
+ 
+ static void
+-xinit( display_name )
+-    char* display_name;
++xinit( char *display_name )
+     {
+     Pixmap temp_pixmap;
+ 
+@@ -333,7 +336,7 @@ static Pixmap star_tile[NUM_TILES];
+ static int star_tiles_made = 0;
+ 
+ static void
+-make_star_tiles()
++make_star_tiles(void)
+     {
+     int i, j, k, r, x, y;
+     int total_prob;
+@@ -410,12 +413,11 @@ char *shades[16] = {
+                                     Tennessee */
+ 
+ static void
+-hack_bits( t, bits_w, bits_h, bits, cx, cy, r, blackflag, demoflag )
+-    struct tws* t;
+-    int bits_w, bits_h;
+-    char* bits;
+-    int cx, cy, r;
+-    int blackflag, demoflag;
++hack_bits(struct tws *t, 
++        int bits_w, int bits_h, 
++        char *bits,
++        int cx, int cy, int r,
++        int blackflag, int demoflag)
+     {
+     double jd, angphase, cphase, aom, cdist, cangdia, csund, csuang;
+     int i;
+@@ -492,10 +494,7 @@ hack_bits( t, bits_w, bits_h, bits, cx, 
+ /* set_root - set the root bitmap */
+ 
+ static void
+-set_root( bits_w, bits_h, bits, cx, cy, r )
+-    int bits_w, bits_h;
+-    char* bits;
+-    int cx, cy, r;
++set_root(int bits_w, int bits_h, char *bits, int cx, int cy, int r)
+     {
+     Pixmap moon_bitmap;
+     Pixmap mask_bitmap;
+@@ -586,7 +585,7 @@ set_root( bits_w, bits_h, bits, cx, cy, 
+     }
+ 
+ static void
+-cleanup()
++cleanup(void)
+     {
+     int i;
+ 
diff -r a951f983c25f -r d068a36ee360 x11/xphoon/patches/patch-ad



Home | Main Index | Thread Index | Old Index