Ticket #13310: libiconv.diff

File libiconv.diff, 5.4 KB (added by takanori@…, 17 years ago)

Note that this patch also contains a fix reported in #12084.

  • files/utf8mac.diff

     
    1 diff -Naur libiconv-1.11.orig/lib/converters.h libiconv-1.11/lib/converters.h
    2 --- libiconv-1.11.orig/lib/converters.h 2006-05-18 21:43:55.000000000 +0900
    3 +++ libiconv-1.11/lib/converters.h      2007-01-26 23:15:55.000000000 +0900
     1diff -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
    44@@ -113,6 +113,7 @@
    55 /* General multi-byte encodings */
    66 #include "utf8.h"
     
    99 #include "ucs2be.h"
    1010 #include "ucs2le.h"
    1111 #include "ucs4.h"
    12 diff -Naur libiconv-1.11.orig/lib/encodings.def libiconv-1.11/lib/encodings.def
    13 --- libiconv-1.11.orig/lib/encodings.def        2006-05-18 21:43:55.000000000 +0900
    14 +++ libiconv-1.11/lib/encodings.def     2007-01-26 23:15:55.000000000 +0900
     12diff -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
    1515@@ -55,12 +55,18 @@
    1616 /* General multi-byte encodings */
    1717 
    1818 DEFENCODING(( "UTF-8",                  /* IANA, RFC 2279 */
    1919-            /*"UTF8",                      JDK 1.1 */
    20 +              "UTF8",                   /* JDK 1.1 */
     20+            "UTF8",                     /* JDK 1.1 */
    2121             /*"CP65001",                   Windows */
    2222             ),
    2323             utf8,
    2424             { utf8_mbtowc, NULL },        { utf8_wctomb, NULL })
    2525 
    2626+DEFENCODING(( "UTF-8-MAC",              /* utf8-nfd */
    27 +              "UTF8-MAC",               /* label from samba 2.2jp */
     27+            "UTF8-MAC",                 /* label from samba 2.2jp */
    2828+            ),
    2929+            utf8mac,
    3030+            { utf8mac_mbtowc, NULL },     { utf8mac_wctomb, NULL })
     
    3232 DEFENCODING(( "UCS-2",                  /* glibc */
    3333               "ISO-10646-UCS-2",        /* IANA */
    3434               "csUnicode",              /* IANA */
    35 diff -Naur libiconv-1.11.orig/lib/utf8mac.h libiconv-1.11/lib/utf8mac.h
    36 --- libiconv-1.11.orig/lib/utf8mac.h    1970-01-01 09:00:00.000000000 +0900
    37 +++ libiconv-1.11/lib/utf8mac.h 2007-01-26 23:16:20.000000000 +0900
     35diff -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
    3838@@ -0,0 +1,1608 @@
    3939+/*
    4040+ * Copyright (C) 2003 Apple Computer, Inc. All rights reserved.
     
    6565+       Includes Unicode 3.2 decomposition code derived from Core Foundation
    6666+ */
    6767+
    68 +#include <errno.h>                      /* EINVAL, ENAMETOOLONG */
    69 +#include <string.h>                     /* bzero() */
    7068+#include <libkern/OSByteOrder.h>
     69+#include <errno.h>
     70+#include <string.h>                    /* bzero() */
    7171+
    7272+#define        UTF_REVERSE_ENDIAN      0x01    /* reverse UCS-2 byte order */
    7373+#define        UTF_NO_NULL_TERM        0x02    /* do not add null termination */
     
    11481148+ * NOTES:
    11491149+ *    The resulting UTF-8 string is NULL terminated.
    11501150+ *
    1151 + *    If '/' chars are allowed on disk then an alternate
     1151+ *    If '/' chars are not allowed on disk then an alternate
    11521152+ *    (replacement) char must be provided in altslash.
    11531153+ *
    11541154+ * input flags:
     
    12601260+ *    The input UTF-8 string does not need to be null terminated
    12611261+ *    if utf8len is set.
    12621262+ *
    1263 + *    If '/' chars are allowed on disk then an alternate
     1263+ *    If '/' chars are not allowed on disk then an alternate
    12641264+ *    (replacement) char must be provided in altslash.
    12651265+ *
    12661266+ * input flags:
     
    16111611+    flags |= UTF_REVERSE_ENDIAN;
    16121612+#endif
    16131613+
    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);
    16151615+
    16161616+    if (ret == ENAMETOOLONG)   /* Name didn't fit; only ucslen chars were decoded */
    16171617+       return RET_TOOFEW(0);
  • Portfile

     
    33PortSystem          1.0
    44
    55name                libiconv
    6 version             1.11
    7 revision            6
     6version             1.12
    87categories          textproc
    98maintainers         ryandesign
    109platforms           darwin freebsd linux
     
    2625
    2726checksums \
    2827        ${distname}${extract.suffix} \
    29                 md5 b77a17e4a5a817100ad4b2613935055e \
    30                 sha1 df09c3ef43443ac15c0c2d49fd791aa73a64bf30 \
    31                 rmd160 9adbcd61598bee2fbe4eb94ac3f35f83f568d9d0 \
     28                md5 c2be282595751535a618ae0edeb8f648 \
     29                sha1 a5738d7dfbbd01c49e8ce026ea4ffa0f01af0179 \
     30                rmd160 74a63c1a2963ac1729c1ac7adfec8fd397a685bd \
    3231        ${distname}-cp932-devel.patch.gz \
    33                 md5 71caa7501358d462862ffab0bd49a152 \
    34                 sha1 f66d156ec559fedee411393dc7223064039ce209 \
    35                 rmd160 bacc8421a7e57a0d4dd4d3e133581f55bdd0b886
     32                md5 124d240bff22e20b86e86d8c8e3bae1c \
     33                sha1 d989b1ce0a829fa3a12c08c3634efd5f169b399a \
     34                rmd160 2042116888ee28572c1f7bcc2756e4a29edfbad0
    3635
    3736depends_build \
    3837        bin:gperf:gperf
     
    8483                MACOSX_DEPLOYMENT_TARGET=10.4
    8584        configure.env-append \
    8685                MACOSX_DEPLOYMENT_TARGET=10.4
     86        if {[variant_isset universal]} {
     87                configure.ldflags-append "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
     88        }
    8789}
    8890
    8991platform freebsd {