Ticket #13310: libiconv.diff
File libiconv.diff, 5.4 KB (added by takanori@…, 17 years ago) |
---|
-
files/utf8mac.diff
1 diff -Naur libiconv-1.1 1.orig/lib/converters.h libiconv-1.11/lib/converters.h2 --- libiconv-1.1 1.orig/lib/converters.h 2006-05-18 21:43:55.000000000 +09003 +++ libiconv-1.1 1/lib/converters.h 2007-01-26 23:15:55.000000000 +09001 diff -Naur libiconv-1.12.orig/lib/converters.h libiconv-1.12/lib/converters.h 2 --- libiconv-1.12.orig/lib/converters.h 2007-05-26 08:18:25.000000000 +0900 3 +++ libiconv-1.12/lib/converters.h 2007-11-13 17:41:10.000000000 +0900 4 4 @@ -113,6 +113,7 @@ 5 5 /* General multi-byte encodings */ 6 6 #include "utf8.h" … … 9 9 #include "ucs2be.h" 10 10 #include "ucs2le.h" 11 11 #include "ucs4.h" 12 diff -Naur libiconv-1.1 1.orig/lib/encodings.def libiconv-1.11/lib/encodings.def13 --- libiconv-1.1 1.orig/lib/encodings.def 2006-05-18 21:43:55.000000000 +090014 +++ libiconv-1.1 1/lib/encodings.def 2007-01-26 23:15:55.000000000 +090012 diff -Naur libiconv-1.12.orig/lib/encodings.def libiconv-1.12/lib/encodings.def 13 --- libiconv-1.12.orig/lib/encodings.def 2007-05-26 08:17:48.000000000 +0900 14 +++ libiconv-1.12/lib/encodings.def 2007-11-13 17:41:10.000000000 +0900 15 15 @@ -55,12 +55,18 @@ 16 16 /* General multi-byte encodings */ 17 17 18 18 DEFENCODING(( "UTF-8", /* IANA, RFC 2279 */ 19 19 - /*"UTF8", JDK 1.1 */ 20 + "UTF8",/* JDK 1.1 */20 + "UTF8", /* JDK 1.1 */ 21 21 /*"CP65001", Windows */ 22 22 ), 23 23 utf8, 24 24 { utf8_mbtowc, NULL }, { utf8_wctomb, NULL }) 25 25 26 26 +DEFENCODING(( "UTF-8-MAC", /* utf8-nfd */ 27 + "UTF8-MAC",/* label from samba 2.2jp */27 + "UTF8-MAC", /* label from samba 2.2jp */ 28 28 + ), 29 29 + utf8mac, 30 30 + { utf8mac_mbtowc, NULL }, { utf8mac_wctomb, NULL }) … … 32 32 DEFENCODING(( "UCS-2", /* glibc */ 33 33 "ISO-10646-UCS-2", /* IANA */ 34 34 "csUnicode", /* IANA */ 35 diff -Naur libiconv-1.1 1.orig/lib/utf8mac.h libiconv-1.11/lib/utf8mac.h36 --- libiconv-1.1 1.orig/lib/utf8mac.h 1970-01-01 09:00:00.000000000 +090037 +++ libiconv-1.1 1/lib/utf8mac.h 2007-01-26 23:16:20.000000000 +090035 diff -Naur libiconv-1.12.orig/lib/utf8mac.h libiconv-1.12/lib/utf8mac.h 36 --- libiconv-1.12.orig/lib/utf8mac.h 1970-01-01 09:00:00.000000000 +0900 37 +++ libiconv-1.12/lib/utf8mac.h 2007-11-13 17:42:39.000000000 +0900 38 38 @@ -0,0 +1,1608 @@ 39 39 +/* 40 40 + * Copyright (C) 2003 Apple Computer, Inc. All rights reserved. … … 65 65 + Includes Unicode 3.2 decomposition code derived from Core Foundation 66 66 + */ 67 67 + 68 +#include <errno.h> /* EINVAL, ENAMETOOLONG */69 +#include <string.h> /* bzero() */70 68 +#include <libkern/OSByteOrder.h> 69 +#include <errno.h> 70 +#include <string.h> /* bzero() */ 71 71 + 72 72 +#define UTF_REVERSE_ENDIAN 0x01 /* reverse UCS-2 byte order */ 73 73 +#define UTF_NO_NULL_TERM 0x02 /* do not add null termination */ … … 1148 1148 + * NOTES: 1149 1149 + * The resulting UTF-8 string is NULL terminated. 1150 1150 + * 1151 + * If '/' chars are allowed on disk then an alternate1151 + * If '/' chars are not allowed on disk then an alternate 1152 1152 + * (replacement) char must be provided in altslash. 1153 1153 + * 1154 1154 + * input flags: … … 1260 1260 + * The input UTF-8 string does not need to be null terminated 1261 1261 + * if utf8len is set. 1262 1262 + * 1263 + * If '/' chars are allowed on disk then an alternate1263 + * If '/' chars are not allowed on disk then an alternate 1264 1264 + * (replacement) char must be provided in altslash. 1265 1265 + * 1266 1266 + * input flags: … … 1611 1611 + flags |= UTF_REVERSE_ENDIAN; 1612 1612 +#endif 1613 1613 + 1614 + ret = utf8_decodestr(s, n, ucsp, &ucslen, sizeof(ucsp), NULL, flags, &consumed);1614 + ret = utf8_decodestr(s, n, ucsp, &ucslen, sizeof(ucsp), 0, flags, &consumed); 1615 1615 + 1616 1616 + if (ret == ENAMETOOLONG) /* Name didn't fit; only ucslen chars were decoded */ 1617 1617 + return RET_TOOFEW(0); -
Portfile
3 3 PortSystem 1.0 4 4 5 5 name libiconv 6 version 1.11 7 revision 6 6 version 1.12 8 7 categories textproc 9 8 maintainers ryandesign 10 9 platforms darwin freebsd linux … … 26 25 27 26 checksums \ 28 27 ${distname}${extract.suffix} \ 29 md5 b77a17e4a5a817100ad4b2613935055e\30 sha1 df09c3ef43443ac15c0c2d49fd791aa73a64bf30\31 rmd160 9adbcd61598bee2fbe4eb94ac3f35f83f568d9d0\28 md5 c2be282595751535a618ae0edeb8f648 \ 29 sha1 a5738d7dfbbd01c49e8ce026ea4ffa0f01af0179 \ 30 rmd160 74a63c1a2963ac1729c1ac7adfec8fd397a685bd \ 32 31 ${distname}-cp932-devel.patch.gz \ 33 md5 71caa7501358d462862ffab0bd49a152\34 sha1 f66d156ec559fedee411393dc7223064039ce209\35 rmd160 bacc8421a7e57a0d4dd4d3e133581f55bdd0b88632 md5 124d240bff22e20b86e86d8c8e3bae1c \ 33 sha1 d989b1ce0a829fa3a12c08c3634efd5f169b399a \ 34 rmd160 2042116888ee28572c1f7bcc2756e4a29edfbad0 36 35 37 36 depends_build \ 38 37 bin:gperf:gperf … … 84 83 MACOSX_DEPLOYMENT_TARGET=10.4 85 84 configure.env-append \ 86 85 MACOSX_DEPLOYMENT_TARGET=10.4 86 if {[variant_isset universal]} { 87 configure.ldflags-append "-isysroot /Developer/SDKs/MacOSX10.4u.sdk" 88 } 87 89 } 88 90 89 91 platform freebsd {