summaryrefslogtreecommitdiffstats
path: root/patches/clementine-0.0.7/clementine-0.0.7-cxxfixes.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/clementine-0.0.7/clementine-0.0.7-cxxfixes.diff')
-rw-r--r--patches/clementine-0.0.7/clementine-0.0.7-cxxfixes.diff111
1 files changed, 111 insertions, 0 deletions
diff --git a/patches/clementine-0.0.7/clementine-0.0.7-cxxfixes.diff b/patches/clementine-0.0.7/clementine-0.0.7-cxxfixes.diff
new file mode 100644
index 000000000..908666f57
--- /dev/null
+++ b/patches/clementine-0.0.7/clementine-0.0.7-cxxfixes.diff
@@ -0,0 +1,111 @@
+#
+# Submitted-By: Robert Schwebel, 2006-02-28
+# Committed-By: Robert Schwebel
+#
+# Error:
+#
+# ...
+#
+# Description:
+#
+# Fix problems with gcc 4.0.2.
+#
+# State:
+#
+# probably unresolved.
+#
+
+diff -urN clementine-0.0.7-orig/Makefile clementine-0.0.7/Makefile
+--- clementine-0.0.7-orig/Makefile 2002-02-27 03:44:58.000000000 +0100
++++ clementine-0.0.7/Makefile 2006-02-28 09:36:54.000000000 +0100
+@@ -7,13 +7,13 @@
+
+ # This should be set to the location of the X installation you want to
+ # compile against.
+-XROOT = /usr/X11R6
++XROOT ?= /usr/X11R6
+
+ # Uncomment for debugging info
+ DEFINES += -DDEBUG
+
+-CC = g++
+-CFLAGS = -g -O2 -Wall
++CXX ?= $(CROSS_COMPILE)g++
++CFLAGS ?= -g -O2 -Wall
+
+ BINDIR = $(DESTDIR)$(XROOT)/bin
+ MANDIR = $(DESTDIR)$(XROOT)/man/man1
+@@ -30,10 +30,10 @@
+ all: $(PROG)
+
+ $(PROG): $(OBJS)
+- $(CC) $(OBJS) $(LDPATH) $(LIBS) -o $@
++ $(CXX) $(OBJS) $(LDPATH) $(LIBS) -o $@
+
+ $(OBJS): %.o: %.cpp $(HEADERS)
+- $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@
++ $(CXX) $(CFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@
+
+ install: all
+ install -s $(PROG) $(BINDIR)
+diff -urN clementine-0.0.7-orig/painter.cpp clementine-0.0.7/painter.cpp
+--- clementine-0.0.7-orig/painter.cpp 2002-03-23 04:23:17.000000000 +0100
++++ clementine-0.0.7/painter.cpp 2006-02-28 10:41:20.000000000 +0100
+@@ -9,6 +9,7 @@
+ #include <cassert>
+ #include <algorithm>
+ #include <cmath>
++#include <iostream>
+
+ #define DEF_FONT "fixed"
+ #define DEF_ACTIVE_FG "white"
+@@ -309,7 +310,7 @@
+ Pixmap pixmap = XCreatePixmap(dpy,root, width,
+ height, DefaultDepth(dpy, screen) );
+ if (pixmap == None) {
+- std::cerr << "Painter::createBlankImage unable to create pixmap" <<
++ std::cerr << "Painter::createBlankImage unable to create pixmap" <<
+ std::endl;
+ return Image( dpy, None );
+ }
+@@ -420,7 +421,7 @@
+ cs = look->activeButtonFacet()->color();
+ else
+ cs = look->inactiveButtonFacet()->color();
+- if ( std::fmod(width,2) == 0 )
++ if ( (int)std::fmod((double)width,(double)2) == 0 )
+ width--;
+ height = width;
+ int half = height/2;
+@@ -428,13 +429,13 @@
+ y += half - int(.2*height); // move down a bit
+ height = half; // reduce height
+ setForeground( cs.color.pixel() );
+- drawLine( d, x, y, x + std::ceil(width/2) + 1, y + height + 1 );
+- drawLine( d, x + 1, y, x + std::ceil(width/2) + 1, y + height );
+- drawLine( d, x, y + 1, x + std::ceil(width/2), y + height + 1 );
+- drawLine( d, x + std::ceil(width/2), y + height, x + width, y -1 );
+- drawLine( d, x + std::ceil(width/2), y + height-1, x +width-1, y-1 );
+- drawLine( d, x + std::ceil(width/2)+1, y + height, x +width, y );
+- drawPoint( d, x + std::ceil(width/2), y + height + 1 );
++ drawLine( d, x, y, x + (int)std::ceil(width/2) + 1, y + height + 1 );
++ drawLine( d, x + 1, y, x + (int)std::ceil(width/2) + 1, y + height );
++ drawLine( d, x, y + 1, x + (int)std::ceil(width/2), y + height + 1 );
++ drawLine( d, x + (int)std::ceil(width/2), y + height, x + width, y -1 );
++ drawLine( d, x + (int)std::ceil(width/2), y + height-1, x +width-1, y-1 );
++ drawLine( d, x + (int)std::ceil(width/2)+1, y + height, x +width, y );
++ drawPoint( d, x + (int)std::ceil(width/2), y + height + 1 );
+ }
+
+ void Painter::setButtonBackground( Drawable d, Painter::Button b, bool active,
+diff -urN clementine-0.0.7-orig/windowmanager.cpp clementine-0.0.7/windowmanager.cpp
+--- clementine-0.0.7-orig/windowmanager.cpp 2002-03-27 02:14:36.000000000 +0100
++++ clementine-0.0.7/windowmanager.cpp 2006-02-28 10:41:48.000000000 +0100
+@@ -9,6 +9,7 @@
+ #include "painter.h"
+
+ #include <algorithm>
++#include <iostream>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>