From 8b966ea3a67cb4f1c12d894c9e8d73cd7a08a10c Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sun, 12 Feb 2017 00:00:30 +0000 Subject: graphics/gle-graphics: use clang and unbreak with gcc6 or later PR: 217001 Submitted by: nivit (maintainer) --- graphics/gle-graphics/Makefile | 3 +-- graphics/gle-graphics/files/patch-src_gle_d__x.cpp | 20 ++++++++++++++++++++ graphics/gle-graphics/files/patch-src_gle_op__def.h | 11 +++++++++++ .../files/patch-src_gle_surface_ffitcontour.cpp | 18 ++++++++++++++++++ .../files/patch-src_gle_tokens_StringKeyHash.h | 16 ++++++++++++++++ 5 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 graphics/gle-graphics/files/patch-src_gle_d__x.cpp create mode 100644 graphics/gle-graphics/files/patch-src_gle_op__def.h create mode 100644 graphics/gle-graphics/files/patch-src_gle_surface_ffitcontour.cpp create mode 100644 graphics/gle-graphics/files/patch-src_gle_tokens_StringKeyHash.h diff --git a/graphics/gle-graphics/Makefile b/graphics/gle-graphics/Makefile index b9eb96cf1d84..eab959b7bc8c 100644 --- a/graphics/gle-graphics/Makefile +++ b/graphics/gle-graphics/Makefile @@ -3,7 +3,7 @@ PORTNAME= gle-graphics DISTVERSION= 4.2.4cf -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= graphics print MASTER_SITES= SF/glx/gle4%20%28Current%20Active%20Version%29/${DISTVERSION:C,.$,,1} DISTNAME= ${PORTNAME}-${DISTVERSION}-src @@ -42,7 +42,6 @@ PLIST_SUB+= PORTVERSION=${PORTVERSION} REINPLACE_FILES= configure -USE_GCC= yes USE_GL= yes USE_LDCONFIG= yes USE_QT4= gui moc network opengl rcc qmake_build diff --git a/graphics/gle-graphics/files/patch-src_gle_d__x.cpp b/graphics/gle-graphics/files/patch-src_gle_d__x.cpp new file mode 100644 index 000000000000..9e864986b413 --- /dev/null +++ b/graphics/gle-graphics/files/patch-src_gle_d__x.cpp @@ -0,0 +1,20 @@ +--- src/gle/d_x.cpp.orig 2011-10-26 21:10:54 UTC ++++ src/gle/d_x.cpp +@@ -199,7 +199,7 @@ void X11GLEDevice::setfillstyle(int i) { + #define BM_HEIGHT 16 + Pixmap bm; + //unsigned +-const char bm_bits[][32] = { ++const unsigned char bm_bits[][32] = { + { 0x00, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, 0x08, 0x00, 0x04, + 0x00, 0x02, 0x00, 0x01, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, + 0x08, 0x00, 0x04, 0x00, 0x02, 0x00, 0x01, 0x00}, /* SHADE */ +@@ -238,7 +238,7 @@ const char bm_bits[][32] = { + 0x1c, 0x38, 0x0e, 0x70, 0x07, 0xe0, 0x03, 0xc0} /* GRID 5 */ + }; + +- bm = XCreateBitmapFromData(dpy,window1,bm_bits[i],BM_WIDTH,BM_HEIGHT); ++ bm = XCreateBitmapFromData(dpy,window1,(const char*) bm_bits[i],BM_WIDTH,BM_HEIGHT); + XSetStipple(dpy, gcf, bm); + XSetFillStyle(dpy, gcf, FillStippled); + XFreePixmap(dpy, bm); diff --git a/graphics/gle-graphics/files/patch-src_gle_op__def.h b/graphics/gle-graphics/files/patch-src_gle_op__def.h new file mode 100644 index 000000000000..4a71a91985a7 --- /dev/null +++ b/graphics/gle-graphics/files/patch-src_gle_op__def.h @@ -0,0 +1,11 @@ +--- src/gle/op_def.h.orig 2011-10-26 21:10:54 UTC ++++ src/gle/op_def.h +@@ -40,7 +40,7 @@ struct op_key { + char name[256]; + int typ; + int pos; +- int idx; ++ signed long idx; + }; + + #define typ_end 0 diff --git a/graphics/gle-graphics/files/patch-src_gle_surface_ffitcontour.cpp b/graphics/gle-graphics/files/patch-src_gle_surface_ffitcontour.cpp new file mode 100644 index 000000000000..112255800db4 --- /dev/null +++ b/graphics/gle-graphics/files/patch-src_gle_surface_ffitcontour.cpp @@ -0,0 +1,18 @@ +--- src/gle/surface/ffitcontour.cpp.orig 2011-06-13 08:36:41 UTC ++++ src/gle/surface/ffitcontour.cpp +@@ -43,15 +43,9 @@ + + /* "f2c.h" defines abs() -- conflict with the definition in */ + /* changing the order solves the problem */ +-#if ( defined(__OS2__) && defined(__EMX__) ) || defined(__WIN32__) + #include + #include + #include "f2c.h" +-#else +-#include "f2c.h" +-#include +-#include +-#endif + + doublereal gutre2_(real* a, real* b); + void gd_message__(const char *s, int l); diff --git a/graphics/gle-graphics/files/patch-src_gle_tokens_StringKeyHash.h b/graphics/gle-graphics/files/patch-src_gle_tokens_StringKeyHash.h new file mode 100644 index 000000000000..c5c857f29de8 --- /dev/null +++ b/graphics/gle-graphics/files/patch-src_gle_tokens_StringKeyHash.h @@ -0,0 +1,16 @@ +--- src/gle/tokens/StringKeyHash.h.orig 2012-02-19 21:07:34 UTC ++++ src/gle/tokens/StringKeyHash.h +@@ -74,11 +74,13 @@ + + using namespace std; + ++#ifndef __clang__ + #ifndef GCC2 + #ifndef _MSC_VER + using namespace __gnu_cxx; // using gnu extensions such as "hash" + #endif + #endif ++#endif + + #include "RefCount.h" + #include "BinIO.h"