gettext.recipe 1.23 KB
Newer Older
1
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
2
import shutil
Andoni Morales Alastruey's avatar
Andoni Morales Alastruey committed
3
4
5

class Recipe(recipe.Recipe):
    name = 'gettext'
6
    version = '0.19.5.1'
7
8
    # only libraries are LGPLv2+, tools are GPLv3+ and defined below
    licenses = [License.LGPLv2Plus]
9
    stype = SourceType.TARBALL
10
    url = 'http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.5.1.tar.gz'
11
    srcdir = 'gettext-runtime'
12
13
    patches = ['gettext/0001-Fix-linker-error-redefinition-of-vasprintf.patch',
               'gettext/0001-Undefine-__USE_MINGW_ANSI_STDIO-as-otherwise-stdio.h.patch' ]
14
    platform_deps = {
15
        Platform.ANDROID:  ['libiconv'],
16
17
        Platform.WINDOWS:  ['mingw-runtime'],
            }
18

19
20
    files_libs = ['libintl']
    files_devel = ['include/libintl.h']
Andoni Morales Alastruey's avatar
Andoni Morales Alastruey committed
21
22

    def prepare (self):
23
24
25
        intl_path = os.path.join(self.make_dir, 'intl')
        self.make = 'cd %s && make' % intl_path
        self.make_install = 'cd %s && make PACKAGE=gettext-tools install' % intl_path
26
        if self.config.target_platform == Platform.WINDOWS:
27
            self.configure_options += ' --enable-threads=win32'
28
29
        if self.config.target_platform != Platform.LINUX:
            self.runtime_dep = True
30
        self.append_env['CFLAGS'] = '-Dlocale_charset=intl_locale_charset'