Mercurial > gub
changeset 6471:834c939b7f86
guile: always retool and junk putenv.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Wed, 02 Feb 2011 18:23:54 +0100 |
parents | f1b28c608b3a |
children | 51635cbba4b0 |
files | gub/specs/guile.py patches/guile-1.9.14-gnulib-libunistring-retooled.patch patches/guile-1.9.14-gnulib-libunistring.patch patches/guile-1.9.14-mingw-readdir.patch |
diffstat | 4 files changed, 71 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/specs/guile.py Tue Feb 01 23:59:39 2011 +0100 +++ b/gub/specs/guile.py Wed Feb 02 18:23:54 2011 +0100 @@ -21,6 +21,8 @@ #'guile-1.8.7-doc-snarfing.patch', 'guile-1.9.14-configure-cross.patch', 'guile-1.9.14-cross.patch', + #'guile-1.9.14-gnulib-libunistring.patch', + 'guile-1.9.14-gnulib-libunistring-retooled.patch', ] force_autoupdate = True dependencies = [ @@ -91,13 +93,17 @@ 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 ('cd %(srcdir)s && gnulib-tool --import --dir=. --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) - self.system ('cp -pv %(sourcefiledir)s/fcntl-o.m4 %(srcdir)s/m4') + ##self.file_sub ([(^putenv,) def autoupdate (self): self.system ('cd %(srcdir)s && autoreconf') # .libs/libguile_2.0_la-arbiters.o: In function `__gmpz_abs': @@ -163,10 +169,11 @@ Guile.__init__ (self, settings, source) # Configure (compile) without -mwindows for console self.target_gcc_flags = '-mms-bitfields' - patches = Guile.patches + [ + patches = Guile.patches + [ # [x for x in Guile.patches if not 'libunistring' in x] + [ 'guile-1.9.14-mingw.patch', 'guile-1.9.14-gnulib-mingw.patch', 'guile-1.9.14-mingw-dirent.patch', + #'guile-1.9.14-gnulib-libunistring-retooled.patch', ] dependencies = (Guile.dependencies + [ @@ -197,9 +204,9 @@ Guile.configure (self) for libtool in ['%(builddir)s/libtool']: # readline patched-out: '%(builddir)s/guile-readline/libtool']: self.file_sub ([('-mwindows', '')], libtool) - def patch (self): - self.system ('cd %(srcdir)s && gnulib-tool --import --dir=. --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 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 putenv stat-time stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings accept bind close connect getpeername getsockname getsockopt listen recv recv recvfrom send sendto setsockopt shutdown socket || :') - Guile.patch (self) + + gnulib_modules = (Guile.gnulib_modules + + 'accept bind close connect getpeername getsockname getsockopt listen recv recv recvfrom send sendto setsockopt shutdown socket ') 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''')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/guile-1.9.14-gnulib-libunistring-retooled.patch Wed Feb 02 18:23:54 2011 +0100 @@ -0,0 +1,24 @@ +--- guile-1.9.14/m4/libunistring.m4~ 2011-02-02 11:02:24.361757176 +0100 ++++ guile-1.9.14/m4/libunistring.m4 2011-02-02 11:03:26.727219798 +0100 +@@ -16,9 +16,7 @@ AC_DEFUN([gl_LIBUNISTRING], + dnl First, try to link without -liconv. libunistring often depends on + dnl libiconv, but we don't know (and often don't need to know) where + dnl libiconv is installed. +- AC_LIB_HAVE_LINKFLAGS([unistring], [], +- [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);], +- [no, consider installing GNU libunistring]) ++ AC_CHECK_LIB(unistring, [u8_strconv_from_locale], [HAVE_LIBUNISTRING=yes ac_cv_libunistring=yes AC_SUBST(HAVE_LIBUNISTRING) LTLIBUNISTRING="-lunistring" AC_SUBST(LTLIBUNISTRING)]) + if test "$ac_cv_libunistring" != yes; then + dnl Second try, with -liconv. + AC_REQUIRE([AM_ICONV]) +@@ -28,9 +26,7 @@ AC_DEFUN([gl_LIBUNISTRING], + unset ac_cv_libunistring + glus_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" +- AC_LIB_HAVE_LINKFLAGS([unistring], [], +- [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);], +- [no, consider installing GNU libunistring]) ++ AC_CHECK_LIB(unistring, [u8_strconv_from_locale], [HAVE_LIBUNISTRING=yes ac_cv_libunistring=yes AC_SUBST(HAVE_LIBUNISTRING) LTLIBUNISTRING="-lunistring" AC_SUBST(LTLIBUNISTRING)]) + if test -n "$LIBUNISTRING"; then + LIBUNISTRING="$LIBUNISTRING $LIBICONV" + LTLIBUNISTRING="$LTLIBUNISTRING $LTLIBICONV"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/guile-1.9.14-gnulib-libunistring.patch Wed Feb 02 18:23:54 2011 +0100 @@ -0,0 +1,35 @@ +--- guile-1.9.14/m4/libunistring.m4~ 2010-12-14 19:15:17.000000000 +0100 ++++ guile-1.9.14/m4/libunistring.m4 2011-02-02 02:09:21.822354542 +0100 +@@ -72,9 +72,7 @@ AC_DEFUN([gl_LIBUNISTRING_CORE], + dnl First, try to link without -liconv. libunistring often depends on + dnl libiconv, but we don't know (and often don't need to know) where + dnl libiconv is installed. +- AC_LIB_HAVE_LINKFLAGS([unistring], [], +- [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);], +- [no, trying again together with libiconv]) ++ AC_CHECK_LIB(unistring, [u8_strconv_from_locale], [HAVE_LIBUNISTRING=yes ac_cv_libunistring=yes AC_SUBST(HAVE_LIBUNISTRING) LTLIBUNISTRING="-lunistring" AC_SUBST(LTLIBUNISTRING)]) + if test "$ac_cv_libunistring" != yes; then + dnl Second try, with -liconv. + dnl We have to erase the cached result of the first AC_LIB_HAVE_LINKFLAGS +@@ -80,9 +80,7 @@ AC_DEFUN([gl_LIBUNISTRING_CORE], + unset ac_cv_libunistring + glus_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" +- AC_LIB_HAVE_LINKFLAGS([unistring], [], +- [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);], +- [no, consider installing GNU libunistring]) ++ AC_CHECK_LIB(unistring, [u8_strconv_from_locale], [HAVE_LIBUNISTRING=yes ac_cv_libunistring=yes AC_SUBST(HAVE_LIBUNISTRING) LTLIBUNISTRING="-lunistring" AC_SUBST(LTLIBUNISTRING)]) + if test -n "$LIBUNISTRING"; then + LIBUNISTRING="$LIBUNISTRING $LIBICONV" + LTLIBUNISTRING="$LTLIBUNISTRING $LTLIBICONV" +@@ -90,9 +90,7 @@ AC_DEFUN([gl_LIBUNISTRING_CORE], + LIBS="$glus_save_LIBS" + fi + else +- AC_LIB_HAVE_LINKFLAGS([unistring], [], +- [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);], +- [no, consider installing GNU libunistring]) ++ AC_CHECK_LIB(unistring, [u8_strconv_from_locale], [HAVE_LIBUNISTRING=yes ac_cv_libunistring=yes AC_SUBST(HAVE_LIBUNISTRING) LTLIBUNISTRING="-lunistring" AC_SUBST(LTLIBUNISTRING)]) + fi + if test $HAVE_LIBUNISTRING = yes; then + dnl Determine the installed version.
--- a/patches/guile-1.9.14-mingw-readdir.patch Tue Feb 01 23:59:39 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ ---- guile-1.9.14/libguile/win32-dirent.h~ 2010-12-14 19:15:17.000000000 +0100 -+++ guile-1.9.14/libguile/win32-dirent.h 2011-01-31 16:05:01.703196058 +0100 -@@ -27,6 +27,14 @@ - - #include <sys/types.h> - -+#define opendir guile_opendir -+#define readdir guile_readdir -+#define closedir guile_closedir -+#define rewinddir guile_rewinddir -+#define seekdir guile_seekdir -+#define telldir guile_telldir -+#define dirfd guile_dirfd -+ - struct dirstream - { - int fd; /* File descriptor. */ ---- guile-1.9.14/libguile/win32-dirent.c~ 2010-12-14 19:15:17.000000000 +0100 -+++ guile-1.9.14/libguile/win32-dirent.c 2011-01-31 16:10:06.336659077 +0100 -@@ -20,14 +20,14 @@ - # include <config.h> - #endif - -+#include "win32-dirent.h" -+ - #include "libguile/__scm.h" - - #include <windows.h> - #include <stdio.h> - #include <string.h> - --#include "win32-dirent.h" -- - DIR * - opendir (const char * name) - { ---- guile-1.9.14/libguile/filesys.c~ 2011-01-30 17:50:22.565848118 +0100 -+++ guile-1.9.14/libguile/filesys.c 2011-01-31 16:11:02.599078648 +0100 -@@ -35,6 +35,10 @@ - #include <stdio.h> - #include <errno.h> - -+#if defined (__MINGW32__) || defined (_MSC_VER) || defined (__BORLANDC__) -+# include "win32-dirent.h" -+#endif /* __MINGW32__ || _MSC_VER || __BORLANDC__ */ -+ - #include "libguile/_scm.h" - #include "libguile/smob.h" - #include "libguile/feature.h" -@@ -94,7 +98,6 @@ - - - #if defined (__MINGW32__) || defined (_MSC_VER) || defined (__BORLANDC__) --# include "win32-dirent.h" - # define NAMLEN(dirent) strlen((dirent)->d_name) - /* The following bits are per AC_HEADER_DIRENT doco in the autoconf manual */ - #elif HAVE_DIRENT_H