git: edc6ad59fbad - main - x11/fireflies: Update to 2.08

From: Felix Palmen <zirias_at_FreeBSD.org>
Date: Sun, 22 Oct 2023 06:13:34 UTC
The branch main has been updated by zirias:

URL: https://cgit.FreeBSD.org/ports/commit/?id=edc6ad59fbad705d00718813055e18ed177c85c2

commit edc6ad59fbad705d00718813055e18ed177c85c2
Author:     Felix Palmen <zirias@FreeBSD.org>
AuthorDate: 2023-10-20 16:28:59 +0000
Commit:     Felix Palmen <zirias@FreeBSD.org>
CommitDate: 2023-10-22 06:13:16 +0000

    x11/fireflies: Update to 2.08
    
    Turned out there is a somewhat well-hidden new release available from
    GitHub, it wasn't even mentioned on the new project homepage. This
    version fixes build issues, it builds without local patches. There's
    also at least some activity on the repository, so no need to deprecate
    this port right now.
    
    A fixed libgfx is now integrated in the source tree, so use this instead
    of the external dependency.
    
    Take maintainership.
---
 x11/fireflies/Makefile                    | 63 ++++++++++++++++++++-----------
 x11/fireflies/distinfo                    |  5 ++-
 x11/fireflies/files/patch-Make.include.in | 13 -------
 x11/fireflies/files/patch-Makefile        | 17 ---------
 x11/fireflies/files/patch-src-main.cc     | 49 ------------------------
 x11/fireflies/files/patch-warnings        | 43 ---------------------
 x11/fireflies/pkg-descr                   |  6 ++-
 x11/fireflies/pkg-plist                   |  2 -
 8 files changed, 49 insertions(+), 149 deletions(-)

diff --git a/x11/fireflies/Makefile b/x11/fireflies/Makefile
index f7d50bebd694..fdf8fca5069f 100644
--- a/x11/fireflies/Makefile
+++ b/x11/fireflies/Makefile
@@ -1,34 +1,53 @@
-PORTNAME=	fireflies
-PORTVERSION=	2.07
-PORTREVISION=	9
-CATEGORIES=	x11
-MASTER_SITES=	${WWW}/files/
+PORTNAME=		fireflies
+DISTVERSIONPREFIX=	v
+DISTVERSION=		2.08
+CATEGORIES=		x11
 
-MAINTAINER=	ports@FreeBSD.org
-COMMENT=	Extension of xscreensaver
-WWW=		https://mpcomplete.org/proj/fireflies
+MAINTAINER=	zirias@FreeBSD.org
+COMMENT=	Fireflies screensaver, for use with xscreensaver
 
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-DEPRECATED=		unmaintained upstream since dec 2005
-EXPIRATION_DATE=	2023-12-31
+LIB_DEPENDS=	libargp.so:devel/argp-standalone
 
-LIB_DEPENDS=	libgfx.so:graphics/libgfx
+USES=		autoreconf gl gmake localbase:ldflags xorg
+USE_GITHUB=	yes
+GH_ACCOUNT=	mpcomplete
+USE_GL=		gl glu
+USE_XORG=	x11
 
 GNU_CONFIGURE=	yes
-USES=		gl
-USE_GL=		gl glu
-EXTRACT_AFTER_ARGS=--exclude '${DISTNAME}/libgfx*'
+CONFIGURE_ARGS=	--with-bindir=${PREFIX}/${XSSHACKSDIR} \
+		--with-confdir=${PREFIX}/${XSSCONFDIR} \
+		ac_cv_lib_jpeg_jpeg_start_compress=no \
+		ac_cv_lib_png_png_read_image=no \
+		ac_cv_lib_tiff_TIFFOpen=no
+
+CPPFLAGS+=	-DHAVE_BOOL
+LDFLAGS+=	-largp
+
+PLIST_FILES=	${XSSHACKSDIR}/fireflies \
+		${XSSCONFDIR}/fireflies.xml
+
+OPTIONS_DEFINE=	SDL
+SDL_DESC=	SDL support, needed for running standalone
+
+SDL_USES=		sdl
+SDL_USE=		SDL=sdl
+SDL_CONFIGURE_OFF=	ac_cv_prog_SDL_CONF=""
+
+XSSHACKSDIR=	bin/xscreensaver-hacks
+XSSCONFDIR=	share/xscreensaver/config
 
-CPPFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/GL
-LDFLAGS+=	-L${LOCALBASE}/lib
-CONFIGURE_ARGS=	--with-bindir=${LOCALBASE}/bin/xscreensaver-hacks \
-		--with-confdir=${LOCALBASE}/share/xscreensaver/config
-PLIST_SUB=	VERSION=${PORTVERSION}
+# The bundled libgfx has an "automagic" dependency on FLTK that can't be
+# overridden, therefore forcefully disable FLTK after configure.
+post-configure:
+		@${REINPLACE_CMD} -E '/(^|HAVE_)FLTK/d' \
+			${WRKSRC}/libgfx/include/gfx/config.h \
+			${WRKSRC}/libgfx/gfx-config
 
-MAKE_ARGS=	CONFIGURE_ENV=${CONFIGURE_ENV:Q} \
-		CONFIGURE_SCRIPT=${CONFIGURE_SCRIPT:Q} \
-		CONFIGURE_ARGS=${CONFIGURE_ARGS:Q}
+post-install:
+		@${STRIP_CMD} ${STAGEDIR}${PREFIX}/${XSSHACKSDIR}/fireflies
 
 .include <bsd.port.mk>
diff --git a/x11/fireflies/distinfo b/x11/fireflies/distinfo
index a99ea0fd04a3..0a67515713dc 100644
--- a/x11/fireflies/distinfo
+++ b/x11/fireflies/distinfo
@@ -1,2 +1,3 @@
-SHA256 (fireflies-2.07.tar.gz) = e215d5306340aed25a103bd6af34b6d3ef0d9f2628c56d3a67b2eb4a9f19a648
-SIZE (fireflies-2.07.tar.gz) = 199917
+TIMESTAMP = 1697799941
+SHA256 (mpcomplete-fireflies-v2.08_GH0.tar.gz) = 1372a3948a1ab93319dfcd9b3ae1cc7393ef4798f6390fc0d6be72e07e0b22b0
+SIZE (mpcomplete-fireflies-v2.08_GH0.tar.gz) = 134204
diff --git a/x11/fireflies/files/patch-Make.include.in b/x11/fireflies/files/patch-Make.include.in
deleted file mode 100644
index d7a8817262d8..000000000000
--- a/x11/fireflies/files/patch-Make.include.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- Make.include.in.orig	Thu Apr 17 14:02:52 2003
-+++ Make.include.in	Sat Feb 11 15:17:29 2006
-@@ -5,8 +5,8 @@
- GL_LIBS = @GL_LIBS@
- OPT_LIBS = @OPT_LIBS@
- 
--CFLAGS = -Wall -I../libgfx/include/ $(SDL_CFLAGS) @CFLAGS@
--LIBS = ../libgfx/src/libgfx.a $(GL_LIBS) $(SDL_LIBS) $(OPT_LIBS) @LIBS@
-+CFLAGS = -Wall -I$(LOCALBASE)/include $(SDL_CFLAGS) @CFLAGS@
-+LIBS = $(SDL_LIBS) $(OPT_LIBS) -L$(LOCALBASE)/lib -lgfx $(GL_LIBS) @LIBS@ -lX11
- 
- OBJECTS = arrow.o bait.o firefly.o scene.o tail.o utils.o modes.o @OPT_OBJS@
- PROGRAM = @PROGRAM@
diff --git a/x11/fireflies/files/patch-Makefile b/x11/fireflies/files/patch-Makefile
deleted file mode 100644
index eacff238ea51..000000000000
--- a/x11/fireflies/files/patch-Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
---- Makefile	Tue May  6 15:00:40 2003
-+++ Makefile	Tue Dec  5 16:44:03 2006
-@@ -1,4 +1,4 @@
--include Make.include
-+#include Make.include
- 
- DISTFILES=\
- add-xscreensaver \
-@@ -21,6 +21,6 @@
- win32/
- 
--all:	libgfx/src/libgfx.a
--	cd src && make
-+all:
-+	cd src && ${MAKE}
- 
- libgfx/src/libgfx.a:
diff --git a/x11/fireflies/files/patch-src-main.cc b/x11/fireflies/files/patch-src-main.cc
deleted file mode 100644
index 165887068c2d..000000000000
--- a/x11/fireflies/files/patch-src-main.cc
+++ /dev/null
@@ -1,49 +0,0 @@
---- src/main.cc.orig	2003-06-23 22:55:04.000000000 +0200
-+++ src/main.cc	2014-06-13 19:00:33.000000000 +0200
-@@ -15,8 +15,10 @@
- #ifdef WIN32
- #include <windows.h>
- #else
-+#ifdef HAVE_ARGP_H
- #include <argp.h>
- #endif
-+#endif
- 
- CanvasBase *canvas;
- Scene scene;
-@@ -26,7 +28,7 @@
- int mspf = 1000/30;
- bool full_screen = false;
- 
--#ifdef WIN32
-+#if defined(WIN32) || !defined (HAVE_ARGP_H)
- // mingw doesn't have argp. implement half-assed version
- 
- #define OPTION_HIDDEN 1
-@@ -131,7 +133,7 @@
- 		return -1;
- 	    }
- 	    else if (opt[0] == 'V') {
--		extern char *argp_program_version;
-+		extern const char *argp_program_version;
- 		cerr << argp_program_version << endl;
- 		return -1;
- 	    }
-@@ -154,7 +156,7 @@
- 		return -1;
- 	    }
- 	    else if (strcmp(opt, "version") == 0) {
--		extern char *argp_program_version;
-+		extern const char *argp_program_version;
- 		cerr << argp_program_version << endl;
- 		return -1;
- 	    }
-@@ -187,7 +189,7 @@
- #define OPT_FPS 2
- #define OPT_FASTFORWARD 3
- 
--char *mode_help =
-+const char *mode_help =
- "\n"
- "Per-swarm modes and their default probabilities:\n"
- "  1: normal                                         p=20\n"
diff --git a/x11/fireflies/files/patch-warnings b/x11/fireflies/files/patch-warnings
deleted file mode 100644
index 17fee0115455..000000000000
--- a/x11/fireflies/files/patch-warnings
+++ /dev/null
@@ -1,43 +0,0 @@
---- src/canvas_sdl.h	2003-04-26 14:01:42.000000000 -0400
-+++ src/canvas_sdl.h	2013-05-13 14:28:04.000000000 -0400
-@@ -10,11 +10,11 @@
- protected:
-     SDL_Surface *surface;
--    char *wm_title;
--    char *wm_class;
-+    const char *wm_title;
-+    const char *wm_class;
- 
-     // create the window (either SDL or GLX)
-     virtual int create_window();
- public:
--    CanvasSDL(Scene *s, bool full_screen, int mspf, char *wm_title, char *wm_class);
-+    CanvasSDL(Scene *s, bool full_screen, int mspf, const char *wm_title, const char *wm_class);
-     virtual ~CanvasSDL() {}
- 
---- src/canvas_sdl.cc	2004-02-05 16:58:24.000000000 -0500
-+++ src/canvas_sdl.cc	2013-05-13 14:27:03.000000000 -0400
-@@ -10,5 +10,5 @@
- using namespace std;
- 
--CanvasSDL::CanvasSDL(Scene *s, bool fs, int m, char *t, char *c)
-+CanvasSDL::CanvasSDL(Scene *s, bool fs, int m, const char *t, const char *c)
-     : CanvasBase(s, fs, m), wm_title(t), wm_class(c)
- {
---- src/vroot.h	2005-12-08 22:07:30.000000000 -0500
-+++ src/vroot.h	2013-05-13 14:30:56.000000000 -0400
-@@ -82,4 +82,5 @@
- #include <X11/Xatom.h>
- #include <X11/Xlib.h>
-+#include <stdio.h>	/* For sscanf */
- 
- static Window
-@@ -96,7 +97,6 @@
- 		Display *dpy = DisplayOfScreen(screen);
- 		Atom __SWM_VROOT = None;
--		int i;
- 		Window rootReturn, parentReturn, *children;
--		unsigned int numChildren;
-+		unsigned int i, numChildren;
- 
-     /* first check for a hex or decimal window ID in the environment */
diff --git a/x11/fireflies/pkg-descr b/x11/fireflies/pkg-descr
index a91350d18363..44d4753320b5 100644
--- a/x11/fireflies/pkg-descr
+++ b/x11/fireflies/pkg-descr
@@ -1 +1,5 @@
-fireflies is a extention of xscreensaver.
+A bunch of fireflies chase a few baits around the screen, leaving colorful
+tails which get blown around by the wind.
+
+This screensaver is installed as a "hack" for xscreensaver. When built with
+SDL support, it can also be run standalone.
diff --git a/x11/fireflies/pkg-plist b/x11/fireflies/pkg-plist
deleted file mode 100644
index ffd2c228dded..000000000000
--- a/x11/fireflies/pkg-plist
+++ /dev/null
@@ -1,2 +0,0 @@
-bin/xscreensaver-hacks/fireflies
-share/xscreensaver/config/fireflies.xml