# HG changeset patch # User Jan Nieuwenhuizen # Date 1458803019 -3600 # Node ID ccc20ae889ca7e72b5ecfe24f9a280ed30ab4f3b # Parent 728bffca309a0eed9b2ca615dc77e2070dd2ce43 mingw::guile-2.0.7 builds. diff -r 728bffca309a -r ccc20ae889ca gub/specs/autoconf.py --- a/gub/specs/autoconf.py Mon Mar 14 23:03:50 2016 +0100 +++ b/gub/specs/autoconf.py Thu Mar 24 08:03:39 2016 +0100 @@ -3,6 +3,8 @@ class Autoconf__tools (tools.AutoBuild): source = 'http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.63.tar.gz' parallel_build_broken = True + def get_conflict_dict (self): + return {'': ['autoconf2_61', 'autoconf2_69']} dependencies = [ 'm4', 'perl', diff -r 728bffca309a -r ccc20ae889ca gub/specs/autoconf2_61.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/autoconf2_61.py Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,11 @@ +from gub import tools + +class Autoconf2_61__tools (tools.AutoBuild): + source = 'http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.61.tar.gz' + parallel_build_broken = True + def get_conflict_dict (self): + return {'': ['autoconf', 'autoconf2_69']} + dependencies = [ + 'm4', + 'perl', + ] diff -r 728bffca309a -r ccc20ae889ca gub/specs/autoconf2_69.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/autoconf2_69.py Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,11 @@ +from gub import tools + +class Autoconf2_69__tools (tools.AutoBuild): + source = 'http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.69.tar.gz' + parallel_build_broken = True + def get_conflict_dict (self): + return {'': ['autoconf', 'autoconf2_61']} + dependencies = [ + 'm4', + 'perl', + ] diff -r 728bffca309a -r ccc20ae889ca gub/specs/automake.py --- a/gub/specs/automake.py Mon Mar 14 23:03:50 2016 +0100 +++ b/gub/specs/automake.py Thu Mar 24 08:03:39 2016 +0100 @@ -2,6 +2,8 @@ class Automake__tools (tools.AutoBuild): source = 'http://ftp.gnu.org/pub/gnu/automake/automake-1.10.1.tar.gz' + def get_conflict_dict (self): + return {'': ['automake1_11', 'automake1_12']} dependencies = ['autoconf'] configure_variables = (tools.AutoBuild.configure_variables + ' AUTOM4TE=%(tools_prefix)s/bin/autom4te' diff -r 728bffca309a -r ccc20ae889ca gub/specs/automake1_11.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/automake1_11.py Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,13 @@ +from gub import tools + +class Automake1_11__tools (tools.AutoBuild): + source = 'http://ftp.gnu.org/pub/gnu/automake/automake-1.11.tar.gz' + def get_conflict_dict (self): + return {'': ['automake', 'automake1_12']} + dependencies = ['autoconf'] + configure_variables = (tools.AutoBuild.configure_variables + + ' AUTOM4TE=%(tools_prefix)s/bin/autom4te' + + ' autom4te_perllibdir=%(tools_prefix)s/share/autoconf' + + ' AC_MACRODIR=%(tools_prefix)s/share/autoconf' + + ' M4PATH=%(tools_prefix)s/share/autoconf' + + ' AUTOM4TE_CFG=%(tools_prefix)s/share/autoconf/autom4te.cfg') diff -r 728bffca309a -r ccc20ae889ca gub/specs/automake1_12.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/automake1_12.py Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,13 @@ +from gub import tools + +class Automake1_12__tools (tools.AutoBuild): + source = 'http://ftp.gnu.org/pub/gnu/automake/automake-1.12.2.tar.gz' + def get_conflict_dict (self): + return {'': ['automake', 'automake1_11']} + dependencies = ['autoconf'] + configure_variables = (tools.AutoBuild.configure_variables + + ' AUTOM4TE=%(tools_prefix)s/bin/autom4te' + + ' autom4te_perllibdir=%(tools_prefix)s/share/autoconf' + + ' AC_MACRODIR=%(tools_prefix)s/share/autoconf' + + ' M4PATH=%(tools_prefix)s/share/autoconf' + + ' AUTOM4TE_CFG=%(tools_prefix)s/share/autoconf/autom4te.cfg') diff -r 728bffca309a -r ccc20ae889ca gub/specs/cairo.py --- a/gub/specs/cairo.py Mon Mar 14 23:03:50 2016 +0100 +++ b/gub/specs/cairo.py Thu Mar 24 08:03:39 2016 +0100 @@ -38,7 +38,8 @@ + ' LDFLAGS=-lpthread' ) dependencies = (Cairo_without_X11.dependencies - + ['pthreads-w32-devel']) + #+ ['pthreads-w32-devel'] + ) class Cairo__darwin (Cairo_without_X11): pass diff -r 728bffca309a -r ccc20ae889ca gub/specs/gmp.py --- a/gub/specs/gmp.py Mon Mar 14 23:03:50 2016 +0100 +++ b/gub/specs/gmp.py Thu Mar 24 08:03:39 2016 +0100 @@ -7,6 +7,7 @@ class Gmp (target.AutoBuild): source = 'http://ftp.gnu.org/pub/gnu/gmp/gmp-6.0.0a.tar.xz' + xsource = 'http://ftp.gnu.org/pub/gnu/gmp/gmp-6.1.0.tar.xz' def __init__ (self, settings, source): target.AutoBuild.__init__ (self, settings, source) if not self.settings.platform.startswith ('darwin'): @@ -23,7 +24,7 @@ # hack seems to work. self.file_sub ([('(#! .*/bin/.*sh)', r'#! \1\ntagname=CXX')], '%(builddir)s/libtool') - + class Gmp__darwin (Gmp): def patch (self): ## powerpc/darwin cross barfs on all C++ includes from diff -r 728bffca309a -r ccc20ae889ca gub/specs/guile-2.0.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/guile-2.0.py Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,323 @@ +import os +# +from gub import context +from gub import misc +from gub import loggedos +from gub import octal +from gub import repository +from gub import target +from gub import tools +from gub import tools32 + +class Guile (target.AutoBuild): + # source = 'git://git.sv.gnu.org/guile.git&branch=branch_release-1-8&revision=bba579611b3671c7e4c1515b100f01c048a07935' + source = 'http://ftp.gnu.org/gnu/guile/guile-2.0.0.1.tar.gz' + patches = [ + 'guile-1.9.14-reloc.patch', + 'guile-1.8.6-test-use-srfi.patch', + 'guile-2.0.0-configure-cross.patch', + 'guile-2.0.0.1-cross.patch', + 'guile-1.9.14-gnulib-libunistring.patch', + 'guile-2.0.0.1-compile-mkdir.patch', + ] + force_autoupdate = True + dependencies = [ + 'gettext-devel', + 'gmp-devel', + 'libtool', + 'libffi', + 'libunistring', + 'libgc', + 'tools::guile', + 'tools::gnulib', + 'tools::pkg-config', + ] + guile_configure_flags = misc.join_lines (''' +--without-threads +--with-gnu-ld +--enable-deprecated +--enable-discouraged +--disable-error-on-warning +--enable-relocation +--enable-rpath +--with-pic +''') + configure_variables = (target.AutoBuild.configure_variables + + misc.join_lines (''' +CC_FOR_BUILD=" +LD_PRELOAD= +C_INCLUDE_PATH= +CPPFLAGS= +LIBRARY_PATH= +PATH_SEPARATOR=':' +PATH=/usr/bin:$PATH +/usr/bin/cc +-I%(builddir)s +-I%(srcdir)s +-I%(builddir)s/libguile +-I. +-I%(srcdir)s/libguile" +''')) + config_cache_overrides = target.AutoBuild.config_cache_overrides + ''' +gl_cv_func_svid_putenv=yes +''' + # FIXME: guile runs gen_scmconfig [when not x-building also guile] + # without setting the proper LD_LIBRARY_PATH. + compile_flags_native = (' LD_PRELOAD= ' + + ' LD_LIBRARY_PATH=%(tools_prefix)s/lib:${LD_LIBRARY_PATH-/foe} ' + + ' CFLAGS="-I%(srcdir)s -I%(builddir)s -DHAVE_CONFIG_H=1"' + + ' LIBFFI_CFLAGS=' + + ' LDFLAGS=' + + ' cross_compiling=yes ') + # FIXME: guile runs gen_scmconfig [when not x-building also guile] + # without setting the proper LD_LIBRARY_PATH. + configure_command = ('GUILE_FOR_BUILD=%(tools_archmatch_prefix)s/bin/guile ' + + target.AutoBuild.configure_command + + guile_configure_flags) + compile_command = ('export preinstguile=%(tools_archmatch_prefix)s/bin/guile; ' + + target.AutoBuild.compile_command) + install_command = ('export preinstguile=%(tools_archmatch_prefix)s/bin/guile; ' + + target.AutoBuild.install_command) + subpackage_names = ['doc', 'devel', 'runtime', ''] + @staticmethod + def version_from_VERSION (self): + return self.version_from_shell_script ('GUILE-VERSION', + 'GUILE_MAJOR_VERSION', + '%(GUILE_MAJOR_VERSION)s.%(GUILE_MINOR_VERSION)s.%(GUILE_MICRO_VERSION)s', + '1.8.6') + def __init__ (self, settings, source): + target.AutoBuild.__init__ (self, settings, source) + if isinstance (source, repository.Git): + ##source.version = lambda: '1.8.6' + source.version = misc.bind_method (Guile.version_from_VERSION, + source) + self.so_version = '17' + # REMOVE putenv! + gnulib_modules = 'alignof alloca-opt announce-gen autobuild byteswap canonicalize-lgpl duplocale environ extensions flock fpieee full-read full-write func gendocs getaddrinfo git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton isinf isnan lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile nproc stat-time stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings ' + def patch (self): + self.dump ('''#!/bin/sh +exec %(tools_archmatch_prefix)s/bin/guile "$@" +''', "%(srcdir)s/pre-inst-guile.in") + #self.autopatch () + self.system ('cp -pv %(sourcefiledir)s/fcntl-o.m4 %(srcdir)s/m4') + self.system ('%(tools_prefix)s/share/gnulib/gnulib-tool --import --dir=%(srcdir)s --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files %(gnulib_modules)s') + target.AutoBuild.patch (self) + def autoupdate (self): + self.system ('cd %(srcdir)s && ./autogen.sh') + # .libs/libguile_2.0_la-arbiters.o: In function `__gmpz_abs': + # arbiters.c:(.text+0x0): multiple definition of `__gmpz_abs' + self.file_sub ([('-std=gnu99', ''),('-std=c99', '')], '%(srcdir)s/configure') + self.file_sub ([('cross_compiling=(maybe|no|yes)', + 'cross_compiling=yes')], '%(srcdir)s/configure') + def autopatch (self): + self.file_sub ([(r'AC_CONFIG_SUBDIRS\(guile-readline\)', '')], + '%(srcdir)s/configure.in') + self.file_sub ([(r'guile-readline', '')], + '%(srcdir)s/Makefile.am') + # Guile [doc] does not compile with dash *and* not with + # librestrict-stat.so; patch out. + if isinstance (self.source, repository.Git): + self.file_sub ([(' doc ', ' ')], '%(srcdir)s/Makefile.am') + self.file_sub ([('guile-readline', '')], '%(srcdir)s/Makefile.am') + else: + self.file_sub ([(' doc ', ' ')], '%(srcdir)s/Makefile.in') + self.file_sub ([('guile-readline', '')], '%(srcdir)s/Makefile.in') + self.dump ('', '%(srcdir)s/doc/ref/version.texi') + self.dump ('', '%(srcdir)s/doc/tutorial/version.texi') + def compile (self): + ## Ugh: broken dependencies break parallel build with make -jX + self.system ('cd %(builddir)s/libguile && make %(compile_flags_native)s gen-scmconfig guile_filter_doc_snarfage') + # Remove -L %(system_root)s from `guile-config link' + self.system ('cd %(builddir)s/libguile && make %(compile_flags_native)slibpath.h') + self.file_sub ([('''-L *%(system_root)s''', '-L')], + '%(builddir)s/libguile/libpath.h') + target.AutoBuild.compile (self) + def install (self): + # with 1.8.7: libtool: cannot install directory not ending in... + # after config.status is being re-run for building of libpath.h + self.update_libtool () + target.AutoBuild.install (self) + majmin_version = '.'.join (self.expand ('%(version)s').split ('.')[0:2]) + majmin_version = '2.0' + + self.dump (''' +prependdir GUILE_LOAD_PATH=$INSTALLER_PREFIX/share/guile/%(majmin_version)s +prependdir GUILE_LOAD_PATH=$INSTALLER_PREFIX/share/guile/site +prependdir GUILE_LOAD_COMPILED_PATH=$INSTALLER_PREFIX/lib/guile/%(majmin_version)s/ccache +''', + '%(install_prefix)s/etc/relocate/guile.reloc', + env=locals ()) + version = self.expand ('%(version)s') + #FIXME: c&p linux.py + self.dump ('''\ +#! /bin/sh +test "$1" = "--version" && echo "%(target_architecture)s-guile-config - Guile version %(version)s" +prefix=%(system_prefix)s +test "$1" = "compile" && echo "-I$prefix/include/guile/2.0" +test "$1" = "link" && echo "-L$prefix/lib -lguile-2.0 -lgmp" +test "$1" = "info" && test "$2" = "guileversion" && echo "%(version)s" +exit 0 +''', + '%(install_prefix)s%(cross_dir)s/bin/%(target_architecture)s-guile-config') + self.chmod ('%(install_prefix)s%(cross_dir)s/bin/%(target_architecture)s-guile-config', octal.o755) + self.system ('cd %(install_prefix)s%(cross_dir)s/bin && cp -pv %(target_architecture)s-guile-config guile-config') + +class Guile__mingw (Guile): + def __init__ (self, settings, source): + Guile.__init__ (self, settings, source) + # Configure (compile) without -mwindows for console + self.target_gcc_flags = '-mms-bitfields' + patches = Guile.patches + [ + 'guile-1.9.15-mingw.patch', + 'guile-1.9.14-mingw-dirent.patch', + 'guile-1.9.15-mingw-compile.patch', + 'guile-1.9.15-mingw-canonicalize.patch', + 'guile-1.9.15-mingw-fports.patch', + 'guile-1.9.15-mingw-rename.patch', + 'guile-1.9.15-mingw-cachedir.patch', + 'guile-2.0.0-mingw-compile-binary.patch', + 'guile-2.0.0-mingw-fchmod.patch', + 'guile-2.0.0-mingw-dynl.patch', + 'guile-2.0.0.1-mingw-boot.scm', + ] + dependencies = (Guile.dependencies + [ + #'pthreads-w32', + 'regex-devel', + 'mingw-extras', + ]) + configure_flags = (Guile.configure_flags + + ' --without-threads') + configure_variables = (Guile.configure_variables + .replace ("':'", "';'") +###we're debugging here +###CFLAGS='-O2 -DHAVE_CONFIG_H=1 -I%(builddir)s' + + misc.join_lines (''' +CFLAGS='-g -DHAVE_CONFIG_H=1 -I%(builddir)s' +LIBS='-lgc -lmingw-extras' +''')) + config_cache_overrides = Guile.config_cache_overrides + ''' +gl_cv_socket_ipv6=no +guile_cv_have_ipv6=no +scm_cv_struct_timespec=${scm_cv_struct_timespec=no} +guile_cv_func_usleep_declared=${guile_cv_func_usleep_declared=yes} +guile_cv_exeext=${guile_cv_exeext=} +libltdl_cv_sys_search_path=${libltdl_cv_sys_search_path="%(system_prefix)s/lib"} +''' + def configure (self): + self.file_sub ([('''^#(LIBOBJS=".*fileblocks.*)''', r'\1')], + '%(srcdir)s/configure') + Guile.configure (self) + for libtool in ['%(builddir)s/libtool']: # readline patched-out: '%(builddir)s/guile-readline/libtool']: + self.file_sub ([('-mwindows', '')], libtool) + + gnulib_modules = (Guile.gnulib_modules + + 'accept bind close connect getpeername getsockname getsockopt listen recv recv recvfrom send sendto setsockopt shutdown socket ') + def patch (self): + Guile.patch (self) + # self.file_sub ([('putenv', 'gnulib_putenv')], '%(srcdir)s/lib/putenv.c') + self.file_sub ([('putenv', 'gnulib_putenv')], '%(srcdir)s/lib/stdlib.in.h') + def compile (self): + ## Why the !?#@$ is .EXE only for guile_filter_doc_snarfage? + self.system ('''cd %(builddir)s/libguile &&make %(compile_flags_native)sgen-scmconfig guile_filter_doc_snarfage.exe''') + self.system ('cd %(builddir)s/libguile && cp guile_filter_doc_snarfage.exe guile_filter_doc_snarfage') + Guile.compile (self) + def install (self): + Guile.install (self) + self.system ('''cd %(install_prefix)s/bin && cp guile.exe guile-windows.exe''') + +class Guile__linux (Guile): + compile_command = ('export LD_LIBRARY_PATH=%(builddir)s/libguile/.libs:$LD_LIBRARY_PATH;' + + Guile.compile_command) + +class Guile__linux__ppc (Guile__linux): + config_cache_overrides = Guile__linux.config_cache_overrides + ''' +guile_cv_have_libc_stack_end=no +''' + +class Guile__freebsd (Guile): + config_cache_overrides = Guile.config_cache_overrides + ''' +ac_cv_type_socklen_t=yes +guile_cv_use_csqrt="no" +''' + +class Guile__darwin (Guile): + patches = Guile.patches + ['guile-1.9.14-pthreads-cross.patch'] + def install (self): + Guile.install (self) + def dylib_link (logger, fname): + directory = os.path.split (fname)[0] + src = os.path.basename (fname) + dst = os.path.splitext (os.path.basename (fname))[0] + '.so' + loggedos.symlink (logger, src, os.path.join (directory, dst)) + self.map_locate (dylib_link, + self.expand ('%(install_prefix)s/lib/'), + 'libguile-srfi*.dylib') + +class Guile__darwin__x86 (Guile__darwin): + def configure (self): + self.file_sub ([('guile-readline', '')], + '%(srcdir)s/Makefile.in') + Guile__darwin.configure (self) + +class Guile__linux__x86 (Guile): + patches = Guile.patches + [ + 'guile-1.9.14-pthreads-cross.patch', + 'guile-1.9.14-struct.patch', + ] + compile_flags_native = (Guile.compile_flags_native + + 'CPATH="%(srcdir)s:%(builddir)s:%(system_prefix)s/include" ') + +class Guile__tools (tools.AutoBuild, Guile): + patches = [ + 'guile-2.0.0.1-testsuite.patch', + 'guile-2.0.0-mingw-compile-binary.patch', + 'guile-2.0.0.1-compile-mkdir.patch', + ] + dependencies = (Guile.dependencies + + [ + 'autoconf', + 'automake', + 'gettext', + 'flex', + 'libtool' + ]) + make_flags = Guile.make_flags + # Doing make gen-scmconfig, guile starts a configure recheck: + # cd .. && make am--refresh + # /bin/sh ./config.status --recheck + # leading to + # checking size of char... 0 + # Great idea, let's re-check! You never know... :-) + compile_flags_native = misc.join_lines (''' +LD_LIBRARY_PATH=%(system_prefix)s/lib +CFLAGS='-O2 -I%(system_prefix)s/include' +LDFLAGS='-L%(system_prefix)s/lib %(rpath)s' +''') + configure_command = ('LD_LIBRARY_PATH=%(system_prefix)s/lib:${LD_LIBRARY_PATH-/foe} ' + + tools.AutoBuild.configure_command + + Guile.guile_configure_flags) + # FIXME: when configuring, guile runs binaries linked against + # libltdl. + # FIXME: when not x-building, guile runs gen_scmconfig, guile without + # setting the proper LD_LIBRARY_PATH. + compile_command = ('export LD_LIBRARY_PATH=%(builddir)s/libguile/.libs:%(system_prefix)s/lib:${LD_LIBRARY_PATH-/foe};' + + tools.AutoBuild.compile_command) + install_command = tools.AutoBuild.install_command + def patch (self): + tools.AutoBuild.patch (self) + #Guile.autopatch (self) + self.system ('cp -pv %(sourcefiledir)s/fcntl-o.m4 %(srcdir)s/m4') + def autoupdate (self): + self.system ('cd %(srcdir)s && ./autogen.sh') + # .libs/libguile_2.0_la-arbiters.o: In function `__gmpz_abs': + # arbiters.c:(.text+0x0): multiple definition of `__gmpz_abs' + self.file_sub ([('-std=gnu99', ''),('-std=c99', '')], '%(srcdir)s/configure') + def install (self): + tools.AutoBuild.install (self) + self.system ('cd %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin && cp guile guile-2.0') +# self.file_sub ([('[(]string-join other-flags[)]', '(string-join (filter (lambda (x) (not (equal? x "-L/usr/lib"))) other-flags))')], +# '%(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin/guile-config', +# must_succeed=True) + +class Guile__tools32 (tools32.AutoBuild, Guile__tools): + pass diff -r 728bffca309a -r ccc20ae889ca gub/specs/guile.py --- a/gub/specs/guile.py Mon Mar 14 23:03:50 2016 +0100 +++ b/gub/specs/guile.py Thu Mar 24 08:03:39 2016 +0100 @@ -10,9 +10,8 @@ from gub import tools32 class Guile (target.AutoBuild): - # source = 'git://git.sv.gnu.org/guile.git&branch=branch_release-1-8&revision=bba579611b3671c7e4c1515b100f01c048a07935' source = 'http://ftp.gnu.org/gnu/guile/guile-2.0.7.tar.gz' - patches = [ + xpatches = [ 'guile-1.9.14-reloc.patch', 'guile-1.8.6-test-use-srfi.patch', 'guile-2.0.0-configure-cross.patch', @@ -20,7 +19,7 @@ 'guile-1.9.14-gnulib-libunistring.patch', 'guile-2.0.0.1-compile-mkdir.patch', ] - force_autoupdate = True + xforce_autoupdate = True dependencies = [ 'gettext-devel', 'gmp-devel', @@ -93,23 +92,26 @@ source) self.so_version = '17' # REMOVE putenv! - gnulib_modules = 'alignof alloca-opt announce-gen autobuild byteswap canonicalize-lgpl duplocale environ extensions flock fpieee full-read full-write func gendocs getaddrinfo git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton isinf isnan lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile nproc stat-time stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings ' - def patch (self): + # TODO: ADD langinfo + xgnulib_modules = 'alignof alloca-opt announce-gen autobuild byteswap canonicalize-lgpl duplocale environ extensions flock fpieee full-read full-write func gendocs getaddrinfo git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton isinf isnan lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile nproc stat-time stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings ' + def xpatch (self): self.dump ('''#!/bin/sh exec %(tools_archmatch_prefix)s/bin/guile "$@" ''', "%(srcdir)s/pre-inst-guile.in") #self.autopatch () self.system ('cp -pv %(sourcefiledir)s/fcntl-o.m4 %(srcdir)s/m4') - self.system ('%(tools_prefix)s/share/gnulib/gnulib-tool --import --dir=%(srcdir)s --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files %(gnulib_modules)s') + #self.system ('%(tools_prefix)s/share/gnulib/gnulib-tool --import --dir=%(srcdir)s --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files %(gnulib_modules)s') target.AutoBuild.patch (self) - def autoupdate (self): - self.system ('cd %(srcdir)s && ./autogen.sh') + def xautoupdate (self): + target.AutoBuild.autoupdate (self); + #self.system ('cd %(srcdir)s && ./autogen.sh') + self.system ('cd %(srcdir)s && autoupdate') # .libs/libguile_2.0_la-arbiters.o: In function `__gmpz_abs': # arbiters.c:(.text+0x0): multiple definition of `__gmpz_abs' self.file_sub ([('-std=gnu99', ''),('-std=c99', '')], '%(srcdir)s/configure') self.file_sub ([('cross_compiling=(maybe|no|yes)', 'cross_compiling=yes')], '%(srcdir)s/configure') - def autopatch (self): + def xautopatch (self): self.file_sub ([(r'AC_CONFIG_SUBDIRS\(guile-readline\)', '')], '%(srcdir)s/configure.in') self.file_sub ([(r'guile-readline', '')], @@ -124,7 +126,7 @@ self.file_sub ([('guile-readline', '')], '%(srcdir)s/Makefile.in') self.dump ('', '%(srcdir)s/doc/ref/version.texi') self.dump ('', '%(srcdir)s/doc/tutorial/version.texi') - def compile (self): + def xcompile (self): ## Ugh: broken dependencies break parallel build with make -jX self.system ('cd %(builddir)s/libguile && make %(compile_flags_native)s gen-scmconfig guile_filter_doc_snarfage') # Remove -L %(system_root)s from `guile-config link' @@ -168,23 +170,30 @@ # Configure (compile) without -mwindows for console self.target_gcc_flags = '-mms-bitfields' patches = Guile.patches + [ - 'guile-1.9.15-mingw.patch', - 'guile-1.9.14-mingw-dirent.patch', - 'guile-1.9.15-mingw-compile.patch', - 'guile-1.9.15-mingw-canonicalize.patch', - 'guile-1.9.15-mingw-fports.patch', - 'guile-1.9.15-mingw-rename.patch', - 'guile-1.9.15-mingw-cachedir.patch', - 'guile-2.0.0-mingw-compile-binary.patch', - 'guile-2.0.0-mingw-fchmod.patch', - 'guile-2.0.0-mingw-dynl.patch', - 'guile-2.0.0.1-mingw-boot.scm', +# 'guile-1.9.15-mingw.patch', +# 'guile-1.9.14-mingw-dirent.patch', +# 'guile-1.9.15-mingw-compile.patch', +# 'guile-1.9.15-mingw-canonicalize.patch', +# 'guile-1.9.15-mingw-fports.patch', +# 'guile-1.9.15-mingw-rename.patch', +# 'guile-1.9.15-mingw-cachedir.patch', +# 'guile-2.0.0-mingw-compile-binary.patch', +# 'guile-2.0.0-mingw-fchmod.patch', +# 'guile-2.0.0-mingw-dynl.patch', +# 'guile-2.0.0.1-mingw-boot.scm', + 'guile-2.0.7-lib-msvc-inval.patch', + 'guile-2.0.7-mingw.patch', ] dependencies = (Guile.dependencies + [ - 'pthreads-w32', - 'regex-devel', - 'mingw-extras', - ]) + #'tools::autoconf2_69', + 'tools::automake1_12', + 'tools::autoconf', + 'libtool', + #'pthreads-w32', + 'libiconv-devel', + 'regex-devel', + 'mingw-extras', + ]) configure_flags = (Guile.configure_flags + ' --without-threads') configure_variables = (Guile.configure_variables @@ -203,6 +212,8 @@ guile_cv_exeext=${guile_cv_exeext=} libltdl_cv_sys_search_path=${libltdl_cv_sys_search_path="%(system_prefix)s/lib"} ''' + def autoupdate (self): + self.system ('cd %(srcdir)s && autoreconf -i --force --verbose') def configure (self): self.file_sub ([('''^#(LIBOBJS=".*fileblocks.*)''', r'\1')], '%(srcdir)s/configure') @@ -210,12 +221,15 @@ for libtool in ['%(builddir)s/libtool']: # readline patched-out: '%(builddir)s/guile-readline/libtool']: self.file_sub ([('-mwindows', '')], libtool) - gnulib_modules = (Guile.gnulib_modules - + 'accept bind close connect getpeername getsockname getsockopt listen recv recv recvfrom send sendto setsockopt shutdown socket ') + gnulib_modules = (Guile.xgnulib_modules + + 'accept bind close connect fcntl getpeername getsockname getsockopt langinfo listen localecharset netdb nl_langinfo pipe2 recv recv recvfrom regex send sendto setsockopt shutdown socket ') def patch (self): Guile.patch (self) + self.file_sub ([('^AM_INIT_AUTOMAKE.*', 'AM_INIT_AUTOMAKE([GNU Guile],[2.0.7])')], '%(srcdir)s/configure.ac') # self.file_sub ([('putenv', 'gnulib_putenv')], '%(srcdir)s/lib/putenv.c') self.file_sub ([('putenv', 'gnulib_putenv')], '%(srcdir)s/lib/stdlib.in.h') + self.system ('%(tools_prefix)s/share/gnulib/gnulib-tool --import --dir=%(srcdir)s --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files %(gnulib_modules)s') + self.apply_patch ('guile-2.0.7-mingw-localcharset.patch') def compile (self): ## Why the !?#@$ is .EXE only for guile_filter_doc_snarfage? self.system ('''cd %(builddir)s/libguile &&make %(compile_flags_native)sgen-scmconfig guile_filter_doc_snarfage.exe''') @@ -266,19 +280,14 @@ 'CPATH="%(srcdir)s:%(builddir)s:%(system_prefix)s/include" ') class Guile__tools (tools.AutoBuild, Guile): - patches = [ - 'guile-2.0.0.1-testsuite.patch', - 'guile-2.0.0-mingw-compile-binary.patch', - 'guile-2.0.0.1-compile-mkdir.patch', - ] dependencies = (Guile.dependencies + [ - 'autoconf', - 'automake', - 'gettext', - 'flex', - 'libtool' - ]) + 'autoconf', + 'flex', + 'gettext', + 'gmp', + 'libtool' + ]) make_flags = Guile.make_flags # Doing make gen-scmconfig, guile starts a configure recheck: # cd .. && make am--refresh @@ -301,15 +310,11 @@ compile_command = ('export LD_LIBRARY_PATH=%(builddir)s/libguile/.libs:%(system_prefix)s/lib:${LD_LIBRARY_PATH-/foe};' + tools.AutoBuild.compile_command) install_command = tools.AutoBuild.install_command - def patch (self): - tools.AutoBuild.patch (self) - #Guile.autopatch (self) - self.system ('cp -pv %(sourcefiledir)s/fcntl-o.m4 %(srcdir)s/m4') - def autoupdate (self): - self.system ('cd %(srcdir)s && ./autogen.sh') - # .libs/libguile_2.0_la-arbiters.o: In function `__gmpz_abs': - # arbiters.c:(.text+0x0): multiple definition of `__gmpz_abs' - self.file_sub ([('-std=gnu99', ''),('-std=c99', '')], '%(srcdir)s/configure') + # def xpatch (self): + # tools.AutoBuild.patch (self) + # #Guile.autopatch (self) + # self.system ('cp -pv %(sourcefiledir)s/fcntl-o.m4 %(srcdir)s/m4') + # self.system ('%(tools_prefix)s/share/gnulib/gnulib-tool --import --dir=%(srcdir)s --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files %(gnulib_modules)s') def install (self): tools.AutoBuild.install (self) self.system ('cd %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin && cp guile guile-2.0') diff -r 728bffca309a -r ccc20ae889ca gub/specs/guile.py-1.8 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/guile.py-1.8 Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,230 @@ +import os +# +from gub import context +from gub import misc +from gub import loggedos +from gub import octal +from gub import repository +from gub import target +from gub import tools + +class Guile (target.AutoBuild): + # source = 'git://git.sv.gnu.org/guile.git&branch=branch_release-1-8&revision=bba579611b3671c7e4c1515b100f01c048a07935' + source = 'http://ftp.gnu.org/pub/gnu/guile/guile-1.8.7.tar.gz' + patches = ['guile-reloc-1.8.6.patch', + 'guile-cexp.patch', + 'guile-1.8.6-test-use-srfi.patch', + 'guile-1.8.7-doc-snarfing.patch'] + dependencies = ['gettext-devel', 'gmp-devel', 'libtool', 'tools::guile'] + guile_configure_flags = misc.join_lines (''' +--without-threads +--with-gnu-ld +--enable-deprecated +--enable-discouraged +--disable-error-on-warning +--enable-relocation +--enable-rpath +''') + configure_variables = (target.AutoBuild.configure_variables + + misc.join_lines (''' +CC_FOR_BUILD=" +LD_PRELOAD= +C_INCLUDE_PATH= +CPPFLAGS= +LIBRARY_PATH= +PATH_SEPARATOR=':' +PATH=/usr/bin:$PATH +/usr/bin/cc +-I%(builddir)s +-I%(srcdir)s +-I%(builddir)s/libguile +-I. +-I%(srcdir)s/libguile" +''')) + # FIXME: guile runs gen_scmconfig [when not x-building also guile] + # without setting the proper LD_LIBRARY_PATH. + compile_flags_native = (' LD_PRELOAD= ' + + ' LD_LIBRARY_PATH=%(tools_prefix)s/lib:${LD_LIBRARY_PATH-/foe} ' + + ' cross_compiling=yes ') + # FIXME: guile runs gen_scmconfig [when not x-building also guile] + # without setting the proper LD_LIBRARY_PATH. + configure_command = ('GUILE_FOR_BUILD=%(tools_prefix)s/bin/guile ' + + target.AutoBuild.configure_command + + guile_configure_flags) + compile_command = ('preinstguile=%(tools_prefix)s/bin/guile ' + + target.AutoBuild.compile_command) + subpackage_names = ['doc', 'devel', 'runtime', ''] + @staticmethod + def version_from_VERSION (self): + return self.version_from_shell_script ('GUILE-VERSION', + 'GUILE_MAJOR_VERSION', + '%(GUILE_MAJOR_VERSION)s.%(GUILE_MINOR_VERSION)s.%(GUILE_MICRO_VERSION)s', + '1.8.6') + def __init__ (self, settings, source): + target.AutoBuild.__init__ (self, settings, source) + if isinstance (source, repository.Git): + ##source.version = lambda: '1.8.6' + source.version = misc.bind_method (Guile.version_from_VERSION, + source) + self.so_version = '17' + def patch (self): + self.dump ('''#!/bin/sh +exec %(tools_prefix)s/bin/guile "$@" +''', "%(srcdir)s/pre-inst-guile.in") + #self.autopatch () + target.AutoBuild.patch (self) + def autopatch (self): + self.file_sub ([(r'AC_CONFIG_SUBDIRS\(guile-readline\)', '')], + '%(srcdir)s/configure.in') + self.file_sub ([(r'guile-readline', '')], + '%(srcdir)s/Makefile.am') + # Guile [doc] does not compile with dash *and* not with + # librestrict-stat.so; patch out. + if isinstance (self.source, repository.Git): + self.file_sub ([(' doc ', ' ')], '%(srcdir)s/Makefile.am') + self.file_sub ([('guile-readline', '')], '%(srcdir)s/Makefile.am') + else: + self.file_sub ([(' doc ', ' ')], '%(srcdir)s/Makefile.in') + self.file_sub ([('guile-readline', '')], '%(srcdir)s/Makefile.in') + self.dump ('', '%(srcdir)s/doc/ref/version.texi') + self.dump ('', '%(srcdir)s/doc/tutorial/version.texi') + def compile (self): + ## Ugh: broken dependencies break parallel build with make -jX + self.system ('cd %(builddir)s/libguile && make %(compile_flags_native)s gen-scmconfig guile_filter_doc_snarfage') + # Remove -L %(system_root)s from `guile-config link' + self.system ('cd %(builddir)s/libguile && make %(compile_flags_native)slibpath.h') + self.file_sub ([('''-L *%(system_root)s''', '-L')], + '%(builddir)s/libguile/libpath.h') + target.AutoBuild.compile (self) + def install (self): + # with 1.8.7: libtool: cannot install directory not ending in... + # after config.status is being re-run for building of libpath.h + self.update_libtool () + target.AutoBuild.install (self) + majmin_version = '.'.join (self.expand ('%(version)s').split ('.')[0:2]) + + self.dump ("prependdir GUILE_LOAD_PATH=$INSTALLER_PREFIX/share/guile/%(majmin_version)s\n", + '%(install_prefix)s/etc/relocate/guile.reloc', + env=locals ()) + version = self.expand ('%(version)s') + #FIXME: c&p linux.py + self.dump ('''\ +#! /bin/sh +test "$1" = "--version" && echo "%(target_architecture)s-guile-config - Guile version %(version)s" +#test "$1" = "compile" && echo "-I $%(system_prefix)s/include" +#test "$1" = "link" && echo "-L%(system_prefix)s/lib -lguile -lgmp" +#prefix=$(dirname $(dirname $0)) +prefix=%(system_prefix)s +test "$1" = "compile" && echo "-I$prefix/include" +test "$1" = "link" && echo "-L$prefix/lib -lguile -lgmp" +test "$1" = "info" && test "$2" = "guileversion" && echo "%(version)s" +exit 0 +''', + '%(install_prefix)s%(cross_dir)s/bin/%(target_architecture)s-guile-config') + self.chmod ('%(install_prefix)s%(cross_dir)s/bin/%(target_architecture)s-guile-config', octal.o755) + self.system ('cd %(install_prefix)s%(cross_dir)s/bin && cp -pv %(target_architecture)s-guile-config guile-config') + +class Guile__mingw (Guile): + def __init__ (self, settings, source): + Guile.__init__ (self, settings, source) + # Configure (compile) without -mwindows for console + self.target_gcc_flags = '-mms-bitfields' + dependencies = Guile.dependencies + ['regex-devel'] + configure_flags = (Guile.configure_flags + + ' --without-threads') + configure_variables = (Guile.configure_variables + .replace ("':'", "';'") + + misc.join_lines (''' +CFLAGS='-O2 -DHAVE_CONFIG_H=1 -I%(builddir)s' +''')) + config_cache_overrides = Guile.config_cache_overrides + ''' +scm_cv_struct_timespec=${scm_cv_struct_timespec=no} +guile_cv_func_usleep_declared=${guile_cv_func_usleep_declared=yes} +guile_cv_exeext=${guile_cv_exeext=} +libltdl_cv_sys_search_path=${libltdl_cv_sys_search_path="%(system_prefix)s/lib"} +''' + def configure (self): + self.file_sub ([('''^#(LIBOBJS=".*fileblocks.*)''', r'\1')], + '%(srcdir)s/configure') + Guile.configure (self) + for libtool in ['%(builddir)s/libtool']: # readline patched-out: '%(builddir)s/guile-readline/libtool']: + self.file_sub ([('-mwindows', '')], libtool) + def compile (self): + ## Why the !?#@$ is .EXE only for guile_filter_doc_snarfage? + self.system ('''cd %(builddir)s/libguile &&make %(compile_flags_native)sgen-scmconfig guile_filter_doc_snarfage.exe''') + self.system ('cd %(builddir)s/libguile && cp guile_filter_doc_snarfage.exe guile_filter_doc_snarfage') + Guile.compile (self) + def install (self): + Guile.install (self) + # dlopen-able .la files go in BIN dir, BIN OR LIB package + self.system ('''mv %(install_prefix)s/lib/lib*[0-9].la %(install_prefix)s/bin''') + self.system ('''cd %(install_prefix)s/bin && cp guile.exe guile-windows.exe''') + +class Guile__linux (Guile): + compile_command = ('export LD_LIBRARY_PATH=%(builddir)s/libguile/.libs:$LD_LIBRARY_PATH;' + + Guile.compile_command) + +class Guile__linux__ppc (Guile__linux): + config_cache_overrides = Guile__linux.config_cache_overrides + ''' +guile_cv_have_libc_stack_end=no +''' + +class Guile__freebsd (Guile): + config_cache_overrides = Guile.config_cache_overrides + ''' +ac_cv_type_socklen_t=yes +guile_cv_use_csqrt="no" +''' + +class Guile__darwin (Guile): + patches = Guile.patches + ['guile-1.8.6-pthreads-cross.patch'] + def install (self): + Guile.install (self) + def dylib_link (logger, fname): + directory = os.path.split (fname)[0] + src = os.path.basename (fname) + dst = os.path.splitext (os.path.basename (fname))[0] + '.so' + loggedos.symlink (logger, src, os.path.join (directory, dst)) + self.map_locate (dylib_link, + self.expand ('%(install_prefix)s/lib/'), + 'libguile-srfi*.dylib') + def configure (self): + self.file_sub ([('guile-readline', '')], + '%(srcdir)s/Makefile.in') + Guile.configure (self) + +class Guile__linux__x86 (Guile): + patches = Guile.patches + ['guile-1.8.6-pthreads-cross.patch'] + +class Guile__tools (tools.AutoBuild, Guile): + dependencies = (Guile.dependencies + + ['autoconf', 'automake', 'gettext', 'flex', 'libtool']) + make_flags = Guile.make_flags + # Doing make gen-scmconfig, guile starts a configure recheck: + # cd .. && make am--refresh + # /bin/sh ./config.status --recheck + # leading to + # checking size of char... 0 + # Great idea, let's re-check! You never know... :-) + compile_flags_native = misc.join_lines (''' +LD_LIBRARY_PATH=%(system_prefix)s/lib +CFLAGS='-O2 -I%(system_prefix)s/include' +LDFLAGS='-L%(system_prefix)s/lib %(rpath)s' +''') + configure_command = ('LD_LIBRARY_PATH=%(system_prefix)s/lib:${LD_LIBRARY_PATH-/foe} ' + + tools.AutoBuild.configure_command + + Guile.guile_configure_flags) + # FIXME: when configuring, guile runs binaries linked against + # libltdl. + # FIXME: when not x-building, guile runs gen_scmconfig, guile without + # setting the proper LD_LIBRARY_PATH. + compile_command = ('export LD_LIBRARY_PATH=%(builddir)s/libguile/.libs:%(system_prefix)s/lib:${LD_LIBRARY_PATH-/foe};' + + Guile.compile_command) + def patch (self): + tools.AutoBuild.patch (self) + #Guile.autopatch (self) + def install (self): + tools.AutoBuild.install (self) + self.system ('cd %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin && cp guile guile-1.8') + self.file_sub ([('[(]string-join other-flags[)]', '(string-join (filter (lambda (x) (not (equal? x "-L/usr/lib"))) other-flags))')], + '%(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin/guile-config', + must_succeed=True) diff -r 728bffca309a -r ccc20ae889ca gub/specs/libgc.py --- a/gub/specs/libgc.py Mon Mar 14 23:03:50 2016 +0100 +++ b/gub/specs/libgc.py Thu Mar 24 08:03:39 2016 +0100 @@ -2,9 +2,11 @@ from gub import tools class Libgc (target.AutoBuild): - source = 'http://hboehm.info/gc/gc_source/gc-7.1.tar.gz' + source = 'http://hboehm.info/gc/gc_source/gc-7.2alpha4.tar.gz&version=7.2.4' + xsource = 'http://hboehm.info/gc/gc_source/gc-7.4.2.tar.gz' + xsource = 'http://hboehm.info/gc/gc_source/gc-7.2.tar.gz' + xsource = 'http://hboehm.info/gc/gc_source/gc6.8.tar.gz&version=6.8' configure_flags = target.AutoBuild.configure_flags + '--enable-threads=pthreads ' - #source = 'http://hboehm.info/gc/gc_source/gc6.8.tar.gz&version=6.8' class Libgc__linux (Libgc): configure_flags = (Libgc.configure_flags @@ -19,11 +21,15 @@ class Libgc__mingw (Libgc): dependencies = [ - 'pthreads-w32', + 'tools::autoconf', + 'tools::automake', + 'tools::libtool', + #'pthreads-w32', ] patches = [ #'libgc-6.8-mingw-pthreads.patch', #'libgc-7.2-mingw-pthreads.patch', + #'libgc-7.2-automake-1.15.patch', 'libgc-7.2-mingw-threads.patch', ] force_autoupdate = True diff -r 728bffca309a -r ccc20ae889ca gub/specs/openssl.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/openssl.py Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,27 @@ +from gub import target +from gub import tools + +class Openssl (target.AutoBuild): + source = 'http://openssl.org/source/openssl-1.0.1c.tar.gz' + srcdir_build_broken = True + parallel_build_broken = True + configure_binary = '%(srcdir)s/config' +# configure_command = 'cd %(builddir)s && %(configure_binary)s' + configure_command = 'cd %(builddir)s && export CROSS_COMPILE=%(toolchain_prefix)s; export CC=gcc; export MACHINE=%(target_cpu)s; bash -x %(configure_binary)s' + install_flags = target.AutoBuild.install_flags + ' INSTALL_PREFIX=%(install_root)s INSTALLTOP=%(prefix_dir)s' + def patch (self): + target.AutoBuild.patch (self) + self.file_sub ([('touch lib$', 'touch lib-')], '%(srcdir)s/crypto/Makefile', must_succeed=True) + +class Openssl__tools (tools.AutoBuild, Openssl): + source = Openssl.source + + srcdir_build_broken = True + parallel_build_broken = True + configure_binary = '%(srcdir)s/config' + configure_command = 'cd %(builddir)s && %(configure_binary)s' +# configure_command = 'cd %(builddir)s && export CC=gcc; export MACHINE=%(target_cpu)s; bash -x %(configure_binary)s' + install_flags = tools.AutoBuild.install_flags + ' INSTALL_PREFIX=%(install_root)s INSTALLTOP=%(prefix_dir)s' + def patch (self): + tools.AutoBuild.patch (self) + self.file_sub ([('touch lib$', 'touch lib-')], '%(srcdir)s/crypto/Makefile', must_succeed=True) diff -r 728bffca309a -r ccc20ae889ca gub/specs/pango.py --- a/gub/specs/pango.py Mon Mar 14 23:03:50 2016 +0100 +++ b/gub/specs/pango.py Thu Mar 24 08:03:39 2016 +0100 @@ -84,7 +84,8 @@ # FIXME: need -lpthread now? # /home/janneke/vc/gub/target/mingw/root/usr/cross/bin/i686-mingw32-ld: cannot find -lpthread dependencies = (Pango.dependencies - + ['pthreads-w32-devel']) + #+ ['pthreads-w32-devel'] + ) def create_config_files (self, prefix='/usr'): Pango.create_config_files (self, prefix) etc = self.expand ('%(install_root)s/%(prefix)s/etc/pango', locals ()) diff -r 728bffca309a -r ccc20ae889ca gub/specs/pthreads-w32.py --- a/gub/specs/pthreads-w32.py Mon Mar 14 23:03:50 2016 +0100 +++ b/gub/specs/pthreads-w32.py Thu Mar 24 08:03:39 2016 +0100 @@ -2,7 +2,7 @@ from gub import target class Pthreads_w32 (target.MakeBuild): - source = 'ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-8-0-release.tar.gz' + 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 @@ -14,9 +14,12 @@ && 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', ''' + self.file_sub ([('#undef PTW32_LEVEL\s', ''' #ifndef _POSIX_SOURCE #define _POSIX_SOURCE #undef _POSIX_C_SOURCE diff -r 728bffca309a -r ccc20ae889ca patches/guile-2.0.7-lib-msvc-inval.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/guile-2.0.7-lib-msvc-inval.patch Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,49 @@ +diff --git a/lib/msvc-inval.c b/lib/msvc-inval.c +index 7da3541..84190d0 100644 +--- a/lib/msvc-inval.c ++++ b/lib/msvc-inval.c +@@ -1,5 +1,5 @@ + /* Invalid parameter handler for MSVC runtime libraries. +- Copyright (C) 2011-2012 Free Software Foundation, Inc. ++ Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by +@@ -28,7 +28,7 @@ + + # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING + +-static void cdecl ++static void __cdecl + gl_msvc_invalid_parameter_handler (const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, +@@ -45,7 +45,7 @@ gl_msvc_invalid_parameter_handler (const wchar_t *expression, + + # if defined _MSC_VER + +-static void cdecl ++static void __cdecl + gl_msvc_invalid_parameter_handler (const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, +@@ -94,7 +94,7 @@ gl_msvc_inval_current (void) + } + } + +-static void cdecl ++static void __cdecl + gl_msvc_invalid_parameter_handler (const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, +diff --git a/lib/msvc-inval.h b/lib/msvc-inval.h +index ce6fcee..c6df57e 100644 +--- a/lib/msvc-inval.h ++++ b/lib/msvc-inval.h +@@ -1,5 +1,5 @@ + /* Invalid parameter handler for MSVC runtime libraries. +- Copyright (C) 2011-2012 Free Software Foundation, Inc. ++ Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by diff -r 728bffca309a -r ccc20ae889ca patches/guile-2.0.7-mingw-localcharset.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/guile-2.0.7-mingw-localcharset.patch Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,194 @@ +--- guile-2.0.7/lib/localcharset.c 2010-12-07 03:32:46.000000000 +0100 ++++ guile-2.0.7/lib/localcharset.c 2012-11-21 23:33:30.000000000 +0100 +@@ -30,11 +29,11 @@ + #include + + #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET +-# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */ ++# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ + #endif + + #if defined _WIN32 || defined __WIN32__ +-# define WIN32_NATIVE ++# define WINDOWS_NATIVE + #endif + + #if defined __EMX__ +@@ -44,7 +43,7 @@ + # endif + #endif + +-#if !defined WIN32_NATIVE ++#if !defined WINDOWS_NATIVE + # include + # if HAVE_LANGINFO_CODESET + # include +@@ -57,7 +56,7 @@ + # define WIN32_LEAN_AND_MEAN + # include + # endif +-#elif defined WIN32_NATIVE ++#elif defined WINDOWS_NATIVE + # define WIN32_LEAN_AND_MEAN + # include + #endif +@@ -83,7 +82,7 @@ + #endif + + #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +- /* Win32, Cygwin, OS/2, DOS */ ++ /* Native Windows, Cygwin, OS/2, DOS */ + # define ISSLASH(C) ((C) == '/' || (C) == '\\') + #endif + +@@ -123,7 +122,7 @@ + cp = charset_aliases; + if (cp == NULL) + { +-#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) ++#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__) + const char *dir; + const char *base = "charset.alias"; + char *file_name; +@@ -228,8 +227,7 @@ + { + /* Out of memory. */ + res_size = 0; +- if (old_res_ptr != NULL) +- free (old_res_ptr); ++ free (old_res_ptr); + break; + } + strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); +@@ -309,7 +307,7 @@ + "DECKOREAN" "\0" "EUC-KR" "\0"; + # endif + +-# if defined WIN32_NATIVE || defined __CYGWIN__ ++# if defined WINDOWS_NATIVE || defined __CYGWIN__ + /* To avoid the troubles of installing a separate file in the same + directory as the DLL and of retrieving the DLL's directory at + runtime, simply inline the aliases here. */ +@@ -361,7 +359,7 @@ + const char *codeset; + const char *aliases; + +-#if !(defined WIN32_NATIVE || defined OS2) ++#if !(defined WINDOWS_NATIVE || defined OS2) + + # if HAVE_LANGINFO_CODESET + +@@ -408,10 +406,10 @@ + } + } + +- /* Woe32 has a function returning the locale's codepage as a number: +- GetACP(). This encoding is used by Cygwin, unless the user has set +- the environment variable CYGWIN=codepage:oem (which very few people +- do). ++ /* The Windows API has a function returning the locale's codepage as a ++ number: GetACP(). This encoding is used by Cygwin, unless the user ++ has set the environment variable CYGWIN=codepage:oem (which very few ++ people do). + Output directed to console windows needs to be converted (to + GetOEMCP() if the console is using a raster font, or to + GetConsoleOutputCP() if it is using a TrueType font). Cygwin does +@@ -454,12 +452,12 @@ + + # endif + +-#elif defined WIN32_NATIVE ++#elif defined WINDOWS_NATIVE + + static char buf[2 + 10 + 1]; + +- /* Woe32 has a function returning the locale's codepage as a number: +- GetACP(). ++ /* The Windows API has a function returning the locale's codepage as a ++ number: GetACP(). + When the output goes to a console window, it needs to be provided in + GetOEMCP() encoding if the console is using a raster font, or in + GetConsoleOutputCP() encoding if it is using a TrueType font. +@@ -544,5 +542,82 @@ + if (codeset[0] == '\0') + codeset = "ASCII"; + ++#ifdef DARWIN7 ++ /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" ++ (the default codeset) does not work when MB_CUR_MAX is 1. */ ++ if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1) ++ codeset = "ASCII"; ++#endif ++ ++ return codeset; ++} ++ ++/* A variant of the above, without calls to `setlocale', `nl_langinfo', ++ etc. */ ++const char * ++environ_locale_charset (void) ++{ ++ static char buf[2 + 10 + 1]; ++ const char *codeset, *aliases; ++ const char *locale = NULL; ++ ++ locale = getenv ("LC_ALL"); ++ if (locale == NULL || locale[0] == '\0') ++ { ++ locale = getenv ("LC_CTYPE"); ++ if (locale == NULL || locale[0] == '\0') ++ locale = getenv ("LANG"); ++ } ++ ++ if (locale != NULL && locale[0] != '\0') ++ { ++ /* If the locale name contains an encoding after the dot, return it. */ ++ const char *dot = strchr (locale, '.'); ++ ++ if (dot != NULL) ++ { ++ const char *modifier; ++ ++ dot++; ++ /* Look for the possible @... trailer and remove it, if any. */ ++ modifier = strchr (dot, '@'); ++ if (modifier == NULL) ++ return dot; ++ if (modifier - dot < sizeof (buf)) ++ { ++ memcpy (buf, dot, modifier - dot); ++ buf [modifier - dot] = '\0'; ++ return buf; ++ } ++ } ++ else if (strcmp (locale, "C") == 0) ++ { ++ strcpy (buf, "ASCII"); ++ return buf; ++ } ++ else ++ codeset = ""; ++ } ++ else ++ codeset = ""; ++ ++ /* Resolve alias. */ ++ for (aliases = get_charset_aliases (); ++ *aliases != '\0'; ++ aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) ++ if (strcmp (codeset, aliases) == 0 ++ || (aliases[0] == '*' && aliases[1] == '\0')) ++ { ++ codeset = aliases + strlen (aliases) + 1; ++ break; ++ } ++ ++ /* Don't return an empty string. GNU libc and GNU libiconv interpret ++ the empty string as denoting "the locale's character encoding", ++ thus GNU libiconv would call this function a second time. */ ++ if (codeset[0] == '\0') ++ /* Default to Latin-1, for backward compatibility with Guile 1.8. */ ++ codeset = "ISO-8859-1"; ++ + return codeset; + } diff -r 728bffca309a -r ccc20ae889ca patches/guile-2.0.7-mingw.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/guile-2.0.7-mingw.patch Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,10 @@ +--- guile-2.0.7/libguile/net_db.c~ 2012-07-02 11:28:13.000000000 +0200 ++++ guile-2.0.7/libguile/net_db.c 2016-03-24 19:37:21.339762638 +0100 +@@ -61,6 +61,7 @@ + + #ifdef __MINGW32__ + #include "win32-socket.h" ++#include + #endif + + #if !defined (HAVE_H_ERRNO) && !defined (__MINGW32__) && !defined (__CYGWIN__) diff -r 728bffca309a -r ccc20ae889ca patches/libgc-7.2-automake-1.15.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/libgc-7.2-automake-1.15.patch Thu Mar 24 08:03:39 2016 +0100 @@ -0,0 +1,11 @@ +--- libgc/autogen.sh~ 2009-09-26 12:52:00.000000000 +0200 ++++ libgc/autogen.sh 2016-03-19 09:11:24.967084360 +0100 +@@ -5,7 +5,7 @@ + # These version are ok, pre-1.7 is not. Post 1.7 may produce a lot of + # warnings for unrelated projects, so prefer 1.7 for now. + am_version= +-for v in 1.10 1.9 1.8 1.7; do ++for v in 1.15 1.10 1.9 1.8 1.7; do + if type -p &>/dev/null automake-$v; then + am_version="-$v" + break