aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/atk/atk.inc11
-rw-r--r--meta-oe/recipes-support/atk/atk_1.30.0.bb20
-rw-r--r--meta-oe/recipes-support/cups/cups-1.4.6/0001-don-t-try-to-run-generated-binaries.patch68
-rw-r--r--meta-oe/recipes-support/cups/cups-1.4.6/use_echo_only_in_init.patch11
-rw-r--r--meta-oe/recipes-support/cups/cups14.inc84
-rw-r--r--meta-oe/recipes-support/cups/cups_1.4.6.bb17
-rw-r--r--meta-oe/recipes-support/fftw/benchfft_3.1.bb20
-rw-r--r--meta-oe/recipes-support/fftw/fftw.inc23
-rw-r--r--meta-oe/recipes-support/fftw/fftw_3.1.2.bb8
-rw-r--r--meta-oe/recipes-support/fftw/fftw_3.2.2.bb8
-rw-r--r--meta-oe/recipes-support/fftw/fftwf_3.1.2.bb7
-rw-r--r--meta-oe/recipes-support/fftw/fftwf_3.2.2.bb8
-rw-r--r--meta-oe/recipes-support/fftw/fftwl_3.1.2.bb8
-rw-r--r--meta-oe/recipes-support/fftw/fftwl_3.2.2.bb8
-rw-r--r--meta-oe/recipes-support/gsl/gsl.inc10
-rw-r--r--meta-oe/recipes-support/gsl/gsl_1.12.bb6
-rw-r--r--meta-oe/recipes-support/guile/files/configure-fix.patch10
-rw-r--r--meta-oe/recipes-support/guile/files/cpp-linemarkers.patch8
-rw-r--r--meta-oe/recipes-support/guile/guile-1.8.7/18.diff1743
-rw-r--r--meta-oe/recipes-support/guile/guile-native.inc12
-rw-r--r--meta-oe/recipes-support/guile/guile-native_1.8.7.bb8
-rw-r--r--meta-oe/recipes-support/guile/guile.inc46
-rw-r--r--meta-oe/recipes-support/guile/guile_1.8.7.bb12
-rw-r--r--meta-oe/recipes-support/htop/htop/remove-proc-test.patch13
-rw-r--r--meta-oe/recipes-support/htop/htop_0.9.bb19
-rw-r--r--meta-oe/recipes-support/libgcrypt/libgcrypt.inc33
-rw-r--r--meta-oe/recipes-support/libgcrypt/libgcrypt/add-pkgconfig-support.patch49
-rw-r--r--meta-oe/recipes-support/libgcrypt/libgcrypt_1.4.6.bb3
-rw-r--r--meta-oe/recipes-support/libgpg-error/libgpg-error-1.8/pkgconfig.patch53
-rw-r--r--meta-oe/recipes-support/libgpg-error/libgpg-error_1.8.bb26
-rw-r--r--meta-oe/recipes-support/libusb/libusb-compat_0.1.3.bbappend4
-rw-r--r--meta-oe/recipes-support/mysql/files/autofoo.patch319
-rw-r--r--meta-oe/recipes-support/mysql/files/configure-ps-cache-check.patch27
-rw-r--r--meta-oe/recipes-support/mysql/files/fix_host_path.patch37
-rw-r--r--meta-oe/recipes-support/mysql/files/my.cnf21
-rw-r--r--meta-oe/recipes-support/mysql/files/mysqld.sh24
-rw-r--r--meta-oe/recipes-support/mysql/mysql5-native_5.1.40.bb28
-rw-r--r--meta-oe/recipes-support/mysql/mysql5/Makefile.am.patch19
-rw-r--r--meta-oe/recipes-support/mysql/mysql5/configure-ps-cache-check.patch27
-rw-r--r--meta-oe/recipes-support/mysql/mysql5/configure.in.patch54
-rw-r--r--meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch77
-rw-r--r--meta-oe/recipes-support/mysql/mysql5/fix_host_path.patch37
-rw-r--r--meta-oe/recipes-support/mysql/mysql5/misc.m4.patch13
-rw-r--r--meta-oe/recipes-support/mysql/mysql5/my.cnf21
-rw-r--r--meta-oe/recipes-support/mysql/mysql5/mysqld.sh24
-rw-r--r--meta-oe/recipes-support/mysql/mysql5/plug.in.patch40
-rw-r--r--meta-oe/recipes-support/mysql/mysql5_5.1.40.bb6
-rw-r--r--meta-oe/recipes-support/mysql/mysql5_5.1.40.inc172
-rw-r--r--meta-oe/recipes-support/ntp/files/hipox/ntp.conf13
-rwxr-xr-xmeta-oe/recipes-support/ntp/files/hipox/ntpd62
-rwxr-xr-xmeta-oe/recipes-support/ntp/files/ntp31
-rw-r--r--meta-oe/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch17
-rw-r--r--meta-oe/recipes-support/ntp/files/ntp.conf13
-rwxr-xr-xmeta-oe/recipes-support/ntp/files/ntpd62
-rwxr-xr-xmeta-oe/recipes-support/ntp/files/ntpdate49
-rw-r--r--meta-oe/recipes-support/ntp/files/tickadj.c.patch32
-rw-r--r--meta-oe/recipes-support/ntp/ntp-ssl_4.2.6p3.bb11
-rw-r--r--meta-oe/recipes-support/ntp/ntp.inc33
-rw-r--r--meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb46
-rw-r--r--meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch12
-rw-r--r--meta-oe/recipes-support/postgresql/postgresql-8.4.4/remove.autoconf.version.check.patch15
-rw-r--r--meta-oe/recipes-support/postgresql/postgresql.inc66
-rw-r--r--meta-oe/recipes-support/postgresql/postgresql_8.4.4.bb11
-rw-r--r--meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch32
-rw-r--r--meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch20
-rw-r--r--meta-oe/recipes-support/sqlite/sqlite-2.8.17/sqlite.pc12
-rw-r--r--meta-oe/recipes-support/sqlite/sqlite_2.8.17.bb60
67 files changed, 3899 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/atk/atk.inc b/meta-oe/recipes-support/atk/atk.inc
new file mode 100644
index 0000000000..a508012cfb
--- /dev/null
+++ b/meta-oe/recipes-support/atk/atk.inc
@@ -0,0 +1,11 @@
+DESCRIPTION = "An accessibility toolkit for GNOME."
+SECTION = "x11/libs"
+PRIORITY = "optional"
+LICENSE = "LGPL"
+
+DEPENDS = "glib-2.0 gtk-doc-native"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-glibtest"
+
diff --git a/meta-oe/recipes-support/atk/atk_1.30.0.bb b/meta-oe/recipes-support/atk/atk_1.30.0.bb
new file mode 100644
index 0000000000..cc8f573810
--- /dev/null
+++ b/meta-oe/recipes-support/atk/atk_1.30.0.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "An accessibility toolkit for GNOME."
+SECTION = "x11/libs"
+PRIORITY = "optional"
+LICENSE = "LGPLv2 & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://atk/atkutil.c;endline=20;md5=db21b0bdbef9da4dc6eb122debc9f9bc \
+ file://atk/atk.h;endline=20;md5=c58238d688c24387376d6c69d06248a7
+PR = "r1"
+
+inherit gnome
+
+SRC_URI[archive.md5sum] = "548d413775819fef425410739041cac3"
+SRC_URI[archive.sha256sum] = "92b9b1213cafc68fe9c3806273b968c26423237d7b1f631dd83dc5270b8c268c"
+
+DEPENDS = "glib-2.0 gtk-doc-native"
+
+EXTRA_OECONF += "--disable-glibtest"
+
+BBCLASSEXTEND = "native"
+
diff --git a/meta-oe/recipes-support/cups/cups-1.4.6/0001-don-t-try-to-run-generated-binaries.patch b/meta-oe/recipes-support/cups/cups-1.4.6/0001-don-t-try-to-run-generated-binaries.patch
new file mode 100644
index 0000000000..7b544ca0e3
--- /dev/null
+++ b/meta-oe/recipes-support/cups/cups-1.4.6/0001-don-t-try-to-run-generated-binaries.patch
@@ -0,0 +1,68 @@
+From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Sun, 30 Jan 2011 16:37:27 +0100
+Subject: [PATCH] don't try to run generated binaries
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ ppdc/Makefile | 30 +++++++++++++++---------------
+ 1 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/ppdc/Makefile b/ppdc/Makefile
+index 0288d47..fc87f1b 100644
+--- a/ppdc/Makefile
++++ b/ppdc/Makefile
+@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \
+ $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
+ libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \
+ $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+- echo Generating localization strings...
+- ./genstrings >sample.c
++# echo Generating localization strings...
++# ./genstrings >sample.c
+
+
+ #
+@@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po
+ $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
+ ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ $(COMMONLIBS) $(LIBZ)
+- echo Testing PPD compiler...
+- ./ppdc-static -l en,fr -I ../data foo.drv
+- ./ppdc-static -l en,fr -z -I ../data foo.drv
++# echo Testing PPD compiler...
++# ./ppdc-static -l en,fr -I ../data foo.drv
++# ./ppdc-static -l en,fr -z -I ../data foo.drv
+
+
+ #
+@@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a
+ ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ $(COMMONLIBS) $(LIBZ)
+ echo Testing PPD importer...
+- $(RM) -r ppd ppd2 sample-import.drv
+- ./ppdc-static -I ../data sample.drv
+- ./ppdi-static -I ../data -o sample-import.drv ppd/*
+- ./ppdc-static -I ../data -d ppd2 sample-import.drv
+- if diff -r ppd ppd2 >/dev/null; then \
+- echo PPD import OK; \
+- else \
+- echo PPD import FAILED; \
+- exit 1; \
+- fi
++# $(RM) -r ppd ppd2 sample-import.drv
++# ./ppdc-static -I ../data sample.drv
++# ./ppdi-static -I ../data -o sample-import.drv ppd/*
++# ./ppdc-static -I ../data -d ppd2 sample-import.drv
++# if diff -r ppd ppd2 >/dev/null; then \
++# echo PPD import OK; \
++# else \
++# echo PPD import FAILED; \
++# exit 1; \
++# fi
+
+
+ #
+--
+1.6.6.1
+
diff --git a/meta-oe/recipes-support/cups/cups-1.4.6/use_echo_only_in_init.patch b/meta-oe/recipes-support/cups/cups-1.4.6/use_echo_only_in_init.patch
new file mode 100644
index 0000000000..21ff0e535b
--- /dev/null
+++ b/meta-oe/recipes-support/cups/cups-1.4.6/use_echo_only_in_init.patch
@@ -0,0 +1,11 @@
+--- a/init/cups.sh.in.orig 2008-10-04 16:50:46.000000000 -0300
++++ b/init/cups.sh.in 2008-10-04 16:51:39.000000000 -0300
+@@ -68,7 +68,7 @@
+ ECHO_ERROR=:
+ ;;
+
+- Linux*)
++ DISABLELinux*)
+ IS_ON=/bin/true
+ if test -f /etc/init.d/functions; then
+ . /etc/init.d/functions
diff --git a/meta-oe/recipes-support/cups/cups14.inc b/meta-oe/recipes-support/cups/cups14.inc
new file mode 100644
index 0000000000..430d3ab5b5
--- /dev/null
+++ b/meta-oe/recipes-support/cups/cups14.inc
@@ -0,0 +1,84 @@
+DESCRIPTION = "An Internet printing system for Unix."
+SECTION = "console/utils"
+LICENSE = "GPLv2 LGPLv2"
+DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib"
+PROVIDES = "cups14"
+
+SRC_URI = "ftp://ftp.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2"
+
+LEAD_SONAME = "libcupsdriver.so"
+
+inherit autotools binconfig
+
+EXTRA_OECONF = " \
+ --enable-gnutls \
+ --enable-dbus \
+ --enable-browsing \
+ --disable-openssl \
+ --disable-tiff \
+ --without-php \
+ --without-perl \
+ --without-python \
+ --without-java \
+ "
+
+
+do_configure() {
+ gnu-configize
+ libtoolize --force
+ DSOFLAGS="${LDFLAGS}" oe_runconf
+}
+
+do_compile () {
+ sed -i s:STRIP:NOSTRIP: Makedefs
+ sed -i s:serial:: backend/Makefile
+
+ echo "all:" > man/Makefile
+ echo "libs:" >> man/Makefile
+ echo "install:" >> man/Makefile
+ echo "install-data:" >> man/Makefile
+ echo "install-exec:" >> man/Makefile
+ echo "install-headers:" >> man/Makefile
+ echo "install-libs:" >> man/Makefile
+
+ oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \
+ "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \
+ "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \
+ "LIBZ=-lz -L${STAGING_LIBDIR}" \
+ "-I."
+}
+
+fakeroot do_install () {
+ oe_runmake "DSTROOT=${D}" install
+
+ # This directory gets installed with perms 511, which makes packaging fail
+ chmod 0711 "${D}/${localstatedir}/run/cups/certs"
+}
+
+python do_package_append() {
+ # Change permissions back the way they were, they probably had a reason...
+ workdir = bb.data.getVar('WORKDIR', d, 1)
+ os.system('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir)
+}
+
+PACKAGES =+ "${PN}-lib ${PN}-libimage"
+
+FILES_${PN}-lib = "${libdir}/libcups.so.*"
+
+FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
+
+FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \
+ ${libdir}/cups/cgi-bin/.debug \
+ ${libdir}/cups/filter/.debug \
+ ${libdir}/cups/monitor/.debug \
+ ${libdir}/cups/notifier/.debug \
+ ${libdir}/cups/daemon/.debug \
+ "
+
+#package the html for the webgui inside the main packages (~1MB uncompressed)
+
+FILES_${PN} += "${datadir}/doc/cups/images \
+ ${datadir}/doc/cups/*html \
+ ${datadir}/doc/cups/*.css \
+ ${datadir}/icons/ \
+ "
diff --git a/meta-oe/recipes-support/cups/cups_1.4.6.bb b/meta-oe/recipes-support/cups/cups_1.4.6.bb
new file mode 100644
index 0000000000..783ecf6b3a
--- /dev/null
+++ b/meta-oe/recipes-support/cups/cups_1.4.6.bb
@@ -0,0 +1,17 @@
+require cups14.inc
+
+DEPENDS += "virtual/libusb0"
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=956e7600195e6139f12de8c2a5bbefa9"
+
+SRC_URI += " \
+ file://use_echo_only_in_init.patch \
+ file://0001-don-t-try-to-run-generated-binaries.patch \
+ "
+
+SRC_URI[md5sum] = "de8fb5a29c36554925c0c6a6e2c0dae1"
+SRC_URI[sha256sum] = "f08711702a77b52c7150f96fe1f45482f6151cb95ef601268c528607fe6ad514"
+
+EXTRA_OECONF += " --disable-gssapi --enable-debug --disable-relro --enable-libusb"
+
+CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf"
diff --git a/meta-oe/recipes-support/fftw/benchfft_3.1.bb b/meta-oe/recipes-support/fftw/benchfft_3.1.bb
new file mode 100644
index 0000000000..efa76cdcef
--- /dev/null
+++ b/meta-oe/recipes-support/fftw/benchfft_3.1.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "FFTW benchmarks"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "GPLv2"
+
+# single precision fftw is called fftwf
+DEPENDS = "fftwf"
+
+SRC_URI = "http://www.fftw.org/benchfft/benchfft-${PV}.tar.gz"
+
+EXTRA_OECONF = "--disable-fortran --enable-single --enable-shared"
+
+inherit autotools pkgconfig
+
+do_compile_prepend() {
+ sed -i -e 's:all-recursive:$(RECURSIVE_TARGETS):g' ${S}/Makefile
+}
+
+SRC_URI[md5sum] = "9356e5e9dcb3f1481977009720a2ccf8"
+SRC_URI[sha256sum] = "1b4a5b5e48ad5e61a21586b7b59d5c0a88691a981e73e2c6dc5868197461791b"
diff --git a/meta-oe/recipes-support/fftw/fftw.inc b/meta-oe/recipes-support/fftw/fftw.inc
new file mode 100644
index 0000000000..40608b61db
--- /dev/null
+++ b/meta-oe/recipes-support/fftw/fftw.inc
@@ -0,0 +1,23 @@
+DESCRIPTION = "FFTW"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "GPL"
+RPROVIDES_${PN} += "libfftw3"
+
+PR = "r3"
+
+SRC_URI = "http://www.fftw.org/fftw-${PV}.tar.gz"
+
+S = "${WORKDIR}/fftw-${PV}"
+
+inherit autotools pkgconfig
+
+do_configure_prepend() {
+ echo 'AM_PROG_AS' >> ${S}/configure.ac
+}
+
+PACKAGES =+ "lib${PN}"
+
+FILES_lib${PN} = "${libdir}/lib*.so.*"
+
+# rename binary in /bin and use u-a tpo choose between different precision implementations?
diff --git a/meta-oe/recipes-support/fftw/fftw_3.1.2.bb b/meta-oe/recipes-support/fftw/fftw_3.1.2.bb
new file mode 100644
index 0000000000..da8133785d
--- /dev/null
+++ b/meta-oe/recipes-support/fftw/fftw_3.1.2.bb
@@ -0,0 +1,8 @@
+require fftw.inc
+
+EXTRA_OECONF = "--disable-fortran --enable-shared"
+
+
+
+SRC_URI[md5sum] = "08f2e21c9fd02f4be2bd53a62592afa4"
+SRC_URI[sha256sum] = "e1b92e97fe27efcbd150212d0d287ac907bd2fef0af32e16284fef5d1c1c26bf"
diff --git a/meta-oe/recipes-support/fftw/fftw_3.2.2.bb b/meta-oe/recipes-support/fftw/fftw_3.2.2.bb
new file mode 100644
index 0000000000..090e004092
--- /dev/null
+++ b/meta-oe/recipes-support/fftw/fftw_3.2.2.bb
@@ -0,0 +1,8 @@
+require fftw.inc
+
+SRC_URI = "http://www.fftw.org/fftw-${PV}.tar.gz"
+
+EXTRA_OECONF = "--disable-fortran --enable-shared --enable-threads"
+
+SRC_URI[md5sum] = "b616e5c91218cc778b5aa735fefb61ae"
+SRC_URI[sha256sum] = "6aa7ae65ee49eb99004f15899f9bb77f54759122f1a350041e81e096157d768f"
diff --git a/meta-oe/recipes-support/fftw/fftwf_3.1.2.bb b/meta-oe/recipes-support/fftw/fftwf_3.1.2.bb
new file mode 100644
index 0000000000..a4f2466528
--- /dev/null
+++ b/meta-oe/recipes-support/fftw/fftwf_3.1.2.bb
@@ -0,0 +1,7 @@
+require fftw.inc
+
+EXTRA_OECONF = "--disable-fortran --enable-single --enable-shared"
+
+
+SRC_URI[md5sum] = "08f2e21c9fd02f4be2bd53a62592afa4"
+SRC_URI[sha256sum] = "e1b92e97fe27efcbd150212d0d287ac907bd2fef0af32e16284fef5d1c1c26bf"
diff --git a/meta-oe/recipes-support/fftw/fftwf_3.2.2.bb b/meta-oe/recipes-support/fftw/fftwf_3.2.2.bb
new file mode 100644
index 0000000000..ac0bb6cd81
--- /dev/null
+++ b/meta-oe/recipes-support/fftw/fftwf_3.2.2.bb
@@ -0,0 +1,8 @@
+require fftw.inc
+
+SRC_URI = "http://www.fftw.org/fftw-${PV}.tar.gz"
+
+EXTRA_OECONF = "--disable-fortran --enable-single --enable-shared --enable-threads"
+
+SRC_URI[md5sum] = "b616e5c91218cc778b5aa735fefb61ae"
+SRC_URI[sha256sum] = "6aa7ae65ee49eb99004f15899f9bb77f54759122f1a350041e81e096157d768f"
diff --git a/meta-oe/recipes-support/fftw/fftwl_3.1.2.bb b/meta-oe/recipes-support/fftw/fftwl_3.1.2.bb
new file mode 100644
index 0000000000..69256fb9fd
--- /dev/null
+++ b/meta-oe/recipes-support/fftw/fftwl_3.1.2.bb
@@ -0,0 +1,8 @@
+require fftw.inc
+
+EXTRA_OECONF = "--disable-fortran --enable-long-double --enable-shared"
+
+
+
+SRC_URI[md5sum] = "08f2e21c9fd02f4be2bd53a62592afa4"
+SRC_URI[sha256sum] = "e1b92e97fe27efcbd150212d0d287ac907bd2fef0af32e16284fef5d1c1c26bf"
diff --git a/meta-oe/recipes-support/fftw/fftwl_3.2.2.bb b/meta-oe/recipes-support/fftw/fftwl_3.2.2.bb
new file mode 100644
index 0000000000..ff2cb2aaa5
--- /dev/null
+++ b/meta-oe/recipes-support/fftw/fftwl_3.2.2.bb
@@ -0,0 +1,8 @@
+require fftw.inc
+
+SRC_URI = "http://www.fftw.org/fftw-${PV}.tar.gz"
+
+EXTRA_OECONF = "--disable-fortran --enable-long-double --enable-shared --enable-threads"
+
+SRC_URI[md5sum] = "b616e5c91218cc778b5aa735fefb61ae"
+SRC_URI[sha256sum] = "6aa7ae65ee49eb99004f15899f9bb77f54759122f1a350041e81e096157d768f"
diff --git a/meta-oe/recipes-support/gsl/gsl.inc b/meta-oe/recipes-support/gsl/gsl.inc
new file mode 100644
index 0000000000..10bacc523d
--- /dev/null
+++ b/meta-oe/recipes-support/gsl/gsl.inc
@@ -0,0 +1,10 @@
+DESCRIPTION = "GNU Scientific Library"
+HOMEPAGE = "http://www.gnu.org/software/gsl/"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "GPL"
+PR = "r1"
+
+inherit autotools pkgconfig binconfig
+
+LEAD_SONAME = "libgsl.so"
diff --git a/meta-oe/recipes-support/gsl/gsl_1.12.bb b/meta-oe/recipes-support/gsl/gsl_1.12.bb
new file mode 100644
index 0000000000..8fdbbc11e3
--- /dev/null
+++ b/meta-oe/recipes-support/gsl/gsl_1.12.bb
@@ -0,0 +1,6 @@
+include gsl.inc
+
+SRC_URI = "${GNU_MIRROR}/gsl/gsl-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "3ec101903c8157756fa1352161bd4c39"
+SRC_URI[sha256sum] = "22019188d24c769acafc250ddc247105eb9cab099529b627078cbd8012c7b7b9"
diff --git a/meta-oe/recipes-support/guile/files/configure-fix.patch b/meta-oe/recipes-support/guile/files/configure-fix.patch
new file mode 100644
index 0000000000..c59798d9e9
--- /dev/null
+++ b/meta-oe/recipes-support/guile/files/configure-fix.patch
@@ -0,0 +1,10 @@
+--- /tmp/configure.in 2008-06-04 12:33:55.451086283 +0200
++++ guile-1.8.5/configure.in 2008-06-04 12:34:03.974994278 +0200
+@@ -38,7 +38,6 @@
+ ]),
+ [bug-guile@gnu.org])
+ AC_CONFIG_AUX_DIR([build-aux])
+-AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_SRCDIR(GUILE-VERSION)
+
+ AM_INIT_AUTOMAKE([gnu no-define check-news])
diff --git a/meta-oe/recipes-support/guile/files/cpp-linemarkers.patch b/meta-oe/recipes-support/guile/files/cpp-linemarkers.patch
new file mode 100644
index 0000000000..3e48932a3c
--- /dev/null
+++ b/meta-oe/recipes-support/guile/files/cpp-linemarkers.patch
@@ -0,0 +1,8 @@
+--- guile.orig/libguile/guile-snarf-docs.in 2009-07-03 18:19:00.000000000 -0400
++++ guile/libguile/guile-snarf-docs.in 2009-11-19 12:55:32.487266268 -0500
+@@ -23,4 +23,4 @@
+ ## Let the user override the preprocessor autoconf found.
+ test -n "${CPP+set}" || CPP="@CPP@"
+
+-${CPP} -DSCM_MAGIC_SNARF_DOCS "$@"
++${CPP} -P -DSCM_MAGIC_SNARF_DOCS "$@"
diff --git a/meta-oe/recipes-support/guile/guile-1.8.7/18.diff b/meta-oe/recipes-support/guile/guile-1.8.7/18.diff
new file mode 100644
index 0000000000..9c9eefb09b
--- /dev/null
+++ b/meta-oe/recipes-support/guile/guile-1.8.7/18.diff
@@ -0,0 +1,1743 @@
+diff --git a/LICENSE b/LICENSE
+index 213e34a..dda451e 100644
+--- a/LICENSE
++++ b/LICENSE
+@@ -1,2 +1,2 @@
+ Guile is covered under the terms of the GNU Lesser General Public
+-License, version 2.1. See COPYING.LESSER.
++License, version 2.1 or later. See COPYING.LESSER.
+diff --git a/NEWS b/NEWS
+index 0dcc411..564484f 100644
+--- a/NEWS
++++ b/NEWS
+@@ -5,6 +5,19 @@ See the end for copying conditions.
+ Please send Guile bug reports to bug-guile@gnu.org.
+
+
++Changes in 1.8.8 (since 1.8.7)
++
++* Bugs fixed
++
++** Fix possible buffer overruns when parsing numbers
++** Avoid clash with system setjmp/longjmp on IA64
++** Don't dynamically link an extension that is already registered
++** Fix `wrong type arg' exceptions with IPv6 addresses
++** Fix typos in `(srfi srfi-19)'
++** Have `(srfi srfi-35)' provide named struct vtables
++** Fix some Interix build problems
++
++
+ Changes in 1.8.7 (since 1.8.6)
+
+ * Bugs fixed
+diff --git a/THANKS b/THANKS
+index 47d3cfa..48a105a 100644
+--- a/THANKS
++++ b/THANKS
+@@ -50,6 +50,7 @@ For fixes or providing information which led to a fix:
+ Roland Haeder
+ Sven Hartrumpf
+ Eric Hanchrow
++ Judy Hawkins
+ Sam Hocevar
+ Patrick Horgan
+ Ales Hvezda
+@@ -64,12 +65,15 @@ For fixes or providing information which led to a fix:
+ Matthias Köppe
+ Matt Kraai
+ Daniel Kraft
++ Jay Krell
+ Jeff Long
+ Marco Maggi
+ Gregory Marton
++ Kjetil S. Matheussen
+ Antoine Mathys
+ Dan McMahill
+ Roger Mc Murtrie
++ Scott McPeak
+ Tim Mooney
+ Han-Wen Nienhuys
+ Jan Nieuwenhuizen
+diff --git a/doc/ref/api-modules.texi b/doc/ref/api-modules.texi
+index 9aeb08a..f6393db 100644
+--- a/doc/ref/api-modules.texi
++++ b/doc/ref/api-modules.texi
+@@ -758,7 +758,7 @@ Record definition with @code{define-record-type} (@pxref{SRFI-9}).
+ Read hash extension @code{#,()} (@pxref{SRFI-10}).
+
+ @item (srfi srfi-11)
+-Multiple-value handling with @code{let-values} and @code{let-values*}
++Multiple-value handling with @code{let-values} and @code{let*-values}
+ (@pxref{SRFI-11}).
+
+ @item (srfi srfi-13)
+diff --git a/doc/ref/guile.texi b/doc/ref/guile.texi
+index 7c17b36..3d9cde4 100644
+--- a/doc/ref/guile.texi
++++ b/doc/ref/guile.texi
+@@ -13,8 +13,8 @@ This reference manual documents Guile, GNU's Ubiquitous Intelligent
+ Language for Extensions. This is edition @value{MANUAL-EDITION}
+ corresponding to Guile @value{VERSION}.
+
+-Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005 Free
+-Software Foundation.
++Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
++2007, 2008, 2009, 2010 Free Software Foundation.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.2 or
+diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi
+index 1cb273a..0a7e342 100644
+--- a/doc/ref/posix.texi
++++ b/doc/ref/posix.texi
+@@ -2310,8 +2310,8 @@ Convert a network address from an integer to a printable string.
+
+ @lisp
+ (inet-ntop AF_INET 2130706433) @result{} "127.0.0.1"
+-(inet-ntop AF_INET6 (- (expt 2 128) 1)) @result{}
+-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
++(inet-ntop AF_INET6 (- (expt 2 128) 1))
++ @result{} "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
+ @end lisp
+ @end deffn
+
+@@ -2882,8 +2882,8 @@ same as @code{make-socket-address} would take to make such an object
+ (@pxref{Network Socket Address}). The return value is unspecified.
+
+ @example
+-(connect sock AF_INET INADDR_LOCALHOST 23)
+-(connect sock (make-socket-address AF_INET INADDR_LOCALHOST 23))
++(connect sock AF_INET INADDR_LOOPBACK 23)
++(connect sock (make-socket-address AF_INET INADDR_LOOPBACK 23))
+ @end example
+ @end deffn
+
+diff --git a/ice-9/debugging/ice-9-debugger-extensions.scm b/ice-9/debugging/ice-9-debugger-extensions.scm
+index a8b8c97..fe04fc0 100644
+--- a/ice-9/debugging/ice-9-debugger-extensions.scm
++++ b/ice-9/debugging/ice-9-debugger-extensions.scm
+@@ -39,7 +39,8 @@
+ (else
+ (define-module (ice-9 debugger))))
+
+-(use-modules (ice-9 debugging steps))
++(use-modules (ice-9 debugging steps)
++ (ice-9 debugging trace))
+
+ (define (assert-continuable state)
+ ;; Check that debugger is in a state where `continuing' makes sense.
+diff --git a/libguile/__scm.h b/libguile/__scm.h
+index b198f9d..e75f1a9 100644
+--- a/libguile/__scm.h
++++ b/libguile/__scm.h
+@@ -3,7 +3,7 @@
+ #ifndef SCM___SCM_H
+ #define SCM___SCM_H
+
+-/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003, 2006, 2007, 2008 Free Software Foundation, Inc.
++/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -359,11 +359,9 @@
+ #define SCM_T_INT32_MIN SCM_I_TYPE_MIN(scm_t_int32,SCM_T_UINT32_MAX)
+ #define SCM_T_INT32_MAX SCM_I_TYPE_MAX(scm_t_int32,SCM_T_UINT32_MAX)
+
+-#if SCM_HAVE_T_INT64
+ #define SCM_T_UINT64_MAX SCM_I_UTYPE_MAX(scm_t_uint64)
+ #define SCM_T_INT64_MIN SCM_I_TYPE_MIN(scm_t_int64,SCM_T_UINT64_MAX)
+ #define SCM_T_INT64_MAX SCM_I_TYPE_MAX(scm_t_int64,SCM_T_UINT64_MAX)
+-#endif
+
+ #if SCM_SIZEOF_LONG_LONG
+ #define SCM_I_ULLONG_MAX SCM_I_UTYPE_MAX(unsigned long long)
+@@ -409,19 +407,28 @@
+ typedef struct {
+ ucontext_t ctx;
+ int fresh;
+- } jmp_buf;
+-# define setjmp(JB) \
++ } scm_i_jmp_buf;
++# define SCM_I_SETJMP(JB) \
+ ( (JB).fresh = 1, \
+ getcontext (&((JB).ctx)), \
+ ((JB).fresh ? ((JB).fresh = 0, 0) : 1) )
+-# define longjmp(JB,VAL) scm_ia64_longjmp (&(JB), VAL)
+- void scm_ia64_longjmp (jmp_buf *, int);
++# define SCM_I_LONGJMP(JB,VAL) scm_ia64_longjmp (&(JB), VAL)
++ void scm_ia64_longjmp (scm_i_jmp_buf *, int);
+ # else /* ndef __ia64__ */
+ # include <setjmp.h>
+ # endif /* ndef __ia64__ */
+ # endif /* ndef _CRAY1 */
+ #endif /* ndef vms */
+
++/* For any platform where SCM_I_SETJMP hasn't been defined in some
++ special way above, map SCM_I_SETJMP, SCM_I_LONGJMP and
++ scm_i_jmp_buf to setjmp, longjmp and jmp_buf. */
++#ifndef SCM_I_SETJMP
++#define scm_i_jmp_buf jmp_buf
++#define SCM_I_SETJMP setjmp
++#define SCM_I_LONGJMP longjmp
++#endif
++
+ /* James Clark came up with this neat one instruction fix for
+ * continuations on the SPARC. It flushes the register windows so
+ * that all the state of the process is contained in the stack.
+diff --git a/libguile/continuations.c b/libguile/continuations.c
+index 69d2569..84a7fed 100644
+--- a/libguile/continuations.c
++++ b/libguile/continuations.c
+@@ -127,7 +127,7 @@ scm_make_continuation (int *first)
+ continuation->offset = continuation->stack - src;
+ memcpy (continuation->stack, src, sizeof (SCM_STACKITEM) * stack_size);
+
+- *first = !setjmp (continuation->jmpbuf);
++ *first = !SCM_I_SETJMP (continuation->jmpbuf);
+ if (*first)
+ {
+ #ifdef __ia64__
+@@ -224,12 +224,12 @@ copy_stack_and_call (scm_t_contregs *continuation, SCM val,
+ scm_i_set_last_debug_frame (continuation->dframe);
+
+ continuation->throw_value = val;
+- longjmp (continuation->jmpbuf, 1);
++ SCM_I_LONGJMP (continuation->jmpbuf, 1);
+ }
+
+ #ifdef __ia64__
+ void
+-scm_ia64_longjmp (jmp_buf *JB, int VAL)
++scm_ia64_longjmp (scm_i_jmp_buf *JB, int VAL)
+ {
+ scm_i_thread *t = SCM_I_CURRENT_THREAD;
+
+diff --git a/libguile/continuations.h b/libguile/continuations.h
+index f6fb96a..c61ab2d 100644
+--- a/libguile/continuations.h
++++ b/libguile/continuations.h
+@@ -43,7 +43,7 @@ SCM_API scm_t_bits scm_tc16_continuation;
+ typedef struct
+ {
+ SCM throw_value;
+- jmp_buf jmpbuf;
++ scm_i_jmp_buf jmpbuf;
+ SCM dynenv;
+ #ifdef __ia64__
+ void *backing_store;
+diff --git a/libguile/extensions.c b/libguile/extensions.c
+index 1090b8b..29cb58c 100644
+--- a/libguile/extensions.c
++++ b/libguile/extensions.c
+@@ -76,6 +76,7 @@ load_extension (SCM lib, SCM init)
+ {
+ extension_t *ext;
+ char *clib, *cinit;
++ int found = 0;
+
+ scm_dynwind_begin (0);
+
+@@ -89,10 +90,14 @@ load_extension (SCM lib, SCM init)
+ && !strcmp (ext->init, cinit))
+ {
+ ext->func (ext->data);
++ found = 1;
+ break;
+ }
+
+ scm_dynwind_end ();
++
++ if (found)
++ return;
+ }
+
+ /* Dynamically link the library. */
+diff --git a/libguile/filesys.c b/libguile/filesys.c
+index 70dfe15..c8acb13 100644
+--- a/libguile/filesys.c
++++ b/libguile/filesys.c
+@@ -23,6 +23,9 @@
+ #ifdef __hpux
+ #define _POSIX_C_SOURCE 199506L /* for readdir_r */
+ #endif
++#if defined(__INTERIX) && !defined(_REENTRANT)
++# define _REENTRANT /* ask Interix for readdir_r prototype */
++#endif
+
+ #ifdef HAVE_CONFIG_H
+ # include <config.h>
+diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
+index 85ebfae..e5de31d 100644
+--- a/libguile/gen-scmconfig.c
++++ b/libguile/gen-scmconfig.c
+@@ -315,28 +315,10 @@ main (int argc, char *argv[])
+ return 1;
+
+ pf ("\n");
+- pf ("/* 64-bit integer -- if available SCM_HAVE_T_INT64 will be 1 and\n"
+- " scm_t_int64 will be a suitable type, otherwise SCM_HAVE_T_INT64\n"
+- " will be 0. */\n");
+- if (SCM_I_GSC_T_INT64)
+- {
+- pf ("#define SCM_HAVE_T_INT64 1 /* 0 or 1 */\n");
+- pf ("typedef %s scm_t_int64;\n", SCM_I_GSC_T_INT64);
+- }
+- else
+- pf ("#define SCM_HAVE_T_INT64 0 /* 0 or 1 */\n");
+-
+- pf ("\n");
+- pf ("/* 64-bit unsigned integer -- if available SCM_HAVE_T_UINT64 will\n"
+- " be 1 and scm_t_uint64 will be a suitable type, otherwise\n"
+- " SCM_HAVE_T_UINT64 will be 0. */\n");
+- if (SCM_I_GSC_T_UINT64)
+- {
+- pf ("#define SCM_HAVE_T_UINT64 1 /* 0 or 1 */\n");
+- pf ("typedef %s scm_t_uint64;\n", SCM_I_GSC_T_UINT64);
+- }
+- else
+- pf ("#define SCM_HAVE_T_UINT64 0 /* 0 or 1 */\n");
++ pf ("#define SCM_HAVE_T_INT64 1 /* 0 or 1 */\n");
++ pf ("typedef %s scm_t_int64;\n", SCM_I_GSC_T_INT64);
++ pf ("#define SCM_HAVE_T_UINT64 1 /* 0 or 1 */\n");
++ pf ("typedef %s scm_t_uint64;\n", SCM_I_GSC_T_UINT64);
+
+ pf ("\n");
+ pf ("/* scm_t_ptrdiff_t and size, always defined -- defined to long if\n"
+diff --git a/libguile/hashtab.c b/libguile/hashtab.c
+index ea7fc69..1f1569c 100644
+--- a/libguile/hashtab.c
++++ b/libguile/hashtab.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc.
++/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2008, 2010 Free Software Foundation, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -911,74 +911,6 @@ SCM_DEFINE (scm_hashx_remove_x, "hashx-remove!", 4, 0, 0,
+
+ /* Hash table iterators */
+
+-static const char s_scm_hash_fold[];
+-
+-SCM
+-scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table)
+-{
+- long i, n;
+- SCM buckets, result = init;
+-
+- if (SCM_HASHTABLE_P (table))
+- buckets = SCM_HASHTABLE_VECTOR (table);
+- else
+- buckets = table;
+-
+- n = SCM_SIMPLE_VECTOR_LENGTH (buckets);
+- for (i = 0; i < n; ++i)
+- {
+- SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle;
+- while (!scm_is_null (ls))
+- {
+- if (!scm_is_pair (ls))
+- scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets);
+- handle = SCM_CAR (ls);
+- if (!scm_is_pair (handle))
+- scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets);
+- result = fn (closure, SCM_CAR (handle), SCM_CDR (handle), result);
+- ls = SCM_CDR (ls);
+- }
+- }
+-
+- return result;
+-}
+-
+-/* The following redundant code is here in order to be able to support
+- hash-for-each-handle. An alternative would have been to replace
+- this code and scm_internal_hash_fold above with a single
+- scm_internal_hash_fold_handles, but we don't want to promote such
+- an API. */
+-
+-static const char s_scm_hash_for_each[];
+-
+-void
+-scm_internal_hash_for_each_handle (SCM (*fn) (), void *closure, SCM table)
+-{
+- long i, n;
+- SCM buckets;
+-
+- if (SCM_HASHTABLE_P (table))
+- buckets = SCM_HASHTABLE_VECTOR (table);
+- else
+- buckets = table;
+-
+- n = SCM_SIMPLE_VECTOR_LENGTH (buckets);
+- for (i = 0; i < n; ++i)
+- {
+- SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle;
+- while (!scm_is_null (ls))
+- {
+- if (!scm_is_pair (ls))
+- scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets);
+- handle = SCM_CAR (ls);
+- if (!scm_is_pair (handle))
+- scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets);
+- fn (closure, handle);
+- ls = SCM_CDR (ls);
+- }
+- }
+-}
+-
+ SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0,
+ (SCM proc, SCM init, SCM table),
+ "An iterator over hash-table elements.\n"
+@@ -1067,6 +999,72 @@ SCM_DEFINE (scm_hash_map_to_list, "hash-map->list", 2, 0, 0,
+
+
+
++SCM
++scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table)
++{
++ long i, n;
++ SCM buckets, result = init;
++
++ if (SCM_HASHTABLE_P (table))
++ buckets = SCM_HASHTABLE_VECTOR (table);
++ else
++ buckets = table;
++
++ n = SCM_SIMPLE_VECTOR_LENGTH (buckets);
++ for (i = 0; i < n; ++i)
++ {
++ SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle;
++ while (!scm_is_null (ls))
++ {
++ if (!scm_is_pair (ls))
++ scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets);
++ handle = SCM_CAR (ls);
++ if (!scm_is_pair (handle))
++ scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets);
++ result = fn (closure, SCM_CAR (handle), SCM_CDR (handle), result);
++ ls = SCM_CDR (ls);
++ }
++ }
++
++ return result;
++}
++
++/* The following redundant code is here in order to be able to support
++ hash-for-each-handle. An alternative would have been to replace
++ this code and scm_internal_hash_fold above with a single
++ scm_internal_hash_fold_handles, but we don't want to promote such
++ an API. */
++
++void
++scm_internal_hash_for_each_handle (SCM (*fn) (), void *closure, SCM table)
++{
++ long i, n;
++ SCM buckets;
++
++ if (SCM_HASHTABLE_P (table))
++ buckets = SCM_HASHTABLE_VECTOR (table);
++ else
++ buckets = table;
++
++ n = SCM_SIMPLE_VECTOR_LENGTH (buckets);
++ for (i = 0; i < n; ++i)
++ {
++ SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle;
++ while (!scm_is_null (ls))
++ {
++ if (!scm_is_pair (ls))
++ scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets);
++ handle = SCM_CAR (ls);
++ if (!scm_is_pair (handle))
++ scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets);
++ fn (closure, handle);
++ ls = SCM_CDR (ls);
++ }
++ }
++}
++
++
++
+
+ void
+ scm_hashtab_prehistory ()
+diff --git a/libguile/iselect.h b/libguile/iselect.h
+index 5a4b30d..b23a641 100644
+--- a/libguile/iselect.h
++++ b/libguile/iselect.h
+@@ -38,7 +38,12 @@
+ #ifdef FD_SET
+
+ #define SELECT_TYPE fd_set
++#if defined(__INTERIX) && FD_SETSIZE == 4096
++/* Interix defines FD_SETSIZE 4096 but select rejects that. */
++#define SELECT_SET_SIZE 1024
++#else
+ #define SELECT_SET_SIZE FD_SETSIZE
++#endif
+
+ #else /* no FD_SET */
+
+diff --git a/libguile/numbers.c b/libguile/numbers.c
+index 2e1635f..4f5ab31 100644
+--- a/libguile/numbers.c
++++ b/libguile/numbers.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
++/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ *
+ * Portions Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories
+ * and Bellcore. See scm_divide.
+@@ -620,7 +620,14 @@ guile_ieee_init (void)
+ #elif HAVE_DINFINITY
+ /* OSF */
+ extern unsigned int DINFINITY[2];
+- guile_Inf = (*((double *) (DINFINITY)));
++ union
++ {
++ double d;
++ int i[2];
++ } alias;
++ alias.i[0] = DINFINITY[0];
++ alias.i[1] = DINFINITY[1];
++ guile_Inf = alias.d;
+ #else
+ double tmp = 1e+10;
+ guile_Inf = tmp;
+@@ -651,7 +658,14 @@ guile_ieee_init (void)
+ {
+ /* OSF */
+ extern unsigned int DQNAN[2];
+- guile_NaN = (*((double *)(DQNAN)));
++ union
++ {
++ double d;
++ int i[2];
++ } alias;
++ alias.i[0] = DQNAN[0];
++ alias.i[1] = DQNAN[1];
++ guile_NaN = alias.d;
+ }
+ #else
+ guile_NaN = guile_Inf / guile_Inf;
+@@ -2663,17 +2677,26 @@ mem2decimal_from_point (SCM result, const char* mem, size_t len,
+ case 'l': case 'L':
+ case 's': case 'S':
+ idx++;
++ if (idx == len)
++ return SCM_BOOL_F;
++
+ start = idx;
+ c = mem[idx];
+ if (c == '-')
+ {
+ idx++;
++ if (idx == len)
++ return SCM_BOOL_F;
++
+ sign = -1;
+ c = mem[idx];
+ }
+ else if (c == '+')
+ {
+ idx++;
++ if (idx == len)
++ return SCM_BOOL_F;
++
+ sign = 1;
+ c = mem[idx];
+ }
+@@ -2789,8 +2812,10 @@ mem2ureal (const char* mem, size_t len, unsigned int *p_idx,
+ SCM divisor;
+
+ idx++;
++ if (idx == len)
++ return SCM_BOOL_F;
+
+- divisor = mem2uinteger (mem, len, &idx, radix, &x);
++ divisor = mem2uinteger (mem, len, &idx, radix, &x);
+ if (scm_is_false (divisor))
+ return SCM_BOOL_F;
+
+@@ -2911,11 +2936,15 @@ mem2complex (const char* mem, size_t len, unsigned int idx,
+ if (c == '+')
+ {
+ idx++;
++ if (idx == len)
++ return SCM_BOOL_F;
+ sign = 1;
+ }
+ else if (c == '-')
+ {
+ idx++;
++ if (idx == len)
++ return SCM_BOOL_F;
+ sign = -1;
+ }
+ else
+@@ -5869,8 +5898,6 @@ scm_i_range_error (SCM bad_val, SCM min, SCM max)
+ #define SCM_FROM_TYPE_PROTO(arg) scm_from_uint32 (arg)
+ #include "libguile/conv-uinteger.i.c"
+
+-#if SCM_HAVE_T_INT64
+-
+ #define TYPE scm_t_int64
+ #define TYPE_MIN SCM_T_INT64_MIN
+ #define TYPE_MAX SCM_T_INT64_MAX
+@@ -5887,8 +5914,6 @@ scm_i_range_error (SCM bad_val, SCM min, SCM max)
+ #define SCM_FROM_TYPE_PROTO(arg) scm_from_uint64 (arg)
+ #include "libguile/conv-uinteger.i.c"
+
+-#endif
+-
+ void
+ scm_to_mpz (SCM val, mpz_t rop)
+ {
+diff --git a/libguile/numbers.h b/libguile/numbers.h
+index 2c2fdcf..35263a4 100644
+--- a/libguile/numbers.h
++++ b/libguile/numbers.h
+@@ -3,7 +3,7 @@
+ #ifndef SCM_NUMBERS_H
+ #define SCM_NUMBERS_H
+
+-/* Copyright (C) 1995,1996,1998,2000,2001,2002,2003,2004,2005, 2006 Free Software Foundation, Inc.
++/* Copyright (C) 1995,1996,1998,2000,2001,2002,2003,2004,2005, 2006, 2010 Free Software Foundation, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -321,16 +321,12 @@ SCM_API SCM scm_from_int32 (scm_t_int32 x);
+ SCM_API scm_t_uint32 scm_to_uint32 (SCM x);
+ SCM_API SCM scm_from_uint32 (scm_t_uint32 x);
+
+-#if SCM_HAVE_T_INT64
+-
+ SCM_API scm_t_int64 scm_to_int64 (SCM x);
+ SCM_API SCM scm_from_int64 (scm_t_int64 x);
+
+ SCM_API scm_t_uint64 scm_to_uint64 (SCM x);
+ SCM_API SCM scm_from_uint64 (scm_t_uint64 x);
+
+-#endif
+-
+ SCM_API void scm_to_mpz (SCM x, mpz_t rop);
+ SCM_API SCM scm_from_mpz (mpz_t rop);
+
+diff --git a/libguile/random.c b/libguile/random.c
+index 8d2ff03..693ed4a 100644
+--- a/libguile/random.c
++++ b/libguile/random.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1999,2000,2001, 2003, 2005, 2006 Free Software Foundation, Inc.
++/* Copyright (C) 1999,2000,2001, 2003, 2005, 2006, 2010 Free Software Foundation, Inc.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+@@ -75,8 +75,6 @@ scm_t_rng scm_the_rng;
+ #define M_PI 3.14159265359
+ #endif
+
+-#if SCM_HAVE_T_UINT64
+-
+ unsigned long
+ scm_i_uniform32 (scm_t_i_rstate *state)
+ {
+@@ -87,38 +85,6 @@ scm_i_uniform32 (scm_t_i_rstate *state)
+ return w;
+ }
+
+-#else
+-
+-/* ww This is a portable version of the same RNG without 64 bit
+- * * aa arithmetic.
+- * ----
+- * xx It is only intended to provide identical behaviour on
+- * xx platforms without 8 byte longs or long longs until
+- * xx someone has implemented the routine in assembler code.
+- * xxcc
+- * ----
+- * ccww
+- */
+-
+-#define L(x) ((x) & 0xffff)
+-#define H(x) ((x) >> 16)
+-
+-unsigned long
+-scm_i_uniform32 (scm_t_i_rstate *state)
+-{
+- scm_t_uint32 x1 = L (A) * L (state->w);
+- scm_t_uint32 x2 = L (A) * H (state->w);
+- scm_t_uint32 x3 = H (A) * L (state->w);
+- scm_t_uint32 w = L (x1) + L (state->c);
+- scm_t_uint32 m = H (x1) + L (x2) + L (x3) + H (state->c) + H (w);
+- scm_t_uint32 x4 = H (A) * H (state->w);
+- state->w = w = (L (m) << 16) + L (w);
+- state->c = H (x2) + H (x3) + x4 + H (m);
+- return w;
+-}
+-
+-#endif
+-
+ void
+ scm_i_init_rstate (scm_t_i_rstate *state, const char *seed, int n)
+ {
+@@ -212,21 +178,49 @@ scm_c_exp1 (scm_t_rstate *state)
+
+ unsigned char scm_masktab[256];
+
+-unsigned long
+-scm_c_random (scm_t_rstate *state, unsigned long m)
++static inline scm_t_uint32
++scm_i_mask32 (scm_t_uint32 m)
+ {
+- unsigned int r, mask;
+- mask = (m < 0x100
++ return (m < 0x100
+ ? scm_masktab[m]
+ : (m < 0x10000
+ ? scm_masktab[m >> 8] << 8 | 0xff
+ : (m < 0x1000000
+ ? scm_masktab[m >> 16] << 16 | 0xffff
+ : scm_masktab[m >> 24] << 24 | 0xffffff)));
++}
++
++static scm_t_uint32
++scm_c_random32 (scm_t_rstate *state, scm_t_uint32 m)
++{
++ scm_t_uint32 r, mask = scm_i_mask32 (m);
+ while ((r = scm_the_rng.random_bits (state) & mask) >= m);
+ return r;
+ }
+
++/* Returns 32 random bits. */
++unsigned long
++scm_c_random (scm_t_rstate *state, unsigned long m)
++{
++ return scm_c_random32 (state, (scm_t_uint32)m);
++}
++
++scm_t_uint64
++scm_c_random64 (scm_t_rstate *state, scm_t_uint64 m)
++{
++ scm_t_uint64 r;
++ scm_t_uint32 mask;
++
++ if (m <= SCM_T_UINT32_MAX)
++ return scm_c_random32 (state, (scm_t_uint32) m);
++
++ mask = scm_i_mask32 (m >> 32);
++ while ((r = ((scm_t_uint64) (scm_the_rng.random_bits (state) & mask) << 32)
++ | scm_the_rng.random_bits (state)) >= m)
++ ;
++ return r;
++}
++
+ /*
+ SCM scm_c_random_bignum (scm_t_rstate *state, SCM m)
+
+@@ -247,24 +241,24 @@ scm_c_random_bignum (scm_t_rstate *state, SCM m)
+ {
+ SCM result = scm_i_mkbig ();
+ const size_t m_bits = mpz_sizeinbase (SCM_I_BIG_MPZ (m), 2);
+- /* how many bits would only partially fill the last unsigned long? */
+- const size_t end_bits = m_bits % (sizeof (unsigned long) * SCM_CHAR_BIT);
+- unsigned long *random_chunks = NULL;
+- const unsigned long num_full_chunks =
+- m_bits / (sizeof (unsigned long) * SCM_CHAR_BIT);
+- const unsigned long num_chunks = num_full_chunks + ((end_bits) ? 1 : 0);
++ /* how many bits would only partially fill the last u32? */
++ const size_t end_bits = m_bits % (sizeof (scm_t_uint32) * SCM_CHAR_BIT);
++ scm_t_uint32 *random_chunks = NULL;
++ const scm_t_uint32 num_full_chunks =
++ m_bits / (sizeof (scm_t_uint32) * SCM_CHAR_BIT);
++ const scm_t_uint32 num_chunks = num_full_chunks + ((end_bits) ? 1 : 0);
+
+ /* we know the result will be this big */
+ mpz_realloc2 (SCM_I_BIG_MPZ (result), m_bits);
+
+ random_chunks =
+- (unsigned long *) scm_gc_calloc (num_chunks * sizeof (unsigned long),
++ (scm_t_uint32 *) scm_gc_calloc (num_chunks * sizeof (scm_t_uint32),
+ "random bignum chunks");
+
+ do
+ {
+- unsigned long *current_chunk = random_chunks + (num_chunks - 1);
+- unsigned long chunks_left = num_chunks;
++ scm_t_uint32 *current_chunk = random_chunks + (num_chunks - 1);
++ scm_t_uint32 chunks_left = num_chunks;
+
+ mpz_set_ui (SCM_I_BIG_MPZ (result), 0);
+
+@@ -273,23 +267,23 @@ scm_c_random_bignum (scm_t_rstate *state, SCM m)
+ /* generate a mask with ones in the end_bits position, i.e. if
+ end_bits is 3, then we'd have a mask of ...0000000111 */
+ const unsigned long rndbits = scm_the_rng.random_bits (state);
+- int rshift = (sizeof (unsigned long) * SCM_CHAR_BIT) - end_bits;
+- unsigned long mask = ((unsigned long) ULONG_MAX) >> rshift;
+- unsigned long highest_bits = rndbits & mask;
++ int rshift = (sizeof (scm_t_uint32) * SCM_CHAR_BIT) - end_bits;
++ scm_t_uint32 mask = 0xffffffff >> rshift;
++ scm_t_uint32 highest_bits = ((scm_t_uint32) rndbits) & mask;
+ *current_chunk-- = highest_bits;
+ chunks_left--;
+ }
+
+ while (chunks_left)
+ {
+- /* now fill in the remaining unsigned long sized chunks */
++ /* now fill in the remaining scm_t_uint32 sized chunks */
+ *current_chunk-- = scm_the_rng.random_bits (state);
+ chunks_left--;
+ }
+ mpz_import (SCM_I_BIG_MPZ (result),
+ num_chunks,
+ -1,
+- sizeof (unsigned long),
++ sizeof (scm_t_uint32),
+ 0,
+ 0,
+ random_chunks);
+@@ -297,7 +291,7 @@ scm_c_random_bignum (scm_t_rstate *state, SCM m)
+ all bits in order not to get a distorted distribution) */
+ } while (mpz_cmp (SCM_I_BIG_MPZ (result), SCM_I_BIG_MPZ (m)) >= 0);
+ scm_gc_free (random_chunks,
+- num_chunks * sizeof (unsigned long),
++ num_chunks * sizeof (scm_t_uint32),
+ "random bignum chunks");
+ return scm_i_normbig (result);
+ }
+@@ -348,9 +342,17 @@ SCM_DEFINE (scm_random, "random", 1, 1, 0,
+ SCM_VALIDATE_RSTATE (2, state);
+ if (SCM_I_INUMP (n))
+ {
+- unsigned long m = SCM_I_INUM (n);
+- SCM_ASSERT_RANGE (1, n, m > 0);
+- return scm_from_ulong (scm_c_random (SCM_RSTATE (state), m));
++ unsigned long m = (unsigned long) SCM_I_INUM (n);
++ SCM_ASSERT_RANGE (1, n, SCM_I_INUM (n) > 0);
++#if SCM_SIZEOF_UNSIGNED_LONG <= 4
++ return scm_from_uint32 (scm_c_random (SCM_RSTATE (state),
++ (scm_t_uint32) m));
++#elif SCM_SIZEOF_UNSIGNED_LONG <= 8
++ return scm_from_uint64 (scm_c_random64 (SCM_RSTATE (state),
++ (scm_t_uint64) m));
++#else
++#error "Cannot deal with this platform's unsigned long size"
++#endif
+ }
+ SCM_VALIDATE_NIM (1, n);
+ if (SCM_REALP (n))
+diff --git a/libguile/random.h b/libguile/random.h
+index 6ec43ff..0690b59 100644
+--- a/libguile/random.h
++++ b/libguile/random.h
+@@ -3,7 +3,7 @@
+ #ifndef SCM_RANDOM_H
+ #define SCM_RANDOM_H
+
+-/* Copyright (C) 1999,2000,2001, 2006 Free Software Foundation, Inc.
++/* Copyright (C) 1999,2000,2001, 2006, 2010 Free Software Foundation, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -45,6 +45,7 @@ typedef struct scm_t_rstate {
+
+ typedef struct scm_t_rng {
+ size_t rstate_size; /* size of random state */
++ /* Though this returns an unsigned long, it's only 32 bits of randomness. */
+ unsigned long (*random_bits) (scm_t_rstate *state); /* gives 32 random bits */
+ void (*init_rstate) (scm_t_rstate *state, const char *seed, int n);
+ scm_t_rstate *(*copy_rstate) (scm_t_rstate *state);
+@@ -62,6 +63,7 @@ typedef struct scm_t_i_rstate {
+ unsigned long c;
+ } scm_t_i_rstate;
+
++/* Though this returns an unsigned long, it's only 32 bits of randomness. */
+ SCM_API unsigned long scm_i_uniform32 (scm_t_i_rstate *);
+ SCM_API void scm_i_init_rstate (scm_t_i_rstate *, const char *seed, int n);
+ SCM_API scm_t_i_rstate *scm_i_copy_rstate (scm_t_i_rstate *);
+@@ -76,7 +78,10 @@ SCM_API scm_t_rstate *scm_c_default_rstate (void);
+ SCM_API double scm_c_uniform01 (scm_t_rstate *);
+ SCM_API double scm_c_normal01 (scm_t_rstate *);
+ SCM_API double scm_c_exp1 (scm_t_rstate *);
++/* Though this returns an unsigned long, it's only 32 bits of randomness. */
+ SCM_API unsigned long scm_c_random (scm_t_rstate *, unsigned long m);
++/* This one returns 64 bits of randomness. */
++SCM_API scm_t_uint64 scm_c_random64 (scm_t_rstate *state, scm_t_uint64 m);
+ SCM_API SCM scm_c_random_bignum (scm_t_rstate *, SCM m);
+
+
+diff --git a/libguile/socket.c b/libguile/socket.c
+index f34b6d4..cb954f4 100644
+--- a/libguile/socket.c
++++ b/libguile/socket.c
+@@ -347,7 +347,7 @@ scm_to_ipv6 (scm_t_uint8 dst[16], SCM src)
+ scm_remember_upto_here_1 (src);
+ }
+ else
+- scm_wrong_type_arg (NULL, 0, src);
++ scm_wrong_type_arg_msg ("scm_to_ipv6", 0, src, "integer");
+ }
+
+ #ifdef HAVE_INET_PTON
+@@ -397,8 +397,8 @@ SCM_DEFINE (scm_inet_ntop, "inet-ntop", 2, 0, 0,
+ "@var{family} can be @code{AF_INET} or @code{AF_INET6}. E.g.,\n\n"
+ "@lisp\n"
+ "(inet-ntop AF_INET 2130706433) @result{} \"127.0.0.1\"\n"
+- "(inet-ntop AF_INET6 (- (expt 2 128) 1)) @result{}\n"
+- "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff\n"
++ "(inet-ntop AF_INET6 (- (expt 2 128) 1))\n"
++ " @result{} \"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff\"\n"
+ "@end lisp")
+ #define FUNC_NAME s_scm_inet_ntop
+ {
+@@ -1167,7 +1167,8 @@ scm_to_sockaddr (SCM address, size_t *address_size)
+ {
+ struct sockaddr_in6 c_inet6;
+
+- scm_to_ipv6 (c_inet6.sin6_addr.s6_addr, address);
++ scm_to_ipv6 (c_inet6.sin6_addr.s6_addr,
++ SCM_SIMPLE_VECTOR_REF (address, 1));
+ c_inet6.sin6_port =
+ htons (scm_to_ushort (SCM_SIMPLE_VECTOR_REF (address, 2)));
+ c_inet6.sin6_flowinfo =
+diff --git a/libguile/srfi-4.c b/libguile/srfi-4.c
+index b0e052a..f2a9d7f 100644
+--- a/libguile/srfi-4.c
++++ b/libguile/srfi-4.c
+@@ -1,6 +1,6 @@
+ /* srfi-4.c --- Uniform numeric vector datatypes.
+ *
+- * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
++ * Copyright (C) 2001, 2004, 2006, 2010 Free Software Foundation, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -84,11 +84,7 @@ static const int uvec_sizes[12] = {
+ 1, 1,
+ 2, 2,
+ 4, 4,
+-#if SCM_HAVE_T_INT64
+ 8, 8,
+-#else
+- sizeof (SCM), sizeof (SCM),
+-#endif
+ sizeof(float), sizeof(double),
+ 2*sizeof(float), 2*sizeof(double)
+ };
+@@ -127,10 +123,8 @@ uvec_print (SCM uvec, SCM port, scm_print_state *pstate)
+ scm_t_int16 *s16;
+ scm_t_uint32 *u32;
+ scm_t_int32 *s32;
+-#if SCM_HAVE_T_INT64
+ scm_t_uint64 *u64;
+ scm_t_int64 *s64;
+-#endif
+ float *f32;
+ double *f64;
+ SCM *fake_64;
+@@ -148,13 +142,8 @@ uvec_print (SCM uvec, SCM port, scm_print_state *pstate)
+ case SCM_UVEC_S16: np.s16 = (scm_t_int16 *) uptr; break;
+ case SCM_UVEC_U32: np.u32 = (scm_t_uint32 *) uptr; break;
+ case SCM_UVEC_S32: np.s32 = (scm_t_int32 *) uptr; break;
+-#if SCM_HAVE_T_INT64
+ case SCM_UVEC_U64: np.u64 = (scm_t_uint64 *) uptr; break;
+ case SCM_UVEC_S64: np.s64 = (scm_t_int64 *) uptr; break;
+-#else
+- case SCM_UVEC_U64:
+- case SCM_UVEC_S64: np.fake_64 = (SCM *) uptr; break;
+-#endif
+ case SCM_UVEC_F32: np.f32 = (float *) uptr; break;
+ case SCM_UVEC_F64: np.f64 = (double *) uptr; break;
+ case SCM_UVEC_C32: np.f32 = (float *) uptr; break;
+@@ -179,14 +168,8 @@ uvec_print (SCM uvec, SCM port, scm_print_state *pstate)
+ case SCM_UVEC_S16: scm_intprint (*np.s16, 10, port); np.s16++; break;
+ case SCM_UVEC_U32: scm_uintprint (*np.u32, 10, port); np.u32++; break;
+ case SCM_UVEC_S32: scm_intprint (*np.s32, 10, port); np.s32++; break;
+-#if SCM_HAVE_T_INT64
+ case SCM_UVEC_U64: scm_uintprint (*np.u64, 10, port); np.u64++; break;
+ case SCM_UVEC_S64: scm_intprint (*np.s64, 10, port); np.s64++; break;
+-#else
+- case SCM_UVEC_U64:
+- case SCM_UVEC_S64: scm_iprin1 (*np.fake_64, port, pstate);
+- np.fake_64++; break;
+-#endif
+ case SCM_UVEC_F32: scm_i_print_double (*np.f32, port); np.f32++; break;
+ case SCM_UVEC_F64: scm_i_print_double (*np.f64, port); np.f64++; break;
+ case SCM_UVEC_C32:
+@@ -222,20 +205,6 @@ uvec_equalp (SCM a, SCM b)
+ result = SCM_BOOL_F;
+ else if (SCM_UVEC_LENGTH (a) != SCM_UVEC_LENGTH (b))
+ result = SCM_BOOL_F;
+-#if SCM_HAVE_T_INT64 == 0
+- else if (SCM_UVEC_TYPE (a) == SCM_UVEC_U64
+- || SCM_UVEC_TYPE (a) == SCM_UVEC_S64)
+- {
+- SCM *aptr = (SCM *)SCM_UVEC_BASE (a), *bptr = (SCM *)SCM_UVEC_BASE (b);
+- size_t len = SCM_UVEC_LENGTH (a), i;
+- for (i = 0; i < len; i++)
+- if (scm_is_false (scm_num_eq_p (*aptr++, *bptr++)))
+- {
+- result = SCM_BOOL_F;
+- break;
+- }
+- }
+-#endif
+ else if (memcmp (SCM_UVEC_BASE (a), SCM_UVEC_BASE (b),
+ SCM_UVEC_LENGTH (a) * uvec_sizes[SCM_UVEC_TYPE(a)]) != 0)
+ result = SCM_BOOL_F;
+@@ -244,24 +213,6 @@ uvec_equalp (SCM a, SCM b)
+ return result;
+ }
+
+-/* Mark hook. Only used when U64 and S64 are implemented as SCMs. */
+-
+-#if SCM_HAVE_T_INT64 == 0
+-static SCM
+-uvec_mark (SCM uvec)
+-{
+- if (SCM_UVEC_TYPE (uvec) == SCM_UVEC_U64
+- || SCM_UVEC_TYPE (uvec) == SCM_UVEC_S64)
+- {
+- SCM *ptr = (SCM *)SCM_UVEC_BASE (uvec);
+- size_t len = SCM_UVEC_LENGTH (uvec), i;
+- for (i = 0; i < len; i++)
+- scm_gc_mark (*ptr++);
+- }
+- return SCM_BOOL_F;
+-}
+-#endif
+-
+ /* Smob free hook for uniform numeric vectors. */
+ static size_t
+ uvec_free (SCM uvec)
+@@ -318,15 +269,6 @@ alloc_uvec (int type, size_t len)
+ if (len > SCM_I_SIZE_MAX / uvec_sizes[type])
+ scm_out_of_range (NULL, scm_from_size_t (len));
+ base = scm_gc_malloc (len * uvec_sizes[type], uvec_names[type]);
+-#if SCM_HAVE_T_INT64 == 0
+- if (type == SCM_UVEC_U64 || type == SCM_UVEC_S64)
+- {
+- SCM *ptr = (SCM *)base;
+- size_t i;
+- for (i = 0; i < len; i++)
+- *ptr++ = SCM_UNSPECIFIED;
+- }
+-#endif
+ return take_uvec (type, base, len);
+ }
+
+@@ -349,17 +291,10 @@ uvec_fast_ref (int type, const void *base, size_t c_idx)
+ return scm_from_uint32 (((scm_t_uint32*)base)[c_idx]);
+ else if (type == SCM_UVEC_S32)
+ return scm_from_int32 (((scm_t_int32*)base)[c_idx]);
+-#if SCM_HAVE_T_INT64
+ else if (type == SCM_UVEC_U64)
+ return scm_from_uint64 (((scm_t_uint64*)base)[c_idx]);
+ else if (type == SCM_UVEC_S64)
+ return scm_from_int64 (((scm_t_int64*)base)[c_idx]);
+-#else
+- else if (type == SCM_UVEC_U64)
+- return ((SCM *)base)[c_idx];
+- else if (type == SCM_UVEC_S64)
+- return ((SCM *)base)[c_idx];
+-#endif
+ else if (type == SCM_UVEC_F32)
+ return scm_from_double (((float*)base)[c_idx]);
+ else if (type == SCM_UVEC_F64)
+@@ -374,22 +309,6 @@ uvec_fast_ref (int type, const void *base, size_t c_idx)
+ return SCM_BOOL_F;
+ }
+
+-#if SCM_HAVE_T_INT64 == 0
+-static SCM scm_uint64_min, scm_uint64_max;
+-static SCM scm_int64_min, scm_int64_max;
+-
+-static void
+-assert_exact_integer_range (SCM val, SCM min, SCM max)
+-{
+- if (!scm_is_integer (val)
+- || scm_is_false (scm_exact_p (val)))
+- scm_wrong_type_arg_msg (NULL, 0, val, "exact integer");
+- if (scm_is_true (scm_less_p (val, min))
+- || scm_is_true (scm_gr_p (val, max)))
+- scm_out_of_range (NULL, val);
+-}
+-#endif
+-
+ static SCM_C_INLINE_KEYWORD void
+ uvec_fast_set_x (int type, void *base, size_t c_idx, SCM val)
+ {
+@@ -405,23 +324,10 @@ uvec_fast_set_x (int type, void *base, size_t c_idx, SCM val)
+ (((scm_t_uint32*)base)[c_idx]) = scm_to_uint32 (val);
+ else if (type == SCM_UVEC_S32)
+ (((scm_t_int32*)base)[c_idx]) = scm_to_int32 (val);
+-#if SCM_HAVE_T_INT64
+ else if (type == SCM_UVEC_U64)
+ (((scm_t_uint64*)base)[c_idx]) = scm_to_uint64 (val);
+ else if (type == SCM_UVEC_S64)
+ (((scm_t_int64*)base)[c_idx]) = scm_to_int64 (val);
+-#else
+- else if (type == SCM_UVEC_U64)
+- {
+- assert_exact_integer_range (val, scm_uint64_min, scm_uint64_max);
+- ((SCM *)base)[c_idx] = val;
+- }
+- else if (type == SCM_UVEC_S64)
+- {
+- assert_exact_integer_range (val, scm_int64_min, scm_int64_max);
+- ((SCM *)base)[c_idx] = val;
+- }
+-#endif
+ else if (type == SCM_UVEC_F32)
+ (((float*)base)[c_idx]) = scm_to_double (val);
+ else if (type == SCM_UVEC_F64)
+@@ -1027,16 +933,12 @@ SCM_DEFINE (scm_uniform_vector_write, "uniform-vector-write", 1, 3, 0,
+
+ #define TYPE SCM_UVEC_U64
+ #define TAG u64
+-#if SCM_HAVE_T_UINT64
+ #define CTYPE scm_t_uint64
+-#endif
+ #include "libguile/srfi-4.i.c"
+
+ #define TYPE SCM_UVEC_S64
+ #define TAG s64
+-#if SCM_HAVE_T_INT64
+ #define CTYPE scm_t_int64
+-#endif
+ #include "libguile/srfi-4.i.c"
+
+ #define TYPE SCM_UVEC_F32
+@@ -1094,23 +996,9 @@ scm_init_srfi_4 (void)
+ {
+ scm_tc16_uvec = scm_make_smob_type ("uvec", 0);
+ scm_set_smob_equalp (scm_tc16_uvec, uvec_equalp);
+-#if SCM_HAVE_T_INT64 == 0
+- scm_set_smob_mark (scm_tc16_uvec, uvec_mark);
+-#endif
+ scm_set_smob_free (scm_tc16_uvec, uvec_free);
+ scm_set_smob_print (scm_tc16_uvec, uvec_print);
+
+-#if SCM_HAVE_T_INT64 == 0
+- scm_uint64_min =
+- scm_permanent_object (scm_from_int (0));
+- scm_uint64_max =
+- scm_permanent_object (scm_c_read_string ("18446744073709551615"));
+- scm_int64_min =
+- scm_permanent_object (scm_c_read_string ("-9223372036854775808"));
+- scm_int64_max =
+- scm_permanent_object (scm_c_read_string ("9223372036854775807"));
+-#endif
+-
+ #include "libguile/srfi-4.x"
+
+ }
+diff --git a/libguile/srfi-4.h b/libguile/srfi-4.h
+index 7abbac8..2348c5a 100644
+--- a/libguile/srfi-4.h
++++ b/libguile/srfi-4.h
+@@ -2,7 +2,7 @@
+ #define SCM_SRFI_4_H
+ /* srfi-4.c --- Homogeneous numeric vector datatypes.
+ *
+- * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
++ * Copyright (C) 2001, 2004, 2006, 2010 Free Software Foundation, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -186,7 +186,6 @@ SCM_API SCM scm_u64vector_to_list (SCM uvec);
+ SCM_API SCM scm_list_to_u64vector (SCM l);
+ SCM_API SCM scm_any_to_u64vector (SCM obj);
+
+-#if SCM_HAVE_T_UINT64
+ SCM_API SCM scm_take_u64vector (scm_t_uint64 *data, size_t n);
+ SCM_API const scm_t_uint64 *scm_array_handle_u64_elements (scm_t_array_handle *h);
+ SCM_API scm_t_uint64 *scm_array_handle_u64_writable_elements (scm_t_array_handle *h);
+@@ -198,7 +197,6 @@ SCM_API scm_t_uint64 *scm_u64vector_writable_elements (SCM uvec,
+ scm_t_array_handle *h,
+ size_t *lenp,
+ ssize_t *incp);
+-#endif
+
+ SCM_API SCM scm_s64vector_p (SCM obj);
+ SCM_API SCM scm_make_s64vector (SCM n, SCM fill);
+@@ -210,7 +208,6 @@ SCM_API SCM scm_s64vector_to_list (SCM uvec);
+ SCM_API SCM scm_list_to_s64vector (SCM l);
+ SCM_API SCM scm_any_to_s64vector (SCM obj);
+
+-#if SCM_HAVE_T_INT64
+ SCM_API SCM scm_take_s64vector (scm_t_int64 *data, size_t n);
+ SCM_API const scm_t_int64 *scm_array_handle_s64_elements (scm_t_array_handle *h);
+ SCM_API scm_t_int64 *scm_array_handle_s64_writable_elements (scm_t_array_handle *h);
+@@ -221,7 +218,6 @@ SCM_API scm_t_int64 *scm_s64vector_writable_elements (SCM uvec,
+ scm_t_array_handle *h,
+ size_t *lenp,
+ ssize_t *incp);
+-#endif
+
+ SCM_API SCM scm_f32vector_p (SCM obj);
+ SCM_API SCM scm_make_f32vector (SCM n, SCM fill);
+diff --git a/libguile/threads.c b/libguile/threads.c
+index 95a905c..f2bb556 100644
+--- a/libguile/threads.c
++++ b/libguile/threads.c
+@@ -276,7 +276,7 @@ unblock_from_queue (SCM queue)
+ var 't'
+ // save registers.
+ SCM_FLUSH_REGISTER_WINDOWS; // sparc only
+- setjmp (t->regs); // here's most of the magic
++ SCM_I_SETJMP (t->regs); // here's most of the magic
+
+ ... and returns.
+
+@@ -330,7 +330,7 @@ unblock_from_queue (SCM queue)
+ t->top = SCM_STACK_PTR (&t);
+ // save registers.
+ SCM_FLUSH_REGISTER_WINDOWS;
+- setjmp (t->regs);
++ SCM_I_SETJMP (t->regs);
+ res = func(data);
+ scm_enter_guile (t);
+
+@@ -388,7 +388,7 @@ suspend (void)
+ t->top = SCM_STACK_PTR (&t);
+ /* save registers. */
+ SCM_FLUSH_REGISTER_WINDOWS;
+- setjmp (t->regs);
++ SCM_I_SETJMP (t->regs);
+ return t;
+ }
+
+diff --git a/libguile/threads.h b/libguile/threads.h
+index 2b0e067..e22d9bd 100644
+--- a/libguile/threads.h
++++ b/libguile/threads.h
+@@ -107,7 +107,7 @@ typedef struct scm_i_thread {
+ /* For keeping track of the stack and registers. */
+ SCM_STACKITEM *base;
+ SCM_STACKITEM *top;
+- jmp_buf regs;
++ scm_i_jmp_buf regs;
+ #ifdef __ia64__
+ void *register_backing_store_base;
+ scm_t_contregs *pending_rbs_continuation;
+diff --git a/libguile/throw.c b/libguile/throw.c
+index 92c5a1a..fcfde47 100644
+--- a/libguile/throw.c
++++ b/libguile/throw.c
+@@ -53,7 +53,7 @@ static scm_t_bits tc16_jmpbuffer;
+ #define DEACTIVATEJB(x) \
+ (SCM_SET_CELL_WORD_0 ((x), (SCM_CELL_WORD_0 (x) & ~(1L << 16L))))
+
+-#define JBJMPBUF(OBJ) ((jmp_buf *) SCM_CELL_WORD_1 (OBJ))
++#define JBJMPBUF(OBJ) ((scm_i_jmp_buf *) SCM_CELL_WORD_1 (OBJ))
+ #define SETJBJMPBUF(x, v) (SCM_SET_CELL_WORD_1 ((x), (scm_t_bits) (v)))
+ #define SCM_JBDFRAME(x) ((scm_t_debug_frame *) SCM_CELL_WORD_2 (x))
+ #define SCM_SETJBDFRAME(x, v) (SCM_SET_CELL_WORD_2 ((x), (scm_t_bits) (v)))
+@@ -75,7 +75,7 @@ make_jmpbuf (void)
+ {
+ SCM answer;
+ SCM_NEWSMOB2 (answer, tc16_jmpbuffer, 0, 0);
+- SETJBJMPBUF(answer, (jmp_buf *)0);
++ SETJBJMPBUF(answer, (scm_i_jmp_buf *)0);
+ DEACTIVATEJB(answer);
+ return answer;
+ }
+@@ -85,7 +85,7 @@ make_jmpbuf (void)
+
+ struct jmp_buf_and_retval /* use only on the stack, in scm_catch */
+ {
+- jmp_buf buf; /* must be first */
++ scm_i_jmp_buf buf; /* must be first */
+ SCM throw_tag;
+ SCM retval;
+ };
+@@ -179,7 +179,7 @@ scm_c_catch (SCM tag,
+ pre_unwind.lazy_catch_p = 0;
+ SCM_SETJBPREUNWIND(jmpbuf, &pre_unwind);
+
+- if (setjmp (jbr.buf))
++ if (SCM_I_SETJMP (jbr.buf))
+ {
+ SCM throw_tag;
+ SCM throw_args;
+@@ -821,7 +821,7 @@ scm_ithrow (SCM key, SCM args, int noreturn SCM_UNUSED)
+ jbr->throw_tag = key;
+ jbr->retval = args;
+ scm_i_set_last_debug_frame (SCM_JBDFRAME (jmpbuf));
+- longjmp (*JBJMPBUF (jmpbuf), 1);
++ SCM_I_LONGJMP (*JBJMPBUF (jmpbuf), 1);
+ }
+
+ /* Otherwise, it's some random piece of junk. */
+diff --git a/libguile/vectors.c b/libguile/vectors.c
+index eeb8569..074655c 100644
+--- a/libguile/vectors.c
++++ b/libguile/vectors.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc.
++/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2010 Free Software Foundation, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -465,7 +465,9 @@ SCM_DEFINE (scm_vector_move_left_x, "vector-move-left!", 5, 0, 0,
+
+ i = scm_to_unsigned_integer (start1, 0, len1);
+ e = scm_to_unsigned_integer (end1, i, len1);
+- j = scm_to_unsigned_integer (start2, 0, len2 - (i-e));
++ SCM_ASSERT_RANGE (SCM_ARG3, end1, (e-i) < len2);
++ j = scm_to_unsigned_integer (start2, 0, len2);
++ SCM_ASSERT_RANGE (SCM_ARG5, start2, j <= len2 - (e - i));
+
+ i *= inc1;
+ e *= inc1;
+@@ -503,7 +505,11 @@ SCM_DEFINE (scm_vector_move_right_x, "vector-move-right!", 5, 0, 0,
+
+ i = scm_to_unsigned_integer (start1, 0, len1);
+ e = scm_to_unsigned_integer (end1, i, len1);
+- j = scm_to_unsigned_integer (start2, 0, len2 - (i-e));
++ SCM_ASSERT_RANGE (SCM_ARG3, end1, (e-i) < len2);
++ j = scm_to_unsigned_integer (start2, 0, len2);
++ SCM_ASSERT_RANGE (SCM_ARG5, start2, j <= len2 - (e - i));
++
++ j += (e - i);
+
+ i *= inc1;
+ e *= inc1;
+diff --git a/scripts/snarf-check-and-output-texi b/scripts/snarf-check-and-output-texi
+index ea33e17..8cd42e8 100755
+--- a/scripts/snarf-check-and-output-texi
++++ b/scripts/snarf-check-and-output-texi
+@@ -267,6 +267,17 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
+ (set! *file* file)
+ (set! *line* line))
+
++ ;; newer gccs like to throw around more location markers into the
++ ;; preprocessed source; these (hash . hash) bits are what they translate to
++ ;; in snarfy terms.
++ (('location ('string . file) ('int . line) ('hash . 'hash))
++ (set! *file* file)
++ (set! *line* line))
++
++ (('location ('hash . 'hash) ('string . file) ('int . line) ('hash . 'hash))
++ (set! *file* file)
++ (set! *line* line))
++
+ (('arglist rest ...)
+ (set! *args* (do-arglist rest)))
+
+diff --git a/srfi/srfi-19.scm b/srfi/srfi-19.scm
+index ffce990..482ec4e 100644
+--- a/srfi/srfi-19.scm
++++ b/srfi/srfi-19.scm
+@@ -1,6 +1,6 @@
+ ;;; srfi-19.scm --- Time/Date Library
+
+-;; Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++;; Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ ;;
+ ;; This library is free software; you can redistribute it and/or
+ ;; modify it under the terms of the GNU Lesser General Public
+@@ -41,7 +41,8 @@
+ (define-module (srfi srfi-19)
+ :use-module (srfi srfi-6)
+ :use-module (srfi srfi-8)
+- :use-module (srfi srfi-9))
++ :use-module (srfi srfi-9)
++ :autoload (ice-9 rdelim) (read-line))
+
+ (begin-deprecated
+ ;; Prevent `export' from re-exporting core bindings. This behaviour
+@@ -339,7 +340,7 @@
+ (set-tm:hour result (date-hour date))
+ ;; FIXME: SRFI day ranges from 0-31. (not compatible with set-tm:mday).
+ (set-tm:mday result (date-day date))
+- (set-tm:month result (- (date-month date) 1))
++ (set-tm:mon result (- (date-month date) 1))
+ ;; FIXME: need to signal error on range violation.
+ (set-tm:year result (+ 1900 (date-year date)))
+ (set-tm:isdst result -1)
+@@ -528,33 +529,38 @@
+ ;; -- these depend on time-monotonic having the same definition as time-tai!
+ (define (time-monotonic->time-utc time-in)
+ (if (not (eq? (time-type time-in) time-monotonic))
+- (priv:time-error caller 'incompatible-time-types time-in))
++ (priv:time-error 'time-monotonic->time-utc
++ 'incompatible-time-types time-in))
+ (let ((ntime (copy-time time-in)))
+ (set-time-type! ntime time-tai)
+ (priv:time-tai->time-utc! ntime ntime 'time-monotonic->time-utc)))
+
+ (define (time-monotonic->time-utc! time-in)
+ (if (not (eq? (time-type time-in) time-monotonic))
+- (priv:time-error caller 'incompatible-time-types time-in))
++ (priv:time-error 'time-monotonic->time-utc!
++ 'incompatible-time-types time-in))
+ (set-time-type! time-in time-tai)
+- (priv:time-tai->time-utc! ntime ntime 'time-monotonic->time-utc))
++ (priv:time-tai->time-utc! time-in time-in 'time-monotonic->time-utc))
+
+ (define (time-monotonic->time-tai time-in)
+ (if (not (eq? (time-type time-in) time-monotonic))
+- (priv:time-error caller 'incompatible-time-types time-in))
++ (priv:time-error 'time-monotonic->time-tai
++ 'incompatible-time-types time-in))
+ (let ((ntime (copy-time time-in)))
+ (set-time-type! ntime time-tai)
+ ntime))
+
+ (define (time-monotonic->time-tai! time-in)
+ (if (not (eq? (time-type time-in) time-monotonic))
+- (priv:time-error caller 'incompatible-time-types time-in))
++ (priv:time-error 'time-monotonic->time-tai!
++ 'incompatible-time-types time-in))
+ (set-time-type! time-in time-tai)
+ time-in)
+
+ (define (time-utc->time-monotonic time-in)
+ (if (not (eq? (time-type time-in) time-utc))
+- (priv:time-error caller 'incompatible-time-types time-in))
++ (priv:time-error 'time-utc->time-monotonic
++ 'incompatible-time-types time-in))
+ (let ((ntime (priv:time-utc->time-tai! time-in (make-time-unnormalized #f #f #f)
+ 'time-utc->time-monotonic)))
+ (set-time-type! ntime time-monotonic)
+@@ -562,7 +568,8 @@
+
+ (define (time-utc->time-monotonic! time-in)
+ (if (not (eq? (time-type time-in) time-utc))
+- (priv:time-error caller 'incompatible-time-types time-in))
++ (priv:time-error 'time-utc->time-monotonic!
++ 'incompatible-time-types time-in))
+ (let ((ntime (priv:time-utc->time-tai! time-in time-in
+ 'time-utc->time-monotonic!)))
+ (set-time-type! ntime time-monotonic)
+@@ -570,14 +577,16 @@
+
+ (define (time-tai->time-monotonic time-in)
+ (if (not (eq? (time-type time-in) time-tai))
+- (priv:time-error caller 'incompatible-time-types time-in))
++ (priv:time-error 'time-tai->time-monotonic
++ 'incompatible-time-types time-in))
+ (let ((ntime (copy-time time-in)))
+ (set-time-type! ntime time-monotonic)
+ ntime))
+
+ (define (time-tai->time-monotonic! time-in)
+ (if (not (eq? (time-type time-in) time-tai))
+- (priv:time-error caller 'incompatible-time-types time-in))
++ (priv:time-error 'time-tai->time-monotonic!
++ 'incompatible-time-types time-in))
+ (set-time-type! time-in time-monotonic)
+ time-in)
+
+@@ -780,7 +789,7 @@
+ (define (priv:year-day day month year)
+ (let ((days-pr (assoc month priv:month-assoc)))
+ (if (not days-pr)
+- (priv:error 'date-year-day 'invalid-month-specification month))
++ (priv:time-error 'date-year-day 'invalid-month-specification month))
+ (if (and (priv:leap-year? year) (> month 2))
+ (+ day (cdr days-pr) 1)
+ (+ day (cdr days-pr)))))
+@@ -1263,7 +1272,7 @@
+ ((#\8) 8)
+ ((#\9) 9)
+ (else (priv:time-error 'bad-date-template-string
+- (list "Non-integer character" ch i)))))
++ (list "Non-integer character" ch)))))
+
+ ;; read an integer upto n characters long on port; upto -> #f is any length
+ (define (priv:integer-reader upto port)
+diff --git a/srfi/srfi-35.scm b/srfi/srfi-35.scm
+index 2035466..ee20a10 100644
+--- a/srfi/srfi-35.scm
++++ b/srfi/srfi-35.scm
+@@ -57,6 +57,19 @@
+ (number->string (object-address ct)
+ 16))))))
+
++(define (%make-condition-type layout id parent all-fields)
++ (let ((struct (make-struct %condition-type-vtable 0
++ (make-struct-layout layout) ;; layout
++ print-condition ;; printer
++ id parent all-fields)))
++
++ ;; Hack to associate STRUCT with a name, providing a better name for
++ ;; GOOPS classes as returned by `class-of' et al.
++ (set-struct-vtable-name! struct (cond ((symbol? id) id)
++ ((string? id) (string->symbol id))
++ (else (string->symbol ""))))
++ struct))
++
+ (define (condition-type? obj)
+ "Return true if OBJ is a condition type."
+ (and (struct? obj)
+@@ -104,10 +117,8 @@ supertypes."
+ field-names parent-fields)))
+ (let* ((all-fields (append parent-fields field-names))
+ (layout (struct-layout-for-condition all-fields)))
+- (make-struct %condition-type-vtable 0
+- (make-struct-layout layout) ;; layout
+- print-condition ;; printer
+- id parent all-fields))
++ (%make-condition-type layout
++ id parent all-fields))
+ (error "invalid condition type field names"
+ field-names)))
+ (error "parent is not a condition type" parent))
+@@ -126,13 +137,10 @@ supertypes."
+ (let* ((all-fields (append-map condition-type-all-fields
+ parents))
+ (layout (struct-layout-for-condition all-fields)))
+- (make-struct %condition-type-vtable 0
+- (make-struct-layout layout) ;; layout
+- print-condition ;; printer
+- id
+- parents ;; list of parents!
+- all-fields
+- all-fields)))))
++ (%make-condition-type layout
++ id
++ parents ;; list of parents!
++ all-fields)))))
+
+
+ ;;;
+diff --git a/test-suite/standalone/Makefile.am b/test-suite/standalone/Makefile.am
+index e7cfd82..058ce93 100644
+--- a/test-suite/standalone/Makefile.am
++++ b/test-suite/standalone/Makefile.am
+@@ -28,7 +28,9 @@ check_SCRIPTS =
+ BUILT_SOURCES =
+ EXTRA_DIST =
+
+-TESTS_ENVIRONMENT = "${top_builddir}/pre-inst-guile-env"
++TESTS_ENVIRONMENT = \
++ builddir="$(builddir)" \
++ "${top_builddir}/pre-inst-guile-env"
+
+ test_cflags = \
+ -I$(top_srcdir)/test-suite/standalone \
+diff --git a/test-suite/standalone/test-asmobs b/test-suite/standalone/test-asmobs
+index 2ea75d9..9689ab9 100755
+--- a/test-suite/standalone/test-asmobs
++++ b/test-suite/standalone/test-asmobs
+@@ -2,7 +2,8 @@
+ exec guile -q -s "$0" "$@"
+ !#
+
+-(load-extension "libtest-asmobs" "libtest_asmobs_init")
++(load-extension (string-append (getenv "builddir") "/libtest-asmobs")
++ "libtest_asmobs_init")
+
+ (define (test x v)
+ (if v
+diff --git a/test-suite/standalone/test-conversion.c b/test-suite/standalone/test-conversion.c
+index 41f99d3..caa835d 100644
+--- a/test-suite/standalone/test-conversion.c
++++ b/test-suite/standalone/test-conversion.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1999,2000,2001,2003,2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
++/* Copyright (C) 1999,2000,2001,2003,2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -702,10 +702,8 @@ DEFSTST (scm_to_int16)
+ DEFUTST (scm_to_uint16)
+ DEFSTST (scm_to_int32)
+ DEFUTST (scm_to_uint32)
+-#ifdef SCM_HAVE_T_INT64
+ DEFSTST (scm_to_int64)
+ DEFUTST (scm_to_uint64)
+-#endif
+
+ #define TEST_8S(v,f,r,re,te) test_8s (v, tst_##f, #f, r, re, te)
+ #define TEST_8U(v,f,r,re,te) test_8u (v, tst_##f, #f, r, re, te)
+@@ -745,11 +743,9 @@ test_int_sizes ()
+ TEST_7S (scm_from_int32, SCM_T_INT32_MAX+1LL, "-2147483648");
+ TEST_7U (scm_from_uint32, SCM_T_UINT32_MAX, "4294967295");
+
+-#if SCM_HAVE_T_INT64
+ TEST_7S (scm_from_int64, SCM_T_INT64_MIN, "-9223372036854775808");
+ TEST_7S (scm_from_int64, SCM_T_INT64_MAX, "9223372036854775807");
+ TEST_7U (scm_from_uint64, SCM_T_UINT64_MAX, "18446744073709551615");
+-#endif
+
+ TEST_8S ("91", scm_to_schar, 91, 0, 0);
+ TEST_8U ("91", scm_to_uchar, 91, 0, 0);
+@@ -794,7 +790,6 @@ test_int_sizes ()
+ TEST_8U ("-1", scm_to_uint32, 0, 1, 0);
+ TEST_8U ("#f", scm_to_uint32, 0, 0, 1);
+
+-#if SCM_HAVE_T_INT64
+ TEST_8S ("-9223372036854775808", scm_to_int64, SCM_T_INT64_MIN, 0, 0);
+ TEST_8S ("9223372036854775807", scm_to_int64, SCM_T_INT64_MAX, 0, 0);
+ TEST_8S ("9223372036854775808", scm_to_int64, 0, 1, 0);
+@@ -803,7 +798,6 @@ test_int_sizes ()
+ TEST_8U ("18446744073709551616", scm_to_uint64, 0, 1, 0);
+ TEST_8U ("-1", scm_to_uint64, 0, 1, 0);
+ TEST_8U ("#f", scm_to_uint64, 0, 0, 1);
+-#endif
+
+ }
+
+diff --git a/test-suite/tests/goops.test b/test-suite/tests/goops.test
+index fa53fd2..fb2535a 100644
+--- a/test-suite/tests/goops.test
++++ b/test-suite/tests/goops.test
+@@ -140,7 +140,12 @@
+ (eq? (class-of "foo") <string>))
+
+ (pass-if "port"
+- (is-a? (%make-void-port "w") <port>)))
++ (is-a? (%make-void-port "w") <port>))
++
++ (pass-if "struct vtable"
++ ;; Previously, `class-of' would fail for nameless structs, i.e., structs
++ ;; for which `struct-vtable-name' is #f.
++ (is-a? (class-of (make-vtable-vtable "prprpr" 0)) <class>)))
+
+
+ (with-test-prefix "defining classes"
+diff --git a/test-suite/tests/socket.test b/test-suite/tests/socket.test
+index 4bfc415..e73f585 100644
+--- a/test-suite/tests/socket.test
++++ b/test-suite/tests/socket.test
+@@ -1,6 +1,6 @@
+ ;;;; socket.test --- test socket functions -*- scheme -*-
+ ;;;;
+-;;;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++;;;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ ;;;;
+ ;;;; This library is free software; you can redistribute it and/or
+ ;;;; modify it under the terms of the GNU Lesser General Public
+@@ -174,13 +174,28 @@
+ ;;; AF_UNIX sockets and `make-socket-address'
+ ;;;
+
++(define %tmpdir
++ ;; Honor `$TMPDIR', which tmpnam(3) doesn't do.
++ (or (getenv "TMPDIR") "/tmp"))
++
++(define %curdir
++ ;; Remember the current working directory.
++ (getcwd))
++
++;; Temporarily cd to %TMPDIR. The goal is to work around path name
++;; limitations, which can lead to exceptions like:
++;;
++;; (misc-error "scm_to_sockaddr"
++;; "unix address path too long: ~A"
++;; ("/tmp/nix-build-fb7bph4ifh0vr3ihigm702dzffdnapfj-guile-coverage-1.9.5.drv-0/guile-test-socket-1258553296-77619")
++;; #f)
++(chdir %tmpdir)
++
+ (define (temp-file-path)
+- ;; Return a temporary file path that honors `$TMPDIR', which `tmpnam'
+- ;; doesn't do.
+- (let ((dir (or (getenv "TMPDIR") "/tmp")))
+- (string-append dir "/guile-test-socket-"
+- (number->string (current-time)) "-"
+- (number->string (random 100000)))))
++ ;; Return a temporary file name, assuming the current directory is %TMPDIR.
++ (string-append "guile-test-socket-"
++ (number->string (current-time)) "-"
++ (number->string (random 100000))))
+
+
+ (if (defined? 'AF_UNIX)
+@@ -320,3 +335,91 @@
+
+ #t)))
+
++
++(if (defined? 'AF_INET6)
++ (with-test-prefix "AF_INET6/SOCK_STREAM"
++
++ ;; testing `bind', `listen' and `connect' on stream-oriented sockets
++
++ (let ((server-socket (socket AF_INET6 SOCK_STREAM 0))
++ (server-bound? #f)
++ (server-listening? #f)
++ (server-pid #f)
++ (ipv6-addr 1) ; ::1
++ (server-port 8889)
++ (client-port 9998))
++
++ (pass-if "bind"
++ (catch 'system-error
++ (lambda ()
++ (bind server-socket AF_INET6 ipv6-addr server-port)
++ (set! server-bound? #t)
++ #t)
++ (lambda args
++ (let ((errno (system-error-errno args)))
++ (cond ((= errno EADDRINUSE) (throw 'unresolved))
++ (else (apply throw args)))))))
++
++ (pass-if "bind/sockaddr"
++ (let* ((sock (socket AF_INET6 SOCK_STREAM 0))
++ (sockaddr (make-socket-address AF_INET6 ipv6-addr client-port)))
++ (catch 'system-error
++ (lambda ()
++ (bind sock sockaddr)
++ #t)
++ (lambda args
++ (let ((errno (system-error-errno args)))
++ (cond ((= errno EADDRINUSE) (throw 'unresolved))
++ (else (apply throw args))))))))
++
++ (pass-if "listen"
++ (if (not server-bound?)
++ (throw 'unresolved)
++ (begin
++ (listen server-socket 123)
++ (set! server-listening? #t)
++ #t)))
++
++ (if server-listening?
++ (let ((pid (primitive-fork)))
++ ;; Spawn a server process.
++ (case pid
++ ((-1) (throw 'unresolved))
++ ((0) ;; the kid: serve two connections and exit
++ (let serve ((conn
++ (false-if-exception (accept server-socket)))
++ (count 1))
++ (if (not conn)
++ (exit 1)
++ (if (> count 0)
++ (serve (false-if-exception (accept server-socket))
++ (- count 1)))))
++ (exit 0))
++ (else ;; the parent
++ (set! server-pid pid)
++ #t))))
++
++ (pass-if "connect"
++ (if (not server-pid)
++ (throw 'unresolved)
++ (let ((s (socket AF_INET6 SOCK_STREAM 0)))
++ (connect s AF_INET6 ipv6-addr server-port)
++ #t)))
++
++ (pass-if "connect/sockaddr"
++ (if (not server-pid)
++ (throw 'unresolved)
++ (let ((s (socket AF_INET6 SOCK_STREAM 0)))
++ (connect s (make-socket-address AF_INET6 ipv6-addr server-port))
++ #t)))
++
++ (pass-if "accept"
++ (if (not server-pid)
++ (throw 'unresolved)
++ (let ((status (cdr (waitpid server-pid))))
++ (eq? 0 (status:exit-val status)))))
++
++ #t)))
++
++;; Switch back to the previous directory.
++(false-if-exception (chdir %curdir))
diff --git a/meta-oe/recipes-support/guile/guile-native.inc b/meta-oe/recipes-support/guile/guile-native.inc
new file mode 100644
index 0000000000..831e088134
--- /dev/null
+++ b/meta-oe/recipes-support/guile/guile-native.inc
@@ -0,0 +1,12 @@
+SECTION = "unknown"
+LICENSE = "GPL"
+DEPENDS = "gettext-native gmp-native"
+
+inherit autotools native
+
+S="${WORKDIR}/guile-${PV}"
+
+do_configure_append() {
+ find ${S} -name Makefile | xargs sed -i s:'-Werror':'':g
+}
+
diff --git a/meta-oe/recipes-support/guile/guile-native_1.8.7.bb b/meta-oe/recipes-support/guile/guile-native_1.8.7.bb
new file mode 100644
index 0000000000..aa4fbb0394
--- /dev/null
+++ b/meta-oe/recipes-support/guile/guile-native_1.8.7.bb
@@ -0,0 +1,8 @@
+require guile-native.inc
+SRC_URI = "http://ftp.gnu.org/pub/gnu/guile/guile-${PV}.tar.gz \
+ file://configure-fix.patch \
+ file://cpp-linemarkers.patch \
+ "
+
+SRC_URI[md5sum] = "991b5b3efcbbc3f7507d05bc42f80a5e"
+SRC_URI[sha256sum] = "bfee6339d91955a637e7f541d96f5b1d53271b42bb4a37b8867d186a6c66f0b3"
diff --git a/meta-oe/recipes-support/guile/guile.inc b/meta-oe/recipes-support/guile/guile.inc
new file mode 100644
index 0000000000..f015965902
--- /dev/null
+++ b/meta-oe/recipes-support/guile/guile.inc
@@ -0,0 +1,46 @@
+DESCRIPTION = "Guile is an interpreter for the Scheme programming language, \
+packaged as a library which can be incorporated into your programs."
+HOMEPAGE = "http://www.gnu.org/software/guile/guile.html"
+SECTION = "devel/scheme"
+DEPENDS = "guile-native gmp libtool"
+LICENSE = "GPL"
+PACKAGES =+ "${PN}-el"
+FILES_${PN}-el = "${datadir}/emacs"
+DESCRIPTION_${PN}-el = "Emacs lisp files for Guile"
+
+inherit autotools
+
+acpaths = "-I ${S}/guile-config"
+
+EXTRA_OECONF = " \
+ --without-threads \
+ --without-included-ltdl \
+ "
+
+do_compile() {
+ for i in $(find ${S} -name "Makefile") ; do
+ sed -i -e s:-Werror::g $i
+ done
+
+ (cd libguile; oe_runmake CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" LDFLAGS="${BUILD_LDFLAGS}" guile_filter_doc_snarfage)
+ oe_runmake preinstguile="`which guile`"
+
+ sed -i -e s:${STAGING_DIR_TARGET}::g \
+ -e s:/${TARGET_SYS}::g \
+ -e s:-L/usr/lib::g \
+ -e s:-isystem/usr/include::g \
+ -e s:,/usr/lib:,\$\{libdir\}:g \
+ guile-1.8.pc
+}
+
+SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
+
+guile_cross_config() {
+ # Create guile-config returning target values instead of native values
+ install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
+ echo '#!'`which guile`$' \\\n-e main -s\n!#\n(define %guile-build-info '\'\( >guile-config.cross
+ sed -n $'s:-isystem[^ ]* ::;s:-Wl,-rpath-link,[^ ]* ::;s:^[ \t]*{[ \t]*": (:;s:",[ \t]*": . ":;s:" *}, *\\\\:"):;/^ (/p' <libguile/libpath.h >>guile-config.cross
+ echo '))' >>guile-config.cross
+ cat guile-config/guile-config >>guile-config.cross
+ install guile-config.cross ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/guile-config
+}
diff --git a/meta-oe/recipes-support/guile/guile_1.8.7.bb b/meta-oe/recipes-support/guile/guile_1.8.7.bb
new file mode 100644
index 0000000000..8b3a80d91d
--- /dev/null
+++ b/meta-oe/recipes-support/guile/guile_1.8.7.bb
@@ -0,0 +1,12 @@
+require guile.inc
+
+PR = "r1"
+
+SRC_URI = "http://ftp.gnu.org/pub/gnu/guile/guile-${PV}.tar.gz \
+ file://configure-fix.patch \
+ file://18.diff \
+ "
+
+
+SRC_URI[md5sum] = "991b5b3efcbbc3f7507d05bc42f80a5e"
+SRC_URI[sha256sum] = "bfee6339d91955a637e7f541d96f5b1d53271b42bb4a37b8867d186a6c66f0b3"
diff --git a/meta-oe/recipes-support/htop/htop/remove-proc-test.patch b/meta-oe/recipes-support/htop/htop/remove-proc-test.patch
new file mode 100644
index 0000000000..3185fdd1f4
--- /dev/null
+++ b/meta-oe/recipes-support/htop/htop/remove-proc-test.patch
@@ -0,0 +1,13 @@
+--- htop-0.6.6/configure.ac 2007-05-21 13:06:15.000000000 -0500
++++ htop-0.6.6-cross/configure.ac 2007-11-16 14:12:16.000000000 -0600
+@@ -58,8 +58,8 @@
+ fi,
+ AC_DEFINE(PROCDIR, "/proc", [Path of proc filesystem]))
+
+-AC_CHECK_FILE($PROCDIR/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.))
+-AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.))
++#AC_CHECK_FILE($PROCDIR/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.))
++#AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.))
+
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
diff --git a/meta-oe/recipes-support/htop/htop_0.9.bb b/meta-oe/recipes-support/htop/htop_0.9.bb
new file mode 100644
index 0000000000..eb207aabe6
--- /dev/null
+++ b/meta-oe/recipes-support/htop/htop_0.9.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "htop process monitor"
+HOMEPAGE = "http://htop.sf.net"
+SECTION = "console/utils"
+PRIORITY = "optional"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c312653532e8e669f30e5ec8bdc23be3"
+
+DEPENDS = "ncurses"
+RDEPENDS_${PN} = "ncurses-terminfo"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/htop/htop-${PV}.tar.gz \
+ file://remove-proc-test.patch"
+
+inherit autotools
+
+SRC_URI[md5sum] = "7c5507f35f363f3f40183a2ba3c561f8"
+SRC_URI[sha256sum] = "4de65c38e1886bccd30ed692b30eb9bf195240680781bfe1eaf5faf84ee6fbfd"
+
diff --git a/meta-oe/recipes-support/libgcrypt/libgcrypt.inc b/meta-oe/recipes-support/libgcrypt/libgcrypt.inc
new file mode 100644
index 0000000000..da882dcc7e
--- /dev/null
+++ b/meta-oe/recipes-support/libgcrypt/libgcrypt.inc
@@ -0,0 +1,33 @@
+DESCRIPTION = "A general purpose cryptographic library based on the code from GnuPG"
+HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+SECTION = "libs"
+PRIORITY = "optional"
+
+BBCLASSEXTEND = "native"
+
+# helper program gcryptrnd and getrandom are under GPL, rest LGPL
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
+
+DEPENDS = "libgpg-error"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \
+ file://add-pkgconfig-support.patch"
+
+inherit autotools binconfig pkgconfig
+
+EXTRA_OECONF = "--without-pth --disable-asm --with-capabilities"
+
+# libgcrypt.pc is added locally and thus installed here
+do_install_append() {
+ install -d ${D}/${libdir}/pkgconfig
+ install -m 0644 ${S}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
+}
+
+ARM_INSTRUCTION_SET = "arm"
+
+# move libgcrypt-config into -dev package
+FILES_${PN} = "${libdir}/lib*.so.*"
+FILES_${PN}-dev += "${bindir} ${libdir}/pkgconfig/*.pc"
diff --git a/meta-oe/recipes-support/libgcrypt/libgcrypt/add-pkgconfig-support.patch b/meta-oe/recipes-support/libgcrypt/libgcrypt/add-pkgconfig-support.patch
new file mode 100644
index 0000000000..24a59787a2
--- /dev/null
+++ b/meta-oe/recipes-support/libgcrypt/libgcrypt/add-pkgconfig-support.patch
@@ -0,0 +1,49 @@
+Index: libgcrypt-1.2.4/configure.ac
+===================================================================
+--- libgcrypt-1.2.4.orig/configure.ac 2008-03-19 22:14:50.000000000 +0000
++++ libgcrypt-1.2.4/configure.ac 2008-03-19 22:14:58.000000000 +0000
+@@ -807,6 +807,7 @@
+ doc/Makefile
+ src/Makefile
+ src/gcrypt.h
++src/libgcrypt.pc
+ src/libgcrypt-config
+ tests/Makefile
+ w32-dll/Makefile
+Index: libgcrypt-1.2.4/src/libgcrypt.pc.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libgcrypt-1.2.4/src/libgcrypt.pc.in 2008-03-19 22:14:58.000000000 +0000
+@@ -0,0 +1,32 @@
++# Process this file with autoconf to produce a pkg-config metadata file.
++# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
++# Author: Simon Josefsson
++#
++# This file is free software; as a special exception the author gives
++# unlimited permission to copy and/or distribute it, with or without
++# modifications, as long as this notice is preserved.
++#
++# This file is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@LIBGCRYPT_CONFIG_API_VERSION@
++
++# Misc information.
++symmetric_ciphers=@LIBGCRYPT_CIPHERS@
++asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
++digests=@LIBGCRYPT_DIGESTS@
++
++Name: libgcrypt
++Description: GNU crypto library
++URL: http://www.gnupg.org
++Version: @VERSION@
++Libs: -L${libdir} -lgcrypt
++Libs.private: -L${libdir} -lgpg-error
++Cflags: -I${includedir}
diff --git a/meta-oe/recipes-support/libgcrypt/libgcrypt_1.4.6.bb b/meta-oe/recipes-support/libgcrypt/libgcrypt_1.4.6.bb
new file mode 100644
index 0000000000..a592437913
--- /dev/null
+++ b/meta-oe/recipes-support/libgcrypt/libgcrypt_1.4.6.bb
@@ -0,0 +1,3 @@
+require libgcrypt.inc
+
+PR = "r0"
diff --git a/meta-oe/recipes-support/libgpg-error/libgpg-error-1.8/pkgconfig.patch b/meta-oe/recipes-support/libgpg-error/libgpg-error-1.8/pkgconfig.patch
new file mode 100644
index 0000000000..49e47d874e
--- /dev/null
+++ b/meta-oe/recipes-support/libgpg-error/libgpg-error-1.8/pkgconfig.patch
@@ -0,0 +1,53 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+Index: libgpg-error-1.8/configure.ac
+===================================================================
+--- libgpg-error-1.8.orig/configure.ac 2010-05-06 06:01:08.000000000 -0700
++++ libgpg-error-1.8/configure.ac 2010-07-21 02:20:20.923261305 -0700
+@@ -140,6 +140,7 @@
+ AC_SUBST(GPG_ERROR_CONFIG_CFLAGS)
+ AC_SUBST(GPG_ERROR_CONFIG_ISUBDIRAFTER)
+ AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config])
++AC_CONFIG_FILES([src/gpg-error.pc])
+
+
+ # Special defines for certain platforms
+Index: libgpg-error-1.8/src/Makefile.am
+===================================================================
+--- libgpg-error-1.8.orig/src/Makefile.am 2010-04-14 02:16:44.000000000 -0700
++++ libgpg-error-1.8/src/Makefile.am 2010-07-21 02:22:36.655012496 -0700
+@@ -37,13 +37,15 @@
+ bin_SCRIPTS = gpg-error-config
+ m4datadir = $(datadir)/aclocal
+ m4data_DATA = gpg-error.m4
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = gpg-error.pc
+
+ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
+ mkerrnos.awk errnos.in README \
+ mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \
+ mkheader.awk gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
+ err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \
+- gpg-error.def.in versioninfo.rc.in
++ gpg-error.def.in versioninfo.rc.in gpg-error.pc.in
+
+ BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
+ err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \
+Index: libgpg-error-1.8/src/gpg-error.pc.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libgpg-error-1.8/src/gpg-error.pc.in 2010-07-21 02:20:20.923261305 -0700
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: gpg-error
++Description: a library that defines common error values for all GnuPG components
++Version: @VERSION@
++Libs: -L{libdir} -lgpg-error
++Cflags: -I${includedir}
diff --git a/meta-oe/recipes-support/libgpg-error/libgpg-error_1.8.bb b/meta-oe/recipes-support/libgpg-error/libgpg-error_1.8.bb
new file mode 100644
index 0000000000..5f6b72cd50
--- /dev/null
+++ b/meta-oe/recipes-support/libgpg-error/libgpg-error_1.8.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "a small library that defines common error values for all GnuPG components"
+HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+BBCLASSEXTEND = "native"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/gpg-error.h;endline=23;md5=83c16c8f5cea85affa1ff270a6f4fcff \
+ file://src/init.c;endline=20;md5=b69742f2a8827d494c6f6a4b1768416c"
+
+
+SECTION = "libs"
+LICENSE = "GPLv2+ & LGPLv2.1+"
+DEPENDS = "gettext"
+PR = "r0"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
+ file://pkgconfig.patch;"
+
+# move libgpg-error-config into -dev package
+FILES_${PN} = "${libdir}/lib*.so.*"
+FILES_${PN}-dev += "${bindir}/*"
+
+inherit autotools binconfig pkgconfig
diff --git a/meta-oe/recipes-support/libusb/libusb-compat_0.1.3.bbappend b/meta-oe/recipes-support/libusb/libusb-compat_0.1.3.bbappend
new file mode 100644
index 0000000000..7de23617db
--- /dev/null
+++ b/meta-oe/recipes-support/libusb/libusb-compat_0.1.3.bbappend
@@ -0,0 +1,4 @@
+PROVIDES += "virtual/libusb0"
+
+inherit lib_package
+
diff --git a/meta-oe/recipes-support/mysql/files/autofoo.patch b/meta-oe/recipes-support/mysql/files/autofoo.patch
new file mode 100644
index 0000000000..669393a23b
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/files/autofoo.patch
@@ -0,0 +1,319 @@
+diff -aurp mysql-4.1.22.old/acinclude.m4 mysql-4.1.22/acinclude.m4
+--- mysql-4.1.22.old/acinclude.m4 2008-09-18 13:00:13.000000000 -0500
++++ mysql-4.1.22/acinclude.m4 2008-09-18 12:58:41.000000000 -0500
+@@ -1,5 +1,88 @@
+ # Local macros for automake & autoconf
+
++AH_TEMPLATE([SPRINTF_RETURNS_INT], [sprintf returns an int])
++AH_TEMPLATE([SPRINTF_RETURNS_PTR], [sprintf returns a char *])
++AH_TEMPLATE([SPRINTF_RETURNS_GARBAGE], [sprintf returns something unknown to us])
++
++AC_DEFUN([MYSQL_SPRINTF_RET], [
++ AC_CACHE_CHECK([return type of sprintf],
++ [mysql_cv_func_sprintf_ret], [
++ old_CFLAGS="$CFLAGS"
++ CFLAGS="$CFLAGS -Werror"
++ AC_COMPILE_IFELSE([
++#include <stdio.h>
++int sprintf(char *str, const char *format, ...);
++ ], [mysql_cv_func_sprintf_ret=int],
++ AC_COMPILE_IFELSE([
++#include <stdio.h>
++char * sprintf(char *str, const char *format, ...);
++ ], [mysql_cv_func_sprintf_ret=ptr],
++ [mysql_cv_func_sprintf_ret=unknown])
++ )
++ CFLAGS="$old_CFLAGS"
++ ])
++ if test x"$mysql_cv_func_sprintf_ret" = "xint"; then
++ AC_DEFINE([SPRINTF_RETURNS_INT], [1])
++ elif test x"$mysql_cv_func_sprintf_ret" = "xptr"; then
++ AC_DEFINE([SPRINTF_RETURNS_PTR], [1])
++ else
++ AC_DEFINE([SPRINTF_RETURNS_GARBAGE], [1])
++ fi
++])
++
++# _MYSQL_FUNC_ATOMIC_ADD
++# ----------------------
++# Check for Linux specific atomic_add function
++AC_DEFUN([_MYSQL_FUNC_ATOMIC_ADD],
++[AC_CACHE_CHECK([for atomic_add], [mysql_cv_func_atomic_add],
++[AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <asm/atomic.h>]],
++ [
++int main()
++{
++ atomic_t v;
++
++ atomic_set(&v, 23);
++ atomic_add(5, &v);
++ return atomic_read(&v) == 28 ? 0 : -1;
++}
++ ])],
++ [mysql_cv_func_atomic_add=yes],
++ [mysql_cv_func_atomic_add=no])])
++ if test x"$mysql_func_atomic_add" = "xyes"; then
++ AC_DEFINE([HAVE_ATOMIC_ADD], [1])
++ fi[]dnl
++])# _MYSQL_FUNC_ATOMIC_ADD
++
++# _MYSQL_FUNC_ATOMIC_SUB
++# ----------------------
++# Check for Linux specific atomic_sub function
++AC_DEFUN([_MYSQL_FUNC_ATOMIC_SUB],
++[AC_CACHE_CHECK([for atomic_sub], [mysql_cv_func_atomic_sub],
++[AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <asm/atomic.h>]],
++ [
++int main()
++{
++ atomic_t v;
++
++ atomic_set(&v, 23);
++ atomic_sub(5, &v);
++ return atomic_read(&v) == 18 ? 0 : -1;
++}
++ ])],
++ [mysql_cv_func_atomic_sub=yes],
++ [mysql_cv_func_atomic_sub=no])])
++ if test x"$mysql_func_atomic_sub" = "xyes"; then
++ AC_DEFINE([HAVE_ATOMIC_SUB], [1])
++ fi[]dnl
++])# _MYSQL_FUNC_ATOMIC_SUB
++
++# MYSQL_FUNCS_ATOMIC
++# ------------------
++# Check for Linux specific atomic add and sub functions
++AC_DEFUN([MYSQL_FUNCS_ATOMIC], [
++ AC_REQUIRE([_MYSQL_FUNC_ATOMIC_ADD])dnl
++ AC_REQUIRE([_MYSQL_FUNC_ATOMIC_SUB])dnl
++])# MYSQL_FUNCS_ATOMIC
+
+ AC_DEFUN([MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY], [
+ AC_CACHE_CHECK([HIST_ENTRY is declared in readline/readline.h], mysql_cv_hist_entry_declared,
+@@ -344,7 +427,7 @@ dnl ------------------------------------
+ AC_DEFUN([MYSQL_CHECK_ULONG],
+ [AC_MSG_CHECKING(for type ulong)
+ AC_CACHE_VAL(ac_cv_ulong,
+-[AC_TRY_RUN([#include <stdio.h>
++[AC_TRY_LINK([#include <stdio.h>
+ #include <sys/types.h>
+ main()
+ {
+@@ -362,7 +445,7 @@ fi
+ AC_DEFUN([MYSQL_CHECK_UCHAR],
+ [AC_MSG_CHECKING(for type uchar)
+ AC_CACHE_VAL(ac_cv_uchar,
+-[AC_TRY_RUN([#include <stdio.h>
++[AC_TRY_LINK([#include <stdio.h>
+ #include <sys/types.h>
+ main()
+ {
+@@ -380,7 +463,7 @@ fi
+ AC_DEFUN([MYSQL_CHECK_UINT],
+ [AC_MSG_CHECKING(for type uint)
+ AC_CACHE_VAL(ac_cv_uint,
+-[AC_TRY_RUN([#include <stdio.h>
++[AC_TRY_LINK([#include <stdio.h>
+ #include <sys/types.h>
+ main()
+ {
+@@ -399,7 +482,7 @@ fi
+ AC_DEFUN([MYSQL_CHECK_IN_ADDR_T],
+ [AC_MSG_CHECKING(for type in_addr_t)
+ AC_CACHE_VAL(ac_cv_in_addr_t,
+-[AC_TRY_RUN([#include <stdio.h>
++[AC_TRY_LINK([#include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+@@ -460,7 +543,7 @@ fi
+ AC_DEFUN([MYSQL_CHECK_FP_EXCEPT],
+ [AC_MSG_CHECKING(for type fp_except)
+ AC_CACHE_VAL(ac_cv_fp_except,
+-[AC_TRY_RUN([#include <stdio.h>
++[AC_TRY_LINK([#include <stdio.h>
+ #include <sys/types.h>
+ #include <ieeefp.h>
+ main()
+diff -aurp mysql-4.1.22.old/configure.in mysql-4.1.22/configure.in
+--- mysql-4.1.22.old/configure.in 2008-09-18 13:00:14.000000000 -0500
++++ mysql-4.1.22/configure.in 2008-09-18 12:54:00.000000000 -0500
+@@ -236,8 +236,6 @@ then
+ else
+ AC_PATH_PROG(AS, as, as)
+ fi
+-# Still need ranlib for readline; local static use only so no libtool.
+-AC_PROG_RANLIB
+ # We use libtool
+ #AC_LIBTOOL_WIN32_DLL
+ AC_PROG_LIBTOOL
+@@ -258,44 +256,7 @@ AC_PROG_YACC
+ AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf)
+ AC_CHECK_PROG(DVIS, tex, manual.dvi)
+
+-AC_MSG_CHECKING("return type of sprintf")
+-
+-#check the return type of sprintf
+-case $SYSTEM_TYPE in
+- *netware*)
+- AC_DEFINE(SPRINTF_RETURNS_INT, [1]) AC_MSG_RESULT("int")
+- ;;
+- *)
+-AC_TRY_RUN([
+- int main()
+- {
+- char* s = "hello";
+- char buf[6];
+- if((int)sprintf(buf, s) == strlen(s))
+- return 0;
+-
+- return -1;
+- }
+- ],
+- [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
+- AC_MSG_RESULT("int")],
+- [AC_TRY_RUN([
+- int main()
+- {
+- char* s = "hello";
+- char buf[6];
+- if((char*)sprintf(buf,s) == buf + strlen(s))
+- return 0;
+- return -1;
+- } ],
+- [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf])
+- AC_MSG_RESULT("ptr")],
+- [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf])
+- AC_MSG_RESULT("garbage")])
+- ])
+- ;;
+-esac
+-
++MYSQL_SPRINTF_RET
+
+ # option, cache_name, variable,
+ # code to execute if yes, code to exectute if fail
+@@ -878,47 +839,7 @@ struct request_info *req;
+ AC_SUBST(WRAPLIBS)
+
+ if test "$TARGET_LINUX" = "true"; then
+- AC_MSG_CHECKING([for atomic operations])
+-
+- AC_LANG_SAVE
+- AC_LANG_CPLUSPLUS
+-
+- atom_ops=
+- AC_TRY_RUN([
+-#include <asm/atomic.h>
+-int main()
+-{
+- atomic_t v;
+-
+- atomic_set(&v, 23);
+- atomic_add(5, &v);
+- return atomic_read(&v) == 28 ? 0 : -1;
+-}
+- ],
+- [AC_DEFINE([HAVE_ATOMIC_ADD], [1],
+- [atomic_add() from <asm/atomic.h> (Linux only)])
+- atom_ops="${atom_ops}atomic_add "],
+- )
+- AC_TRY_RUN([
+-#include <asm/atomic.h>
+-int main()
+-{
+- atomic_t v;
+-
+- atomic_set(&v, 23);
+- atomic_sub(5, &v);
+- return atomic_read(&v) == 18 ? 0 : -1;
+-}
+- ],
+- [AC_DEFINE([HAVE_ATOMIC_SUB], [1],
+- [atomic_sub() from <asm/atomic.h> (Linux only)])
+- atom_ops="${atom_ops}atomic_sub "],
+- )
+-
+- if test -z "$atom_ops"; then atom_ops="no"; fi
+- AC_MSG_RESULT($atom_ops)
+-
+- AC_LANG_RESTORE
++ MYSQL_FUNC_ATOMIC
+
+ AC_ARG_WITH(pstack,
+ [ --with-pstack Use the pstack backtrace library],
+@@ -971,13 +892,13 @@ fi
+ # Later in this script LIBS will be augmented with a threads library.
+ NON_THREADED_LIBS="$LIBS"
+
+-AC_MSG_CHECKING([for int8])
++AC_CACHE_CHECK([for int8], [mysql_cv_type_int8], [
+ case $SYSTEM_TYPE in
+ *netware)
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+-AC_TRY_RUN([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #ifdef HAVE_STDLIB_H
+ #include <stdlib.h>
+ #endif
+@@ -988,22 +909,21 @@ AC_TRY_RUN([
+
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+-#endif
+-
++#endif]], [
+ int main()
+ {
+ int8 i;
+ return 0;
+-}
+-],
+-[AC_DEFINE([HAVE_INT_8_16_32], [1],
+- [whether int8, int16 and int32 types exist])
+-AC_MSG_RESULT([yes])],
+-[AC_MSG_RESULT([no])]
+-)
++}])], [mysql_cv_type_int8=yes], [mysql_cv_type_int8=no])
+ ;;
+ esac
+
++if test x"$mysql_cv_type_int8" = "xyes"; then
++ AC_DEFINE([HAVE_INT_8_16_32], [1],
++ [whether int8, int16 and int32 types exist])
++fi
++])
++
+ #
+ # Some system specific hacks
+ #
+@@ -1814,7 +1734,7 @@ then
+ AC_MSG_ERROR("MySQL needs a long long type.")
+ fi
+ # off_t is not a builtin type
+-MYSQL_CHECK_SIZEOF(off_t, 4)
++AC_CHECK_SIZEOF(off_t, 4)
+ if test "$ac_cv_sizeof_off_t" -eq 0
+ then
+ AC_MSG_ERROR("MySQL needs a off_t type.")
+diff -aurp mysql-4.1.22.old/innobase/configure.in mysql-4.1.22/innobase/configure.in
+--- mysql-4.1.22.old/innobase/configure.in 2008-09-18 13:00:14.000000000 -0500
++++ mysql-4.1.22/innobase/configure.in 2008-09-18 12:55:39.000000000 -0500
+@@ -3,6 +3,7 @@ AC_INIT
+ AC_CANONICAL_SYSTEM
+ AM_MAINTAINER_MODE
+ AM_CONFIG_HEADER(ib_config.h)
++AC_CONFIG_AUX_DIR([..])
+ AM_INIT_AUTOMAKE(ib, 0.90)
+
+ # This is need before AC_PROG_CC
+@@ -32,7 +33,6 @@ CFLAGS="$CFLAGS "
+ CXXFLAGS="$CXXFLAGS "
+
+ AC_PROG_CC
+-AC_PROG_RANLIB
+ AC_PROG_INSTALL
+ AC_PROG_LIBTOOL
+ AC_CHECK_HEADERS(aio.h sched.h)
diff --git a/meta-oe/recipes-support/mysql/files/configure-ps-cache-check.patch b/meta-oe/recipes-support/mysql/files/configure-ps-cache-check.patch
new file mode 100644
index 0000000000..3b5b3fd063
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/files/configure-ps-cache-check.patch
@@ -0,0 +1,27 @@
+Index: mysql-4.1.22/configure.in
+===================================================================
+--- mysql-4.1.22.orig/configure.in 2009-01-28 16:33:28.000000000 +0000
++++ mysql-4.1.22/configure.in 2009-01-28 16:43:26.000000000 +0000
+@@ -471,8 +471,8 @@
+
+ # Lock for PS
+ AC_PATH_PROG(PS, ps, ps)
+-AC_MSG_CHECKING("how to check if pid exists")
+-PS=$ac_cv_path_PS
++AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC],
++[
+ # Linux style
+ if $PS p $$ 2> /dev/null | grep $0 > /dev/null
+ then
+@@ -511,8 +511,9 @@
+ AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
+ esac
+ fi
+-AC_SUBST(FIND_PROC)
+-AC_MSG_RESULT("$FIND_PROC")
++ac_cv_FIND_PROC="$FIND_PROC"
++])
++AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC])
+
+ # Check if a pid is valid
+ AC_PATH_PROG(KILL, kill, kill)
diff --git a/meta-oe/recipes-support/mysql/files/fix_host_path.patch b/meta-oe/recipes-support/mysql/files/fix_host_path.patch
new file mode 100644
index 0000000000..4f69cd5198
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/files/fix_host_path.patch
@@ -0,0 +1,37 @@
+--- mysql-4.1.22/configure.in.old 2008-09-18 20:11:15.000000000 -0500
++++ mysql-4.1.22/configure.in 2008-09-18 20:12:28.000000000 -0500
+@@ -456,9 +456,9 @@ else
+ fi
+ fi
+
+-AC_SUBST(HOSTNAME)
+-AC_SUBST(PERL)
+-AC_SUBST(PERL5)
++AC_SUBST(HOSTNAME,/bin/hostname)
++AC_SUBST(PERL,$(bindir)/perl)
++AC_SUBST(PERL5,$(bindir)/perl)
+
+ # for build ndb docs
+
+@@ -516,16 +516,17 @@ AC_MSG_RESULT("$FIND_PROC")
+
+ # Check if a pid is valid
+ AC_PATH_PROG(KILL, kill, kill)
++AC_SUBST(KILL,/bin/kill)
+ AC_MSG_CHECKING("for kill switches")
+-if $ac_cv_path_KILL -0 $$
++if $KILL -0 $$
+ then
+- CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
++ CHECK_PID="$KILL -0 \$\$PID > /dev/null 2> /dev/null"
+ elif kill -s 0 $$
+ then
+- CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
++ CHECK_PID="$KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
+ else
+ AC_MSG_WARN([kill -0 to check for pid seems to fail])
+- CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
++ CHECK_PID="$KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
+ fi
+ AC_SUBST(CHECK_PID)
+ AC_MSG_RESULT("$CHECK_PID")
diff --git a/meta-oe/recipes-support/mysql/files/my.cnf b/meta-oe/recipes-support/mysql/files/my.cnf
new file mode 100644
index 0000000000..85560ebf5c
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/files/my.cnf
@@ -0,0 +1,21 @@
+[client]
+#password = password
+port = 3306
+socket = /tmp/mysql.sock
+
+[mysqld_safe]
+err-log = /var/log/mysql.err
+
+[mysqld]
+user = mysql
+port = 3306
+socket = /tmp/mysql.sock
+pid-file = /var/lib/mysql/mysqld.pid
+log-error = /var/log/mysqld.err
+basedir = /usr
+datadir = /var/mysql
+skip-locking
+skip-innodb
+skip-networking
+bind-address = localhost
+
diff --git a/meta-oe/recipes-support/mysql/files/mysqld.sh b/meta-oe/recipes-support/mysql/files/mysqld.sh
new file mode 100644
index 0000000000..479ebdb257
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/files/mysqld.sh
@@ -0,0 +1,24 @@
+# MySQL init script
+
+. /etc/default/rcS
+
+case "$1" in
+ start)
+ /usr/bin/mysqld_safe &
+ ;;
+ stop)
+ if test -f /var/lib/mysql/mysqld.pid ; then
+ PID=`cat /var/lib/mysql/mysqld.pid`
+ kill $PID
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/mysqld {start|stop|restart}"
+ ;;
+esac
+
+exit 0
diff --git a/meta-oe/recipes-support/mysql/mysql5-native_5.1.40.bb b/meta-oe/recipes-support/mysql/mysql5-native_5.1.40.bb
new file mode 100644
index 0000000000..800178330b
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5-native_5.1.40.bb
@@ -0,0 +1,28 @@
+require mysql5_${PV}.inc
+inherit native
+PR ="r2"
+
+SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \
+ file://fix-abi-check-gcc45.patch"
+
+RDEPENDS_${PN} = ""
+PACKAGES = ""
+DEPENDS = "ncurses-native"
+EXTRA_OEMAKE = ""
+EXTRA_OECONF = " --with-embedded-server "
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+ mv -f ${D}${libdir}/mysql/* ${D}${libdir}
+ rmdir ${D}${libdir}/mysql
+
+ install -d ${D}${bindir}
+ install -m 0755 sql/gen_lex_hash ${D}${bindir}/
+}
+
+NATIVE_INSTALL_WORKS = "1"
+
+PSTAGING_DISABLED = "1"
+
+SRC_URI[md5sum] = "32e7373c16271606007374396e6742ad"
+SRC_URI[sha256sum] = "2b0737b84e7b42c9e54c9658d23bfaee1189cd5955f26b10bdb862761d0f0432"
diff --git a/meta-oe/recipes-support/mysql/mysql5/Makefile.am.patch b/meta-oe/recipes-support/mysql/mysql5/Makefile.am.patch
new file mode 100644
index 0000000000..33fd17acd4
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5/Makefile.am.patch
@@ -0,0 +1,19 @@
+Index: mysql-5.1.40/sql/Makefile.am
+===================================================================
+--- mysql-5.1.40.orig/sql/Makefile.am
++++ mysql-5.1.40/sql/Makefile.am
+@@ -174,10 +174,10 @@ link_sources:
+ # This generates lex_hash.h
+ # NOTE Built sources should depend on their sources not the tool
+ # this avoid the rebuild of the built files in a source dist
+-lex_hash.h: gen_lex_hash.cc lex.h
+- $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
+- ./gen_lex_hash$(EXEEXT) > $@-t
+- $(MV) $@-t $@
++GEN_LEX_HASH = ./gen_lex_hash$(EXEEXT)
++
++lex_hash.h: gen_lex_hash$(EXEEXT)
++ $(GEN_LEX_HASH) > $@
+
+ # For testing of udf_example.so
+ udf_example_la_SOURCES= udf_example.c
diff --git a/meta-oe/recipes-support/mysql/mysql5/configure-ps-cache-check.patch b/meta-oe/recipes-support/mysql/mysql5/configure-ps-cache-check.patch
new file mode 100644
index 0000000000..3b5b3fd063
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5/configure-ps-cache-check.patch
@@ -0,0 +1,27 @@
+Index: mysql-4.1.22/configure.in
+===================================================================
+--- mysql-4.1.22.orig/configure.in 2009-01-28 16:33:28.000000000 +0000
++++ mysql-4.1.22/configure.in 2009-01-28 16:43:26.000000000 +0000
+@@ -471,8 +471,8 @@
+
+ # Lock for PS
+ AC_PATH_PROG(PS, ps, ps)
+-AC_MSG_CHECKING("how to check if pid exists")
+-PS=$ac_cv_path_PS
++AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC],
++[
+ # Linux style
+ if $PS p $$ 2> /dev/null | grep $0 > /dev/null
+ then
+@@ -511,8 +511,9 @@
+ AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
+ esac
+ fi
+-AC_SUBST(FIND_PROC)
+-AC_MSG_RESULT("$FIND_PROC")
++ac_cv_FIND_PROC="$FIND_PROC"
++])
++AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC])
+
+ # Check if a pid is valid
+ AC_PATH_PROG(KILL, kill, kill)
diff --git a/meta-oe/recipes-support/mysql/mysql5/configure.in.patch b/meta-oe/recipes-support/mysql/mysql5/configure.in.patch
new file mode 100644
index 0000000000..3edc5f3c21
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5/configure.in.patch
@@ -0,0 +1,54 @@
+Index: mysql-5.1.40/configure.in
+===================================================================
+--- mysql-5.1.40.orig/configure.in
++++ mysql-5.1.40/configure.in
+@@ -226,8 +226,6 @@ else
+ AC_PATH_PROG(AS, as, as)
+ fi
+
+-# Still need ranlib for readline; local static use only so no libtool.
+-AC_PROG_RANLIB
+ # We use libtool
+ #AC_LIBTOOL_WIN32_DLL
+ AC_PROG_LIBTOOL
+@@ -255,39 +253,7 @@ AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL
+ AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf)
+ AC_CHECK_PROG(DVIS, tex, manual.dvi)
+
+-#check the return type of sprintf
+-AC_MSG_CHECKING("return type of sprintf")
+-AC_TRY_RUN([
+- int main()
+- {
+- char* s = "hello";
+- char buf[6];
+- if((int)sprintf(buf, s) == strlen(s))
+- return 0;
+-
+- return -1;
+- }
+- ],
+- [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
+- AC_MSG_RESULT("int")],
+- [AC_TRY_RUN([
+- int main()
+- {
+- char* s = "hello";
+- char buf[6];
+- if((char*)sprintf(buf,s) == buf + strlen(s))
+- return 0;
+- return -1;
+- } ],
+- [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf])
+- AC_MSG_RESULT("ptr")],
+- [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf])
+- AC_MSG_RESULT("garbage")]
+- )],
+- # Cross compile, assume POSIX
+- [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
+- AC_MSG_RESULT("int (we assume)")]
+-)
++MYSQL_SPRINTF_RET
+
+ AC_PATH_PROG(uname_prog, uname, no)
+
diff --git a/meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch b/meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch
new file mode 100644
index 0000000000..58812c1f1a
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch
@@ -0,0 +1,77 @@
+From: Date: July 20 2010 7:44pm
+Subject: bzr commit into mysql-5.1-bugteam branch (davi:3493) Bug#52514
+List-Archive: http://lists.mysql.com/commits/113968
+X-Bug: 52514
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="===============9147207462624717749=="
+
+--===============9147207462624717749==
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+# At a local mysql-5.1-bugteam repository of davi
+
+ 3493 Davi Arnaut 2010-07-20
+ Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5
+ due to GCC preprocessor change
+
+ The problem is that newer GCC versions treats missing headers
+ as fatal errors. The solution is to use a guard macro to prevent
+ the inclusion of system headers when checking the ABI with the
+ C Preprocessor.
+
+ Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638
+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836
+ @ Makefile.am
+ Define guard macro.
+ @ configure.in
+ Remove workaround.
+ @ include/mysql.h
+ Guard the header inclusion.
+ @ include/mysql.h.pp
+ Header is not included anymore.
+
+ modified:
+ Makefile.am
+ configure.in
+ include/mysql.h
+ include/mysql.h.pp
+=== modified file 'Makefile.am'
+Index: mysql-5.1.40/Makefile.am
+===================================================================
+--- mysql-5.1.40.orig/Makefile.am 2009-10-07 01:46:13.000000000 +0800
++++ mysql-5.1.40/Makefile.am 2010-08-17 20:07:24.843148001 +0800
+@@ -312,7 +312,7 @@
+ do_abi_check:
+ set -ex; \
+ for file in $(abi_headers); do \
+- @CC@ -E -nostdinc -dI \
++ @CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/include/mysql \
+ -I$(top_srcdir)/sql \
+Index: mysql-5.1.40/include/mysql.h
+===================================================================
+--- mysql-5.1.40.orig/include/mysql.h 2009-10-07 01:46:50.000000000 +0800
++++ mysql-5.1.40/include/mysql.h 2010-08-17 20:07:24.843148001 +0800
+@@ -44,7 +44,9 @@
+ #endif
+
+ #ifndef _global_h /* If not standard header */
++#ifndef MYSQL_ABI_CHECK
+ #include <sys/types.h>
++#endif
+ #ifdef __LCC__
+ #include <winsock2.h> /* For windows */
+ #endif
+Index: mysql-5.1.40/include/mysql.h.pp
+===================================================================
+--- mysql-5.1.40.orig/include/mysql.h.pp 2009-10-07 01:46:50.000000000 +0800
++++ mysql-5.1.40/include/mysql.h.pp 2010-08-17 20:07:24.843148001 +0800
+@@ -1,4 +1,3 @@
+-#include <sys/types.h>
+ typedef char my_bool;
+ typedef int my_socket;
+ #include "mysql_version.h"
diff --git a/meta-oe/recipes-support/mysql/mysql5/fix_host_path.patch b/meta-oe/recipes-support/mysql/mysql5/fix_host_path.patch
new file mode 100644
index 0000000000..4f69cd5198
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5/fix_host_path.patch
@@ -0,0 +1,37 @@
+--- mysql-4.1.22/configure.in.old 2008-09-18 20:11:15.000000000 -0500
++++ mysql-4.1.22/configure.in 2008-09-18 20:12:28.000000000 -0500
+@@ -456,9 +456,9 @@ else
+ fi
+ fi
+
+-AC_SUBST(HOSTNAME)
+-AC_SUBST(PERL)
+-AC_SUBST(PERL5)
++AC_SUBST(HOSTNAME,/bin/hostname)
++AC_SUBST(PERL,$(bindir)/perl)
++AC_SUBST(PERL5,$(bindir)/perl)
+
+ # for build ndb docs
+
+@@ -516,16 +516,17 @@ AC_MSG_RESULT("$FIND_PROC")
+
+ # Check if a pid is valid
+ AC_PATH_PROG(KILL, kill, kill)
++AC_SUBST(KILL,/bin/kill)
+ AC_MSG_CHECKING("for kill switches")
+-if $ac_cv_path_KILL -0 $$
++if $KILL -0 $$
+ then
+- CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
++ CHECK_PID="$KILL -0 \$\$PID > /dev/null 2> /dev/null"
+ elif kill -s 0 $$
+ then
+- CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
++ CHECK_PID="$KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
+ else
+ AC_MSG_WARN([kill -0 to check for pid seems to fail])
+- CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
++ CHECK_PID="$KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
+ fi
+ AC_SUBST(CHECK_PID)
+ AC_MSG_RESULT("$CHECK_PID")
diff --git a/meta-oe/recipes-support/mysql/mysql5/misc.m4.patch b/meta-oe/recipes-support/mysql/mysql5/misc.m4.patch
new file mode 100644
index 0000000000..7b0acff21c
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5/misc.m4.patch
@@ -0,0 +1,13 @@
+Index: mysql-5.1.40/config/ac-macros/misc.m4
+===================================================================
+--- mysql-5.1.40.orig/config/ac-macros/misc.m4
++++ mysql-5.1.40/config/ac-macros/misc.m4
+@@ -476,7 +476,7 @@ AC_DEFUN([MYSQL_STACK_DIRECTION],
+ {
+ exit (find_stack_direction() < 0);
+ }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
+- ac_cv_c_stack_direction=)])
++ ac_cv_c_stack_direction=0)])
+ AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
+ ])dnl
+
diff --git a/meta-oe/recipes-support/mysql/mysql5/my.cnf b/meta-oe/recipes-support/mysql/mysql5/my.cnf
new file mode 100644
index 0000000000..7f557e4250
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5/my.cnf
@@ -0,0 +1,21 @@
+[client]
+#password = password
+port = 3306
+socket = /tmp/mysql.sock
+
+[mysqld_safe]
+err-log = /var/log/mysql.err
+
+[mysqld]
+user = mysql
+port = 3306
+socket = /tmp/mysql.sock
+pid-file = /var/lib/mysql/mysqld.pid
+log-error = /var/log/mysqld.err
+basedir = /usr
+datadir = /var/mysql
+skip-locking
+loose-skip-innodb
+skip-networking
+bind-address = localhost
+
diff --git a/meta-oe/recipes-support/mysql/mysql5/mysqld.sh b/meta-oe/recipes-support/mysql/mysql5/mysqld.sh
new file mode 100644
index 0000000000..479ebdb257
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5/mysqld.sh
@@ -0,0 +1,24 @@
+# MySQL init script
+
+. /etc/default/rcS
+
+case "$1" in
+ start)
+ /usr/bin/mysqld_safe &
+ ;;
+ stop)
+ if test -f /var/lib/mysql/mysqld.pid ; then
+ PID=`cat /var/lib/mysql/mysqld.pid`
+ kill $PID
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/mysqld {start|stop|restart}"
+ ;;
+esac
+
+exit 0
diff --git a/meta-oe/recipes-support/mysql/mysql5/plug.in.patch b/meta-oe/recipes-support/mysql/mysql5/plug.in.patch
new file mode 100644
index 0000000000..70c39fa7a3
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5/plug.in.patch
@@ -0,0 +1,40 @@
+Index: mysql-5.1.40/storage/innodb_plugin/plug.in
+===================================================================
+--- mysql-5.1.40.orig/storage/innodb_plugin/plug.in
++++ mysql-5.1.40/storage/innodb_plugin/plug.in
+@@ -63,35 +63,6 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [
+ ;;
+ esac
+ AC_SUBST(INNODB_DYNAMIC_CFLAGS)
+- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
+- AC_TRY_RUN(
+- [
+- #include <pthread.h>
+- #include <string.h>
+-
+- int main(int argc, char** argv) {
+- pthread_t x1;
+- pthread_t x2;
+- pthread_t x3;
+-
+- memset(&x1, 0x0, sizeof(x1));
+- memset(&x2, 0x0, sizeof(x2));
+- memset(&x3, 0x0, sizeof(x3));
+-
+- __sync_bool_compare_and_swap(&x1, x2, x3);
+-
+- return(0);
+- }
+- ],
+- [
+- AC_DEFINE([HAVE_ATOMIC_PTHREAD_T], [1],
+- [pthread_t can be used by GCC atomic builtins])
+- AC_MSG_RESULT(yes)
+- ],
+- [
+- AC_MSG_RESULT(no)
+- ]
+- )
+
+ # Try using solaris atomics on SunOS if GCC atomics are not available
+ AC_CHECK_DECLS(
diff --git a/meta-oe/recipes-support/mysql/mysql5_5.1.40.bb b/meta-oe/recipes-support/mysql/mysql5_5.1.40.bb
new file mode 100644
index 0000000000..5229312dce
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5_5.1.40.bb
@@ -0,0 +1,6 @@
+require ${PN}_${PV}.inc
+
+DEPENDS += mysql5-native
+
+SRC_URI[md5sum] = "32e7373c16271606007374396e6742ad"
+SRC_URI[sha256sum] = "2b0737b84e7b42c9e54c9658d23bfaee1189cd5955f26b10bdb862761d0f0432"
diff --git a/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc b/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
new file mode 100644
index 0000000000..348f4e38d2
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
@@ -0,0 +1,172 @@
+DESCRIPTION = "The MySQL Open Source Database System"
+HOMEPAGE = "http://www.mysql.com/"
+SECTION = "libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=477ab0a4c8ca64b482b3f2a365d0fdfa"
+
+DEPENDS = "ncurses"
+PR = "r5"
+
+SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \
+ file://configure.in.patch \
+ file://plug.in.patch \
+ file://misc.m4.patch \
+ file://Makefile.am.patch \
+ file://fix_host_path.patch \
+ file://configure-ps-cache-check.patch \
+ file://fix-abi-check-gcc45.patch \
+ file://my.cnf \
+ file://mysqld.sh"
+
+S = "${WORKDIR}/mysql-${PV}"
+
+BINCONFIG_GLOB = "mysql_config"
+
+inherit autotools binconfig update-rc.d
+
+INITSCRIPT_PACKAGES = "${PN}-server"
+INITSCRIPT_NAME = "mysqld"
+INITSCRIPT_PARAMS = "start 45 S . stop 45 0 6 1 ."
+
+export ac_cv_path_PS=/bin/ps
+export ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null"
+PARALLEL_MAKE = " "
+EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'"
+EXTRA_OECONF = " --with-atomic-ops=up --with-embedded-server --prefix=/usr --sysconfdir=/etc/mysql --localstatedir=/var/mysql --disable-dependency-tracking --without-raid --without-debug --with-low-memory --without-query-cache --without-man --without-docs --without-innodb "
+
+do_configure_append() {
+ sed -i /comp_err/d ${S}/sql/share/Makefile
+}
+
+SYSROOT_PREPROCESS_FUNCS += "mysql5_sysroot_preprocess"
+
+# We need to append this so it runs *after* binconfig's preprocess function
+mysql5_sysroot_preprocess () {
+ sed -i -es,^pkgincludedir=\'/usr/include/mysql\',pkgincludedir=\'${STAGING_INCDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config
+ sed -i -es,^pkglibdir=\'/usr/lib/mysql\',pkglibdir=\'${STAGING_LIBDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+ mv -f ${D}${libdir}/mysql/* ${D}${libdir}
+ rmdir ${D}${libdir}/mysql
+
+ install -d ${D}/etc/init.d
+ install -m 0644 ${WORKDIR}/my.cnf ${D}/etc/
+ install -m 0755 ${WORKDIR}/mysqld.sh ${D}/etc/init.d/mysqld
+}
+
+pkg_postinst_mysql5-server () {
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+
+ grep mysql /etc/passwd || adduser --disabled-password --home=/var/mysql --ingroup nogroup mysql
+
+ #Install the database
+ test -d /usr/bin || mkdir -p /usr/bin
+ test -e /usr/bin/hostname || ln -s /bin/hostname /usr/bin/hostname
+ mkdir /var/lib/mysql
+ chown mysql.nogroup /var/lib/mysql
+
+ mysql_install_db
+
+}
+
+pkg_postrm_mysql5-server () {
+ grep mysql /etc/passwd && deluser mysql
+}
+
+PACKAGES = "${PN}-dbg ${PN} \
+libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-dbg \
+libmysqlclient libmysqlclient-dev libmysqlclient-dbg \
+${PN}-client ${PN}-server ${PN}-leftovers"
+CONFFILES_${PN}-server += "${sysconfdir}/my.cnf"
+
+FILES_${PN} = " "
+RDEPENDS_${PN} = "${PN}-client ${PN}-server"
+ALLOW_EMPTY_${PN} = "1"
+
+FILES_libmysqlclient = "${libdir}/libmysqlclient.so.*"
+FILES_libmysqlclient-dev = " \
+${includedir}/mysql/ \
+${libdir}/lib* \
+${libdir}/plugin/* \
+${sysconfdir}/aclocal \
+${bindir}/mysql_config"
+FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \
+/usr/mysql-test/lib/My/SafeProcess/.debug/my_safe_process"
+
+FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*"
+FILES_libmysqlclient-r-dev = "${libdir}/libmysqlclient_r.*"
+FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*"
+
+FILES_${PN}-client = "\
+${bindir}/myisam_ftdump \
+${bindir}/mysql \
+${bindir}/mysql_client_test \
+${bindir}/mysql_client_test_embedded \
+${bindir}/mysql_find_rows \
+${bindir}/mysql_fix_extensions \
+${bindir}/mysql_waitpid \
+${bindir}/mysqlaccess \
+${bindir}/mysqladmin \
+${bindir}/mysqlbug \
+${bindir}/mysqlcheck \
+${bindir}/mysqldump \
+${bindir}/mysqldumpslow \
+${bindir}/mysqlimport \
+${bindir}/mysqlshow \
+${bindir}/mysqlslap \
+${bindir}/mysqltest_embedded \
+${libexecdir}/mysqlmanager"
+
+FILES_${PN}-server = "\
+${bindir}/comp_err \
+${bindir}/isamchk \
+${bindir}/isamlog \
+${bindir}/msql2mysql \
+${bindir}/my_print_defaults \
+${bindir}/myisamchk \
+${bindir}/myisamlog \
+${bindir}/myisampack \
+${bindir}/mysql_convert_table_format \
+${bindir}/mysql_fix_privilege_tables \
+${bindir}/mysql_install_db \
+${bindir}/mysql_secure_installation \
+${bindir}/mysql_setpermission \
+${bindir}/mysql_tzinfo_to_sql \
+${bindir}/mysql_upgrade \
+${bindir}/mysql_zap \
+${bindir}/mysqlbinlog \
+${bindir}/mysqld_multi \
+${bindir}/mysqld_safe \
+${bindir}/mysqlhotcopy \
+${bindir}/mysqltest \
+${bindir}/ndb_delete_all \
+${bindir}/ndb_desc \
+${bindir}/ndb_drop_index \
+${bindir}/ndb_drop_table \
+${bindir}/ndb_mgm \
+${bindir}/ndb_restore \
+${bindir}/ndb_select_all \
+${bindir}/ndb_select_count \
+${bindir}/ndb_show_tables \
+${bindir}/ndb_waiter \
+${bindir}/pack_isam \
+${bindir}/perror \
+${bindir}/replace \
+${bindir}/resolve_stack_dump \
+${bindir}/resolveip \
+${libexecdir}/mysqld \
+${sbindir}/mysqld \
+${sbindir}/ndb_cpcd \
+${sbindir}/ndbd \
+${sbindir}/ndb_mgmd \
+${datadir}/mysql/ \
+${localstatedir}/mysql/ \
+${sysconfdir}/init.d \
+${sysconfdir}/my.cnf"
+
+DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}"
+FILES_${PN}-leftovers = "/"
diff --git a/meta-oe/recipes-support/ntp/files/hipox/ntp.conf b/meta-oe/recipes-support/ntp/files/hipox/ntp.conf
new file mode 100644
index 0000000000..57e585c175
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/files/hipox/ntp.conf
@@ -0,0 +1,13 @@
+# This is the most basic ntp configuration file
+# The driftfile must remain in a place specific to this
+# machine - it records the machine specific clock error
+driftfile /etc/ntp.drift
+# This obtains a random server which will be close
+# (in IP terms) to the machine. Add other servers
+# as required, or change this.
+#server pool.ntp.org
+# Using local hardware clock as fallback
+server 127.127.1.0
+fudge 127.127.1.0 stratum 14
+# Defining a default security setting
+restrict default nomodify nopeer
diff --git a/meta-oe/recipes-support/ntp/files/hipox/ntpd b/meta-oe/recipes-support/ntp/files/hipox/ntpd
new file mode 100755
index 0000000000..7d2cd34cdf
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/files/hipox/ntpd
@@ -0,0 +1,62 @@
+#! /bin/sh
+#
+# ntpd init.d script for ntpdc from ntp.isc.org
+test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0
+# rcS contains TICKADJ
+test -r /etc/default/rcS && . /etc/default/rcS
+
+# Functions to do individual actions
+settick(){
+ # If TICKADJ is set we *must* adjust it before we start, because the
+ # driftfile relies on the correct setting
+ test -n "$TICKADJ" -a -x /usr/bin/tickadj && {
+ echo -n "Setting tick to $TICKADJ: "
+ /usr/bin/tickadj "$TICKADJ"
+ echo "done"
+ }
+}
+startdaemon(){
+ # The -g option allows ntpd to step the time to correct it just
+ # once. The daemon will exit if the clock drifts too much after
+ # this. If ntpd seems to disappear after a while assume TICKADJ
+ # above is set to a totally incorrect value.
+ echo -n "Starting ntpd: "
+ start-stop-daemon --start -x /usr/bin/ntpd -- -p /var/run/ntp.pid "$@"
+ echo "done"
+}
+stopdaemon(){
+ echo -n "Stopping ntpd: "
+ start-stop-daemon --stop -p /var/run/ntp.pid
+ echo "done"
+}
+
+case "$1" in
+ start)
+ settick
+ startdaemon -g -x
+ ;;
+ stop)
+ stopdaemon
+ ;;
+ force-reload)
+ stopdaemon
+ settick
+ startdaemon -g -x
+ ;;
+ restart)
+ # Don't reset the tick here
+ stopdaemon
+ startdaemon -g -x
+ ;;
+ reload)
+ # Must do this by hand, but don't do -g
+ stopdaemon
+ startdaemon -x
+ ;;
+ *)
+ echo "Usage: ntpd { start | stop | restart | reload }" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-oe/recipes-support/ntp/files/ntp b/meta-oe/recipes-support/ntp/files/ntp
new file mode 100755
index 0000000000..e91a52869a
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/files/ntp
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+FLAGS="defaults 23"
+
+test -f /usr/bin/ntpd || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting NTP server: ntpd"
+ start-stop-daemon --start --quiet --exec /usr/bin/ntpd
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping NTP server: ntpd"
+ start-stop-daemon --stop --quiet --exec /usr/bin/ntpd
+ echo "."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting NTP server: ntpd... "
+ start-stop-daemon --stop --quiet --exec /usr/bin/ntpd
+ sleep 2
+ start-stop-daemon --start --quiet --exec /usr/bin/ntpd
+ echo "done."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/ntp {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-oe/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch b/meta-oe/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch
new file mode 100644
index 0000000000..cb1e2f7341
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch
@@ -0,0 +1,17 @@
+--- a/include/ntp_syscall.h.orig 2009-05-19 16:44:55.048156467 -0400
++++ b/include/ntp_syscall.h 2009-05-19 16:46:19.293323686 -0400
+@@ -14,6 +14,14 @@
+ # include <sys/timex.h>
+ #endif
+
++#if defined(ADJ_NANO) && !defined(MOD_NANO)
++#define MOD_NANO ADJ_NANO
++#endif
++
++#if defined(ADJ_TAI) && !defined(MOD_TAI)
++#define MOD_TAI ADJ_TAI
++#endif
++
+ #ifndef NTP_SYSCALLS_LIBC
+ #ifdef NTP_SYSCALLS_STD
+ # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t))
diff --git a/meta-oe/recipes-support/ntp/files/ntp.conf b/meta-oe/recipes-support/ntp/files/ntp.conf
new file mode 100644
index 0000000000..02a44b0d01
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/files/ntp.conf
@@ -0,0 +1,13 @@
+# This is the most basic ntp configuration file
+# The driftfile must remain in a place specific to this
+# machine - it records the machine specific clock error
+driftfile /etc/ntp.drift
+# This obtains a random server which will be close
+# (in IP terms) to the machine. Add other servers
+# as required, or change this.
+server pool.ntp.org
+# Using local hardware clock as fallback
+server 127.127.1.0
+fudge 127.127.1.0 stratum 14
+# Defining a default security setting
+restrict default nomodify nopeer
diff --git a/meta-oe/recipes-support/ntp/files/ntpd b/meta-oe/recipes-support/ntp/files/ntpd
new file mode 100755
index 0000000000..ae50f135d0
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/files/ntpd
@@ -0,0 +1,62 @@
+#! /bin/sh
+#
+# ntpd init.d script for ntpdc from ntp.isc.org
+test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0
+# rcS contains TICKADJ
+test -r /etc/default/rcS && . /etc/default/rcS
+
+# Functions to do individual actions
+settick(){
+ # If TICKADJ is set we *must* adjust it before we start, because the
+ # driftfile relies on the correct setting
+ test -n "$TICKADJ" -a -x /usr/bin/tickadj && {
+ echo -n "Setting tick to $TICKADJ: "
+ /usr/bin/tickadj "$TICKADJ"
+ echo "done"
+ }
+}
+startdaemon(){
+ # The -g option allows ntpd to step the time to correct it just
+ # once. The daemon will exit if the clock drifts too much after
+ # this. If ntpd seems to disappear after a while assume TICKADJ
+ # above is set to a totally incorrect value.
+ echo -n "Starting ntpd: "
+ start-stop-daemon --start -x /usr/bin/ntpd -- -p /var/run/ntp.pid "$@"
+ echo "done"
+}
+stopdaemon(){
+ echo -n "Stopping ntpd: "
+ start-stop-daemon --stop -p /var/run/ntp.pid
+ echo "done"
+}
+
+case "$1" in
+ start)
+ settick
+ startdaemon -g
+ ;;
+ stop)
+ stopdaemon
+ ;;
+ force-reload)
+ stopdaemon
+ settick
+ startdaemon -g
+ ;;
+ restart)
+ # Don't reset the tick here
+ stopdaemon
+ startdaemon -g
+ ;;
+ reload)
+ # Must do this by hand, but don't do -g
+ stopdaemon
+ startdaemon
+ ;;
+ *)
+ echo "Usage: ntpd { start | stop | restart | reload }" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-oe/recipes-support/ntp/files/ntpdate b/meta-oe/recipes-support/ntp/files/ntpdate
new file mode 100755
index 0000000000..784b029ad5
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/files/ntpdate
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/bin
+
+test -x /usr/bin/ntpdate || exit 0
+
+if test -f /etc/default/ntpdate ; then
+. /etc/default/ntpdate
+else
+NTPSERVERS="pool.ntp.org"
+fi
+
+test -n "$NTPSERVERS" || exit 0
+
+# This is a heuristic: The idea is that if a static interface is brought
+# up, that is a major event, and we can put in some extra effort to fix
+# the system time. Feel free to change this, especially if you regularly
+# bring up new network interfaces.
+if [ "$METHOD" = static ]; then
+ OPTS="-b"
+fi
+
+if [ "$METHOD" = loopback ]; then
+ exit 0
+fi
+
+(
+
+LOCKFILE=/var/lock/ntpdate
+
+# Avoid running more than one at a time
+if [ -x /usr/bin/lockfile-create ]; then
+ lockfile-create $LOCKFILE
+ lockfile-touch $LOCKFILE &
+ LOCKTOUCHPID="$!"
+fi
+
+if /usr/bin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then
+ if [ "$UPDATE_HWCLOCK" = "yes" ]; then
+ hwclock --systohc || :
+ fi
+fi
+
+if [ -x /usr/bin/lockfile-create ] ; then
+ kill $LOCKTOUCHPID
+ lockfile-remove $LOCKFILE
+fi
+
+) &
diff --git a/meta-oe/recipes-support/ntp/files/tickadj.c.patch b/meta-oe/recipes-support/ntp/files/tickadj.c.patch
new file mode 100644
index 0000000000..9ef9de9e1f
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/files/tickadj.c.patch
@@ -0,0 +1,32 @@
+Index: ntp-4.2.2p3-r0/ntp-4.2.2p3/util/tickadj.c
+===================================================================
+--- ntp-4.2.2p3/util/tickadj.c 2004-02-25 06:58:33.000000000 +0100
++++ ntp-4.2.2p3/util/tickadj.c 2007-07-07 01:00:54.000000000 +0200
+@@ -21,7 +21,8 @@
+ # include <unistd.h>
+ #endif /* HAVE_UNISTD_H */
+
+-#ifdef HAVE___ADJTIMEX /* Linux */
++/* proper handling here has been moved to upstream ntp bugzilla */
++#ifdef linux
+
+ #include <sys/timex.h>
+ struct timex txc;
+@@ -91,7 +92,7 @@
+ }
+
+ if (!errflg) {
+- if (__adjtimex(&txc) < 0)
++ if (adjtimex(&txc) < 0)
+ perror("adjtimex");
+ else if (!quiet)
+ printf("tick = %ld\ntick_adj = %d\n",
+@@ -146,7 +147,7 @@
+ #endif
+ }
+
+- if (__adjtimex(&txc) < 0)
++ if (adjtimex(&txc) < 0)
+ {
+ perror("adjtimex");
+ }
diff --git a/meta-oe/recipes-support/ntp/ntp-ssl_4.2.6p3.bb b/meta-oe/recipes-support/ntp/ntp-ssl_4.2.6p3.bb
new file mode 100644
index 0000000000..a158990792
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/ntp-ssl_4.2.6p3.bb
@@ -0,0 +1,11 @@
+require ntp_${PV}.bb
+DEPENDS = "openssl"
+
+S = "${WORKDIR}/ntp-${PV}"
+
+EXTRA_OECONF = "--with-openssl-libdir=${STAGING_LIBDIR} \
+ --with-openssl-incdir=${STAGING_INCDIR}/openssl"
+
+
+SRC_URI[md5sum] = "98e16c7aa4ecd4c004b51bff18962e95"
+SRC_URI[sha256sum] = "9f4a5271a285d390c9225e3ea28f70049ea377d30fc6de4659007cfff278671a"
diff --git a/meta-oe/recipes-support/ntp/ntp.inc b/meta-oe/recipes-support/ntp/ntp.inc
new file mode 100644
index 0000000000..c72e40e79c
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/ntp.inc
@@ -0,0 +1,33 @@
+DESCRIPTION = "The Network Time Protocol (NTP) is used to \
+synchronize the time of a computer client or server to \
+another server or reference time source, such as a radio \
+or satellite receiver or modem."
+HOMEPAGE = "http://ntp.isc.org/bin/view/Main/WebHome"
+SECTION = "console/network"
+PRIORITY = "optional"
+LICENSE = "ntp"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670"
+RSUGGESTS_${PN} = "iana-etc"
+
+SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
+ file://ipv6only-workaround.patch \
+ file://ntpd \
+ file://ntp.conf \
+ file://ntpdate"
+
+inherit autotools update-rc.d
+
+INITSCRIPT_NAME = "ntpd"
+# No dependencies, so just go in at the standard level (20)
+INITSCRIPT_PARAMS = "defaults"
+
+# The ac_cv_header_readline_history is to stop ntpdc depending on either
+# readline or curses
+EXTRA_OECONF = "--without-openssl --without-crypto ac_cv_header_readline_history_h=no"
+CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
+
+PACKAGES += "ntpdate ${PN}-bin ${PN}-tickadj ${PN}-utils"
+# NOTE: you don't need ntpdate, use "ntpdc -q -g -x"
+
+# This should use rc.update
+FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/init.d/ntpdate"
diff --git a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb
new file mode 100644
index 0000000000..f64f6f6d92
--- /dev/null
+++ b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb
@@ -0,0 +1,46 @@
+require ntp.inc
+
+PR = "r1"
+
+SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
+ file://tickadj.c.patch \
+ file://ntp-4.2.4_p6-nano.patch \
+ file://ntpd \
+ file://ntp.conf \
+ file://ntpdate"
+
+SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2"
+SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e"
+
+EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd"
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir}
+ install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d
+ install -d ${D}/${sysconfdir}/network/if-up.d
+ install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d
+}
+
+FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace"
+FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd"
+FILES_${PN}-tickadj = "${bindir}/tickadj"
+FILES_ntp-utils = "${bindir}/*"
+FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate"
+
+# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
+# with wonky clocks (e.g. OpenSlug)
+RDEPENDS_${PN} = "${PN}-tickadj"
+
+pkg_postinst_ntpdate() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ if ! grep -q -s ntpdate /var/spool/cron/root; then
+ echo "adding crontab"
+ test -d /var/spool/cron || mkdir -p /var/spool/cron
+ echo "30 * * * * /usr/bin/ntpdate -b -s -u pool.ntp.org" >> /var/spool/cron/root
+ fi
+fi
+}
+
diff --git a/meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch b/meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch
new file mode 100644
index 0000000000..c0f28f4258
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch
@@ -0,0 +1,12 @@
+diff --git a/src/interfaces/ecpg/Makefile b/src/interfaces/ecpg/Makefile
+index dcd578f..1428423 100644
+--- a/src/interfaces/ecpg/Makefile
++++ b/src/interfaces/ecpg/Makefile
+@@ -8,7 +8,6 @@ all install installdirs uninstall dep depend distprep:
+ $(MAKE) -C ecpglib $@
+ $(MAKE) -C compatlib $@
+ $(MAKE) -C preproc $@
+- $(MAKE) -C test $@
+
+ clean distclean maintainer-clean:
+ -$(MAKE) -C include $@
diff --git a/meta-oe/recipes-support/postgresql/postgresql-8.4.4/remove.autoconf.version.check.patch b/meta-oe/recipes-support/postgresql/postgresql-8.4.4/remove.autoconf.version.check.patch
new file mode 100644
index 0000000000..d027061d89
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/postgresql-8.4.4/remove.autoconf.version.check.patch
@@ -0,0 +1,15 @@
+Index: postgresql-8.4.4/configure.in
+===================================================================
+--- postgresql-8.4.4.orig/configure.in
++++ postgresql-8.4.4/configure.in
+@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch un
+
+ AC_INIT([PostgreSQL], [8.4.4], [pgsql-bugs@postgresql.org])
+
+-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.61], [], [m4_fatal([Autoconf version 2.61 is required.
+-Untested combinations of 'autoconf' and PostgreSQL versions are not
+-recommended. You can remove the check from 'configure.in' but it is then
+-your responsibility whether the result works or not.])])
+ AC_COPYRIGHT([Copyright (c) 1996-2009, PostgreSQL Global Development Group])
+ AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
+ AC_CONFIG_AUX_DIR(config)
diff --git a/meta-oe/recipes-support/postgresql/postgresql.inc b/meta-oe/recipes-support/postgresql/postgresql.inc
new file mode 100644
index 0000000000..edad3bcc5b
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/postgresql.inc
@@ -0,0 +1,66 @@
+DESCRIPTION = "PostgreSQL is a powerful, open source relational database system."
+HOMEPAGE = "http://www.postgresql.com"
+LICENSE = "BSD"
+
+DEPENDS = "zlib readline tzcode-native"
+
+ARM_INSTRUCTION_SET = "arm"
+
+#WARNING: this recipe assumes you have the timezone compiler present in /usr/sbin/zic
+
+SRC_URI = "ftp://ftp-archives.postgresql.org/pub/source/v${PV}/${P}.tar.bz2"
+
+LEAD_SONAME = "libpq.so"
+
+# LDFLAGS for shared libraries
+export LDFLAGS_SL = "${LDFLAGS}"
+
+inherit autotools pkgconfig
+
+do_compile_append() {
+ cp /usr/sbin/zic ${S}/src/timezone/
+}
+
+PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \
+ libecpg-compat-dbg libecpg-compat \
+ libecpg-dbg libecpg libecpg-dev \
+ libpq-dbg libpq libpq-dev \
+ libpgtypes-dbg libpgtypes "
+
+FILES_${PN}-client = "${bindir}/clusterdb \
+ ${bindir}/createdb \
+ ${bindir}/createlang \
+ ${bindir}/createuser \
+ ${bindir}/dropdb \
+ ${bindir}/droplang \
+ ${bindir}/dropuser \
+ ${bindir}/pg_dump \
+ ${bindir}/pg_dumpall \
+ ${bindir}/pg_restore \
+ ${bindir}/psql \
+ ${bindir}/reindexdb \
+ ${bindir}/vacuumdb \
+ ${bindir}/vacuumlo \
+ ${datadir}/${PN}/psqlrc.sample"
+
+FILES_${PN}-doc += "${prefix}/doc/"
+FILES_${PN}-timezone = "${datadir}/${PN}/timezone"
+FILES_${PN}-server-dev = "${includedir}/${PN}/server"
+
+FILES_libecpg = "${libdir}/libecpg*.so.*"
+FILES_libecpg-dbg = "${libdir}/.debug/libecpg*"
+FILES_libecpg-dev = "${libdir}/libecpg*.a ${libdir}/libecpg*.so \
+ ${libdir}/libpgtypes*.a ${libdir}/libpgtypes*.so \
+ ${includedir}/ecpg*.h ${includedir}/${PN}/ecpg*.h \
+ ${includedir}/pgtypes*.h ${includedir}/${PN}/informix \
+ ${includedir}/sql3types.h ${includedir}/sqlca.h"
+
+FILES_libpq = "${libdir}/libpq*.so.*"
+FILES_libpq-dbg = "${libdir}/.debug/libpq* ${libdir}/${PN}/pgxs/src/test/regress/.debug/*"
+FILES_libpq-dev = "${libdir}/libpq*.a ${libdir}/libpq*.so ${libdir}/libpgport.a \
+ ${includedir}"
+
+FILES_libecpg-compat = "${libdir}/libecpg_compat*.so.*"
+FILES_libecpg-compat-dbg = "${libdir}/.debug/libecpg_compat*"
+FILES_libpgtypes = "${libdir}/libpgtypes*.so.*"
+FILES_libpgtypes-dbg = "${libdir}/.debug/libpgtypes*"
diff --git a/meta-oe/recipes-support/postgresql/postgresql_8.4.4.bb b/meta-oe/recipes-support/postgresql/postgresql_8.4.4.bb
new file mode 100644
index 0000000000..d0f5078498
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/postgresql_8.4.4.bb
@@ -0,0 +1,11 @@
+require postgresql.inc
+
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=29b81b066680be9ffd98cb9d2afb9de6"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "ftp://ftp.postgresql.org/pub/source/v${PV}/${P}.tar.bz2 \
+ file://remove.autoconf.version.check.patch"
+
+SRC_URI[md5sum] = "4bf2448ad965bca3940df648c02194df"
+SRC_URI[sha256sum] = "e66b398d565f7fb16d8ae58ae72881dcd3dbb1b88f532bbe1c2d1284812be37e"
diff --git a/meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch b/meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch
new file mode 100644
index 0000000000..914422f1df
--- /dev/null
+++ b/meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch
@@ -0,0 +1,32 @@
+diff -urN sqlite-2.8.17.orig/main.mk sqlite-2.8.17/main.mk
+--- sqlite-2.8.17.orig/main.mk 2005-04-23 22:43:23.000000000 +0000
++++ sqlite-2.8.17/main.mk 2009-04-02 20:10:36.000000000 +0000
+@@ -139,7 +139,7 @@
+ # This is the default Makefile target. The objects listed here
+ # are what get build when you type just "make" with no arguments.
+ #
+-all: sqlite.h config.h libsqlite.a sqlite$(EXE)
++all: sqlite.h config.h libsqlite.so sqlite$(EXE)
+
+ # Generate the file "last_change" which contains the date of change
+ # of the most recently modified source code file
+@@ -148,13 +148,12 @@
+ cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \
+ | awk '{print $$5,$$6}' >last_change
+
+-libsqlite.a: $(LIBOBJ)
+- $(AR) libsqlite.a $(LIBOBJ)
+- $(RANLIB) libsqlite.a
+-
+-sqlite$(EXE): $(TOP)/src/shell.c libsqlite.a sqlite.h
+- $(TCCX) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \
+- libsqlite.a $(LIBREADLINE) $(THREADLIB)
++libsqlite.so: $(LIBOBJ)
++ $(CC) $(LDFLAGS) -shared -o libsqlite.so -Wl,-soname,libsqlite.so.0 $(LIBOBJ)
++
++sqlite$(EXE): $(TOP)/src/shell.c libsqlite.so sqlite.h
++ $(TCCX) $(LDFLAGS) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \
++ -lsqlite $(LIBREADLINE) $(THREADLIB)
+
+ sqlite_analyzer$(EXE): $(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC) \
+ $(TOP)/tool/spaceanal.tcl
diff --git a/meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch b/meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch
new file mode 100644
index 0000000000..b84b6486ef
--- /dev/null
+++ b/meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch
@@ -0,0 +1,20 @@
+diff -bur sqlite-2.8.17~orig/main.mk sqlite-2.8.17/main.mk
+--- sqlite-2.8.17~orig/main.mk 2006-02-13 04:09:33.000000000 -0600
++++ sqlite-2.8.17/main.mk 2006-02-13 04:15:42.000000000 -0600
+@@ -58,7 +58,7 @@
+ expr.o func.o hash.o insert.o \
+ main.o opcodes.o os.o pager.o parse.o pragma.o printf.o random.o \
+ select.o table.o tokenize.o trigger.o update.o util.o \
+- vacuum.o vdbe.o vdbeaux.o where.o tclsqlite.o
++ vacuum.o vdbe.o vdbeaux.o where.o
+
+ # All of the source code files.
+ #
+@@ -91,7 +91,6 @@
+ $(TOP)/src/sqlite.h.in \
+ $(TOP)/src/sqliteInt.h \
+ $(TOP)/src/table.c \
+- $(TOP)/src/tclsqlite.c \
+ $(TOP)/src/tokenize.c \
+ $(TOP)/src/trigger.c \
+ $(TOP)/src/update.c \
diff --git a/meta-oe/recipes-support/sqlite/sqlite-2.8.17/sqlite.pc b/meta-oe/recipes-support/sqlite/sqlite-2.8.17/sqlite.pc
new file mode 100644
index 0000000000..6bc742eecb
--- /dev/null
+++ b/meta-oe/recipes-support/sqlite/sqlite-2.8.17/sqlite.pc
@@ -0,0 +1,12 @@
+# Package Information for pkg-config
+
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: SQLite
+Description: SQL database engine
+Version: 2.8.17
+Libs: -L${libdir} -lsqlite
+Cflags: -I${includedir}
diff --git a/meta-oe/recipes-support/sqlite/sqlite_2.8.17.bb b/meta-oe/recipes-support/sqlite/sqlite_2.8.17.bb
new file mode 100644
index 0000000000..75678f6292
--- /dev/null
+++ b/meta-oe/recipes-support/sqlite/sqlite_2.8.17.bb
@@ -0,0 +1,60 @@
+DESCRIPTION = "An Embeddable SQL Database Engine"
+HOMEPAGE = "http://www.sqlite.org/"
+SECTION = "libs"
+PRIORITY = "optional"
+DEPENDS = "readline ncurses"
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=10;md5=e98469a8efa024a38ad5b2e4b92f4a96"
+
+PR = "r7"
+
+SRC_URI = "http://www.hwaci.com/sw/sqlite/sqlite-${PV}.tar.gz \
+ file://mainmk_build_dynamic.patch \
+ file://mainmk_no_tcl.patch \
+ file://sqlite.pc"
+
+SOURCES = "attach.o auth.o btree.o btree_rb.o build.o copy.o date.o delete.o \
+ expr.o func.o hash.o insert.o main.o opcodes.o os.o pager.o \
+ parse.o pragma.o printf.o random.o select.o table.o tokenize.o \
+ trigger.o update.o util.o vacuum.o vdbe.o vdbeaux.o where.o"
+
+inherit autotools pkgconfig
+
+do_configure() {
+ echo "main.mk is patched, no need to configure"
+ # make pkgconfig.bbclass pick this up
+ mv ${WORKDIR}/sqlite.pc ${S}
+}
+
+do_compile() {
+ oe_runmake -f Makefile.linux-gcc \
+ TOP="${S}" \
+ BCC="${BUILD_CC}" \
+ TCC="${CC}" \
+ OPTS="-fPIC -D'INTPTR_TYPE=int'" \
+ TCL_FLAGS= LIBTCL= \
+ READLINE_FLAGS="-DHAVE_READLINE=1 -I${STAGING_INCDIR}" \
+ LIBREADLINE="-L. -L${STAGING_LIBDIR} -lreadline -lncurses"
+}
+
+do_install() {
+ install -d ${D}${libdir} ${D}${bindir}
+ install sqlite ${D}${bindir}
+ install -m 0755 libsqlite.so ${D}${libdir}/libsqlite.so.0.8.6
+ ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so
+ ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0
+ ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0.8
+ install -d ${D}${includedir}
+ install -m 0644 sqlite.h ${D}${includedir}/sqlite.h
+ install -d ${D}${libdir}/pkgconfig
+ install -m 0644 ${S}/sqlite.pc ${D}${libdir}/pkgconfig/sqlite.pc
+}
+
+PACKAGES += "${PN}-bin"
+FILES_${PN}-bin = "${bindir}/*"
+FILES_${PN} = "${libdir}/*.so.*"
+
+SRC_URI[md5sum] = "838dbac20b56d2c4292e98848505a05b"
+SRC_URI[sha256sum] = "3f35ebfb67867fb5b583a03e480f900206af637efe7179b32294a6a0cf806f37"
+
+BBCLASSEXTEND = "native"