summaryrefslogtreecommitdiff
path: root/recipes/winpthreads-runtime.recipe
blob: 34e42ff044bca70dc279a1360e6afbabfa8e0fd5 (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
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
import shutil
from cerbero.errors import FatalError


class Recipe(recipe.Recipe):
    name = 'winpthreads-runtime'
    version = '0.1'
    licenses = [License.LGPL]
    btype = BuildType.CUSTOM
    stype = SourceType.CUSTOM

    files_libs = ['libwinpthread']

    def install(self):
        if self.config.platform == Platform.WINDOWS:
            binmingw = 'bin'
        else:
            binmingw = os.path.join(self.config.host, 'lib')
        # copy the  dll's required at runtime
        for f in ['libwinpthread-1']:
            shutil.copy(
                os.path.join(self.config.toolchain_prefix, binmingw, f + '.dll'),
                os.path.join(self.config.prefix, 'bin', f + '.dll'))