Index: Makefile
===================================================================
RCS file: /cvs/ports/games/hyperrogue/Makefile,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 Makefile
--- Makefile	21 Nov 2018 01:58:38 -0000	1.8
+++ Makefile	15 Jan 2019 13:58:53 -0000
@@ -2,6 +2,7 @@
 
 COMMENT =	roguelike game in a non-Euclidean world
 CATEGORIES =	games x11
+REVISION =	0
 
 GH_ACCOUNT =	zenorogue
 GH_PROJECT =	hyperrogue
@@ -17,7 +18,7 @@ WANTLIB += ${COMPILER_LIBCXX} GL GLEW SD
 WANTLIB += c m png
 
 # C++11
-COMPILER =	base-clang ports-clang ports-gcc
+COMPILER =	base-clang ports-gcc
 
 BUILD_DEPENDS =	${MODGNU_AUTOCONF_DEPENDS} \
 		${MODGNU_AUTOMAKE_DEPENDS}
Index: patches/patch-polygons_cpp
===================================================================
RCS file: patches/patch-polygons_cpp
diff -N patches/patch-polygons_cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-polygons_cpp	15 Jan 2019 13:58:53 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+Fix colors on big-endian machines in non-OpenGL mode.
+Index: polygons.cpp
+--- polygons.cpp.orig
++++ polygons.cpp
+@@ -762,7 +762,12 @@ void fixMercator(bool tinf) {
+   }
+   
+ unsigned char& part(color_t& col, int i) {
+-  unsigned char* c = (unsigned char*) &col; return c[i];
++  unsigned char* c = (unsigned char*) &col;
++#if SDL_BYTEORDER == SDL_BIG_ENDIAN
++  return c[sizeof(col) - 1 - i];
++#else
++  return c[i];
++#endif
+   }
+ 
+ bool in_twopoint = false;
Index: patches/patch-shaders_cpp
===================================================================
RCS file: patches/patch-shaders_cpp
diff -N patches/patch-shaders_cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-shaders_cpp	15 Jan 2019 13:58:53 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+Fix colors for big endian archs in OpenGL mode.
+Index: shaders.cpp
+--- shaders.cpp.orig
++++ shaders.cpp
+@@ -341,7 +341,8 @@ void id_modelview() {
+ void color2(color_t color, ld part) {
+   unsigned char *c = (unsigned char*) (&color);
+   GLfloat cols[4];
+-  for(int i=0; i<4; i++) cols[i] = c[3-i] / 255.0 * part;
++  for(int i=0; i<4; i++)
++    cols[i] = (color >> ((3-i) * 8) & 0xff) / 255.0 * part; 
+   #if CAP_SHADER
+   // glUniform4fv(current->uFog, 4, cols);
+   glUniform4f(current->uColor, cols[0], cols[1], cols[2], cols[3]);
+@@ -352,7 +353,11 @@ void color2(color_t color, ld part) {
+ 
+ void colorClear(color_t color) {
+   unsigned char *c = (unsigned char*) (&color);
++#if SDL_BYTEORDER == SDL_BIG_ENDIAN
++  glClearColor(c[0] / 255.0, c[1] / 255.0, c[2]/255.0, c[3] / 255.0);
++#else
+   glClearColor(c[3] / 255.0, c[2] / 255.0, c[1]/255.0, c[0] / 255.0);
++#endif
+   }
+ 
+ void be_nontextured(shader_projection sp) { switch_mode(gmColored, sp); }
