Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Apr 2006 18:50:02 +0200
From:      "Martin Wilke" <freebsd@unixfreunde.de>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/96369: [patch] misc/gkrellmbgchg2 (build fix)
Message-ID:  <1146070202.12658@mwilke.ath.cx>
Resent-Message-ID: <200604261650.k3QGoFn5067396@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         96369
>Category:       ports
>Synopsis:       [patch] misc/gkrellmbgchg2 (build fix)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 26 16:50:14 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Martin Wilke
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 7.0-CURRENT #135: Thu Apr 20 17:57:52 CEST 2006
    root@mwilke.ath.cx:/usr/obj/usr/src/sys/BSDBOX



>Description:


- this patch fixes the build problem under Freebsd 4.X
- Thx Andreas Kohn for help.


>How-To-Repeat:





>Fix:


--- gkrellmbgchg2.diff begins here ---
diff -ruN /usr/ports/misc/gkrellmbgchg2/Makefile ports/misc/gkrellmbgchg2/Makefile
--- /usr/ports/misc/gkrellmbgchg2/Makefile	Wed Apr 26 18:36:06 2006
+++ ports/misc/gkrellmbgchg2/Makefile	Wed Apr 26 18:39:42 2006
@@ -23,10 +23,6 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} < 500000
-BROKEN=		Does not compile
-.endif
-
 post-patch:
 	@${REINPLACE_CMD} -e 's|-O3||g' ${WRKSRC}/Makefile
 
diff -ruN /usr/ports/misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c ports/misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c
--- /usr/ports/misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c	Thu Jan  1 01:00:00 1970
+++ ports/misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c	Wed Apr 26 17:54:18 2006
@@ -0,0 +1,39 @@
+--- gkrellmbgchg.c.orig	Wed Apr 26 17:41:54 2006
++++ gkrellmbgchg.c	Wed Apr 26 17:54:17 2006
+@@ -114,7 +114,9 @@
+ {
+ 	FILE *file;
+ 	gchar *tmp;
+-
++#if !defined(WIN32)
++	struct stat buf;
++#endif
+ 	if( filename ) {
+ 		if( !strncmp( filename, "~/", MIN(2, strlen(filename)) ) )
+ 			tmp = g_strdup_printf( "%s/%s", g_get_home_dir(), filename+2 );
+@@ -125,7 +127,6 @@
+ 
+ #if !defined(WIN32)
+ 	/* don't load if no force and not modified */
+-	struct stat buf;
+ 	if( stat( tmp, &buf ) == -1 ) {
+ 		/* something went wrong, we just don't care what for now */
+ 		GKBG_debug("stat: error on `%s'", tmp);
+@@ -223,6 +224,9 @@
+ 	gint num=1;
+ 	FILE *idb_file;
+ 	struct idb_entry *idb_e;
++#if !defined(WIN32)
++	struct stat buf;
++#endif
+ 
+ 	if((idb_file = open_imagelist( bgmon.idb, force )) == NULL) return 1;
+ 
+@@ -261,7 +265,6 @@
+ #if !defined(WIN32)
+ 		/* ignore the file if we stat returns -1 (error) and the user wants
+ 		 * us to */
+-		struct stat buf;
+ 		if( bgmon.ignore && (stat( tmp, &buf ) == -1) ) {
+ 			GKBG_debug( "ignoring `%s'", tmp );
+ 		} else {
--- gkrellmbgchg2.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1146070202.12658>