On Sat, Jul 22, 2017 at 08:40:06PM +0100, Kaashif Hymabaccus wrote:
> According to the LICENSE file:
> 
>     I tracked down John Bradley <brad...@trilon.com>, who wrote the
>     xfish program back around 1987, that xfishtank is derived from. He
>     stated the following copyright:
> 
>     > It doesn't have one - do whatever you'd like with it.  Enjoy!
>     >
>     > --jhb
> 
> This is not a real license, but it does imply we are allowed to
> distribute it, correct? This is why I set PERMIT_* to Yes. The rest of
> the program (written by other authors from 1988 onwards) is under a
> permissive license, so should be ok.

Upon further consideration, I have realised that this is not
ok. Please find an updated diff where the PERMIT_* are set to "no
license" just like before.

Also the order of the lines was a bit scrambled before, hopefully it's
better now.

diff --git Makefile Makefile
index eba5a1b45a4..7de35be4f18 100644
--- Makefile
+++ Makefile
@@ -2,23 +2,25 @@
 
 COMMENT=       fish swim in the background of your screen
 
-DISTNAME=      xfishtank-2.2
-REVISION=      1
+GH_ACCOUNT=    jim-rees
+GH_PROJECT=    xfishtank
+GH_TAGNAME=    v2.5
+
 CATEGORIES=    x11
 
-MASTER_SITES=  http://distcache.freebsd.org/ports-distfiles/
+HOMEPAGE=      http://jim.rees.org/computers/xfishtank.html
+
+MAINTAINER=    Kaashif Hymabaccus <kaas...@kaashif.co.uk>
 
 PERMIT_PACKAGE_CDROM=  no license
 PERMIT_PACKAGE_FTP=    no license
 PERMIT_DISTFILES_FTP=  no license
 
-WANTLIB=       X11 Xau Xdmcp Xext c m
+WANTLIB=       X11 Xau Xdmcp Xext c m Imlib2
 
-CONFIGURE_STYLE= imake noman
-WRKDIST=       ${WRKDIR}/xfishtank2.0
+LIB_DEPENDS=   graphics/imlib2
 
-post-patch:
-       @cd ${WRKSRC} && ${MAKE_ENV} ${MAKE_PROGRAM} clean
+CONFIGURE_STYLE= imake
 
 NO_TEST=       Yes
 
diff --git distinfo distinfo
index 5a578d98550..d1b6f90033a 100644
--- distinfo
+++ distinfo
@@ -1,2 +1,2 @@
-SHA256 (xfishtank-2.2.tar.gz) = Q5EijAdPzNc6nqgzLgkOktebon+eY2kwNfOSOH0DEiw=
-SIZE (xfishtank-2.2.tar.gz) = 360031
+SHA256 (xfishtank-2.5.tar.gz) = vYzjxOetsOYrKU3jB5csDV4qRCsJTBeKO+CE4+JqCOA=
+SIZE (xfishtank-2.5.tar.gz) = 153554
diff --git patches/patch-Imakefile patches/patch-Imakefile
index 18e2571dd34..c89f354545a 100644
--- patches/patch-Imakefile
+++ patches/patch-Imakefile
@@ -1,18 +1,14 @@
-$OpenBSD: patch-Imakefile,v 1.1 2007/10/26 23:54:56 ajacoutot Exp $
---- Imakefile.orig     Wed Dec 16 01:04:35 1992
-+++ Imakefile  Sat Oct 27 01:50:24 2007
-@@ -2,12 +2,12 @@
+$OpenBSD$
+
+Index: Imakefile
+--- Imakefile.orig
++++ Imakefile
+@@ -1,7 +1,7 @@
+  EXTRA_INCLUDES = -I./fishmaps
  LOCAL_LIBRARIES = $(XLIB)
          DEPLIBS = $(DEPXLIB)
-   SYS_LIBRARIES = -lm
--    CDEBUGFLAGS = -g
-+XCOMM    CDEBUGFLAGS = -g
+-  SYS_LIBRARIES = -lImlib2 -lm
++  SYS_LIBRARIES = -L/usr/X11R6/lib -L/usr/local/lib -lImlib2 -lm
+    MANSRCSUFFIX = 1x
  
-            SRCS = xfish.c medcut.c read.c gifread.c
-            OBJS = xfish.o medcut.o read.o gifread.o
- 
--ComplexProgramTarget(xfishtank)
-+ComplexProgramTargetNoMan(xfishtank)
- 
- xfishy.h: makeh FishList
-       ./makeh > xfishy.h
+            SRCS = xfish.c medcut.c
diff --git patches/patch-gifread_c patches/patch-gifread_c
deleted file mode 100644
index 5d3fd9cfaf8..00000000000
--- patches/patch-gifread_c
+++ /dev/null
@@ -1,11 +0,0 @@
-$OpenBSD: patch-gifread_c,v 1.1 2008/07/28 22:29:49 sthen Exp $
---- gifread.c.orig     Mon Jul 28 20:58:24 2008
-+++ gifread.c  Mon Jul 28 20:58:41 2008
-@@ -56,6 +56,7 @@
- 
- #include <X11/Xlib.h>
- #include <stdio.h>
-+#include <stdlib.h>
- #if  defined(SYSV) || defined(SVR4)
- #include <string.h>
- #else /* SYSV */
diff --git patches/patch-makeh_c patches/patch-makeh_c
deleted file mode 100644
index 035ba7ac187..00000000000
--- patches/patch-makeh_c
+++ /dev/null
@@ -1,10 +0,0 @@
-$OpenBSD: patch-makeh_c,v 1.1 2008/07/28 22:29:49 sthen Exp $
---- makeh.c.orig       Mon Jul 28 20:54:02 2008
-+++ makeh.c    Mon Jul 28 20:54:11 2008
-@@ -1,5 +1,6 @@
- 
- #include <stdio.h>
-+#include <stdlib.h>
- 
- main()
- {
diff --git patches/patch-medcut_c patches/patch-medcut_c
deleted file mode 100644
index cf8b21288c7..00000000000
--- patches/patch-medcut_c
+++ /dev/null
@@ -1,9 +0,0 @@
-$OpenBSD: patch-medcut_c,v 1.1 2008/07/28 22:29:49 sthen Exp $
---- medcut.c.orig      Mon Jul 28 20:57:39 2008
-+++ medcut.c   Mon Jul 28 20:57:44 2008
-@@ -1,4 +1,5 @@
- #include <stdio.h>
-+#include <stdlib.h>
- #include "medcut.h"
- 
- #define RED     0
diff --git patches/patch-read_c patches/patch-read_c
deleted file mode 100644
index 9d5bf6c4fd0..00000000000
--- patches/patch-read_c
+++ /dev/null
@@ -1,10 +0,0 @@
-$OpenBSD: patch-read_c,v 1.1 2008/07/28 22:29:49 sthen Exp $
---- read.c.orig        Mon Jul 28 20:58:19 2008
-+++ read.c     Mon Jul 28 20:58:45 2008
-@@ -1,5 +1,6 @@
- #include <X11/Xlib.h>
- #include <stdio.h>
-+#include <stdlib.h>
- #include "compact.h"
- #include "medcut.h"
- 
diff --git patches/patch-xfish_c patches/patch-xfish_c
deleted file mode 100644
index a7f865f30ec..00000000000
--- patches/patch-xfish_c
+++ /dev/null
@@ -1,333 +0,0 @@
-$OpenBSD: patch-xfish_c,v 1.2 2008/07/28 22:29:49 sthen Exp $
---- xfish.c.orig       Thu Dec 17 21:26:17 1992
-+++ xfish.c    Mon Jul 28 23:22:24 2008
-@@ -11,6 +11,8 @@
- 
-   *   Ported to monocrome by Jonathan Greenblatt (jon...@rover.umd.edu)
- 
-+  *     05/02/1996 Added TrueColor support by TJ Phan (p...@aur.alcatel.com)
-+
-   TODO:
- 
-       Parameter parsing needs to be redone.
-@@ -46,13 +48,24 @@
- 
- /* constants are based on rand(3C) returning an integer between 0 and 32767 */
- 
--#if defined(ultrix) || defined(sun) || defined(linux)
-+#if defined(ultrix) || defined(sun)
- #define  RAND_I_1_16   134217728
- #define  RAND_F_1_8    268435455.875
- #define  RAND_I_1_4    536870911
- #define  RAND_I_1_2   1073741823
- #define  RAND_I_3_4   1610612735
- #define  RAND_F_MAX   2147483647.0
-+#else     
-+#if defined(__FreeBSD__) || defined(__OpenBSD__)
-+#include <stdlib.h>
-+#include <unistd.h>
-+
-+#define  RAND_I_1_16   (RAND_MAX>>4)
-+#define  RAND_F_1_8    ((float)(RAND_MAX>>3))
-+#define  RAND_I_1_4    (RAND_MAX>>2)
-+#define  RAND_I_1_2    (RAND_MAX>>1)
-+#define  RAND_I_3_4    ((RAND_MAX>>2)*3)
-+#define  RAND_F_MAX    ((float)RAND_MAX)
- #else
- #define  RAND_I_1_16   2048
- #define  RAND_F_1_8    4096.0
-@@ -61,8 +74,8 @@
- #define  RAND_I_3_4   24575
- #define  RAND_F_MAX   32767.0
- #endif
-+#endif
- 
--
- extern unsigned char *ReadBitmap();
- 
- 
-@@ -850,6 +863,10 @@ putbubble(b, s, c)
-  * Find the closest color by allocating it, or picking an already allocated
-  * color
-  */
-+Visual (*visual_info) = NULL;
-+int r_mask, g_mask, b_mask;
-+int r_shift=0, g_shift=0, b_shift=0;
-+int r_bits=0, g_bits=0, b_bits=0;
- void
- FindColor(Dpy, colormap, colr)
-       Display *Dpy;
-@@ -862,6 +879,58 @@ FindColor(Dpy, colormap, colr)
-       XColor def_colrs[256];
-       int NumCells;
- 
-+      if( visual_info == NULL &&  DefaultDepth(Dpy, DefaultScreen(Dpy)) >= 16 
)
-+      {
-+         visual_info = DefaultVisual(Dpy, DefaultScreen(Dpy));
-+         r_mask = visual_info->red_mask;
-+         while( !(r_mask & 1) )
-+         {
-+            r_mask >>= 1;
-+            r_shift++;
-+         }
-+         while( r_mask & 1 )
-+         {
-+            r_mask >>= 1;
-+            r_bits++;
-+         }
-+
-+         g_mask = visual_info->green_mask;
-+         while( !(g_mask & 1) )
-+         {
-+            g_mask >>= 1;
-+            g_shift++;
-+         }
-+         while( g_mask & 1 )
-+         {
-+            g_mask >>= 1;
-+            g_bits++;
-+         }
-+
-+         b_mask = visual_info->blue_mask;
-+         while( !(b_mask &1) )
-+         {
-+            b_mask >>= 1;
-+            b_shift++;
-+         }
-+         while( b_mask & 1 )
-+         {
-+            b_mask >>= 1;
-+            b_bits++;
-+         }
-+      }
-+
-+      if( DefaultDepth(Dpy, DefaultScreen(Dpy)) > 8 )
-+      {
-+         colr->red >>= 16 - r_bits;
-+         colr->green >>= 16 - g_bits;
-+         colr->blue >>= 16 - b_bits;
-+
-+         colr->pixel = ((colr->red << r_shift) & visual_info->red_mask) |
-+            ((colr->green << g_shift) & visual_info->green_mask) |
-+            ((colr->blue << b_shift) & visual_info->blue_mask);
-+         return;
-+      }
-+
-       if (AllocCnt < climit)
-       {
-               match = XAllocColor(Dpy, colormap, colr);
-@@ -982,7 +1051,6 @@ init_colormap()
-       XColor hdef, edef;
-       struct colr_data *cdp;
-       struct colr_data colrs[256];
--      extern char *malloc();
- 
-       colormap = XDefaultColormap(Dpy, screen);
- 
-@@ -1151,6 +1219,7 @@ MakeImage(data, width, height)
-               fprintf(stderr, "Don't know how to format image for display of 
depth %d\n", depth);
-               exit(1);
-       }
-+
-       if (BitmapBitOrder(Dpy) == LSBFirst)
-       {
-               shiftstart = 0;
-@@ -1194,7 +1263,8 @@ MakeImage(data, width, height)
-                       }
-               }
-       }
--      bytesperline = (width + linepad) * depth / 8;
-+
-+      bytesperline = (width  * depth / 8 + linepad);
-       newimage = XCreateImage(Dpy, DefaultVisual(Dpy, screen), depth,
-               ZPixmap, 0, (char *)bit_data,
-               (width + linepad), height, 8, bytesperline);
-@@ -1218,7 +1288,6 @@ init_pixmap()
-       unsigned char *data;
-       register int i, j, k;
-       int cnt, wcnt;
--      extern char *malloc();
- 
-       cnt = 1;
-       cnt += Pcnt;
-@@ -1341,9 +1410,14 @@ init_pixmap()
-               free((char *)data);
-       }
- 
-+      if( DisplayPlanes(Dpy, screen) < 8 )
-+      {
-+
-               j = rwidth[k] * rheight[k];
-               x1A = (caddrt) malloc(rwidth[k] * rheight[k]);
-               p = (caddrt) xfishRasterA[k];
-+
-+
-               q = x1A;
-               for (i = 0; i < j; i++)
-               {
-@@ -1389,8 +1463,69 @@ init_pixmap()
-               xfishB[k][2] = MakeImage(x1B, rwidth[k], rheight[k]);
-               xfishB[k][1] = MakeImage(x2B, rwidth[k], rheight[k]);
- 
-+              free((char *)x1A);
-+              free((char *)x2A);
-+              free((char *)x1B);
-+              free((char *)x2B);
-+
-+      }
-+      else
-+      {
-               i = DisplayPlanes(Dpy, screen);
- 
-+              xfishA[k][2] = XGetImage(Dpy, DefaultRootWindow(Dpy), 0, 0, 
rwidth[k], rheight[k], 0, ZPixmap);
-+
-+              p = (caddrt) xfishRasterA[k];
-+
-+              for (j = 0; j < rheight[k]; j++)
-+              {
-+                 for( i = 0; i < rwidth[k]; i++ )
-+                 {
-+                    XPutPixel(xfishA[k][2], i, j, cmap[cnt + (int)(*p)]);
-+                    p++;
-+                 }
-+              }
-+
-+              xfishB[k][2] = XGetImage(Dpy, DefaultRootWindow(Dpy), 0, 0, 
rwidth[k], rheight[k], 0, ZPixmap);
-+
-+              p = (caddrt) xfishRasterB[k];
-+
-+              for (j = 0; j < rheight[k]; j++)
-+              {
-+                 for( i = 0; i < rwidth[k]; i++ )
-+                 {
-+                    XPutPixel(xfishB[k][2], i, j, cmap[cnt + (int)(*p)]);
-+                    p++;
-+                 }
-+              }
-+
-+              xfishA[k][1] = XGetImage(Dpy, DefaultRootWindow(Dpy), 0, 0, 
rwidth[k], rheight[k], 0, ZPixmap);
-+
-+              for (j = 0; j < rheight[k]; j++)
-+              {
-+                 for( i = 0; i < rwidth[k]; i++ )
-+                 {
-+                    XPutPixel(xfishA[k][1], i, j,
-+                              XGetPixel(xfishA[k][2], rwidth[k] - i -1, j));
-+                 }
-+              }
-+
-+              xfishB[k][1] = XGetImage(Dpy, DefaultRootWindow(Dpy), 0, 0, 
rwidth[k], rheight[k], 0, ZPixmap);
-+
-+              for (j = 0; j < rheight[k]; j++)
-+              {
-+                 for( i = 0; i < rwidth[k]; i++ )
-+                 {
-+                    XPutPixel(xfishB[k][1], i, j,
-+                              XGetPixel(xfishB[k][2], rwidth[k] - i - 1, j));
-+                 }
-+              }
-+
-+      }
-+
-+
-+              i = DisplayPlanes(Dpy, screen);
-+
-               pfishA[k][1] = XCreatePixmap(Dpy, wid,
-                       rwidth[k], rheight[k], i);
-               pfishA[k][2] = XCreatePixmap(Dpy, wid,
-@@ -1400,11 +1535,6 @@ init_pixmap()
-               pfishB[k][2] = XCreatePixmap(Dpy, wid,
-                       rwidth[k], rheight[k], i);
- 
--              free((char *)x1A);
--              free((char *)x2A);
--              free((char *)x1B);
--              free((char *)x2B);
--
-               if (pfishA[k][1])
-               {
-                       XPutImage(Dpy, pfishA[k][1], gc, xfishA[k][1], 0, 0,
-@@ -1465,34 +1595,6 @@ Initialize signal so that SIGUSR1 causes secure mode t
- void 
- init_signals()
- {
--      int ret;
--#ifdef linux
--      signal(SIGUSR1, toggle_secure);
--#else                 
--#if defined(MOTOROLA) || defined(SCO)
--    sigset(SIGUSR1, toggle_secure);
--#else
--    struct sigvec vec;
--
--    vec.sv_handler = toggle_secure;
--    vec.sv_mask = 0;
--    vec.sv_onstack = 0;
--
--#ifndef hpux
--    ret = sigvec(SIGUSR1, &vec, &vec);
--      if (ret != 0)
--      {
--              fprintf(stderr, "sigvec call failed\n");
--      }
--      else
--      {
--              fprintf(stderr, "sigvec call OK\n");
--      }
--#else
--    sigvector(SIGUSR1, &vec, &vec);
--#endif
--#endif /* MOTOROLA */
--#endif /* LINUX */
- }
- 
- 
-@@ -1505,7 +1607,6 @@ initialize()
-     XWindowAttributes winfo;
-     XSetWindowAttributes attr;
-     XGCValues   vals;
--    extern char *malloc();
-     XSizeHints  xsh;
-     XImage *pimage;
-     int i, size, cnt;
-@@ -1613,13 +1714,12 @@ if ((!DoClipping)||(picname[0] != '\0'))
-     xsh.height = height;
-     XSetNormalHints(Dpy, wid, &xsh);
- 
-+    XMapWindow(Dpy, wid);
-     if (picname[0] != '\0')
-     {
-       XPutImage(Dpy, PicMap, gc, pimage, 0, 0, 0, 0, Pwidth, Pheight);
-       XSetWindowBackgroundPixmap(Dpy, wid, PicMap);
-     }
--
--    XMapWindow(Dpy, wid);
- }
- 
-     binfo = (bubble *) malloc(blimit * sizeof(bubble));
-@@ -1965,9 +2065,14 @@ void 
- high_res_sleep(seconds)
-     double      seconds;
- {
--    int         fds = 0;
-     struct timeval timeout;
--
-+#if defined(__FreeBSD__) || defined(__OpenBSD__)
-+    fd_set fds;
-+    FD_ZERO(&fds);
-+#else
-+    int         fds = 0;
-+#endif    
-+    
-     timeout.tv_sec = seconds;
-     timeout.tv_usec = (seconds - timeout.tv_sec) * 1000000.0;
-     select(0, &fds, &fds, &fds, &timeout);
-@@ -1976,7 +2081,7 @@ high_res_sleep(seconds)
- 
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
--void 
-+int
- main(argc, argv)
-     int         argc;
-     char      **argv;
diff --git pkg/PLIST pkg/PLIST
index 1aa94d8e270..d7fba22a747 100644
--- pkg/PLIST
+++ pkg/PLIST
@@ -1,2 +1,3 @@
 @comment $OpenBSD: PLIST,v 1.2 2001/07/08 04:19:24 pvalchev Exp $
-bin/xfishtank
+@bin bin/xfishtank
+@man man/man1/xfishtank.1

Reply via email to