From 9180fc5b8272480972c7fade5b8102cee1ce7126 Mon Sep 17 00:00:00 2001 From: danfe Date: Fri, 23 Oct 2015 15:47:08 +0000 Subject: - Allow to build on big-endian architectures - Add a comment explaining the need for USE_GCC --- graphics/dcp2icc/Makefile | 2 +- ...XMP-Toolkit-SDK-4.4.2_source_common_EndianUtils.hpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 graphics/dcp2icc/files/patch-XMP-Toolkit-SDK-4.4.2_source_common_EndianUtils.hpp (limited to 'graphics') diff --git a/graphics/dcp2icc/Makefile b/graphics/dcp2icc/Makefile index fbf207862b93..e347d2437d3b 100644 --- a/graphics/dcp2icc/Makefile +++ b/graphics/dcp2icc/Makefile @@ -16,7 +16,7 @@ LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 \ liblcms.so:${PORTSDIR}/graphics/lcms USES= localbase scons tar:bzip2 -USE_GCC= any +USE_GCC= any # segfaults on exit when built with Clang PLIST_FILES= bin/${PORTNAME} diff --git a/graphics/dcp2icc/files/patch-XMP-Toolkit-SDK-4.4.2_source_common_EndianUtils.hpp b/graphics/dcp2icc/files/patch-XMP-Toolkit-SDK-4.4.2_source_common_EndianUtils.hpp new file mode 100644 index 000000000000..d2a7c1d58ab7 --- /dev/null +++ b/graphics/dcp2icc/files/patch-XMP-Toolkit-SDK-4.4.2_source_common_EndianUtils.hpp @@ -0,0 +1,18 @@ +--- XMP-Toolkit-SDK-4.4.2/source/common/EndianUtils.hpp.orig 2008-10-06 07:18:58 UTC ++++ XMP-Toolkit-SDK-4.4.2/source/common/EndianUtils.hpp +@@ -32,8 +32,13 @@ + #endif + #elif XMP_UNIXBuild + #ifndef kBigEndianHost // Typically in the makefile for generic UNIX. +- #if __GNUC__ && (__i386__ || __x86_64__) +- #define kBigEndianHost 0 ++ #ifdef __FreeBSD__ ++ #include ++ #if _BYTE_ORDER == _LITTLE_ENDIAN ++ #define kBigEndianHost 0 ++ #else // _BYTE_ORDER == _BIG_ENDIAN ++ #define kBigEndianHost 1 ++ #endif + #else + #error "Must define kBigEndianHost as 0 or 1 in the makefile." + #endif -- cgit