aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/iconv/README.chromium
blob: e9e4df5e52c0e2f1d1dc99342eb7bd28cb60fa8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Name: libiconv
Short Name: libiconv
URL: git://git.savannah.gnu.org/libiconv.git
Version: 1.14
License: Libraries under LGPL, program under GPL
License File: NOT_SHIPPED
Security Critical: No

Description:
iconv is a library for converting between different character encodings.
Used in Skia as a dependency of libpoppler, for PDF rasterization during
testing.

Local Modifications:
No changes to files from the upstream repository.
Platform-specific configuration files added to
third_party/iconv/config/windows:
  config.h
  iconv.h
  localcharset.h

These files were created from the header templates based on instructions in:
http://www.codeproject.com/Articles/302012/How-to-Build-libiconv-with-Microsoft-Visual-Studio,
then kludging it to build. The process used to create them from release
sources are:
1. Download the libiconv-1.14 tarball from
   http://www.gnu.org/software/libiconv/#downloading
2. Copy and rename these files:
    (libiconv-1.14)/libcharset/include/localcharset.h.build.in
      -> third_party/iconv/config/windows/localcharset.h
    (libiconv-1.14)/include/iconv.h.build.in
      -> third_party/iconv/config/windows/iconv.h
    (libiconv-1.14)/config.h.in
      -> third_party/iconv/config/windows/config.h
3. Modify localcharset.h as follows:
    Replace
      #if @HAVE_VISIBILITY@ && BUILDING_LIBCHARSET
      #define LIBCHARSET_DLL_EXPORTED __attribute__((__visibility__("default")))
      #else
      #define LIBCHARSET_DLL_EXPORTED
      #endif
    with
      #define LIBCHARSET_DLL_EXPORTED
4. Modify config.h as follows:
    Delete line 30:
      #undef EILSEQ
    Change line 686 to:
      #define ICONV_CONST const
5. Modify iconv.h as follows:
    Replace
      #if @HAVE_VISIBILITY@ && BUILDING_LIBICONV
      #define LIBICONV_DLL_EXPORTED __attribute__((__visibility__("default")))
      #else
      #define LIBICONV_DLL_EXPORTED
      #endif
    with
      #define LIBICONV_DLL_EXPORTED 
    Delete all references to @DLL_VARIABLE@ (find and replace with nothing).
    Find and replace these:
      @ICONV_CONST@ -> const
      @USE_MBSTATE_T@ -> USE_MBSTATE_T
      @BROKEN_WCHAR_H@ -> BROKEN_WCHAR_H
      @HAVE_WCHAR_T@ -> HAVE_WCHAR_T
Note: if a dynamic library is needed for whatever reason,
LIBCHARSET_DLL_EXPORTED and LIBICONV_DLL_EXPORTED needs to be defined as
either __declspec(dllexport) or __declspec(dllimport).

Autogenerated files (consistent across platforms) added to
third_party/iconv/config:
  aliases.h
  canonical_dos.h
  canonical.h
  canonical_local.h
  flags.h

These files were pulled from a release tarball.