summaryrefslogtreecommitdiff
path: root/recipes/libiconv.recipe
blob: 05d993a0034bead32b75a2bb30eb723a94561698 (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
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python


class Recipe(recipe.Recipe):
    name = 'libiconv'
    version = '1.14'
    # only libraries are LGPLv2+, tools are GPLv3+ and defined below
    licenses = [License.LGPLv2Plus]
    stype = SourceType.TARBALL
    url = 'http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz'
    patches = ['libiconv/0001-Use-correct-autotools-versions.patch',
               'libiconv/0002-Add-support-for-Android.patch',
               'libiconv/0003-stdint-fix-build-with-Android-s-Bionic-fox-x86.patch',]

    configure_options = '--disable-nls --enable-static'
    platform_deps = {Platform.WINDOWS: ['gettext']}
    autoreconf_sh = './autogen.sh --skip-gnulib && autoreconf -fiv'

    files_bins = ['iconv', ]
    licenses_bins = [License.GPLv3Plus]
    files_libs = ['libiconv', 'libcharset', ]
    files_devel = ['include/iconv.h', 'include/libcharset.h',
                   'include/localcharset.h' ]
    files_lang = ['libiconv']

    def prepare(self):
        if self.config.target_platform != Platform.LINUX:
            self.runtime_dep = True
        if self.config.target_platform == Platform.IOS:
            self.append_env['CFLAGS'] = '-Dlocale_charset=iconv_locale_charset'