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

class Recipe(recipe.Recipe):
    name = 'gettext'
    version = '0.18.1.1+2012-01-26'
    # only libraries are LGPLv2+, tools are GPLv3+ and defined below
    licenses = [License.LGPLv2Plus]
    srcdir = 'gettext-runtime'
    platform_deps = {
        Platform.DARWIN:  ['libiconv'],
        Platform.WINDOWS:  ['mingw-runtime'],
            }

    files_libs = ['libintl']
    files_devel = ['include/libintl.h']

    def prepare (self):
        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
        if self.config.target_platform == Platform.WINDOWS:
            self.configure_options += ' --enable-threads=win32'
        elif self.config.target_platform == Platform.ANDROID:
            self.autoreconf = True
            self.autoreconf_sh = 'cd .. && ./autogen.sh --quick --skip-gnulib'
        if self.config.target_platform != Platform.LINUX:
            self.runtime_dep = True