comparison gub/specs/guile.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 fc4f6d2163bd
children
comparison
equal deleted inserted replaced
6511:728bffca309a 6512:ccc20ae889ca
8 from gub import target 8 from gub import target
9 from gub import tools 9 from gub import tools
10 from gub import tools32 10 from gub import tools32
11 11
12 class Guile (target.AutoBuild): 12 class Guile (target.AutoBuild):
13 # source = 'git://git.sv.gnu.org/guile.git&branch=branch_release-1-8&revision=bba579611b3671c7e4c1515b100f01c048a07935'
14 source = 'http://ftp.gnu.org/gnu/guile/guile-2.0.7.tar.gz' 13 source = 'http://ftp.gnu.org/gnu/guile/guile-2.0.7.tar.gz'
15 patches = [ 14 xpatches = [
16 'guile-1.9.14-reloc.patch', 15 'guile-1.9.14-reloc.patch',
17 'guile-1.8.6-test-use-srfi.patch', 16 'guile-1.8.6-test-use-srfi.patch',
18 'guile-2.0.0-configure-cross.patch', 17 'guile-2.0.0-configure-cross.patch',
19 'guile-2.0.0.1-cross.patch', 18 'guile-2.0.0.1-cross.patch',
20 'guile-1.9.14-gnulib-libunistring.patch', 19 'guile-1.9.14-gnulib-libunistring.patch',
21 'guile-2.0.0.1-compile-mkdir.patch', 20 'guile-2.0.0.1-compile-mkdir.patch',
22 ] 21 ]
23 force_autoupdate = True 22 xforce_autoupdate = True
24 dependencies = [ 23 dependencies = [
25 'gettext-devel', 24 'gettext-devel',
26 'gmp-devel', 25 'gmp-devel',
27 'libtool', 26 'libtool',
28 'libffi', 27 'libffi',
91 ##source.version = lambda: '1.8.6' 90 ##source.version = lambda: '1.8.6'
92 source.version = misc.bind_method (Guile.version_from_VERSION, 91 source.version = misc.bind_method (Guile.version_from_VERSION,
93 source) 92 source)
94 self.so_version = '17' 93 self.so_version = '17'
95 # REMOVE putenv! 94 # REMOVE putenv!
96 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 ' 95 # TODO: ADD langinfo
97 def patch (self): 96 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 '
97 def xpatch (self):
98 self.dump ('''#!/bin/sh 98 self.dump ('''#!/bin/sh
99 exec %(tools_archmatch_prefix)s/bin/guile "$@" 99 exec %(tools_archmatch_prefix)s/bin/guile "$@"
100 ''', "%(srcdir)s/pre-inst-guile.in") 100 ''', "%(srcdir)s/pre-inst-guile.in")
101 #self.autopatch () 101 #self.autopatch ()
102 self.system ('cp -pv %(sourcefiledir)s/fcntl-o.m4 %(srcdir)s/m4') 102 self.system ('cp -pv %(sourcefiledir)s/fcntl-o.m4 %(srcdir)s/m4')
103 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') 103 #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')
104 target.AutoBuild.patch (self) 104 target.AutoBuild.patch (self)
105 def autoupdate (self): 105 def xautoupdate (self):
106 self.system ('cd %(srcdir)s && ./autogen.sh') 106 target.AutoBuild.autoupdate (self);
107 #self.system ('cd %(srcdir)s && ./autogen.sh')
108 self.system ('cd %(srcdir)s && autoupdate')
107 # .libs/libguile_2.0_la-arbiters.o: In function `__gmpz_abs': 109 # .libs/libguile_2.0_la-arbiters.o: In function `__gmpz_abs':
108 # arbiters.c:(.text+0x0): multiple definition of `__gmpz_abs' 110 # arbiters.c:(.text+0x0): multiple definition of `__gmpz_abs'
109 self.file_sub ([('-std=gnu99', ''),('-std=c99', '')], '%(srcdir)s/configure') 111 self.file_sub ([('-std=gnu99', ''),('-std=c99', '')], '%(srcdir)s/configure')
110 self.file_sub ([('cross_compiling=(maybe|no|yes)', 112 self.file_sub ([('cross_compiling=(maybe|no|yes)',
111 'cross_compiling=yes')], '%(srcdir)s/configure') 113 'cross_compiling=yes')], '%(srcdir)s/configure')
112 def autopatch (self): 114 def xautopatch (self):
113 self.file_sub ([(r'AC_CONFIG_SUBDIRS\(guile-readline\)', '')], 115 self.file_sub ([(r'AC_CONFIG_SUBDIRS\(guile-readline\)', '')],
114 '%(srcdir)s/configure.in') 116 '%(srcdir)s/configure.in')
115 self.file_sub ([(r'guile-readline', '')], 117 self.file_sub ([(r'guile-readline', '')],
116 '%(srcdir)s/Makefile.am') 118 '%(srcdir)s/Makefile.am')
117 # Guile [doc] does not compile with dash *and* not with 119 # Guile [doc] does not compile with dash *and* not with
122 else: 124 else:
123 self.file_sub ([(' doc ', ' ')], '%(srcdir)s/Makefile.in') 125 self.file_sub ([(' doc ', ' ')], '%(srcdir)s/Makefile.in')
124 self.file_sub ([('guile-readline', '')], '%(srcdir)s/Makefile.in') 126 self.file_sub ([('guile-readline', '')], '%(srcdir)s/Makefile.in')
125 self.dump ('', '%(srcdir)s/doc/ref/version.texi') 127 self.dump ('', '%(srcdir)s/doc/ref/version.texi')
126 self.dump ('', '%(srcdir)s/doc/tutorial/version.texi') 128 self.dump ('', '%(srcdir)s/doc/tutorial/version.texi')
127 def compile (self): 129 def xcompile (self):
128 ## Ugh: broken dependencies break parallel build with make -jX 130 ## Ugh: broken dependencies break parallel build with make -jX
129 self.system ('cd %(builddir)s/libguile && make %(compile_flags_native)s gen-scmconfig guile_filter_doc_snarfage') 131 self.system ('cd %(builddir)s/libguile && make %(compile_flags_native)s gen-scmconfig guile_filter_doc_snarfage')
130 # Remove -L %(system_root)s from `guile-config link' 132 # Remove -L %(system_root)s from `guile-config link'
131 self.system ('cd %(builddir)s/libguile && make %(compile_flags_native)slibpath.h') 133 self.system ('cd %(builddir)s/libguile && make %(compile_flags_native)slibpath.h')
132 self.file_sub ([('''-L *%(system_root)s''', '-L')], 134 self.file_sub ([('''-L *%(system_root)s''', '-L')],
166 def __init__ (self, settings, source): 168 def __init__ (self, settings, source):
167 Guile.__init__ (self, settings, source) 169 Guile.__init__ (self, settings, source)
168 # Configure (compile) without -mwindows for console 170 # Configure (compile) without -mwindows for console
169 self.target_gcc_flags = '-mms-bitfields' 171 self.target_gcc_flags = '-mms-bitfields'
170 patches = Guile.patches + [ 172 patches = Guile.patches + [
171 'guile-1.9.15-mingw.patch', 173 # 'guile-1.9.15-mingw.patch',
172 'guile-1.9.14-mingw-dirent.patch', 174 # 'guile-1.9.14-mingw-dirent.patch',
173 'guile-1.9.15-mingw-compile.patch', 175 # 'guile-1.9.15-mingw-compile.patch',
174 'guile-1.9.15-mingw-canonicalize.patch', 176 # 'guile-1.9.15-mingw-canonicalize.patch',
175 'guile-1.9.15-mingw-fports.patch', 177 # 'guile-1.9.15-mingw-fports.patch',
176 'guile-1.9.15-mingw-rename.patch', 178 # 'guile-1.9.15-mingw-rename.patch',
177 'guile-1.9.15-mingw-cachedir.patch', 179 # 'guile-1.9.15-mingw-cachedir.patch',
178 'guile-2.0.0-mingw-compile-binary.patch', 180 # 'guile-2.0.0-mingw-compile-binary.patch',
179 'guile-2.0.0-mingw-fchmod.patch', 181 # 'guile-2.0.0-mingw-fchmod.patch',
180 'guile-2.0.0-mingw-dynl.patch', 182 # 'guile-2.0.0-mingw-dynl.patch',
181 'guile-2.0.0.1-mingw-boot.scm', 183 # 'guile-2.0.0.1-mingw-boot.scm',
184 'guile-2.0.7-lib-msvc-inval.patch',
185 'guile-2.0.7-mingw.patch',
182 ] 186 ]
183 dependencies = (Guile.dependencies + [ 187 dependencies = (Guile.dependencies + [
184 'pthreads-w32', 188 #'tools::autoconf2_69',
185 'regex-devel', 189 'tools::automake1_12',
186 'mingw-extras', 190 'tools::autoconf',
187 ]) 191 'libtool',
192 #'pthreads-w32',
193 'libiconv-devel',
194 'regex-devel',
195 'mingw-extras',
196 ])
188 configure_flags = (Guile.configure_flags 197 configure_flags = (Guile.configure_flags
189 + ' --without-threads') 198 + ' --without-threads')
190 configure_variables = (Guile.configure_variables 199 configure_variables = (Guile.configure_variables
191 .replace ("':'", "';'") 200 .replace ("':'", "';'")
192 ###we're debugging here 201 ###we're debugging here
201 scm_cv_struct_timespec=${scm_cv_struct_timespec=no} 210 scm_cv_struct_timespec=${scm_cv_struct_timespec=no}
202 guile_cv_func_usleep_declared=${guile_cv_func_usleep_declared=yes} 211 guile_cv_func_usleep_declared=${guile_cv_func_usleep_declared=yes}
203 guile_cv_exeext=${guile_cv_exeext=} 212 guile_cv_exeext=${guile_cv_exeext=}
204 libltdl_cv_sys_search_path=${libltdl_cv_sys_search_path="%(system_prefix)s/lib"} 213 libltdl_cv_sys_search_path=${libltdl_cv_sys_search_path="%(system_prefix)s/lib"}
205 ''' 214 '''
215 def autoupdate (self):
216 self.system ('cd %(srcdir)s && autoreconf -i --force --verbose')
206 def configure (self): 217 def configure (self):
207 self.file_sub ([('''^#(LIBOBJS=".*fileblocks.*)''', r'\1')], 218 self.file_sub ([('''^#(LIBOBJS=".*fileblocks.*)''', r'\1')],
208 '%(srcdir)s/configure') 219 '%(srcdir)s/configure')
209 Guile.configure (self) 220 Guile.configure (self)
210 for libtool in ['%(builddir)s/libtool']: # readline patched-out: '%(builddir)s/guile-readline/libtool']: 221 for libtool in ['%(builddir)s/libtool']: # readline patched-out: '%(builddir)s/guile-readline/libtool']:
211 self.file_sub ([('-mwindows', '')], libtool) 222 self.file_sub ([('-mwindows', '')], libtool)
212 223
213 gnulib_modules = (Guile.gnulib_modules 224 gnulib_modules = (Guile.xgnulib_modules
214 + 'accept bind close connect getpeername getsockname getsockopt listen recv recv recvfrom send sendto setsockopt shutdown socket ') 225 + 'accept bind close connect fcntl getpeername getsockname getsockopt langinfo listen localecharset netdb nl_langinfo pipe2 recv recv recvfrom regex send sendto setsockopt shutdown socket ')
215 def patch (self): 226 def patch (self):
216 Guile.patch (self) 227 Guile.patch (self)
228 self.file_sub ([('^AM_INIT_AUTOMAKE.*', 'AM_INIT_AUTOMAKE([GNU Guile],[2.0.7])')], '%(srcdir)s/configure.ac')
217 # self.file_sub ([('putenv', 'gnulib_putenv')], '%(srcdir)s/lib/putenv.c') 229 # self.file_sub ([('putenv', 'gnulib_putenv')], '%(srcdir)s/lib/putenv.c')
218 self.file_sub ([('putenv', 'gnulib_putenv')], '%(srcdir)s/lib/stdlib.in.h') 230 self.file_sub ([('putenv', 'gnulib_putenv')], '%(srcdir)s/lib/stdlib.in.h')
231 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')
232 self.apply_patch ('guile-2.0.7-mingw-localcharset.patch')
219 def compile (self): 233 def compile (self):
220 ## Why the !?#@$ is .EXE only for guile_filter_doc_snarfage? 234 ## Why the !?#@$ is .EXE only for guile_filter_doc_snarfage?
221 self.system ('''cd %(builddir)s/libguile &&make %(compile_flags_native)sgen-scmconfig guile_filter_doc_snarfage.exe''') 235 self.system ('''cd %(builddir)s/libguile &&make %(compile_flags_native)sgen-scmconfig guile_filter_doc_snarfage.exe''')
222 self.system ('cd %(builddir)s/libguile && cp guile_filter_doc_snarfage.exe guile_filter_doc_snarfage') 236 self.system ('cd %(builddir)s/libguile && cp guile_filter_doc_snarfage.exe guile_filter_doc_snarfage')
223 Guile.compile (self) 237 Guile.compile (self)
264 ] 278 ]
265 compile_flags_native = (Guile.compile_flags_native + 279 compile_flags_native = (Guile.compile_flags_native +
266 'CPATH="%(srcdir)s:%(builddir)s:%(system_prefix)s/include" ') 280 'CPATH="%(srcdir)s:%(builddir)s:%(system_prefix)s/include" ')
267 281
268 class Guile__tools (tools.AutoBuild, Guile): 282 class Guile__tools (tools.AutoBuild, Guile):
269 patches = [
270 'guile-2.0.0.1-testsuite.patch',
271 'guile-2.0.0-mingw-compile-binary.patch',
272 'guile-2.0.0.1-compile-mkdir.patch',
273 ]
274 dependencies = (Guile.dependencies 283 dependencies = (Guile.dependencies
275 + [ 284 + [
276 'autoconf', 285 'autoconf',
277 'automake', 286 'flex',
278 'gettext', 287 'gettext',
279 'flex', 288 'gmp',
280 'libtool' 289 'libtool'
281 ]) 290 ])
282 make_flags = Guile.make_flags 291 make_flags = Guile.make_flags
283 # Doing make gen-scmconfig, guile starts a configure recheck: 292 # Doing make gen-scmconfig, guile starts a configure recheck:
284 # cd .. && make am--refresh 293 # cd .. && make am--refresh
285 # /bin/sh ./config.status --recheck 294 # /bin/sh ./config.status --recheck
286 # leading to 295 # leading to
299 # FIXME: when not x-building, guile runs gen_scmconfig, guile without 308 # FIXME: when not x-building, guile runs gen_scmconfig, guile without
300 # setting the proper LD_LIBRARY_PATH. 309 # setting the proper LD_LIBRARY_PATH.
301 compile_command = ('export LD_LIBRARY_PATH=%(builddir)s/libguile/.libs:%(system_prefix)s/lib:${LD_LIBRARY_PATH-/foe};' 310 compile_command = ('export LD_LIBRARY_PATH=%(builddir)s/libguile/.libs:%(system_prefix)s/lib:${LD_LIBRARY_PATH-/foe};'
302 + tools.AutoBuild.compile_command) 311 + tools.AutoBuild.compile_command)
303 install_command = tools.AutoBuild.install_command 312 install_command = tools.AutoBuild.install_command
304 def patch (self): 313 # def xpatch (self):
305 tools.AutoBuild.patch (self) 314 # tools.AutoBuild.patch (self)
306 #Guile.autopatch (self) 315 # #Guile.autopatch (self)
307 self.system ('cp -pv %(sourcefiledir)s/fcntl-o.m4 %(srcdir)s/m4') 316 # self.system ('cp -pv %(sourcefiledir)s/fcntl-o.m4 %(srcdir)s/m4')
308 def autoupdate (self): 317 # 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')
309 self.system ('cd %(srcdir)s && ./autogen.sh')
310 # .libs/libguile_2.0_la-arbiters.o: In function `__gmpz_abs':
311 # arbiters.c:(.text+0x0): multiple definition of `__gmpz_abs'
312 self.file_sub ([('-std=gnu99', ''),('-std=c99', '')], '%(srcdir)s/configure')
313 def install (self): 318 def install (self):
314 tools.AutoBuild.install (self) 319 tools.AutoBuild.install (self)
315 self.system ('cd %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin && cp guile guile-2.0') 320 self.system ('cd %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin && cp guile guile-2.0')
316 # self.file_sub ([('[(]string-join other-flags[)]', '(string-join (filter (lambda (x) (not (equal? x "-L/usr/lib"))) other-flags))')], 321 # self.file_sub ([('[(]string-join other-flags[)]', '(string-join (filter (lambda (x) (not (equal? x "-L/usr/lib"))) other-flags))')],
317 # '%(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin/guile-config', 322 # '%(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin/guile-config',