summaryrefslogtreecommitdiff
path: root/recipes/winpthreads-runtime.recipe
blob: b5677287533192eca615cfb77f17bb3cad0de285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
import shutil


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

    files_libs = ['libwinpthread']

    async 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'))