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

class Recipe(recipe.Recipe):
    name = 'gettext-m4'
    version = '0.19.8.1'
    stype = SourceType.TARBALL
    url = 'gnu://gettext/gettext-%(version)s.tar.xz'
    tarball_dirname = 'gettext-%(version)s'
    tarball_checksum = '105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4'
    # only libraries are LGPLv2+, tools are GPLv3+ and defined below
    licenses = [License.LGPLv2Plus]
    autoreconf = True
    btype = BuildType.CUSTOM

    patches = ['../gettext/0001-Fix-build-invalid-instruction-on-macOS-10.13.patch']

    files_devel = [
            'share/aclocal/codeset.m4',
            'share/aclocal/fcntl-o.m4',
            'share/aclocal/gettext.m4',
            'share/aclocal/glibc2.m4',
            'share/aclocal/glibc21.m4',
            'share/aclocal/iconv.m4',
            'share/aclocal/intdiv0.m4',
            'share/aclocal/intl.m4',
            'share/aclocal/intldir.m4',
            'share/aclocal/intlmacosx.m4',
            'share/aclocal/intmax.m4',
            'share/aclocal/inttypes-pri.m4',
            'share/aclocal/inttypes_h.m4',
            'share/aclocal/lcmessage.m4',
            'share/aclocal/lib-ld.m4',
            'share/aclocal/lib-link.m4',
            'share/aclocal/lib-prefix.m4',
            'share/aclocal/lock.m4',
            'share/aclocal/longlong.m4',
            'share/aclocal/nls.m4',
            'share/aclocal/po.m4',
            'share/aclocal/printf-posix.m4',
            'share/aclocal/progtest.m4',
            'share/aclocal/size_max.m4',
            'share/aclocal/stdint_h.m4',
            'share/aclocal/threadlib.m4',
            'share/aclocal/uintmax_t.m4',
            'share/aclocal/visibility.m4',
            'share/aclocal/wchar_t.m4',
            'share/aclocal/wint_t.m4',
            'share/aclocal/xsize.m4',
            ]

    def post_install(self):
        m4dir = os.path.join(self.build_dir, 'gettext-runtime', 'm4')
        for f in [x for x in os.listdir(m4dir) if x.endswith('.m4')]:
            shutil.copy(os.path.join(m4dir, f),
                    os.path.join(self.config.prefix, 'share', 'aclocal'))
        m4dir = os.path.join(self.build_dir, 'gettext-runtime', 'gnulib-m4')
        for f in ['lib-ld.m4', 'lib-prefix.m4', 'lib-link.m4']:
            shutil.copy(os.path.join(m4dir, f),
                    os.path.join(self.config.prefix, 'share', 'aclocal'))