aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-10-06 06:26:29 +0800
committerpav <pav@FreeBSD.org>2005-10-06 06:26:29 +0800
commitbe5701fcf9c932556fd0009756314297210ed09e (patch)
tree50777265911c98521bb07dd9dd43114828c0c492 /graphics
parent5e8130252b0625eb8dc7ddcfdc5342a774e74fdc (diff)
downloadfreebsd-ports-gnome-be5701fcf9c932556fd0009756314297210ed09e.tar.gz
freebsd-ports-gnome-be5701fcf9c932556fd0009756314297210ed09e.tar.zst
freebsd-ports-gnome-be5701fcf9c932556fd0009756314297210ed09e.zip
- Update to 0.2.2
PR: ports/86955 Submitted by: Piotr Smyrak <piotr.smyrak@heron.pl> (maintainer)
Diffstat (limited to 'graphics')
-rw-r--r--graphics/agave/Makefile10
-rw-r--r--graphics/agave/distinfo4
-rw-r--r--graphics/agave/files/patch-src-core-compat-round.cc14
-rw-r--r--graphics/agave/files/patch-src_main.cc10
-rw-r--r--graphics/agave/files/roundpatch310
-rw-r--r--graphics/gnome-colorscheme/Makefile10
-rw-r--r--graphics/gnome-colorscheme/distinfo4
-rw-r--r--graphics/gnome-colorscheme/files/patch-src-core-compat-round.cc14
-rw-r--r--graphics/gnome-colorscheme/files/patch-src_main.cc10
-rw-r--r--graphics/gnome-colorscheme/files/roundpatch310
10 files changed, 36 insertions, 660 deletions
diff --git a/graphics/agave/Makefile b/graphics/agave/Makefile
index 41f94c664585..30837c67c179 100644
--- a/graphics/agave/Makefile
+++ b/graphics/agave/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= colorscheme
-PORTVERSION= 0.2.1
+PORTVERSION= 0.2.2
CATEGORIES= graphics gnome
MASTER_SITES= http://download.gna.org/${PORTNAME}/0.2/
PKGNAMEPREFIX= gnome-
@@ -25,10 +25,4 @@ GNU_CONFIGURE= yes
USE_GCC= 3.4+
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib"
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 503001
-EXTRA_PATCHES+= ${FILESDIR}/roundpatch
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/graphics/agave/distinfo b/graphics/agave/distinfo
index 2e212dfb213d..49e573d71043 100644
--- a/graphics/agave/distinfo
+++ b/graphics/agave/distinfo
@@ -1,2 +1,2 @@
-MD5 (colorscheme-0.2.1.tar.bz2) = e1465624d3373b5593b7c6ca25856aee
-SIZE (colorscheme-0.2.1.tar.bz2) = 149287
+MD5 (colorscheme-0.2.2.tar.bz2) = 0106bd04856d89181984ea8fa1c4647c
+SIZE (colorscheme-0.2.2.tar.bz2) = 151991
diff --git a/graphics/agave/files/patch-src-core-compat-round.cc b/graphics/agave/files/patch-src-core-compat-round.cc
new file mode 100644
index 000000000000..de6ffff36126
--- /dev/null
+++ b/graphics/agave/files/patch-src-core-compat-round.cc
@@ -0,0 +1,14 @@
+--- src/core/compat-round.cc.orig Wed Oct 5 21:18:30 2005
++++ src/core/compat-round.cc Wed Oct 5 21:19:28 2005
+@@ -43,7 +43,11 @@
+ #define COMPAT_FP_SUBNORMAL 0x08
+ #define COMPAT_FP_ZERO 0x10
+
++#ifdef Linux
+ #include <endian.h>
++#elif defined(__FreeBSD__)
++#include <machine/endian.h>
++#endif
+ #define compat_fpclassify(x) \
+ ((sizeof (x) == sizeof (float)) ? compat___fpclassifyf(x) \
+ : (sizeof (x) == sizeof (double)) ? compat___fpclassifyd(x) \
diff --git a/graphics/agave/files/patch-src_main.cc b/graphics/agave/files/patch-src_main.cc
deleted file mode 100644
index 090109c97ab0..000000000000
--- a/graphics/agave/files/patch-src_main.cc
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/main.cc.orig Tue Aug 30 02:25:47 2005
-+++ src/main.cc Tue Aug 30 02:26:18 2005
-@@ -33,6 +33,7 @@
- #include <libgnomeui/gnome-ui-init.h>
-
- #include "gcs-mainwindow.h"
-+#include "gcs-i18n.h"
-
- namespace gcs
- {
diff --git a/graphics/agave/files/roundpatch b/graphics/agave/files/roundpatch
deleted file mode 100644
index 4f0fbb99b6c5..000000000000
--- a/graphics/agave/files/roundpatch
+++ /dev/null
@@ -1,310 +0,0 @@
---- src/core/gcs-color.cc.orig Wed Aug 31 02:18:48 2005
-+++ src/core/gcs-color.cc Wed Aug 31 02:26:33 2005
-@@ -28,7 +28,262 @@
- #include <iomanip> // for hex, setw, setfill, uppercase
- #include <algorithm> // for transform
- #include <stdexcept> // for invalid_argument exception
--#include <math.h> // for round, floor
-+
-+/* ====================================================
-+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
-+ *
-+ * Developed at SunPro, a Sun Microsystems, Inc. business.
-+ * Permission to use, copy, modify, and distribute this
-+ * software is freely granted, provided that this notice
-+ * is preserved.
-+ * ====================================================
-+ *
-+ * Copyright (c) 2003, Steven G. Kargl
-+ * Copyright (c) 2003 Mike Barcroft <mike@FreeBSD.org>
-+ * Copyright (c) 2002, 2003 David Schultz <dschultz@uclink.Berkeley.EDU>
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice unmodified, this list of conditions, and the following
-+ * disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <math.h>
-+
-+/* Symbolic constants to classify floating point numbers. */
-+#define COMPAT_FP_INFINITE 0x01
-+#define COMPAT_FP_NAN 0x02
-+#define COMPAT_FP_NORMAL 0x04
-+#define COMPAT_FP_SUBNORMAL 0x08
-+#define COMPAT_FP_ZERO 0x10
-+
-+#include <sys/endian.h>
-+#define compat_fpclassify(x) \
-+ ((sizeof (x) == sizeof (float)) ? compat___fpclassifyf(x) \
-+ : (sizeof (x) == sizeof (double)) ? compat___fpclassifyd(x) \
-+ : compat___fpclassifyl(x))
-+
-+union compat_IEEEf2bits {
-+ float f;
-+ struct {
-+#if _BYTE_ORDER == _LITTLE_ENDIAN
-+ unsigned int man :23;
-+ unsigned int exp :8;
-+ unsigned int sign :1;
-+#else /* _BIG_ENDIAN */
-+ unsigned int sign :1;
-+ unsigned int exp :8;
-+ unsigned int man :23;
-+#endif
-+ } bits;
-+};
-+
-+union compat_IEEEd2bits {
-+ double d;
-+ struct {
-+#if _BYTE_ORDER == _LITTLE_ENDIAN
-+ unsigned int manl :32;
-+ unsigned int manh :20;
-+ unsigned int exp :11;
-+ unsigned int sign :1;
-+#else /* _BIG_ENDIAN */
-+ unsigned int sign :1;
-+ unsigned int exp :11;
-+ unsigned int manh :20;
-+ unsigned int manl :32;
-+#endif
-+ } bits;
-+};
-+
-+#ifdef __alpha__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int manl :32;
-+ unsigned int manh :20;
-+ unsigned int exp :11;
-+ unsigned int sign :1;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((void)0)
-+#elif __amd64__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int manl :32;
-+ unsigned int manh :32;
-+ unsigned int exp :15;
-+ unsigned int sign :1;
-+ unsigned int junkl :16;
-+ unsigned int junkh :32;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff)
-+#elif __arm__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int manl :32;
-+ unsigned int manh :32;
-+ unsigned int exp :15;
-+ unsigned int sign :1;
-+ unsigned int junk :16;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff)
-+#elif __i386__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int manl :32;
-+ unsigned int manh :32;
-+ unsigned int exp :15;
-+ unsigned int sign :1;
-+ unsigned int junk :16;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff)
-+#elif __ia64__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+#if _BYTE_ORDER == _LITTLE_ENDIAN
-+ unsigned int manl :32;
-+ unsigned int manh :32;
-+ unsigned int exp :15;
-+ unsigned int sign :1;
-+ unsigned long junk :48;
-+#else /* _BIG_ENDIAN */
-+ unsigned long junk :48;
-+ unsigned int sign :1;
-+ unsigned int exp :15;
-+ unsigned int manh :32;
-+ unsigned int manl :32;
-+#endif
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff)
-+#elif __powerpc__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int sign :1;
-+ unsigned int exp :15;
-+ unsigned long long manh :48;
-+ unsigned long long manl :64;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((void)0)
-+#elif __sparc64__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int sign :1;
-+ unsigned int exp :15;
-+ unsigned long manh :48;
-+ unsigned long manl :64;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((void)0)
-+#endif
-+
-+static int
-+compat___fpclassifyf(float f)
-+{
-+ union compat_IEEEf2bits u;
-+
-+ u.f = f;
-+ if (u.bits.exp == 0) {
-+ if (u.bits.man == 0)
-+ return (COMPAT_FP_ZERO);
-+ return (COMPAT_FP_SUBNORMAL);
-+ }
-+ if (u.bits.exp == 255) {
-+ if (u.bits.man == 0)
-+ return (COMPAT_FP_INFINITE);
-+ return (COMPAT_FP_NAN);
-+ }
-+ return (COMPAT_FP_NORMAL);
-+}
-+
-+static int
-+compat___fpclassifyd(double d)
-+{
-+ union compat_IEEEd2bits u;
-+
-+ u.d = d;
-+ if (u.bits.exp == 0) {
-+ if ((u.bits.manl | u.bits.manh) == 0)
-+ return (COMPAT_FP_ZERO);
-+ return (COMPAT_FP_SUBNORMAL);
-+ }
-+ if (u.bits.exp == 2047) {
-+ if ((u.bits.manl | u.bits.manh) == 0)
-+ return (COMPAT_FP_INFINITE);
-+ return (COMPAT_FP_NAN);
-+ }
-+ return (COMPAT_FP_NORMAL);
-+}
-+
-+static int
-+compat___fpclassifyl(long double e)
-+{
-+ union compat_IEEEl2bits u;
-+
-+ u.e = e;
-+ if (u.bits.exp == 0) {
-+ if ((u.bits.manl | u.bits.manh) == 0)
-+ return (COMPAT_FP_ZERO);
-+ return (COMPAT_FP_SUBNORMAL);
-+ }
-+ compat_mask_nbit_l(u); /* Mask normalization bit if applicable. */
-+ if (u.bits.exp == 32767) {
-+ if ((u.bits.manl | u.bits.manh) == 0)
-+ return (COMPAT_FP_INFINITE);
-+ return (COMPAT_FP_NAN);
-+ }
-+ return (COMPAT_FP_NORMAL);
-+}
-+
-+static double
-+compat_round(double x)
-+{
-+ double t;
-+ int i;
-+
-+ i = compat_fpclassify(x);
-+ if (i == COMPAT_FP_INFINITE || i == COMPAT_FP_NAN)
-+ return (x);
-+
-+ if (x >= 0.0) {
-+ t = ceil(x);
-+ if (t - x > 0.5)
-+ t -= 1.0;
-+ return (t);
-+ } else {
-+ t = ceil(-x);
-+ if (t + x > 0.5)
-+ t -= 1.0;
-+ return (-t);
-+ }
-+}
-
- namespace gcs
- {
-@@ -166,9 +421,9 @@
- }
-
- tempHue *= maxHueValue / 6; // degrees
-- tempHue = round(tempHue);
-- out.saturation = static_cast<int>(round(tempSat));
-- out.value = static_cast<int>(round(tempVal));
-+ tempHue = compat_round(tempHue);
-+ out.saturation = static_cast<int>(compat_round(tempSat));
-+ out.value = static_cast<int>(compat_round(tempVal));
- if(tempHue < 0)
- {
- out.hue += maxHueValue;
-@@ -201,7 +456,7 @@
- hueSector = static_cast<int>(floor(scaledHue));
- remainder = scaledHue - hueSector; // factorial part of scaledHue
- p = static_cast<int>(
-- round(
-+ compat_round(
- (float) maxRgbValue *
- (
- ((float) hsv.value / 100.0) *
-@@ -210,18 +465,18 @@
- )
- );
- q = static_cast<int>(
-- round(
-+ compat_round(
- (float) maxRgbValue * ((float) hsv.value / 100.0 *
- (1.0 - ((float) hsv.saturation / 100.0 * remainder)))
- )
- );
- t = static_cast<int>(
-- round(
-+ compat_round(
- (float) maxRgbValue * ((float) hsv.value / 100.0) *
- (1.0 - ((float) hsv.saturation / 100.0) * (1.0 - remainder))
- )
- );
-- val = static_cast<int>(round(maxRgbValue * hsv.value / 100));
-+ val = static_cast<int>(compat_round(maxRgbValue * hsv.value / 100));
-
- switch(hueSector)
- {
diff --git a/graphics/gnome-colorscheme/Makefile b/graphics/gnome-colorscheme/Makefile
index 41f94c664585..30837c67c179 100644
--- a/graphics/gnome-colorscheme/Makefile
+++ b/graphics/gnome-colorscheme/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= colorscheme
-PORTVERSION= 0.2.1
+PORTVERSION= 0.2.2
CATEGORIES= graphics gnome
MASTER_SITES= http://download.gna.org/${PORTNAME}/0.2/
PKGNAMEPREFIX= gnome-
@@ -25,10 +25,4 @@ GNU_CONFIGURE= yes
USE_GCC= 3.4+
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib"
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 503001
-EXTRA_PATCHES+= ${FILESDIR}/roundpatch
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/graphics/gnome-colorscheme/distinfo b/graphics/gnome-colorscheme/distinfo
index 2e212dfb213d..49e573d71043 100644
--- a/graphics/gnome-colorscheme/distinfo
+++ b/graphics/gnome-colorscheme/distinfo
@@ -1,2 +1,2 @@
-MD5 (colorscheme-0.2.1.tar.bz2) = e1465624d3373b5593b7c6ca25856aee
-SIZE (colorscheme-0.2.1.tar.bz2) = 149287
+MD5 (colorscheme-0.2.2.tar.bz2) = 0106bd04856d89181984ea8fa1c4647c
+SIZE (colorscheme-0.2.2.tar.bz2) = 151991
diff --git a/graphics/gnome-colorscheme/files/patch-src-core-compat-round.cc b/graphics/gnome-colorscheme/files/patch-src-core-compat-round.cc
new file mode 100644
index 000000000000..de6ffff36126
--- /dev/null
+++ b/graphics/gnome-colorscheme/files/patch-src-core-compat-round.cc
@@ -0,0 +1,14 @@
+--- src/core/compat-round.cc.orig Wed Oct 5 21:18:30 2005
++++ src/core/compat-round.cc Wed Oct 5 21:19:28 2005
+@@ -43,7 +43,11 @@
+ #define COMPAT_FP_SUBNORMAL 0x08
+ #define COMPAT_FP_ZERO 0x10
+
++#ifdef Linux
+ #include <endian.h>
++#elif defined(__FreeBSD__)
++#include <machine/endian.h>
++#endif
+ #define compat_fpclassify(x) \
+ ((sizeof (x) == sizeof (float)) ? compat___fpclassifyf(x) \
+ : (sizeof (x) == sizeof (double)) ? compat___fpclassifyd(x) \
diff --git a/graphics/gnome-colorscheme/files/patch-src_main.cc b/graphics/gnome-colorscheme/files/patch-src_main.cc
deleted file mode 100644
index 090109c97ab0..000000000000
--- a/graphics/gnome-colorscheme/files/patch-src_main.cc
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/main.cc.orig Tue Aug 30 02:25:47 2005
-+++ src/main.cc Tue Aug 30 02:26:18 2005
-@@ -33,6 +33,7 @@
- #include <libgnomeui/gnome-ui-init.h>
-
- #include "gcs-mainwindow.h"
-+#include "gcs-i18n.h"
-
- namespace gcs
- {
diff --git a/graphics/gnome-colorscheme/files/roundpatch b/graphics/gnome-colorscheme/files/roundpatch
deleted file mode 100644
index 4f0fbb99b6c5..000000000000
--- a/graphics/gnome-colorscheme/files/roundpatch
+++ /dev/null
@@ -1,310 +0,0 @@
---- src/core/gcs-color.cc.orig Wed Aug 31 02:18:48 2005
-+++ src/core/gcs-color.cc Wed Aug 31 02:26:33 2005
-@@ -28,7 +28,262 @@
- #include <iomanip> // for hex, setw, setfill, uppercase
- #include <algorithm> // for transform
- #include <stdexcept> // for invalid_argument exception
--#include <math.h> // for round, floor
-+
-+/* ====================================================
-+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
-+ *
-+ * Developed at SunPro, a Sun Microsystems, Inc. business.
-+ * Permission to use, copy, modify, and distribute this
-+ * software is freely granted, provided that this notice
-+ * is preserved.
-+ * ====================================================
-+ *
-+ * Copyright (c) 2003, Steven G. Kargl
-+ * Copyright (c) 2003 Mike Barcroft <mike@FreeBSD.org>
-+ * Copyright (c) 2002, 2003 David Schultz <dschultz@uclink.Berkeley.EDU>
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice unmodified, this list of conditions, and the following
-+ * disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <math.h>
-+
-+/* Symbolic constants to classify floating point numbers. */
-+#define COMPAT_FP_INFINITE 0x01
-+#define COMPAT_FP_NAN 0x02
-+#define COMPAT_FP_NORMAL 0x04
-+#define COMPAT_FP_SUBNORMAL 0x08
-+#define COMPAT_FP_ZERO 0x10
-+
-+#include <sys/endian.h>
-+#define compat_fpclassify(x) \
-+ ((sizeof (x) == sizeof (float)) ? compat___fpclassifyf(x) \
-+ : (sizeof (x) == sizeof (double)) ? compat___fpclassifyd(x) \
-+ : compat___fpclassifyl(x))
-+
-+union compat_IEEEf2bits {
-+ float f;
-+ struct {
-+#if _BYTE_ORDER == _LITTLE_ENDIAN
-+ unsigned int man :23;
-+ unsigned int exp :8;
-+ unsigned int sign :1;
-+#else /* _BIG_ENDIAN */
-+ unsigned int sign :1;
-+ unsigned int exp :8;
-+ unsigned int man :23;
-+#endif
-+ } bits;
-+};
-+
-+union compat_IEEEd2bits {
-+ double d;
-+ struct {
-+#if _BYTE_ORDER == _LITTLE_ENDIAN
-+ unsigned int manl :32;
-+ unsigned int manh :20;
-+ unsigned int exp :11;
-+ unsigned int sign :1;
-+#else /* _BIG_ENDIAN */
-+ unsigned int sign :1;
-+ unsigned int exp :11;
-+ unsigned int manh :20;
-+ unsigned int manl :32;
-+#endif
-+ } bits;
-+};
-+
-+#ifdef __alpha__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int manl :32;
-+ unsigned int manh :20;
-+ unsigned int exp :11;
-+ unsigned int sign :1;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((void)0)
-+#elif __amd64__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int manl :32;
-+ unsigned int manh :32;
-+ unsigned int exp :15;
-+ unsigned int sign :1;
-+ unsigned int junkl :16;
-+ unsigned int junkh :32;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff)
-+#elif __arm__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int manl :32;
-+ unsigned int manh :32;
-+ unsigned int exp :15;
-+ unsigned int sign :1;
-+ unsigned int junk :16;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff)
-+#elif __i386__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int manl :32;
-+ unsigned int manh :32;
-+ unsigned int exp :15;
-+ unsigned int sign :1;
-+ unsigned int junk :16;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff)
-+#elif __ia64__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+#if _BYTE_ORDER == _LITTLE_ENDIAN
-+ unsigned int manl :32;
-+ unsigned int manh :32;
-+ unsigned int exp :15;
-+ unsigned int sign :1;
-+ unsigned long junk :48;
-+#else /* _BIG_ENDIAN */
-+ unsigned long junk :48;
-+ unsigned int sign :1;
-+ unsigned int exp :15;
-+ unsigned int manh :32;
-+ unsigned int manl :32;
-+#endif
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff)
-+#elif __powerpc__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int sign :1;
-+ unsigned int exp :15;
-+ unsigned long long manh :48;
-+ unsigned long long manl :64;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((void)0)
-+#elif __sparc64__
-+union compat_IEEEl2bits {
-+ long double e;
-+ struct {
-+ unsigned int sign :1;
-+ unsigned int exp :15;
-+ unsigned long manh :48;
-+ unsigned long manl :64;
-+ } bits;
-+};
-+#define compat_mask_nbit_l(u) ((void)0)
-+#endif
-+
-+static int
-+compat___fpclassifyf(float f)
-+{
-+ union compat_IEEEf2bits u;
-+
-+ u.f = f;
-+ if (u.bits.exp == 0) {
-+ if (u.bits.man == 0)
-+ return (COMPAT_FP_ZERO);
-+ return (COMPAT_FP_SUBNORMAL);
-+ }
-+ if (u.bits.exp == 255) {
-+ if (u.bits.man == 0)
-+ return (COMPAT_FP_INFINITE);
-+ return (COMPAT_FP_NAN);
-+ }
-+ return (COMPAT_FP_NORMAL);
-+}
-+
-+static int
-+compat___fpclassifyd(double d)
-+{
-+ union compat_IEEEd2bits u;
-+
-+ u.d = d;
-+ if (u.bits.exp == 0) {
-+ if ((u.bits.manl | u.bits.manh) == 0)
-+ return (COMPAT_FP_ZERO);
-+ return (COMPAT_FP_SUBNORMAL);
-+ }
-+ if (u.bits.exp == 2047) {
-+ if ((u.bits.manl | u.bits.manh) == 0)
-+ return (COMPAT_FP_INFINITE);
-+ return (COMPAT_FP_NAN);
-+ }
-+ return (COMPAT_FP_NORMAL);
-+}
-+
-+static int
-+compat___fpclassifyl(long double e)
-+{
-+ union compat_IEEEl2bits u;
-+
-+ u.e = e;
-+ if (u.bits.exp == 0) {
-+ if ((u.bits.manl | u.bits.manh) == 0)
-+ return (COMPAT_FP_ZERO);
-+ return (COMPAT_FP_SUBNORMAL);
-+ }
-+ compat_mask_nbit_l(u); /* Mask normalization bit if applicable. */
-+ if (u.bits.exp == 32767) {
-+ if ((u.bits.manl | u.bits.manh) == 0)
-+ return (COMPAT_FP_INFINITE);
-+ return (COMPAT_FP_NAN);
-+ }
-+ return (COMPAT_FP_NORMAL);
-+}
-+
-+static double
-+compat_round(double x)
-+{
-+ double t;
-+ int i;
-+
-+ i = compat_fpclassify(x);
-+ if (i == COMPAT_FP_INFINITE || i == COMPAT_FP_NAN)
-+ return (x);
-+
-+ if (x >= 0.0) {
-+ t = ceil(x);
-+ if (t - x > 0.5)
-+ t -= 1.0;
-+ return (t);
-+ } else {
-+ t = ceil(-x);
-+ if (t + x > 0.5)
-+ t -= 1.0;
-+ return (-t);
-+ }
-+}
-
- namespace gcs
- {
-@@ -166,9 +421,9 @@
- }
-
- tempHue *= maxHueValue / 6; // degrees
-- tempHue = round(tempHue);
-- out.saturation = static_cast<int>(round(tempSat));
-- out.value = static_cast<int>(round(tempVal));
-+ tempHue = compat_round(tempHue);
-+ out.saturation = static_cast<int>(compat_round(tempSat));
-+ out.value = static_cast<int>(compat_round(tempVal));
- if(tempHue < 0)
- {
- out.hue += maxHueValue;
-@@ -201,7 +456,7 @@
- hueSector = static_cast<int>(floor(scaledHue));
- remainder = scaledHue - hueSector; // factorial part of scaledHue
- p = static_cast<int>(
-- round(
-+ compat_round(
- (float) maxRgbValue *
- (
- ((float) hsv.value / 100.0) *
-@@ -210,18 +465,18 @@
- )
- );
- q = static_cast<int>(
-- round(
-+ compat_round(
- (float) maxRgbValue * ((float) hsv.value / 100.0 *
- (1.0 - ((float) hsv.saturation / 100.0 * remainder)))
- )
- );
- t = static_cast<int>(
-- round(
-+ compat_round(
- (float) maxRgbValue * ((float) hsv.value / 100.0) *
- (1.0 - ((float) hsv.saturation / 100.0) * (1.0 - remainder))
- )
- );
-- val = static_cast<int>(round(maxRgbValue * hsv.value / 100));
-+ val = static_cast<int>(compat_round(maxRgbValue * hsv.value / 100));
-
- switch(hueSector)
- {