From 982d2409162b58ae79a7e80148a839fecb557c36 Mon Sep 17 00:00:00 2001 From: trevor Date: Sun, 1 Jun 2003 07:25:10 +0000 Subject: patch to enable compilation with GCC 3.2.2 --- x11-wm/clementine/Makefile | 8 +----- x11-wm/clementine/files/patch-painter.cpp | 42 +++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 x11-wm/clementine/files/patch-painter.cpp (limited to 'x11-wm') diff --git a/x11-wm/clementine/Makefile b/x11-wm/clementine/Makefile index 49d262a55d4b..8ffc370056ed 100644 --- a/x11-wm/clementine/Makefile +++ b/x11-wm/clementine/Makefile @@ -17,12 +17,6 @@ COMMENT= Has title bars, iconizing, and styles (unstable) RUN_DEPENDS= xv:${PORTSDIR}/graphics/xv \ rxvt:${PORTSDIR}/x11/rxvt -.include - -.if ${OSVERSION} >= 500113 -BROKEN= "Does not compile (bad C++ code)" -.endif - PLIST= ${WRKDIR}/pkg-plist PKGMESSAGE= ${WRKDIR}/pkg-message USE_GMAKE= yes @@ -69,4 +63,4 @@ do-install: post-install: @${CAT} ${PKGMESSAGE} -.include +.include diff --git a/x11-wm/clementine/files/patch-painter.cpp b/x11-wm/clementine/files/patch-painter.cpp new file mode 100644 index 000000000000..a0cde107049b --- /dev/null +++ b/x11-wm/clementine/files/patch-painter.cpp @@ -0,0 +1,42 @@ +$FreeBSD$ + +--- painter.cpp.orig Sat Mar 23 03:23:17 2002 ++++ painter.cpp Tue May 27 19:25:40 2003 +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + #define DEF_FONT "fixed" + #define DEF_ACTIVE_FG "white" +@@ -420,7 +421,7 @@ + cs = look->activeButtonFacet()->color(); + else + cs = look->inactiveButtonFacet()->color(); +- if ( std::fmod(width,2) == 0 ) ++ if ( std::fmod((float)width,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((float)width/2) + 1, y + height + 1 ); ++ drawLine( d, x + 1, y, x + (int) std::ceil((float)width/2) + 1, y + height ); ++ drawLine( d, x, y + 1, x + (int) std::ceil((float)width/2), y + height + 1 ); ++ drawLine( d, x + (int) std::ceil((float)width/2), y + height, x + width, y -1 ); ++ drawLine( d, x + (int) std::ceil((float)width/2), y + height-1, x +width-1, y-1 ); ++ drawLine( d, x + (int) std::ceil((float)width/2)+1, y + height, x +width, y ); ++ drawPoint( d, x + (int) std::ceil((float)width/2), y + height + 1 ); + } + + void Painter::setButtonBackground( Drawable d, Painter::Button b, bool active, -- cgit