summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2012-01-13 18:19:36 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-19 13:26:12 +0000
commit34f4ab18bdcac475ab703d00c3ccb989592633e3 (patch)
treefa60f1fb331a734be4a4fb6bd6c70ff8396f4bf3 /meta
parent225a24a390beb07c9e2bf86f8e2102e929c66a56 (diff)
downloadpoky-34f4ab18bdcac475ab703d00c3ccb989592633e3.tar.gz
guile: new recipe for autogen
guile recipe is needed by autogen. Imported & updated the guile-cross-config generation & guile-2.0.pc manipulation code from the meta-oe guile recipe. (From OE-Core rev: 7726884826332387180cd24ebe565cd13a193e13) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/guile/files/debian/0001-Fix-the-SRFI-60-copy-bit-documentation.patch33
-rw-r--r--meta/recipes-devtools/guile/files/debian/0002-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch25
-rw-r--r--meta/recipes-devtools/guile/files/debian/0003-Include-gc.h-rather-than-gc-gc_version.h-in-pthread-.patch26
-rw-r--r--meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch38
-rw-r--r--meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch48
-rw-r--r--meta/recipes-devtools/guile/guile_2.0.3.bb79
6 files changed, 249 insertions, 0 deletions
diff --git a/meta/recipes-devtools/guile/files/debian/0001-Fix-the-SRFI-60-copy-bit-documentation.patch b/meta/recipes-devtools/guile/files/debian/0001-Fix-the-SRFI-60-copy-bit-documentation.patch
new file mode 100644
index 0000000000..e6df9b9f9c
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/debian/0001-Fix-the-SRFI-60-copy-bit-documentation.patch
@@ -0,0 +1,33 @@
1Upstream-Status: Inappropriate [debian patch]
2
3From c53b49c63d7ed145fbaa3dde25063c407631f373 Mon Sep 17 00:00:00 2001
4From: Rob Browning <rlb@defaultvalue.org>
5Date: Sat, 23 Apr 2011 14:57:49 -0500
6Subject: Fix the SRFI 60 copy-bit documentation.
7
8---
9 libguile/srfi-60.c | 4 ++--
10 1 files changed, 2 insertions(+), 2 deletions(-)
11
12diff --git a/libguile/srfi-60.c b/libguile/srfi-60.c
13index 264f4cb..1ed3c9e 100644
14--- a/libguile/srfi-60.c
15+++ b/libguile/srfi-60.c
16@@ -70,7 +70,7 @@ SCM_DEFINE (scm_srfi60_log2_binary_factors, "log2-binary-factors", 1, 0, 0,
17
18
19 SCM_DEFINE (scm_srfi60_copy_bit, "copy-bit", 3, 0, 0,
20- (SCM index, SCM n, SCM bit),
21+ (SCM index, SCM n, SCM newbit),
22 "Return @var{n} with the bit at @var{index} set according to\n"
23 "@var{newbit}. @var{newbit} should be @code{#t} to set the bit\n"
24 "to 1, or @code{#f} to set it to 0. Bits other than at\n"
25@@ -86,7 +86,7 @@ SCM_DEFINE (scm_srfi60_copy_bit, "copy-bit", 3, 0, 0,
26 int bb;
27
28 ii = scm_to_ulong (index);
29- bb = scm_to_bool (bit);
30+ bb = scm_to_bool (newbit);
31
32 if (SCM_I_INUMP (n))
33 {
diff --git a/meta/recipes-devtools/guile/files/debian/0002-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch b/meta/recipes-devtools/guile/files/debian/0002-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch
new file mode 100644
index 0000000000..7176c76409
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/debian/0002-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch
@@ -0,0 +1,25 @@
1Upstream-Status: Inappropriate [debian patch]
2
3From 6614b8efc5a8d90a26a2b99308b909ac351b65e5 Mon Sep 17 00:00:00 2001
4From: Rob Browning <rlb@defaultvalue.org>
5Date: Sat, 23 Apr 2011 14:57:50 -0500
6Subject: Define _GNU_SOURCE to fix the GNU/kFreeBSD build.
7
8Author: Petr Salinger <Petr.Salinger@seznam.cz>
9Closes: #401168
10---
11 libguile/fports.c | 1 +
12 1 files changed, 1 insertions(+), 0 deletions(-)
13
14diff --git a/libguile/fports.c b/libguile/fports.c
15index 1348b8b..3ac3ced 100644
16--- a/libguile/fports.c
17+++ b/libguile/fports.c
18@@ -20,6 +20,7 @@
19
20
21 #define _LARGEFILE64_SOURCE /* ask for stat64 etc */
22+#define _GNU_SOURCE /* ask for LONG_LONG_MAX/LONG_LONG_MIN */
23
24 #ifdef HAVE_CONFIG_H
25 # include <config.h>
diff --git a/meta/recipes-devtools/guile/files/debian/0003-Include-gc.h-rather-than-gc-gc_version.h-in-pthread-.patch b/meta/recipes-devtools/guile/files/debian/0003-Include-gc.h-rather-than-gc-gc_version.h-in-pthread-.patch
new file mode 100644
index 0000000000..aa64f58800
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/debian/0003-Include-gc.h-rather-than-gc-gc_version.h-in-pthread-.patch
@@ -0,0 +1,26 @@
1Upstream-Status: Inappropriate [debian patch]
2
3From 0c91fa9270e86b20bfb8e62db5ac84617b2567d9 Mon Sep 17 00:00:00 2001
4From: Rob Browning <rlb@defaultvalue.org>
5Date: Thu, 10 Nov 2011 02:23:04 -0600
6Subject: Include gc.h rather than gc/gc_version.h in pthread test.
7
8See comments in recent gc_version.h. It should never be included
9directly, and doing so was causing build failures.
10---
11 .../standalone/test-pthread-create-secondary.c | 2 +-
12 1 files changed, 1 insertions(+), 1 deletions(-)
13
14diff --git a/test-suite/standalone/test-pthread-create-secondary.c b/test-suite/standalone/test-pthread-create-secondary.c
15index fe39c2a..d87fb33 100644
16--- a/test-suite/standalone/test-pthread-create-secondary.c
17+++ b/test-suite/standalone/test-pthread-create-secondary.c
18@@ -27,7 +27,7 @@
19 #include <stdlib.h>
20 #include <libguile.h>
21
22-#include <gc/gc_version.h>
23+#include <gc.h>
24
25
26 /* Up to GC 7.2alpha5, calling `GC_INIT' from a secondary thread would
diff --git a/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch b/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
new file mode 100644
index 0000000000..be3191a039
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
@@ -0,0 +1,38 @@
1
2Upstream-Status: Inappropriate [opensuse patch]
3
4Index: guile-2.0.3/libguile/hash.c
5===================================================================
6--- guile-2.0.3.orig/libguile/hash.c 2011-07-06 15:49:59.000000000 -0700
7+++ guile-2.0.3/libguile/hash.c 2012-01-13 21:49:43.332844884 -0800
8@@ -270,7 +270,7 @@ scm_hasher(SCM obj, unsigned long n, siz
9 unsigned long
10 scm_ihashq (SCM obj, unsigned long n)
11 {
12- return (SCM_UNPACK (obj) >> 1) % n;
13+ return ((unsigned long) SCM_UNPACK (obj) >> 1) % n;
14 }
15
16
17@@ -306,7 +306,7 @@ scm_ihashv (SCM obj, unsigned long n)
18 if (SCM_NUMP(obj))
19 return (unsigned long) scm_hasher(obj, n, 10);
20 else
21- return SCM_UNPACK (obj) % n;
22+ return (unsigned long) SCM_UNPACK (obj) % n;
23 }
24
25
26Index: guile-2.0.3/libguile/struct.c
27===================================================================
28--- guile-2.0.3.orig/libguile/struct.c 2011-07-06 15:50:00.000000000 -0700
29+++ guile-2.0.3/libguile/struct.c 2012-01-13 21:49:43.332844884 -0800
30@@ -942,7 +942,7 @@ scm_struct_ihashq (SCM obj, unsigned lon
31 {
32 /* The length of the hash table should be a relative prime it's not
33 necessary to shift down the address. */
34- return SCM_UNPACK (obj) % n;
35+ return (unsigned long) SCM_UNPACK (obj) % n;
36 }
37
38 SCM_DEFINE (scm_struct_vtable_name, "struct-vtable-name", 1, 0, 0,
diff --git a/meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch b/meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch
new file mode 100644
index 0000000000..ed56694a98
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch
@@ -0,0 +1,48 @@
1
2Upstream-Status: Inappropriate [opensuse patch]
3
4See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10096
5why this test is turned off.
6Index: guile-2.0.3/test-suite/tests/gc.test
7===================================================================
8--- guile-2.0.3.orig/test-suite/tests/gc.test 2011-10-15 09:34:40.000000000 -0700
9+++ guile-2.0.3/test-suite/tests/gc.test 2012-01-13 21:52:10.282540355 -0800
10@@ -65,23 +65,23 @@
11 foo)))
12
13
14-(with-test-prefix "gc"
15- (pass-if "Unused modules are removed"
16- (let* ((guard (make-guardian))
17- (total 1000))
18-
19- (for-each (lambda (x) (guard (make-module))) (iota total))
20+;;(with-test-prefix "gc"
21+;; (pass-if "Unused modules are removed"
22+;; (let* ((guard (make-guardian))
23+;; (total 1000))
24+;;
25+;; (for-each (lambda (x) (guard (make-module))) (iota total))
26
27 ;; Avoid false references to the modules on the stack.
28- (stack-cleanup 20)
29+;; (stack-cleanup 20)
30
31- (gc)
32- (gc) ;; twice: have to kill the weak vectors.
33- (gc) ;; thrice: because the test doesn't succeed with only
34+;; (gc)
35+;; (gc) ;; twice: have to kill the weak vectors.
36+;; (gc) ;; thrice: because the test doesn't succeed with only
37 ;; one gc round. not sure why.
38
39- (= (let lp ((i 0))
40- (if (guard)
41- (lp (1+ i))
42- i))
43- total))))
44+;; (= (let lp ((i 0))
45+;; (if (guard)
46+;; (lp (1+ i))
47+;; i))
48+;; total))))
diff --git a/meta/recipes-devtools/guile/guile_2.0.3.bb b/meta/recipes-devtools/guile/guile_2.0.3.bb
new file mode 100644
index 0000000000..60fbe32c6f
--- /dev/null
+++ b/meta/recipes-devtools/guile/guile_2.0.3.bb
@@ -0,0 +1,79 @@
1SUMMARY = "Guile is the GNU Ubiquitous Intelligent Language for Extensions."
2DESCRIPTION = "Guile is the GNU Ubiquitous Intelligent Language for Extensions,\
3 the official extension language for the GNU operating system.\
4 Guile is a library designed to help programmers create flexible applications.\
5 Using Guile in an application allows the application's functionality to be\
6 extended by users or other programmers with plug-ins, modules, or scripts.\
7 Guile provides what might be described as "practical software freedom,"\
8 making it possible for users to customize an application to meet their\
9 needs without digging into the application's internals."
10
11HOMEPAGE = "http://www.gnu.org/software/guile/"
12SECTION = "devel"
13LICENSE = "GPLv3"
14LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
15
16SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.gz \
17 file://debian/0001-Fix-the-SRFI-60-copy-bit-documentation.patch \
18 file://debian/0002-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch \
19 file://debian/0003-Include-gc.h-rather-than-gc-gc_version.h-in-pthread-.patch \
20 file://opensuse/guile-64bit.patch \
21 file://opensuse/guile-turn-off-gc-test.patch \
22 "
23
24SRC_URI[md5sum] = "3b8b4e1083037f29d2c4704a6d55f2a8"
25SRC_URI[sha256sum] = "a53b21159befe3e89bbaca71e9e62cf00af0f49fcca297c407944b988d59eb08"
26
27PR = "r1"
28
29inherit autotools gettext
30BBCLASSEXTEND = "native"
31
32DEPENDS = "libunistring bdwgc gmp libtool libffi"
33# add guile-native only to the target recipe's DEPENDS
34DEPENDS += "${@['guile-native', ''][d.getVar('PN', 1) != 'guile']}"
35
36do_configure_prepend() {
37 mkdir -p po
38}
39
40export GUILE_FOR_BUILD=${BUILD_SYS}-guile
41
42do_compile_append() {
43 # just for target recipe
44 if [ "${PN}" == "guile" ]
45 then
46 sed -i -e s:${STAGING_DIR_TARGET}::g \
47 -e s:/${TARGET_SYS}::g \
48 -e s:-L/usr/lib::g \
49 -e s:-isystem/usr/include::g \
50 -e s:,/usr/lib:,\$\{libdir\}:g \
51 meta/guile-2.0.pc
52 fi
53}
54
55do_install_append_virtclass-native() {
56 install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile
57}
58
59SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
60
61guile_cross_config() {
62 # this is only for target recipe
63 if [ "${PN}" == "guile" ]
64 then
65 # Create guile-config returning target values instead of native values
66 install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
67 echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
68 > guile-config.cross
69 sed -n -e 's:^[ \t]*{[ \t]*": (:' \
70 -e 's:",[ \t]*": . ":' \
71 -e 's:" *}, *\\:"):' \
72 -e 's:^.*cachedir.*$::' \
73 -e '/^ (/p' \
74 < libguile/libpath.h >> guile-config.cross
75 echo '))' >> guile-config.cross
76 cat meta/guile-config >> guile-config.cross
77 install guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
78 fi
79}