ports/178600: Fixing x11/fireflies [patch]

Mikhail T. mi at aldan.algebra.com
Mon May 13 18:50:02 UTC 2013


>Number:         178600
>Category:       ports
>Synopsis:       Fixing x11/fireflies [patch]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 13 18:50:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Mikhail T.
>Release:        FreeBSD 9.1-PRERELEASE amd64
>Organization:
Virtual Estates, Inc.	http://sybpipe.com/
>Environment:
System: FreeBSD narawntapu 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #6 r244476: Wed Dec 19 23:40:59 EST 2012 root at narawntapu:/usr/obj/cache/src/sys/POWEREDGE2900 amd64

>Description:
	x11/fireflies, which is (or recently was) required by xscreensaver,
	is currently marked as conflicting with PNG. This, effectively,
	makes it broken for all systems with any meaningful GUI -- where
	a screensaver can be used in the first place.

	The problem is not with the fireflies itself, but with the (old)
	version of libgfx, which is, rather unfortunately, bundled with
	the fireflies distribution.

>How-To-Repeat:
>Fix:

	The attached patch fixes fireflies to use th libgfx installed
	by graphics/libgfx instead of its own. graphics/libgfx
	installs a newer version of the software AND patches that
	same PNG incompatibility, that broke fireflies itself.

	Additional fixes include make fireflies compilable with newer
	compilers (gcc47, gcc48), remove gmake-requirement, and otherwise
	make the world a better place.

Index: Makefile
===================================================================
--- Makefile	(revision 318121)
+++ Makefile	(working copy)
@@ -3,18 +3,19 @@
 
 PORTNAME=	fireflies
 PORTVERSION=	2.07
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	x11
 MASTER_SITES=	http://somewhere.fscked.org/proj/fireflies/files/
 
 MAINTAINER=	umeno at rr.iij4u.or.jp
 COMMENT=	Extension of xscreensaver
 
-CONFLICTS=	png-[0-9]*
+LIB_DEPENDS=	gfx:${PORTSDIR}/graphics/libgfx
 
 GNU_CONFIGURE=	yes
-USE_GMAKE=	yes
 USE_GL=		yes
+EXTRACT_AFTER_ARGS=--exclude '${DISTNAME}/libgfx*'
+MAKE_JOBS_SAFE=	yes
 
 CPPFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/GL
 LDFLAGS+=	-L${LOCALBASE}/lib
@@ -26,10 +27,4 @@
 		CONFIGURE_SCRIPT=${CONFIGURE_SCRIPT:Q} \
 		CONFIGURE_ARGS=${CONFIGURE_ARGS:Q}
 
-post-extract:
-	@(cd ${WRKSRC};  ${TAR} zxpf libgfx-1.0.1.tar.gz)
-
-post-patch:
-	@${REINPLACE_CMD} -e 's|fltk|ignored-&|' ${WRKSRC}/libgfx/configure
-
 .include <bsd.port.mk>
Index: files/patch-Make.include.in
===================================================================
--- files/patch-Make.include.in	(revision 318121)
+++ files/patch-Make.include.in	(working copy)
@@ -6,8 +6,8 @@
  
 -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 -I../libgfx/include/ $(SDL_CFLAGS) @CFLAGS@
-+LIBS = ../libgfx/src/libgfx.a $(SDL_LIBS) $(OPT_LIBS) -L$(LOCALBASE)/lib $(GL_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@
Index: files/patch-Makefile
===================================================================
--- files/patch-Makefile	(revision 318121)
+++ files/patch-Makefile	(working copy)
@@ -1,4 +1,4 @@
---- Makefile.orig	Tue May  6 15:00:40 2003
+--- Makefile	Tue May  6 15:00:40 2003
 +++ Makefile	Tue Dec  5 16:44:03 2006
 @@ -1,4 +1,4 @@
 -include Make.include
@@ -6,26 +6,12 @@
  
  DISTFILES=\
  add-xscreensaver \
-@@ -21,18 +21,17 @@
+@@ -21,6 +21,6 @@
  win32/
  
- all:	libgfx/src/libgfx.a
+-all:	libgfx/src/libgfx.a
 -	cd src && make
++all:
 +	cd src && ${MAKE}
  
  libgfx/src/libgfx.a:
--	gunzip -c libgfx-1.0.1.tar.gz | tar x
--	cd libgfx && ./configure && cd src && make
-+	cd libgfx && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} && cd src && ${MAKE}
- 
- install: all
- 	sh ./installit $(DESTDIR)
- 
- clean:
--	make -C src clean
--	make -C win32 clean
-+	${MAKE} -C src clean
-+	${MAKE} -C win32 clean
- 
- dist:
- 	rm -rf fireflies-$(VERSION)
Index: files/patch-src-main.cc
===================================================================
--- files/patch-src-main.cc	(revision 318121)
+++ files/patch-src-main.cc	(working copy)
@@ -1,5 +1,5 @@
---- src/main.cc.orig	Tue Jun 24 05:55:04 2003
-+++ src/main.cc	Wed Feb 15 02:32:39 2006
+--- src/main.cc	2003-06-23 16:55:04.000000000 -0400
++++ src/main.cc	2013-05-13 14:24:28.000000000 -0400
 @@ -15,8 +15,10 @@
  #ifdef WIN32
  #include <windows.h>
@@ -20,3 +20,12 @@
  // mingw doesn't have argp. implement half-assed version
  
  #define OPTION_HIDDEN 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"
Index: files/patch-warnings
===================================================================
--- files/patch-warnings	(revision 0)
+++ files/patch-warnings	(working copy)
@@ -0,0 +1,43 @@
+--- 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 */
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list