[112432] trunk/dports/print/lcdf-typetools
ryandesign at macports.org
ryandesign at macports.org
Tue Oct 22 16:11:06 PDT 2013
Revision: 112432
https://trac.macports.org/changeset/112432
Author: ryandesign at macports.org
Date: 2013-10-22 16:11:06 -0700 (Tue, 22 Oct 2013)
Log Message:
-----------
lcdf-typetools: fix build on Mavericks by applying an upstream patch to fix how static_assert is defined and used (#40798)
Modified Paths:
--------------
trunk/dports/print/lcdf-typetools/Portfile
Added Paths:
-----------
trunk/dports/print/lcdf-typetools/files/static_assert.patch
Modified: trunk/dports/print/lcdf-typetools/Portfile
===================================================================
--- trunk/dports/print/lcdf-typetools/Portfile 2013-10-22 22:46:55 UTC (rev 112431)
+++ trunk/dports/print/lcdf-typetools/Portfile 2013-10-22 23:11:06 UTC (rev 112432)
@@ -25,6 +25,7 @@
patch.pre_args -p1
patchfiles detect-endianness-universal.patch
+patchfiles-append static_assert.patch
if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} eq {libc++} &&
Added: trunk/dports/print/lcdf-typetools/files/static_assert.patch
===================================================================
--- trunk/dports/print/lcdf-typetools/files/static_assert.patch (rev 0)
+++ trunk/dports/print/lcdf-typetools/files/static_assert.patch 2013-10-22 23:11:06 UTC (rev 112432)
@@ -0,0 +1,69 @@
+https://github.com/kohler/lcdf-typetools/issues/3
+https://github.com/kohler/lcdf-typetools/commit/d263fdf688166d1eedffb776d4cc72815d561c52
+diff --git a/libefont/cff.cc b/libefont/cff.cc
+index 3906f65..9040178 100644
+--- a/libefont/cff.cc
++++ b/libefont/cff.cc
+@@ -28,7 +28,7 @@
+ #include <efont/t1unparser.hh>
+
+ #ifndef static_assert
+-#define static_assert(c) switch (c) case 0: case (c):
++#define static_assert(c, msg) switch (c) case 0: case (c):
+ #endif
+
+ namespace Efont {
+@@ -346,9 +346,12 @@
+ : _data_string(s), _data(reinterpret_cast<const uint8_t *>(_data_string.data())), _len(_data_string.length()),
+ _strings_map(-2)
+ {
+- static_assert((sizeof(standard_strings) / sizeof(standard_strings[0])) == NSTANDARD_STRINGS);
+- static_assert((sizeof(standard_encoding) / sizeof(standard_encoding[0])) == 256);
+- static_assert((sizeof(expert_encoding) / sizeof(expert_encoding[0])) == 256);
++ static_assert((sizeof(standard_strings) / sizeof(standard_strings[0])) == NSTANDARD_STRINGS,
++ "NSTANDARD_STRINGS defined incorrectly");
++ static_assert((sizeof(standard_encoding) / sizeof(standard_encoding[0])) == 256,
++ "standard_encoding has wrong size");
++ static_assert((sizeof(expert_encoding) / sizeof(expert_encoding[0])) == 256,
++ "expert_encoding has wrong size");
+ _error = parse_header(errh ? errh : ErrorHandler::silent_handler());
+ }
+
+diff --git a/libefont/otf.cc b/libefont/otf.cc
+index 8e885b5..ae099f8 100644
+--- a/libefont/otf.cc
++++ b/libefont/otf.cc
+@@ -26,10 +26,6 @@
+ #include <efont/otfdata.hh> // for ntohl()
+ #include <efont/otfname.hh>
+
+-#ifndef static_assert
+-#define static_assert(c) switch (c) case 0: case (c):
+-#endif
+-
+ namespace Efont { namespace OpenType {
+
+ Vector<PermString> debug_glyph_names;
+diff --git a/libefont/t1interp.cc b/libefont/t1interp.cc
+index 7b607bb..53483f2 100644
+--- a/libefont/t1interp.cc
++++ b/libefont/t1interp.cc
+@@ -31,7 +31,7 @@
+ #define CHECK_PATH_END() do { if (_state == S_PATH) { act_closepath(cmd); } _state = S_IPATH; } while (0)
+
+ #ifndef static_assert
+-# define static_assert(c) switch (c) case 0: case (c):
++# define static_assert(c, msg) switch (c) case 0: case (c):
+ #endif
+
+ namespace Efont {
+@@ -111,7 +111,8 @@
+ String
+ CharstringInterp::error_string(int error, int error_data)
+ {
+- static_assert(-errLastError == (sizeof(error_formats) / sizeof(error_formats[0])) - 1);
++ static_assert(-errLastError == (sizeof(error_formats) / sizeof(error_formats[0])) - 1,
++ "errLastError defined incorrectly");
+ if (error >= 0)
+ return error_formats[0];
+ else if (error < errLastError)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131022/7a42a00d/attachment.html>
More information about the macports-changes
mailing list