aboutsummaryrefslogtreecommitdiff
path: root/misc/gkrellmbgchg2
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-04-29 11:19:48 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-04-29 11:19:48 +0000
commitd90ae0c69baa010e38d6aa16092bd5fddf599160 (patch)
treee3b770098042436c66c17d4f5987987158ec35f5 /misc/gkrellmbgchg2
parente8cab3379ee07e6d0ff7dd3dec9ccea20d77fd44 (diff)
downloadports-d90ae0c69baa010e38d6aa16092bd5fddf599160.tar.gz
ports-d90ae0c69baa010e38d6aa16092bd5fddf599160.zip
- Fix build on 4.X
PR: ports/96369 Submitted by: Martin Wilke <freebsd@unixfreunde.de> (maintainer)
Notes
Notes: svn path=/head/; revision=160741
Diffstat (limited to 'misc/gkrellmbgchg2')
-rw-r--r--misc/gkrellmbgchg2/Makefile4
-rw-r--r--misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c39
2 files changed, 39 insertions, 4 deletions
diff --git a/misc/gkrellmbgchg2/Makefile b/misc/gkrellmbgchg2/Makefile
index 66ce2ecd787e..793856535d3c 100644
--- a/misc/gkrellmbgchg2/Makefile
+++ b/misc/gkrellmbgchg2/Makefile
@@ -23,10 +23,6 @@ PLIST_FILES= libexec/gkrellm2/plugins/gkrellmbgchg.so
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 500000
-BROKEN= Does not compile
-.endif
-
post-patch:
@${REINPLACE_CMD} -e 's|-O3||g' ${WRKSRC}/Makefile
diff --git a/misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c b/misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c
new file mode 100644
index 000000000000..58aa9797c1a3
--- /dev/null
+++ b/misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c
@@ -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 {