Mercurial > gub
view 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 |
line wrap: on
line source
from gub import misc from gub import target class Pthreads_w32 (target.MakeBuild): source = 'ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz' make_flags = 'GC CROSS=%(toolchain_prefix)s' install_command = misc.join_lines (''' install -d %(install_prefix)s/bin install -d %(install_prefix)s/include install -d %(install_prefix)s/lib && install -m644 pthread.h sched.h %(install_prefix)s/include && install -m755 pthreadGC2.dll %(install_prefix)s/bin && install -m755 libpthreadGC2.a %(install_prefix)s/lib && install -m755 pthreadGC2.dll %(install_prefix)s/bin/pthread.dll && install -m755 libpthreadGC2.a %(install_prefix)s/lib/libpthread.a ''') def compile (self): print self.get_substitution_dict ()['PATH'] target.MakeBuild.compile (self) def install (self): for file in ['pthread.h', 'sched.h']: self.file_sub ([('#undef PTW32_LEVEL\s', ''' #ifndef _POSIX_SOURCE #define _POSIX_SOURCE #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199000 /*URG*/ #define pid_t int #endif #undef PTW32_LEVEL ''')], '%(builddir)s/%(file)s', env=locals ()) self.system (''' rm -rf %(install_root)s cd %(builddir)s && %(install_command)s ''') self.install_license () self.libtool_installed_la_fixups ()