Revision: 87626 http://trac.macports.org/changeset/87626 Author: jmr@macports.org Date: 2011-11-29 07:28:17 -0800 (Tue, 29 Nov 2011) Log Message: ----------- sphinx: byteswap russian utf-8 alphabet on big-endian platforms (#22060) Modified Paths: -------------- trunk/dports/textproc/sphinx/Portfile Added Paths: ----------- trunk/dports/textproc/sphinx/files/ trunk/dports/textproc/sphinx/files/endian.patch Modified: trunk/dports/textproc/sphinx/Portfile =================================================================== --- trunk/dports/textproc/sphinx/Portfile 2011-11-29 14:05:00 UTC (rev 87625) +++ trunk/dports/textproc/sphinx/Portfile 2011-11-29 15:28:17 UTC (rev 87626) @@ -5,6 +5,7 @@ name sphinx version 0.9.9 +revision 1 categories textproc net maintainers brett openmaintainer @@ -26,6 +27,8 @@ depends_lib port:expat \ port:libiconv +patchfiles endian.patch + configure.args --mandir=${prefix}/share/man \ --datadir=${prefix}/share/doc \ --sysconfdir=${prefix}/etc/sphinx \ Added: trunk/dports/textproc/sphinx/files/endian.patch =================================================================== --- trunk/dports/textproc/sphinx/files/endian.patch (rev 0) +++ trunk/dports/textproc/sphinx/files/endian.patch 2011-11-29 15:28:17 UTC (rev 87626) @@ -0,0 +1,58 @@ +--- src/sphinxstemru.cpp.orig 2009-03-03 02:42:35.000000000 +1100 ++++ src/sphinxstemru.cpp 2011-11-30 02:05:50.000000000 +1100 +@@ -68,6 +68,47 @@ struct RussianAlphabetWin1251_t + // UTF-8 implementation + ///////////////////////////////////////////////////////////////////////////// + ++#ifdef __BIG_ENDIAN__ ++struct RussianAlphabetUTF8_t ++{ ++ enum ++ { ++ A = 0xD0B0U, ++ B = 0xD0B1U, ++ V = 0xD0B2U, ++ G = 0xD0B3U, ++ D = 0xD0B4U, ++ E = 0xD0B5U, ++ YO = 0xD191U, ++ ZH = 0xD0B6U, ++ Z = 0xD0B7U, ++ I = 0xD0B8U, ++ IY = 0xD0B9U, ++ K = 0xD0BAU, ++ L = 0xD0BBU, ++ M = 0xD0BCU, ++ N = 0xD0BDU, ++ O = 0xD0BEU, ++ P = 0xD0BFU, ++ R = 0xD180U, ++ S = 0xD181U, ++ T = 0xD182U, ++ U = 0xD183U, ++ F = 0xD184U, ++ H = 0xD185U, ++ TS = 0xD186U, ++ CH = 0xD187U, ++ SH = 0xD188U, ++ SCH = 0xD189U, ++ TVY = 0xD18AU, // TVYordiy znak ++ Y = 0xD18BU, ++ MYA = 0xD18CU, // MYAgkiy znak ++ EE = 0xD18DU, ++ YU = 0xD18EU, ++ YA = 0xD18FU ++ }; ++}; ++#else + struct RussianAlphabetUTF8_t + { + enum +@@ -107,6 +148,7 @@ struct RussianAlphabetUTF8_t + YA = 0x8FD1U + }; + }; ++#endif + + #define LOC_CHAR_TYPE unsigned short + #define LOC_PREFIX(_a) _a##_utf8
participants (1)
-
jmr@macports.org