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
|
class Recipe(recipe.Recipe):
name = 'winpthreads'
version = 'v2.0.8'
licenses = [License.LGPL]
srcdir = 'mingw-w64-libraries/winpthreads'
configure_options = '--enable-shared --enable-static '
add_host_build_target = False
autoreconf = True
allow_parallel_build = False
make_install = 'make install-strip'
files_all = [
'bin/libwinpthread-1.dll',
'lib/libpthread.a',
'lib/libpthread.dll.a',
'lib/libwinpthread.a',
'lib/libwinpthread.dll.a',
'lib/libwinpthread.la',
'include/pthread.h',
'include/pthread_compat.h',
'include/pthread_time.h',
'include/pthread_unistd.h',
'include/sched.h',
'include/semaphore.h',
]
def prepare(self):
self.repo_dir = os.path.join(self.config.local_sources, 'mingw-w64')
self.remotes = {'origin': '%s/%s' %
(self.config.git_root, 'mingw-w64')}
if self.config.target_arch == Architecture.X86:
host = 'i686-w64-mingw32'
else:
host = 'x86_64-w64-mingw32'
self.configure_options += ' --host=%s' % host
self.set_env('CC', '%s-gcc' % host)
self.set_env('CXX', '%s-g++' % host)
self.set_env('CPP', '%s-cpp' % host)
self.set_env('LD', '%s-ld' % host)
self.set_env('STRIP', '%s-strip' % host)
self.set_env('RANLIB', '%s-ranlib' % host)
self.set_env('DLLTOOL', '%s-dlltool' % host)
self.set_env('AR', '%s-ar' % host)
self.set_env('AS', '%s-as' % host)
|