summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2010-04-10 06:27:23 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2010-04-10 06:27:23 (GMT)
commit9d05d00a3024b31b94cce3950982fff358da1cc2 (patch)
treeebbb6d20a61962fb820e6eae404713c277aaff70 /src
parent26ac64f318752a5a06e72b9d6d23ec9075a83a30 (diff)
downloadmxe-9d05d00a3024b31b94cce3950982fff358da1cc2.zip
mxe-9d05d00a3024b31b94cce3950982fff358da1cc2.tar.gz
mxe-9d05d00a3024b31b94cce3950982fff358da1cc2.tar.bz2
new package: guile
Diffstat (limited to 'src')
-rw-r--r--src/guile-test.c18
-rw-r--r--src/guile-win32.patch81
-rw-r--r--src/guile.mk36
3 files changed, 135 insertions, 0 deletions
diff --git a/src/guile-test.c b/src/guile-test.c
new file mode 100644
index 0000000..d1bcd58
--- /dev/null
+++ b/src/guile-test.c
@@ -0,0 +1,18 @@
+/* This file is part of mingw-cross-env. */
+/* See doc/index.html for further information. */
+
+#include <libguile.h>
+
+static void inner_main(void *data, int argc, char *argv[])
+{
+ (void)data;
+ (void)argc;
+ (void)argv;
+ scm_c_eval_string("(display \"Hello World!\\n\")");
+}
+
+int main(int argc, char *argv[])
+{
+ scm_boot_guile(argc, argv, inner_main, NULL);
+ return 0;
+}
diff --git a/src/guile-win32.patch b/src/guile-win32.patch
new file mode 100644
index 0000000..aec4017
--- /dev/null
+++ b/src/guile-win32.patch
@@ -0,0 +1,81 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+diff -ruN guile-1.8.7.orig/configure guile-1.8.7/configure
+--- guile-1.8.7.orig/configure 2009-07-05 22:25:00.000000000 +0200
++++ guile-1.8.7/configure 2010-04-10 07:35:25.000000000 +0200
+@@ -35057,6 +35057,7 @@
+ $as_echo_n "checking whether pthread_attr_getstack works for the main thread... " >&6; }
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
++if test "$cross_compiling" = "no"; then
+ if test "$cross_compiling" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+@@ -35140,6 +35141,9 @@
+ fi
+
+
++else
++works=no
++fi
+ CFLAGS="$old_CFLAGS"
+ { $as_echo "$as_me:$LINENO: result: $works" >&5
+ $as_echo "$works" >&6; }
+diff -ruN guile-1.8.7.orig/configure.in guile-1.8.7/configure.in
+--- guile-1.8.7.orig/configure.in 2009-07-05 20:40:06.000000000 +0200
++++ guile-1.8.7/configure.in 2010-04-10 07:27:37.000000000 +0200
+@@ -1374,6 +1374,7 @@
+ AC_MSG_CHECKING(whether pthread_attr_getstack works for the main thread)
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
++if test "$cross_compiling" = "no"; then
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #if HAVE_PTHREAD_ATTR_GETSTACK
+ #include <pthread.h>
+@@ -1404,6 +1405,9 @@
+ AC_DEFINE(PTHREAD_ATTR_GETSTACK_WORKS, [1], [Define when pthread_att_get_stack works for the main thread])],
+ [works=no],
+ [])
++else
++works=no
++fi
+ CFLAGS="$old_CFLAGS"
+ AC_MSG_RESULT($works)
+
+diff -ruN guile-1.8.7.orig/guile-readline/configure guile-1.8.7/guile-readline/configure
+--- guile-1.8.7.orig/guile-readline/configure 2009-07-05 22:24:45.000000000 +0200
++++ guile-1.8.7/guile-readline/configure 2010-04-10 07:36:18.000000000 +0200
+@@ -12353,7 +12353,7 @@
+ fi
+
+
+-for termlib in ncurses curses termcap terminfo termlib ; do
++for termlib in ncurses curses termcap terminfo termlib pdcurses ; do
+ as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgoto" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: checking for tgoto in -l${termlib}" >&5
+ $as_echo_n "checking for tgoto in -l${termlib}... " >&6; }
+diff -ruN guile-1.8.7.orig/guile-readline/configure.in guile-1.8.7/guile-readline/configure.in
+--- guile-1.8.7.orig/guile-readline/configure.in 2009-07-04 00:19:22.000000000 +0200
++++ guile-1.8.7/guile-readline/configure.in 2010-04-10 07:13:43.000000000 +0200
+@@ -33,7 +33,7 @@
+ fi
+ AC_SUBST(EXTRA_DEFS)
+
+-for termlib in ncurses curses termcap terminfo termlib ; do
++for termlib in ncurses curses termcap terminfo termlib pdcurses ; do
+ AC_CHECK_LIB(${termlib}, tgoto,
+ [LIBS="-l${termlib} $LIBS"; break])
+ done
+diff -ruN guile-1.8.7.orig/libguile/__scm.h guile-1.8.7/libguile/__scm.h
+--- guile-1.8.7.orig/libguile/__scm.h 2009-07-04 00:18:59.000000000 +0200
++++ guile-1.8.7/libguile/__scm.h 2010-04-10 07:58:48.000000000 +0200
+@@ -150,7 +150,7 @@
+ which should be exported or imported in the resulting dynamic link
+ library (DLL) in the Win32 port. */
+
+-#if defined (SCM_IMPORT)
++#if defined (SCM_IMPORT) && defined (USE_DLL_IMPORT)
+ # define SCM_API __declspec (dllimport) extern
+ #elif defined (SCM_EXPORT) || defined (DLL_EXPORT)
+ # define SCM_API __declspec (dllexport) extern
diff --git a/src/guile.mk b/src/guile.mk
new file mode 100644
index 0000000..895f0ca
--- /dev/null
+++ b/src/guile.mk
@@ -0,0 +1,36 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+# GNU Guile
+PKG := guile
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 1.8.7
+$(PKG)_CHECKSUM := 24cd2f06439c76d41d982a7384fe8a0fe5313b54
+$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
+$(PKG)_WEBSITE := http://www.gnu.org/software/$(PKG)/
+$(PKG)_URL := http://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc libtool gmp libiconv gettext readline
+
+define $(PKG)_UPDATE
+ wget -q -O- 'http://git.savannah.gnu.org/gitweb/?p=$(PKG).git;a=tags' | \
+ grep '<a class="list subject"' | \
+ $(SED) -n 's,.*<a[^>]*>[^0-9>]*\([0-9][^< ]*\)\.<.*,\1,p' | \
+ head -1
+endef
+
+define $(PKG)_BUILD
+ cd '$(1)' && ./configure \
+ --host='$(TARGET)' \
+ --prefix='$(PREFIX)/$(TARGET)' \
+ --disable-shared \
+ --with-threads \
+ LIBS='-lintl -liconv'
+ $(MAKE) -C '$(1)' -j '$(JOBS)'
+ $(MAKE) -C '$(1)' -j 1 install
+
+ '$(TARGET)-gcc' \
+ -W -Wall -Werror -ansi -pedantic \
+ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-guile.exe' \
+ `'$(TARGET)-pkg-config' guile-1.8 --cflags --libs`
+endef