Mercurial > gub
annotate gub/specs/pthreads-w32.py @ 6512:ccc20ae889ca default tip guix
mingw::guile-2.0.7 builds.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Thu, 24 Mar 2016 08:03:39 +0100 |
parents | 9cc45009b221 |
children |
rev | line source |
---|---|
4617 | 1 from gub import misc |
4628
e4825590ebe5
s/targetbuild/target/, s/toolsbuild/tools/.
Jan Nieuwenhuizen <janneke@gnu.org>
parents:
4617
diff
changeset
|
2 from gub import target |
4617 | 3 |
4628
e4825590ebe5
s/targetbuild/target/, s/toolsbuild/tools/.
Jan Nieuwenhuizen <janneke@gnu.org>
parents:
4617
diff
changeset
|
4 class Pthreads_w32 (target.MakeBuild): |
6512
ccc20ae889ca
mingw::guile-2.0.7 builds.
Jan Nieuwenhuizen <janneke@gnu.org>
parents:
5661
diff
changeset
|
5 source = 'ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz' |
5644
7aee893b7746
Grand make_flags, compile_flags, install_flags hack.
Jan Nieuwenhuizen <janneke@gnu.org>
parents:
5643
diff
changeset
|
6 make_flags = 'GC CROSS=%(toolchain_prefix)s' |
5661
9cc45009b221
Grand install_command () -> class.install_command hack.
Jan Nieuwenhuizen <janneke@gnu.org>
parents:
5644
diff
changeset
|
7 install_command = misc.join_lines (''' |
4617 | 8 install -d %(install_prefix)s/bin |
9 install -d %(install_prefix)s/include | |
10 install -d %(install_prefix)s/lib | |
11 && install -m644 pthread.h sched.h %(install_prefix)s/include | |
12 && install -m755 pthreadGC2.dll %(install_prefix)s/bin | |
13 && install -m755 libpthreadGC2.a %(install_prefix)s/lib | |
14 && install -m755 pthreadGC2.dll %(install_prefix)s/bin/pthread.dll | |
15 && install -m755 libpthreadGC2.a %(install_prefix)s/lib/libpthread.a | |
16 ''') | |
6512
ccc20ae889ca
mingw::guile-2.0.7 builds.
Jan Nieuwenhuizen <janneke@gnu.org>
parents:
5661
diff
changeset
|
17 def compile (self): |
ccc20ae889ca
mingw::guile-2.0.7 builds.
Jan Nieuwenhuizen <janneke@gnu.org>
parents:
5661
diff
changeset
|
18 print self.get_substitution_dict ()['PATH'] |
ccc20ae889ca
mingw::guile-2.0.7 builds.
Jan Nieuwenhuizen <janneke@gnu.org>
parents:
5661
diff
changeset
|
19 target.MakeBuild.compile (self) |
4617 | 20 def install (self): |
21 for file in ['pthread.h', 'sched.h']: | |
6512
ccc20ae889ca
mingw::guile-2.0.7 builds.
Jan Nieuwenhuizen <janneke@gnu.org>
parents:
5661
diff
changeset
|
22 self.file_sub ([('#undef PTW32_LEVEL\s', ''' |
4617 | 23 #ifndef _POSIX_SOURCE |
24 #define _POSIX_SOURCE | |
25 #undef _POSIX_C_SOURCE | |
26 #define _POSIX_C_SOURCE 199000 | |
27 /*URG*/ | |
28 #define pid_t int | |
29 #endif | |
30 | |
31 #undef PTW32_LEVEL | |
32 ''')], | |
33 '%(builddir)s/%(file)s', env=locals ()) | |
34 self.system (''' | |
35 rm -rf %(install_root)s | |
36 cd %(builddir)s && %(install_command)s | |
37 ''') | |
38 self.install_license () | |
39 self.libtool_installed_la_fixups () |