diff options
Diffstat (limited to 'meta-oe/recipes-support')
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 @@ | |||
| 1 | DESCRIPTION = "An accessibility toolkit for GNOME." | ||
| 2 | SECTION = "x11/libs" | ||
| 3 | PRIORITY = "optional" | ||
| 4 | LICENSE = "LGPL" | ||
| 5 | |||
| 6 | DEPENDS = "glib-2.0 gtk-doc-native" | ||
| 7 | |||
| 8 | inherit autotools pkgconfig | ||
| 9 | |||
| 10 | EXTRA_OECONF = "--disable-glibtest" | ||
| 11 | |||
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 @@ | |||
| 1 | DESCRIPTION = "An accessibility toolkit for GNOME." | ||
| 2 | SECTION = "x11/libs" | ||
| 3 | PRIORITY = "optional" | ||
| 4 | LICENSE = "LGPLv2 & LGPLv2+" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \ | ||
| 6 | file://atk/atkutil.c;endline=20;md5=db21b0bdbef9da4dc6eb122debc9f9bc \ | ||
| 7 | file://atk/atk.h;endline=20;md5=c58238d688c24387376d6c69d06248a7 | ||
| 8 | PR = "r1" | ||
| 9 | |||
| 10 | inherit gnome | ||
| 11 | |||
| 12 | SRC_URI[archive.md5sum] = "548d413775819fef425410739041cac3" | ||
| 13 | SRC_URI[archive.sha256sum] = "92b9b1213cafc68fe9c3806273b968c26423237d7b1f631dd83dc5270b8c268c" | ||
| 14 | |||
| 15 | DEPENDS = "glib-2.0 gtk-doc-native" | ||
| 16 | |||
| 17 | EXTRA_OECONF += "--disable-glibtest" | ||
| 18 | |||
| 19 | BBCLASSEXTEND = "native" | ||
| 20 | |||
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 @@ | |||
| 1 | From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
| 3 | Date: Sun, 30 Jan 2011 16:37:27 +0100 | ||
| 4 | Subject: [PATCH] don't try to run generated binaries | ||
| 5 | |||
| 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
| 7 | --- | ||
| 8 | ppdc/Makefile | 30 +++++++++++++++--------------- | ||
| 9 | 1 files changed, 15 insertions(+), 15 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/ppdc/Makefile b/ppdc/Makefile | ||
| 12 | index 0288d47..fc87f1b 100644 | ||
| 13 | --- a/ppdc/Makefile | ||
| 14 | +++ b/ppdc/Makefile | ||
| 15 | @@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \ | ||
| 16 | $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \ | ||
| 17 | libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \ | ||
| 18 | $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | ||
| 19 | - echo Generating localization strings... | ||
| 20 | - ./genstrings >sample.c | ||
| 21 | +# echo Generating localization strings... | ||
| 22 | +# ./genstrings >sample.c | ||
| 23 | |||
| 24 | |||
| 25 | # | ||
| 26 | @@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po | ||
| 27 | $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \ | ||
| 28 | ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ | ||
| 29 | $(COMMONLIBS) $(LIBZ) | ||
| 30 | - echo Testing PPD compiler... | ||
| 31 | - ./ppdc-static -l en,fr -I ../data foo.drv | ||
| 32 | - ./ppdc-static -l en,fr -z -I ../data foo.drv | ||
| 33 | +# echo Testing PPD compiler... | ||
| 34 | +# ./ppdc-static -l en,fr -I ../data foo.drv | ||
| 35 | +# ./ppdc-static -l en,fr -z -I ../data foo.drv | ||
| 36 | |||
| 37 | |||
| 38 | # | ||
| 39 | @@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a | ||
| 40 | ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ | ||
| 41 | $(COMMONLIBS) $(LIBZ) | ||
| 42 | echo Testing PPD importer... | ||
| 43 | - $(RM) -r ppd ppd2 sample-import.drv | ||
| 44 | - ./ppdc-static -I ../data sample.drv | ||
| 45 | - ./ppdi-static -I ../data -o sample-import.drv ppd/* | ||
| 46 | - ./ppdc-static -I ../data -d ppd2 sample-import.drv | ||
| 47 | - if diff -r ppd ppd2 >/dev/null; then \ | ||
| 48 | - echo PPD import OK; \ | ||
| 49 | - else \ | ||
| 50 | - echo PPD import FAILED; \ | ||
| 51 | - exit 1; \ | ||
| 52 | - fi | ||
| 53 | +# $(RM) -r ppd ppd2 sample-import.drv | ||
| 54 | +# ./ppdc-static -I ../data sample.drv | ||
| 55 | +# ./ppdi-static -I ../data -o sample-import.drv ppd/* | ||
| 56 | +# ./ppdc-static -I ../data -d ppd2 sample-import.drv | ||
| 57 | +# if diff -r ppd ppd2 >/dev/null; then \ | ||
| 58 | +# echo PPD import OK; \ | ||
| 59 | +# else \ | ||
| 60 | +# echo PPD import FAILED; \ | ||
| 61 | +# exit 1; \ | ||
| 62 | +# fi | ||
| 63 | |||
| 64 | |||
| 65 | # | ||
| 66 | -- | ||
| 67 | 1.6.6.1 | ||
| 68 | |||
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 @@ | |||
| 1 | --- a/init/cups.sh.in.orig 2008-10-04 16:50:46.000000000 -0300 | ||
| 2 | +++ b/init/cups.sh.in 2008-10-04 16:51:39.000000000 -0300 | ||
| 3 | @@ -68,7 +68,7 @@ | ||
| 4 | ECHO_ERROR=: | ||
| 5 | ;; | ||
| 6 | |||
| 7 | - Linux*) | ||
| 8 | + DISABLELinux*) | ||
| 9 | IS_ON=/bin/true | ||
| 10 | if test -f /etc/init.d/functions; then | ||
| 11 | . /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 @@ | |||
| 1 | DESCRIPTION = "An Internet printing system for Unix." | ||
| 2 | SECTION = "console/utils" | ||
| 3 | LICENSE = "GPLv2 LGPLv2" | ||
| 4 | DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib" | ||
| 5 | PROVIDES = "cups14" | ||
| 6 | |||
| 7 | SRC_URI = "ftp://ftp.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2" | ||
| 8 | |||
| 9 | LEAD_SONAME = "libcupsdriver.so" | ||
| 10 | |||
| 11 | inherit autotools binconfig | ||
| 12 | |||
| 13 | EXTRA_OECONF = " \ | ||
| 14 | --enable-gnutls \ | ||
| 15 | --enable-dbus \ | ||
| 16 | --enable-browsing \ | ||
| 17 | --disable-openssl \ | ||
| 18 | --disable-tiff \ | ||
| 19 | --without-php \ | ||
| 20 | --without-perl \ | ||
| 21 | --without-python \ | ||
| 22 | --without-java \ | ||
| 23 | " | ||
| 24 | |||
| 25 | |||
| 26 | do_configure() { | ||
| 27 | gnu-configize | ||
| 28 | libtoolize --force | ||
| 29 | DSOFLAGS="${LDFLAGS}" oe_runconf | ||
| 30 | } | ||
| 31 | |||
| 32 | do_compile () { | ||
| 33 | sed -i s:STRIP:NOSTRIP: Makedefs | ||
| 34 | sed -i s:serial:: backend/Makefile | ||
| 35 | |||
| 36 | echo "all:" > man/Makefile | ||
| 37 | echo "libs:" >> man/Makefile | ||
| 38 | echo "install:" >> man/Makefile | ||
| 39 | echo "install-data:" >> man/Makefile | ||
| 40 | echo "install-exec:" >> man/Makefile | ||
| 41 | echo "install-headers:" >> man/Makefile | ||
| 42 | echo "install-libs:" >> man/Makefile | ||
| 43 | |||
| 44 | oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \ | ||
| 45 | "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \ | ||
| 46 | "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \ | ||
| 47 | "LIBZ=-lz -L${STAGING_LIBDIR}" \ | ||
| 48 | "-I." | ||
| 49 | } | ||
| 50 | |||
| 51 | fakeroot do_install () { | ||
| 52 | oe_runmake "DSTROOT=${D}" install | ||
| 53 | |||
| 54 | # This directory gets installed with perms 511, which makes packaging fail | ||
| 55 | chmod 0711 "${D}/${localstatedir}/run/cups/certs" | ||
| 56 | } | ||
| 57 | |||
| 58 | python do_package_append() { | ||
| 59 | # Change permissions back the way they were, they probably had a reason... | ||
| 60 | workdir = bb.data.getVar('WORKDIR', d, 1) | ||
| 61 | os.system('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir) | ||
| 62 | } | ||
| 63 | |||
| 64 | PACKAGES =+ "${PN}-lib ${PN}-libimage" | ||
| 65 | |||
| 66 | FILES_${PN}-lib = "${libdir}/libcups.so.*" | ||
| 67 | |||
| 68 | FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*" | ||
| 69 | |||
| 70 | FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \ | ||
| 71 | ${libdir}/cups/cgi-bin/.debug \ | ||
| 72 | ${libdir}/cups/filter/.debug \ | ||
| 73 | ${libdir}/cups/monitor/.debug \ | ||
| 74 | ${libdir}/cups/notifier/.debug \ | ||
| 75 | ${libdir}/cups/daemon/.debug \ | ||
| 76 | " | ||
| 77 | |||
| 78 | #package the html for the webgui inside the main packages (~1MB uncompressed) | ||
| 79 | |||
| 80 | FILES_${PN} += "${datadir}/doc/cups/images \ | ||
| 81 | ${datadir}/doc/cups/*html \ | ||
| 82 | ${datadir}/doc/cups/*.css \ | ||
| 83 | ${datadir}/icons/ \ | ||
| 84 | " | ||
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 @@ | |||
| 1 | require cups14.inc | ||
| 2 | |||
| 3 | DEPENDS += "virtual/libusb0" | ||
| 4 | |||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=956e7600195e6139f12de8c2a5bbefa9" | ||
| 6 | |||
| 7 | SRC_URI += " \ | ||
| 8 | file://use_echo_only_in_init.patch \ | ||
| 9 | file://0001-don-t-try-to-run-generated-binaries.patch \ | ||
| 10 | " | ||
| 11 | |||
| 12 | SRC_URI[md5sum] = "de8fb5a29c36554925c0c6a6e2c0dae1" | ||
| 13 | SRC_URI[sha256sum] = "f08711702a77b52c7150f96fe1f45482f6151cb95ef601268c528607fe6ad514" | ||
| 14 | |||
| 15 | EXTRA_OECONF += " --disable-gssapi --enable-debug --disable-relro --enable-libusb" | ||
| 16 | |||
| 17 | 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 @@ | |||
| 1 | DESCRIPTION = "FFTW benchmarks" | ||
| 2 | SECTION = "libs" | ||
| 3 | PRIORITY = "optional" | ||
| 4 | LICENSE = "GPLv2" | ||
| 5 | |||
| 6 | # single precision fftw is called fftwf | ||
| 7 | DEPENDS = "fftwf" | ||
| 8 | |||
| 9 | SRC_URI = "http://www.fftw.org/benchfft/benchfft-${PV}.tar.gz" | ||
| 10 | |||
| 11 | EXTRA_OECONF = "--disable-fortran --enable-single --enable-shared" | ||
| 12 | |||
| 13 | inherit autotools pkgconfig | ||
| 14 | |||
| 15 | do_compile_prepend() { | ||
| 16 | sed -i -e 's:all-recursive:$(RECURSIVE_TARGETS):g' ${S}/Makefile | ||
| 17 | } | ||
| 18 | |||
| 19 | SRC_URI[md5sum] = "9356e5e9dcb3f1481977009720a2ccf8" | ||
| 20 | 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 @@ | |||
| 1 | DESCRIPTION = "FFTW" | ||
| 2 | SECTION = "libs" | ||
| 3 | PRIORITY = "optional" | ||
| 4 | LICENSE = "GPL" | ||
| 5 | RPROVIDES_${PN} += "libfftw3" | ||
| 6 | |||
| 7 | PR = "r3" | ||
| 8 | |||
| 9 | SRC_URI = "http://www.fftw.org/fftw-${PV}.tar.gz" | ||
| 10 | |||
| 11 | S = "${WORKDIR}/fftw-${PV}" | ||
| 12 | |||
| 13 | inherit autotools pkgconfig | ||
| 14 | |||
| 15 | do_configure_prepend() { | ||
| 16 | echo 'AM_PROG_AS' >> ${S}/configure.ac | ||
| 17 | } | ||
| 18 | |||
| 19 | PACKAGES =+ "lib${PN}" | ||
| 20 | |||
| 21 | FILES_lib${PN} = "${libdir}/lib*.so.*" | ||
| 22 | |||
| 23 | # 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 @@ | |||
| 1 | require fftw.inc | ||
| 2 | |||
| 3 | EXTRA_OECONF = "--disable-fortran --enable-shared" | ||
| 4 | |||
| 5 | |||
| 6 | |||
| 7 | SRC_URI[md5sum] = "08f2e21c9fd02f4be2bd53a62592afa4" | ||
| 8 | 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 @@ | |||
| 1 | require fftw.inc | ||
| 2 | |||
| 3 | SRC_URI = "http://www.fftw.org/fftw-${PV}.tar.gz" | ||
| 4 | |||
| 5 | EXTRA_OECONF = "--disable-fortran --enable-shared --enable-threads" | ||
| 6 | |||
| 7 | SRC_URI[md5sum] = "b616e5c91218cc778b5aa735fefb61ae" | ||
| 8 | 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 @@ | |||
| 1 | require fftw.inc | ||
| 2 | |||
| 3 | EXTRA_OECONF = "--disable-fortran --enable-single --enable-shared" | ||
| 4 | |||
| 5 | |||
| 6 | SRC_URI[md5sum] = "08f2e21c9fd02f4be2bd53a62592afa4" | ||
| 7 | 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 @@ | |||
| 1 | require fftw.inc | ||
| 2 | |||
| 3 | SRC_URI = "http://www.fftw.org/fftw-${PV}.tar.gz" | ||
| 4 | |||
| 5 | EXTRA_OECONF = "--disable-fortran --enable-single --enable-shared --enable-threads" | ||
| 6 | |||
| 7 | SRC_URI[md5sum] = "b616e5c91218cc778b5aa735fefb61ae" | ||
| 8 | 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 @@ | |||
| 1 | require fftw.inc | ||
| 2 | |||
| 3 | EXTRA_OECONF = "--disable-fortran --enable-long-double --enable-shared" | ||
| 4 | |||
| 5 | |||
| 6 | |||
| 7 | SRC_URI[md5sum] = "08f2e21c9fd02f4be2bd53a62592afa4" | ||
| 8 | 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 @@ | |||
| 1 | require fftw.inc | ||
| 2 | |||
| 3 | SRC_URI = "http://www.fftw.org/fftw-${PV}.tar.gz" | ||
| 4 | |||
| 5 | EXTRA_OECONF = "--disable-fortran --enable-long-double --enable-shared --enable-threads" | ||
| 6 | |||
| 7 | SRC_URI[md5sum] = "b616e5c91218cc778b5aa735fefb61ae" | ||
| 8 | 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 @@ | |||
| 1 | DESCRIPTION = "GNU Scientific Library" | ||
| 2 | HOMEPAGE = "http://www.gnu.org/software/gsl/" | ||
| 3 | SECTION = "libs" | ||
| 4 | PRIORITY = "optional" | ||
| 5 | LICENSE = "GPL" | ||
| 6 | PR = "r1" | ||
| 7 | |||
| 8 | inherit autotools pkgconfig binconfig | ||
| 9 | |||
| 10 | 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 @@ | |||
| 1 | include gsl.inc | ||
| 2 | |||
| 3 | SRC_URI = "${GNU_MIRROR}/gsl/gsl-${PV}.tar.gz" | ||
| 4 | |||
| 5 | SRC_URI[md5sum] = "3ec101903c8157756fa1352161bd4c39" | ||
| 6 | 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 @@ | |||
| 1 | --- /tmp/configure.in 2008-06-04 12:33:55.451086283 +0200 | ||
| 2 | +++ guile-1.8.5/configure.in 2008-06-04 12:34:03.974994278 +0200 | ||
| 3 | @@ -38,7 +38,6 @@ | ||
| 4 | ]), | ||
| 5 | [bug-guile@gnu.org]) | ||
| 6 | AC_CONFIG_AUX_DIR([build-aux]) | ||
| 7 | -AC_CONFIG_MACRO_DIR([m4]) | ||
| 8 | AC_CONFIG_SRCDIR(GUILE-VERSION) | ||
| 9 | |||
| 10 | 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 @@ | |||
| 1 | --- guile.orig/libguile/guile-snarf-docs.in 2009-07-03 18:19:00.000000000 -0400 | ||
| 2 | +++ guile/libguile/guile-snarf-docs.in 2009-11-19 12:55:32.487266268 -0500 | ||
| 3 | @@ -23,4 +23,4 @@ | ||
| 4 | ## Let the user override the preprocessor autoconf found. | ||
| 5 | test -n "${CPP+set}" || CPP="@CPP@" | ||
| 6 | |||
| 7 | -${CPP} -DSCM_MAGIC_SNARF_DOCS "$@" | ||
| 8 | +${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 @@ | |||
| 1 | diff --git a/LICENSE b/LICENSE | ||
| 2 | index 213e34a..dda451e 100644 | ||
| 3 | --- a/LICENSE | ||
| 4 | +++ b/LICENSE | ||
| 5 | @@ -1,2 +1,2 @@ | ||
| 6 | Guile is covered under the terms of the GNU Lesser General Public | ||
| 7 | -License, version 2.1. See COPYING.LESSER. | ||
| 8 | +License, version 2.1 or later. See COPYING.LESSER. | ||
| 9 | diff --git a/NEWS b/NEWS | ||
| 10 | index 0dcc411..564484f 100644 | ||
| 11 | --- a/NEWS | ||
| 12 | +++ b/NEWS | ||
| 13 | @@ -5,6 +5,19 @@ See the end for copying conditions. | ||
| 14 | Please send Guile bug reports to bug-guile@gnu.org. | ||
| 15 | |||
| 16 | |||
| 17 | +Changes in 1.8.8 (since 1.8.7) | ||
| 18 | + | ||
| 19 | +* Bugs fixed | ||
| 20 | + | ||
| 21 | +** Fix possible buffer overruns when parsing numbers | ||
| 22 | +** Avoid clash with system setjmp/longjmp on IA64 | ||
| 23 | +** Don't dynamically link an extension that is already registered | ||
| 24 | +** Fix `wrong type arg' exceptions with IPv6 addresses | ||
| 25 | +** Fix typos in `(srfi srfi-19)' | ||
| 26 | +** Have `(srfi srfi-35)' provide named struct vtables | ||
| 27 | +** Fix some Interix build problems | ||
| 28 | + | ||
| 29 | + | ||
| 30 | Changes in 1.8.7 (since 1.8.6) | ||
| 31 | |||
| 32 | * Bugs fixed | ||
| 33 | diff --git a/THANKS b/THANKS | ||
| 34 | index 47d3cfa..48a105a 100644 | ||
| 35 | --- a/THANKS | ||
| 36 | +++ b/THANKS | ||
| 37 | @@ -50,6 +50,7 @@ For fixes or providing information which led to a fix: | ||
| 38 | Roland Haeder | ||
| 39 | Sven Hartrumpf | ||
| 40 | Eric Hanchrow | ||
| 41 | + Judy Hawkins | ||
| 42 | Sam Hocevar | ||
| 43 | Patrick Horgan | ||
| 44 | Ales Hvezda | ||
| 45 | @@ -64,12 +65,15 @@ For fixes or providing information which led to a fix: | ||
| 46 | Matthias Köppe | ||
| 47 | Matt Kraai | ||
| 48 | Daniel Kraft | ||
| 49 | + Jay Krell | ||
| 50 | Jeff Long | ||
| 51 | Marco Maggi | ||
| 52 | Gregory Marton | ||
| 53 | + Kjetil S. Matheussen | ||
| 54 | Antoine Mathys | ||
| 55 | Dan McMahill | ||
| 56 | Roger Mc Murtrie | ||
| 57 | + Scott McPeak | ||
| 58 | Tim Mooney | ||
| 59 | Han-Wen Nienhuys | ||
| 60 | Jan Nieuwenhuizen | ||
| 61 | diff --git a/doc/ref/api-modules.texi b/doc/ref/api-modules.texi | ||
| 62 | index 9aeb08a..f6393db 100644 | ||
| 63 | --- a/doc/ref/api-modules.texi | ||
| 64 | +++ b/doc/ref/api-modules.texi | ||
| 65 | @@ -758,7 +758,7 @@ Record definition with @code{define-record-type} (@pxref{SRFI-9}). | ||
| 66 | Read hash extension @code{#,()} (@pxref{SRFI-10}). | ||
| 67 | |||
| 68 | @item (srfi srfi-11) | ||
| 69 | -Multiple-value handling with @code{let-values} and @code{let-values*} | ||
| 70 | +Multiple-value handling with @code{let-values} and @code{let*-values} | ||
| 71 | (@pxref{SRFI-11}). | ||
| 72 | |||
| 73 | @item (srfi srfi-13) | ||
| 74 | diff --git a/doc/ref/guile.texi b/doc/ref/guile.texi | ||
| 75 | index 7c17b36..3d9cde4 100644 | ||
| 76 | --- a/doc/ref/guile.texi | ||
| 77 | +++ b/doc/ref/guile.texi | ||
| 78 | @@ -13,8 +13,8 @@ This reference manual documents Guile, GNU's Ubiquitous Intelligent | ||
| 79 | Language for Extensions. This is edition @value{MANUAL-EDITION} | ||
| 80 | corresponding to Guile @value{VERSION}. | ||
| 81 | |||
| 82 | -Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005 Free | ||
| 83 | -Software Foundation. | ||
| 84 | +Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 85 | +2007, 2008, 2009, 2010 Free Software Foundation. | ||
| 86 | |||
| 87 | Permission is granted to copy, distribute and/or modify this document | ||
| 88 | under the terms of the GNU Free Documentation License, Version 1.2 or | ||
| 89 | diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi | ||
| 90 | index 1cb273a..0a7e342 100644 | ||
| 91 | --- a/doc/ref/posix.texi | ||
| 92 | +++ b/doc/ref/posix.texi | ||
| 93 | @@ -2310,8 +2310,8 @@ Convert a network address from an integer to a printable string. | ||
| 94 | |||
| 95 | @lisp | ||
| 96 | (inet-ntop AF_INET 2130706433) @result{} "127.0.0.1" | ||
| 97 | -(inet-ntop AF_INET6 (- (expt 2 128) 1)) @result{} | ||
| 98 | -ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | ||
| 99 | +(inet-ntop AF_INET6 (- (expt 2 128) 1)) | ||
| 100 | + @result{} "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" | ||
| 101 | @end lisp | ||
| 102 | @end deffn | ||
| 103 | |||
| 104 | @@ -2882,8 +2882,8 @@ same as @code{make-socket-address} would take to make such an object | ||
| 105 | (@pxref{Network Socket Address}). The return value is unspecified. | ||
| 106 | |||
| 107 | @example | ||
| 108 | -(connect sock AF_INET INADDR_LOCALHOST 23) | ||
| 109 | -(connect sock (make-socket-address AF_INET INADDR_LOCALHOST 23)) | ||
| 110 | +(connect sock AF_INET INADDR_LOOPBACK 23) | ||
| 111 | +(connect sock (make-socket-address AF_INET INADDR_LOOPBACK 23)) | ||
| 112 | @end example | ||
| 113 | @end deffn | ||
| 114 | |||
| 115 | diff --git a/ice-9/debugging/ice-9-debugger-extensions.scm b/ice-9/debugging/ice-9-debugger-extensions.scm | ||
| 116 | index a8b8c97..fe04fc0 100644 | ||
| 117 | --- a/ice-9/debugging/ice-9-debugger-extensions.scm | ||
| 118 | +++ b/ice-9/debugging/ice-9-debugger-extensions.scm | ||
| 119 | @@ -39,7 +39,8 @@ | ||
| 120 | (else | ||
| 121 | (define-module (ice-9 debugger)))) | ||
| 122 | |||
| 123 | -(use-modules (ice-9 debugging steps)) | ||
| 124 | +(use-modules (ice-9 debugging steps) | ||
| 125 | + (ice-9 debugging trace)) | ||
| 126 | |||
| 127 | (define (assert-continuable state) | ||
| 128 | ;; Check that debugger is in a state where `continuing' makes sense. | ||
| 129 | diff --git a/libguile/__scm.h b/libguile/__scm.h | ||
| 130 | index b198f9d..e75f1a9 100644 | ||
| 131 | --- a/libguile/__scm.h | ||
| 132 | +++ b/libguile/__scm.h | ||
| 133 | @@ -3,7 +3,7 @@ | ||
| 134 | #ifndef SCM___SCM_H | ||
| 135 | #define SCM___SCM_H | ||
| 136 | |||
| 137 | -/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 138 | +/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003, 2006, 2007, 2008, 2010 Free Software Foundation, Inc. | ||
| 139 | * | ||
| 140 | * This library is free software; you can redistribute it and/or | ||
| 141 | * modify it under the terms of the GNU Lesser General Public | ||
| 142 | @@ -359,11 +359,9 @@ | ||
| 143 | #define SCM_T_INT32_MIN SCM_I_TYPE_MIN(scm_t_int32,SCM_T_UINT32_MAX) | ||
| 144 | #define SCM_T_INT32_MAX SCM_I_TYPE_MAX(scm_t_int32,SCM_T_UINT32_MAX) | ||
| 145 | |||
| 146 | -#if SCM_HAVE_T_INT64 | ||
| 147 | #define SCM_T_UINT64_MAX SCM_I_UTYPE_MAX(scm_t_uint64) | ||
| 148 | #define SCM_T_INT64_MIN SCM_I_TYPE_MIN(scm_t_int64,SCM_T_UINT64_MAX) | ||
| 149 | #define SCM_T_INT64_MAX SCM_I_TYPE_MAX(scm_t_int64,SCM_T_UINT64_MAX) | ||
| 150 | -#endif | ||
| 151 | |||
| 152 | #if SCM_SIZEOF_LONG_LONG | ||
| 153 | #define SCM_I_ULLONG_MAX SCM_I_UTYPE_MAX(unsigned long long) | ||
| 154 | @@ -409,19 +407,28 @@ | ||
| 155 | typedef struct { | ||
| 156 | ucontext_t ctx; | ||
| 157 | int fresh; | ||
| 158 | - } jmp_buf; | ||
| 159 | -# define setjmp(JB) \ | ||
| 160 | + } scm_i_jmp_buf; | ||
| 161 | +# define SCM_I_SETJMP(JB) \ | ||
| 162 | ( (JB).fresh = 1, \ | ||
| 163 | getcontext (&((JB).ctx)), \ | ||
| 164 | ((JB).fresh ? ((JB).fresh = 0, 0) : 1) ) | ||
| 165 | -# define longjmp(JB,VAL) scm_ia64_longjmp (&(JB), VAL) | ||
| 166 | - void scm_ia64_longjmp (jmp_buf *, int); | ||
| 167 | +# define SCM_I_LONGJMP(JB,VAL) scm_ia64_longjmp (&(JB), VAL) | ||
| 168 | + void scm_ia64_longjmp (scm_i_jmp_buf *, int); | ||
| 169 | # else /* ndef __ia64__ */ | ||
| 170 | # include <setjmp.h> | ||
| 171 | # endif /* ndef __ia64__ */ | ||
| 172 | # endif /* ndef _CRAY1 */ | ||
| 173 | #endif /* ndef vms */ | ||
| 174 | |||
| 175 | +/* For any platform where SCM_I_SETJMP hasn't been defined in some | ||
| 176 | + special way above, map SCM_I_SETJMP, SCM_I_LONGJMP and | ||
| 177 | + scm_i_jmp_buf to setjmp, longjmp and jmp_buf. */ | ||
| 178 | +#ifndef SCM_I_SETJMP | ||
| 179 | +#define scm_i_jmp_buf jmp_buf | ||
| 180 | +#define SCM_I_SETJMP setjmp | ||
| 181 | +#define SCM_I_LONGJMP longjmp | ||
| 182 | +#endif | ||
| 183 | + | ||
| 184 | /* James Clark came up with this neat one instruction fix for | ||
| 185 | * continuations on the SPARC. It flushes the register windows so | ||
| 186 | * that all the state of the process is contained in the stack. | ||
| 187 | diff --git a/libguile/continuations.c b/libguile/continuations.c | ||
| 188 | index 69d2569..84a7fed 100644 | ||
| 189 | --- a/libguile/continuations.c | ||
| 190 | +++ b/libguile/continuations.c | ||
| 191 | @@ -127,7 +127,7 @@ scm_make_continuation (int *first) | ||
| 192 | continuation->offset = continuation->stack - src; | ||
| 193 | memcpy (continuation->stack, src, sizeof (SCM_STACKITEM) * stack_size); | ||
| 194 | |||
| 195 | - *first = !setjmp (continuation->jmpbuf); | ||
| 196 | + *first = !SCM_I_SETJMP (continuation->jmpbuf); | ||
| 197 | if (*first) | ||
| 198 | { | ||
| 199 | #ifdef __ia64__ | ||
| 200 | @@ -224,12 +224,12 @@ copy_stack_and_call (scm_t_contregs *continuation, SCM val, | ||
| 201 | scm_i_set_last_debug_frame (continuation->dframe); | ||
| 202 | |||
| 203 | continuation->throw_value = val; | ||
| 204 | - longjmp (continuation->jmpbuf, 1); | ||
| 205 | + SCM_I_LONGJMP (continuation->jmpbuf, 1); | ||
| 206 | } | ||
| 207 | |||
| 208 | #ifdef __ia64__ | ||
| 209 | void | ||
| 210 | -scm_ia64_longjmp (jmp_buf *JB, int VAL) | ||
| 211 | +scm_ia64_longjmp (scm_i_jmp_buf *JB, int VAL) | ||
| 212 | { | ||
| 213 | scm_i_thread *t = SCM_I_CURRENT_THREAD; | ||
| 214 | |||
| 215 | diff --git a/libguile/continuations.h b/libguile/continuations.h | ||
| 216 | index f6fb96a..c61ab2d 100644 | ||
| 217 | --- a/libguile/continuations.h | ||
| 218 | +++ b/libguile/continuations.h | ||
| 219 | @@ -43,7 +43,7 @@ SCM_API scm_t_bits scm_tc16_continuation; | ||
| 220 | typedef struct | ||
| 221 | { | ||
| 222 | SCM throw_value; | ||
| 223 | - jmp_buf jmpbuf; | ||
| 224 | + scm_i_jmp_buf jmpbuf; | ||
| 225 | SCM dynenv; | ||
| 226 | #ifdef __ia64__ | ||
| 227 | void *backing_store; | ||
| 228 | diff --git a/libguile/extensions.c b/libguile/extensions.c | ||
| 229 | index 1090b8b..29cb58c 100644 | ||
| 230 | --- a/libguile/extensions.c | ||
| 231 | +++ b/libguile/extensions.c | ||
| 232 | @@ -76,6 +76,7 @@ load_extension (SCM lib, SCM init) | ||
| 233 | { | ||
| 234 | extension_t *ext; | ||
| 235 | char *clib, *cinit; | ||
| 236 | + int found = 0; | ||
| 237 | |||
| 238 | scm_dynwind_begin (0); | ||
| 239 | |||
| 240 | @@ -89,10 +90,14 @@ load_extension (SCM lib, SCM init) | ||
| 241 | && !strcmp (ext->init, cinit)) | ||
| 242 | { | ||
| 243 | ext->func (ext->data); | ||
| 244 | + found = 1; | ||
| 245 | break; | ||
| 246 | } | ||
| 247 | |||
| 248 | scm_dynwind_end (); | ||
| 249 | + | ||
| 250 | + if (found) | ||
| 251 | + return; | ||
| 252 | } | ||
| 253 | |||
| 254 | /* Dynamically link the library. */ | ||
| 255 | diff --git a/libguile/filesys.c b/libguile/filesys.c | ||
| 256 | index 70dfe15..c8acb13 100644 | ||
| 257 | --- a/libguile/filesys.c | ||
| 258 | +++ b/libguile/filesys.c | ||
| 259 | @@ -23,6 +23,9 @@ | ||
| 260 | #ifdef __hpux | ||
| 261 | #define _POSIX_C_SOURCE 199506L /* for readdir_r */ | ||
| 262 | #endif | ||
| 263 | +#if defined(__INTERIX) && !defined(_REENTRANT) | ||
| 264 | +# define _REENTRANT /* ask Interix for readdir_r prototype */ | ||
| 265 | +#endif | ||
| 266 | |||
| 267 | #ifdef HAVE_CONFIG_H | ||
| 268 | # include <config.h> | ||
| 269 | diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c | ||
| 270 | index 85ebfae..e5de31d 100644 | ||
| 271 | --- a/libguile/gen-scmconfig.c | ||
| 272 | +++ b/libguile/gen-scmconfig.c | ||
| 273 | @@ -315,28 +315,10 @@ main (int argc, char *argv[]) | ||
| 274 | return 1; | ||
| 275 | |||
| 276 | pf ("\n"); | ||
| 277 | - pf ("/* 64-bit integer -- if available SCM_HAVE_T_INT64 will be 1 and\n" | ||
| 278 | - " scm_t_int64 will be a suitable type, otherwise SCM_HAVE_T_INT64\n" | ||
| 279 | - " will be 0. */\n"); | ||
| 280 | - if (SCM_I_GSC_T_INT64) | ||
| 281 | - { | ||
| 282 | - pf ("#define SCM_HAVE_T_INT64 1 /* 0 or 1 */\n"); | ||
| 283 | - pf ("typedef %s scm_t_int64;\n", SCM_I_GSC_T_INT64); | ||
| 284 | - } | ||
| 285 | - else | ||
| 286 | - pf ("#define SCM_HAVE_T_INT64 0 /* 0 or 1 */\n"); | ||
| 287 | - | ||
| 288 | - pf ("\n"); | ||
| 289 | - pf ("/* 64-bit unsigned integer -- if available SCM_HAVE_T_UINT64 will\n" | ||
| 290 | - " be 1 and scm_t_uint64 will be a suitable type, otherwise\n" | ||
| 291 | - " SCM_HAVE_T_UINT64 will be 0. */\n"); | ||
| 292 | - if (SCM_I_GSC_T_UINT64) | ||
| 293 | - { | ||
| 294 | - pf ("#define SCM_HAVE_T_UINT64 1 /* 0 or 1 */\n"); | ||
| 295 | - pf ("typedef %s scm_t_uint64;\n", SCM_I_GSC_T_UINT64); | ||
| 296 | - } | ||
| 297 | - else | ||
| 298 | - pf ("#define SCM_HAVE_T_UINT64 0 /* 0 or 1 */\n"); | ||
| 299 | + pf ("#define SCM_HAVE_T_INT64 1 /* 0 or 1 */\n"); | ||
| 300 | + pf ("typedef %s scm_t_int64;\n", SCM_I_GSC_T_INT64); | ||
| 301 | + pf ("#define SCM_HAVE_T_UINT64 1 /* 0 or 1 */\n"); | ||
| 302 | + pf ("typedef %s scm_t_uint64;\n", SCM_I_GSC_T_UINT64); | ||
| 303 | |||
| 304 | pf ("\n"); | ||
| 305 | pf ("/* scm_t_ptrdiff_t and size, always defined -- defined to long if\n" | ||
| 306 | diff --git a/libguile/hashtab.c b/libguile/hashtab.c | ||
| 307 | index ea7fc69..1f1569c 100644 | ||
| 308 | --- a/libguile/hashtab.c | ||
| 309 | +++ b/libguile/hashtab.c | ||
| 310 | @@ -1,4 +1,4 @@ | ||
| 311 | -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. | ||
| 312 | +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2008, 2010 Free Software Foundation, Inc. | ||
| 313 | * | ||
| 314 | * This library is free software; you can redistribute it and/or | ||
| 315 | * modify it under the terms of the GNU Lesser General Public | ||
| 316 | @@ -911,74 +911,6 @@ SCM_DEFINE (scm_hashx_remove_x, "hashx-remove!", 4, 0, 0, | ||
| 317 | |||
| 318 | /* Hash table iterators */ | ||
| 319 | |||
| 320 | -static const char s_scm_hash_fold[]; | ||
| 321 | - | ||
| 322 | -SCM | ||
| 323 | -scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table) | ||
| 324 | -{ | ||
| 325 | - long i, n; | ||
| 326 | - SCM buckets, result = init; | ||
| 327 | - | ||
| 328 | - if (SCM_HASHTABLE_P (table)) | ||
| 329 | - buckets = SCM_HASHTABLE_VECTOR (table); | ||
| 330 | - else | ||
| 331 | - buckets = table; | ||
| 332 | - | ||
| 333 | - n = SCM_SIMPLE_VECTOR_LENGTH (buckets); | ||
| 334 | - for (i = 0; i < n; ++i) | ||
| 335 | - { | ||
| 336 | - SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle; | ||
| 337 | - while (!scm_is_null (ls)) | ||
| 338 | - { | ||
| 339 | - if (!scm_is_pair (ls)) | ||
| 340 | - scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets); | ||
| 341 | - handle = SCM_CAR (ls); | ||
| 342 | - if (!scm_is_pair (handle)) | ||
| 343 | - scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets); | ||
| 344 | - result = fn (closure, SCM_CAR (handle), SCM_CDR (handle), result); | ||
| 345 | - ls = SCM_CDR (ls); | ||
| 346 | - } | ||
| 347 | - } | ||
| 348 | - | ||
| 349 | - return result; | ||
| 350 | -} | ||
| 351 | - | ||
| 352 | -/* The following redundant code is here in order to be able to support | ||
| 353 | - hash-for-each-handle. An alternative would have been to replace | ||
| 354 | - this code and scm_internal_hash_fold above with a single | ||
| 355 | - scm_internal_hash_fold_handles, but we don't want to promote such | ||
| 356 | - an API. */ | ||
| 357 | - | ||
| 358 | -static const char s_scm_hash_for_each[]; | ||
| 359 | - | ||
| 360 | -void | ||
| 361 | -scm_internal_hash_for_each_handle (SCM (*fn) (), void *closure, SCM table) | ||
| 362 | -{ | ||
| 363 | - long i, n; | ||
| 364 | - SCM buckets; | ||
| 365 | - | ||
| 366 | - if (SCM_HASHTABLE_P (table)) | ||
| 367 | - buckets = SCM_HASHTABLE_VECTOR (table); | ||
| 368 | - else | ||
| 369 | - buckets = table; | ||
| 370 | - | ||
| 371 | - n = SCM_SIMPLE_VECTOR_LENGTH (buckets); | ||
| 372 | - for (i = 0; i < n; ++i) | ||
| 373 | - { | ||
| 374 | - SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle; | ||
| 375 | - while (!scm_is_null (ls)) | ||
| 376 | - { | ||
| 377 | - if (!scm_is_pair (ls)) | ||
| 378 | - scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets); | ||
| 379 | - handle = SCM_CAR (ls); | ||
| 380 | - if (!scm_is_pair (handle)) | ||
| 381 | - scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets); | ||
| 382 | - fn (closure, handle); | ||
| 383 | - ls = SCM_CDR (ls); | ||
| 384 | - } | ||
| 385 | - } | ||
| 386 | -} | ||
| 387 | - | ||
| 388 | SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0, | ||
| 389 | (SCM proc, SCM init, SCM table), | ||
| 390 | "An iterator over hash-table elements.\n" | ||
| 391 | @@ -1067,6 +999,72 @@ SCM_DEFINE (scm_hash_map_to_list, "hash-map->list", 2, 0, 0, | ||
| 392 | |||
| 393 | |||
| 394 | |||
| 395 | +SCM | ||
| 396 | +scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table) | ||
| 397 | +{ | ||
| 398 | + long i, n; | ||
| 399 | + SCM buckets, result = init; | ||
| 400 | + | ||
| 401 | + if (SCM_HASHTABLE_P (table)) | ||
| 402 | + buckets = SCM_HASHTABLE_VECTOR (table); | ||
| 403 | + else | ||
| 404 | + buckets = table; | ||
| 405 | + | ||
| 406 | + n = SCM_SIMPLE_VECTOR_LENGTH (buckets); | ||
| 407 | + for (i = 0; i < n; ++i) | ||
| 408 | + { | ||
| 409 | + SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle; | ||
| 410 | + while (!scm_is_null (ls)) | ||
| 411 | + { | ||
| 412 | + if (!scm_is_pair (ls)) | ||
| 413 | + scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets); | ||
| 414 | + handle = SCM_CAR (ls); | ||
| 415 | + if (!scm_is_pair (handle)) | ||
| 416 | + scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets); | ||
| 417 | + result = fn (closure, SCM_CAR (handle), SCM_CDR (handle), result); | ||
| 418 | + ls = SCM_CDR (ls); | ||
| 419 | + } | ||
| 420 | + } | ||
| 421 | + | ||
| 422 | + return result; | ||
| 423 | +} | ||
| 424 | + | ||
| 425 | +/* The following redundant code is here in order to be able to support | ||
| 426 | + hash-for-each-handle. An alternative would have been to replace | ||
| 427 | + this code and scm_internal_hash_fold above with a single | ||
| 428 | + scm_internal_hash_fold_handles, but we don't want to promote such | ||
| 429 | + an API. */ | ||
| 430 | + | ||
| 431 | +void | ||
| 432 | +scm_internal_hash_for_each_handle (SCM (*fn) (), void *closure, SCM table) | ||
| 433 | +{ | ||
| 434 | + long i, n; | ||
| 435 | + SCM buckets; | ||
| 436 | + | ||
| 437 | + if (SCM_HASHTABLE_P (table)) | ||
| 438 | + buckets = SCM_HASHTABLE_VECTOR (table); | ||
| 439 | + else | ||
| 440 | + buckets = table; | ||
| 441 | + | ||
| 442 | + n = SCM_SIMPLE_VECTOR_LENGTH (buckets); | ||
| 443 | + for (i = 0; i < n; ++i) | ||
| 444 | + { | ||
| 445 | + SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle; | ||
| 446 | + while (!scm_is_null (ls)) | ||
| 447 | + { | ||
| 448 | + if (!scm_is_pair (ls)) | ||
| 449 | + scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets); | ||
| 450 | + handle = SCM_CAR (ls); | ||
| 451 | + if (!scm_is_pair (handle)) | ||
| 452 | + scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets); | ||
| 453 | + fn (closure, handle); | ||
| 454 | + ls = SCM_CDR (ls); | ||
| 455 | + } | ||
| 456 | + } | ||
| 457 | +} | ||
| 458 | + | ||
| 459 | + | ||
| 460 | + | ||
| 461 | |||
| 462 | void | ||
| 463 | scm_hashtab_prehistory () | ||
| 464 | diff --git a/libguile/iselect.h b/libguile/iselect.h | ||
| 465 | index 5a4b30d..b23a641 100644 | ||
| 466 | --- a/libguile/iselect.h | ||
| 467 | +++ b/libguile/iselect.h | ||
| 468 | @@ -38,7 +38,12 @@ | ||
| 469 | #ifdef FD_SET | ||
| 470 | |||
| 471 | #define SELECT_TYPE fd_set | ||
| 472 | +#if defined(__INTERIX) && FD_SETSIZE == 4096 | ||
| 473 | +/* Interix defines FD_SETSIZE 4096 but select rejects that. */ | ||
| 474 | +#define SELECT_SET_SIZE 1024 | ||
| 475 | +#else | ||
| 476 | #define SELECT_SET_SIZE FD_SETSIZE | ||
| 477 | +#endif | ||
| 478 | |||
| 479 | #else /* no FD_SET */ | ||
| 480 | |||
| 481 | diff --git a/libguile/numbers.c b/libguile/numbers.c | ||
| 482 | index 2e1635f..4f5ab31 100644 | ||
| 483 | --- a/libguile/numbers.c | ||
| 484 | +++ b/libguile/numbers.c | ||
| 485 | @@ -1,4 +1,4 @@ | ||
| 486 | -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | ||
| 487 | +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 488 | * | ||
| 489 | * Portions Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories | ||
| 490 | * and Bellcore. See scm_divide. | ||
| 491 | @@ -620,7 +620,14 @@ guile_ieee_init (void) | ||
| 492 | #elif HAVE_DINFINITY | ||
| 493 | /* OSF */ | ||
| 494 | extern unsigned int DINFINITY[2]; | ||
| 495 | - guile_Inf = (*((double *) (DINFINITY))); | ||
| 496 | + union | ||
| 497 | + { | ||
| 498 | + double d; | ||
| 499 | + int i[2]; | ||
| 500 | + } alias; | ||
| 501 | + alias.i[0] = DINFINITY[0]; | ||
| 502 | + alias.i[1] = DINFINITY[1]; | ||
| 503 | + guile_Inf = alias.d; | ||
| 504 | #else | ||
| 505 | double tmp = 1e+10; | ||
| 506 | guile_Inf = tmp; | ||
| 507 | @@ -651,7 +658,14 @@ guile_ieee_init (void) | ||
| 508 | { | ||
| 509 | /* OSF */ | ||
| 510 | extern unsigned int DQNAN[2]; | ||
| 511 | - guile_NaN = (*((double *)(DQNAN))); | ||
| 512 | + union | ||
| 513 | + { | ||
| 514 | + double d; | ||
| 515 | + int i[2]; | ||
| 516 | + } alias; | ||
| 517 | + alias.i[0] = DQNAN[0]; | ||
| 518 | + alias.i[1] = DQNAN[1]; | ||
| 519 | + guile_NaN = alias.d; | ||
| 520 | } | ||
| 521 | #else | ||
| 522 | guile_NaN = guile_Inf / guile_Inf; | ||
| 523 | @@ -2663,17 +2677,26 @@ mem2decimal_from_point (SCM result, const char* mem, size_t len, | ||
| 524 | case 'l': case 'L': | ||
| 525 | case 's': case 'S': | ||
| 526 | idx++; | ||
| 527 | + if (idx == len) | ||
| 528 | + return SCM_BOOL_F; | ||
| 529 | + | ||
| 530 | start = idx; | ||
| 531 | c = mem[idx]; | ||
| 532 | if (c == '-') | ||
| 533 | { | ||
| 534 | idx++; | ||
| 535 | + if (idx == len) | ||
| 536 | + return SCM_BOOL_F; | ||
| 537 | + | ||
| 538 | sign = -1; | ||
| 539 | c = mem[idx]; | ||
| 540 | } | ||
| 541 | else if (c == '+') | ||
| 542 | { | ||
| 543 | idx++; | ||
| 544 | + if (idx == len) | ||
| 545 | + return SCM_BOOL_F; | ||
| 546 | + | ||
| 547 | sign = 1; | ||
| 548 | c = mem[idx]; | ||
| 549 | } | ||
| 550 | @@ -2789,8 +2812,10 @@ mem2ureal (const char* mem, size_t len, unsigned int *p_idx, | ||
| 551 | SCM divisor; | ||
| 552 | |||
| 553 | idx++; | ||
| 554 | + if (idx == len) | ||
| 555 | + return SCM_BOOL_F; | ||
| 556 | |||
| 557 | - divisor = mem2uinteger (mem, len, &idx, radix, &x); | ||
| 558 | + divisor = mem2uinteger (mem, len, &idx, radix, &x); | ||
| 559 | if (scm_is_false (divisor)) | ||
| 560 | return SCM_BOOL_F; | ||
| 561 | |||
| 562 | @@ -2911,11 +2936,15 @@ mem2complex (const char* mem, size_t len, unsigned int idx, | ||
| 563 | if (c == '+') | ||
| 564 | { | ||
| 565 | idx++; | ||
| 566 | + if (idx == len) | ||
| 567 | + return SCM_BOOL_F; | ||
| 568 | sign = 1; | ||
| 569 | } | ||
| 570 | else if (c == '-') | ||
| 571 | { | ||
| 572 | idx++; | ||
| 573 | + if (idx == len) | ||
| 574 | + return SCM_BOOL_F; | ||
| 575 | sign = -1; | ||
| 576 | } | ||
| 577 | else | ||
| 578 | @@ -5869,8 +5898,6 @@ scm_i_range_error (SCM bad_val, SCM min, SCM max) | ||
| 579 | #define SCM_FROM_TYPE_PROTO(arg) scm_from_uint32 (arg) | ||
| 580 | #include "libguile/conv-uinteger.i.c" | ||
| 581 | |||
| 582 | -#if SCM_HAVE_T_INT64 | ||
| 583 | - | ||
| 584 | #define TYPE scm_t_int64 | ||
| 585 | #define TYPE_MIN SCM_T_INT64_MIN | ||
| 586 | #define TYPE_MAX SCM_T_INT64_MAX | ||
| 587 | @@ -5887,8 +5914,6 @@ scm_i_range_error (SCM bad_val, SCM min, SCM max) | ||
| 588 | #define SCM_FROM_TYPE_PROTO(arg) scm_from_uint64 (arg) | ||
| 589 | #include "libguile/conv-uinteger.i.c" | ||
| 590 | |||
| 591 | -#endif | ||
| 592 | - | ||
| 593 | void | ||
| 594 | scm_to_mpz (SCM val, mpz_t rop) | ||
| 595 | { | ||
| 596 | diff --git a/libguile/numbers.h b/libguile/numbers.h | ||
| 597 | index 2c2fdcf..35263a4 100644 | ||
| 598 | --- a/libguile/numbers.h | ||
| 599 | +++ b/libguile/numbers.h | ||
| 600 | @@ -3,7 +3,7 @@ | ||
| 601 | #ifndef SCM_NUMBERS_H | ||
| 602 | #define SCM_NUMBERS_H | ||
| 603 | |||
| 604 | -/* Copyright (C) 1995,1996,1998,2000,2001,2002,2003,2004,2005, 2006 Free Software Foundation, Inc. | ||
| 605 | +/* Copyright (C) 1995,1996,1998,2000,2001,2002,2003,2004,2005, 2006, 2010 Free Software Foundation, Inc. | ||
| 606 | * | ||
| 607 | * This library is free software; you can redistribute it and/or | ||
| 608 | * modify it under the terms of the GNU Lesser General Public | ||
| 609 | @@ -321,16 +321,12 @@ SCM_API SCM scm_from_int32 (scm_t_int32 x); | ||
| 610 | SCM_API scm_t_uint32 scm_to_uint32 (SCM x); | ||
| 611 | SCM_API SCM scm_from_uint32 (scm_t_uint32 x); | ||
| 612 | |||
| 613 | -#if SCM_HAVE_T_INT64 | ||
| 614 | - | ||
| 615 | SCM_API scm_t_int64 scm_to_int64 (SCM x); | ||
| 616 | SCM_API SCM scm_from_int64 (scm_t_int64 x); | ||
| 617 | |||
| 618 | SCM_API scm_t_uint64 scm_to_uint64 (SCM x); | ||
| 619 | SCM_API SCM scm_from_uint64 (scm_t_uint64 x); | ||
| 620 | |||
| 621 | -#endif | ||
| 622 | - | ||
| 623 | SCM_API void scm_to_mpz (SCM x, mpz_t rop); | ||
| 624 | SCM_API SCM scm_from_mpz (mpz_t rop); | ||
| 625 | |||
| 626 | diff --git a/libguile/random.c b/libguile/random.c | ||
| 627 | index 8d2ff03..693ed4a 100644 | ||
| 628 | --- a/libguile/random.c | ||
| 629 | +++ b/libguile/random.c | ||
| 630 | @@ -1,4 +1,4 @@ | ||
| 631 | -/* Copyright (C) 1999,2000,2001, 2003, 2005, 2006 Free Software Foundation, Inc. | ||
| 632 | +/* Copyright (C) 1999,2000,2001, 2003, 2005, 2006, 2010 Free Software Foundation, Inc. | ||
| 633 | * This library is free software; you can redistribute it and/or | ||
| 634 | * modify it under the terms of the GNU Lesser General Public | ||
| 635 | * License as published by the Free Software Foundation; either | ||
| 636 | @@ -75,8 +75,6 @@ scm_t_rng scm_the_rng; | ||
| 637 | #define M_PI 3.14159265359 | ||
| 638 | #endif | ||
| 639 | |||
| 640 | -#if SCM_HAVE_T_UINT64 | ||
| 641 | - | ||
| 642 | unsigned long | ||
| 643 | scm_i_uniform32 (scm_t_i_rstate *state) | ||
| 644 | { | ||
| 645 | @@ -87,38 +85,6 @@ scm_i_uniform32 (scm_t_i_rstate *state) | ||
| 646 | return w; | ||
| 647 | } | ||
| 648 | |||
| 649 | -#else | ||
| 650 | - | ||
| 651 | -/* ww This is a portable version of the same RNG without 64 bit | ||
| 652 | - * * aa arithmetic. | ||
| 653 | - * ---- | ||
| 654 | - * xx It is only intended to provide identical behaviour on | ||
| 655 | - * xx platforms without 8 byte longs or long longs until | ||
| 656 | - * xx someone has implemented the routine in assembler code. | ||
| 657 | - * xxcc | ||
| 658 | - * ---- | ||
| 659 | - * ccww | ||
| 660 | - */ | ||
| 661 | - | ||
| 662 | -#define L(x) ((x) & 0xffff) | ||
| 663 | -#define H(x) ((x) >> 16) | ||
| 664 | - | ||
| 665 | -unsigned long | ||
| 666 | -scm_i_uniform32 (scm_t_i_rstate *state) | ||
| 667 | -{ | ||
| 668 | - scm_t_uint32 x1 = L (A) * L (state->w); | ||
| 669 | - scm_t_uint32 x2 = L (A) * H (state->w); | ||
| 670 | - scm_t_uint32 x3 = H (A) * L (state->w); | ||
| 671 | - scm_t_uint32 w = L (x1) + L (state->c); | ||
| 672 | - scm_t_uint32 m = H (x1) + L (x2) + L (x3) + H (state->c) + H (w); | ||
| 673 | - scm_t_uint32 x4 = H (A) * H (state->w); | ||
| 674 | - state->w = w = (L (m) << 16) + L (w); | ||
| 675 | - state->c = H (x2) + H (x3) + x4 + H (m); | ||
| 676 | - return w; | ||
| 677 | -} | ||
| 678 | - | ||
| 679 | -#endif | ||
| 680 | - | ||
| 681 | void | ||
| 682 | scm_i_init_rstate (scm_t_i_rstate *state, const char *seed, int n) | ||
| 683 | { | ||
| 684 | @@ -212,21 +178,49 @@ scm_c_exp1 (scm_t_rstate *state) | ||
| 685 | |||
| 686 | unsigned char scm_masktab[256]; | ||
| 687 | |||
| 688 | -unsigned long | ||
| 689 | -scm_c_random (scm_t_rstate *state, unsigned long m) | ||
| 690 | +static inline scm_t_uint32 | ||
| 691 | +scm_i_mask32 (scm_t_uint32 m) | ||
| 692 | { | ||
| 693 | - unsigned int r, mask; | ||
| 694 | - mask = (m < 0x100 | ||
| 695 | + return (m < 0x100 | ||
| 696 | ? scm_masktab[m] | ||
| 697 | : (m < 0x10000 | ||
| 698 | ? scm_masktab[m >> 8] << 8 | 0xff | ||
| 699 | : (m < 0x1000000 | ||
| 700 | ? scm_masktab[m >> 16] << 16 | 0xffff | ||
| 701 | : scm_masktab[m >> 24] << 24 | 0xffffff))); | ||
| 702 | +} | ||
| 703 | + | ||
| 704 | +static scm_t_uint32 | ||
| 705 | +scm_c_random32 (scm_t_rstate *state, scm_t_uint32 m) | ||
| 706 | +{ | ||
| 707 | + scm_t_uint32 r, mask = scm_i_mask32 (m); | ||
| 708 | while ((r = scm_the_rng.random_bits (state) & mask) >= m); | ||
| 709 | return r; | ||
| 710 | } | ||
| 711 | |||
| 712 | +/* Returns 32 random bits. */ | ||
| 713 | +unsigned long | ||
| 714 | +scm_c_random (scm_t_rstate *state, unsigned long m) | ||
| 715 | +{ | ||
| 716 | + return scm_c_random32 (state, (scm_t_uint32)m); | ||
| 717 | +} | ||
| 718 | + | ||
| 719 | +scm_t_uint64 | ||
| 720 | +scm_c_random64 (scm_t_rstate *state, scm_t_uint64 m) | ||
| 721 | +{ | ||
| 722 | + scm_t_uint64 r; | ||
| 723 | + scm_t_uint32 mask; | ||
| 724 | + | ||
| 725 | + if (m <= SCM_T_UINT32_MAX) | ||
| 726 | + return scm_c_random32 (state, (scm_t_uint32) m); | ||
| 727 | + | ||
| 728 | + mask = scm_i_mask32 (m >> 32); | ||
| 729 | + while ((r = ((scm_t_uint64) (scm_the_rng.random_bits (state) & mask) << 32) | ||
| 730 | + | scm_the_rng.random_bits (state)) >= m) | ||
| 731 | + ; | ||
| 732 | + return r; | ||
| 733 | +} | ||
| 734 | + | ||
| 735 | /* | ||
| 736 | SCM scm_c_random_bignum (scm_t_rstate *state, SCM m) | ||
| 737 | |||
| 738 | @@ -247,24 +241,24 @@ scm_c_random_bignum (scm_t_rstate *state, SCM m) | ||
| 739 | { | ||
| 740 | SCM result = scm_i_mkbig (); | ||
| 741 | const size_t m_bits = mpz_sizeinbase (SCM_I_BIG_MPZ (m), 2); | ||
| 742 | - /* how many bits would only partially fill the last unsigned long? */ | ||
| 743 | - const size_t end_bits = m_bits % (sizeof (unsigned long) * SCM_CHAR_BIT); | ||
| 744 | - unsigned long *random_chunks = NULL; | ||
| 745 | - const unsigned long num_full_chunks = | ||
| 746 | - m_bits / (sizeof (unsigned long) * SCM_CHAR_BIT); | ||
| 747 | - const unsigned long num_chunks = num_full_chunks + ((end_bits) ? 1 : 0); | ||
| 748 | + /* how many bits would only partially fill the last u32? */ | ||
| 749 | + const size_t end_bits = m_bits % (sizeof (scm_t_uint32) * SCM_CHAR_BIT); | ||
| 750 | + scm_t_uint32 *random_chunks = NULL; | ||
| 751 | + const scm_t_uint32 num_full_chunks = | ||
| 752 | + m_bits / (sizeof (scm_t_uint32) * SCM_CHAR_BIT); | ||
| 753 | + const scm_t_uint32 num_chunks = num_full_chunks + ((end_bits) ? 1 : 0); | ||
| 754 | |||
| 755 | /* we know the result will be this big */ | ||
| 756 | mpz_realloc2 (SCM_I_BIG_MPZ (result), m_bits); | ||
| 757 | |||
| 758 | random_chunks = | ||
| 759 | - (unsigned long *) scm_gc_calloc (num_chunks * sizeof (unsigned long), | ||
| 760 | + (scm_t_uint32 *) scm_gc_calloc (num_chunks * sizeof (scm_t_uint32), | ||
| 761 | "random bignum chunks"); | ||
| 762 | |||
| 763 | do | ||
| 764 | { | ||
| 765 | - unsigned long *current_chunk = random_chunks + (num_chunks - 1); | ||
| 766 | - unsigned long chunks_left = num_chunks; | ||
| 767 | + scm_t_uint32 *current_chunk = random_chunks + (num_chunks - 1); | ||
| 768 | + scm_t_uint32 chunks_left = num_chunks; | ||
| 769 | |||
| 770 | mpz_set_ui (SCM_I_BIG_MPZ (result), 0); | ||
| 771 | |||
| 772 | @@ -273,23 +267,23 @@ scm_c_random_bignum (scm_t_rstate *state, SCM m) | ||
| 773 | /* generate a mask with ones in the end_bits position, i.e. if | ||
| 774 | end_bits is 3, then we'd have a mask of ...0000000111 */ | ||
| 775 | const unsigned long rndbits = scm_the_rng.random_bits (state); | ||
| 776 | - int rshift = (sizeof (unsigned long) * SCM_CHAR_BIT) - end_bits; | ||
| 777 | - unsigned long mask = ((unsigned long) ULONG_MAX) >> rshift; | ||
| 778 | - unsigned long highest_bits = rndbits & mask; | ||
| 779 | + int rshift = (sizeof (scm_t_uint32) * SCM_CHAR_BIT) - end_bits; | ||
| 780 | + scm_t_uint32 mask = 0xffffffff >> rshift; | ||
| 781 | + scm_t_uint32 highest_bits = ((scm_t_uint32) rndbits) & mask; | ||
| 782 | *current_chunk-- = highest_bits; | ||
| 783 | chunks_left--; | ||
| 784 | } | ||
| 785 | |||
| 786 | while (chunks_left) | ||
| 787 | { | ||
| 788 | - /* now fill in the remaining unsigned long sized chunks */ | ||
| 789 | + /* now fill in the remaining scm_t_uint32 sized chunks */ | ||
| 790 | *current_chunk-- = scm_the_rng.random_bits (state); | ||
| 791 | chunks_left--; | ||
| 792 | } | ||
| 793 | mpz_import (SCM_I_BIG_MPZ (result), | ||
| 794 | num_chunks, | ||
| 795 | -1, | ||
| 796 | - sizeof (unsigned long), | ||
| 797 | + sizeof (scm_t_uint32), | ||
| 798 | 0, | ||
| 799 | 0, | ||
| 800 | random_chunks); | ||
| 801 | @@ -297,7 +291,7 @@ scm_c_random_bignum (scm_t_rstate *state, SCM m) | ||
| 802 | all bits in order not to get a distorted distribution) */ | ||
| 803 | } while (mpz_cmp (SCM_I_BIG_MPZ (result), SCM_I_BIG_MPZ (m)) >= 0); | ||
| 804 | scm_gc_free (random_chunks, | ||
| 805 | - num_chunks * sizeof (unsigned long), | ||
| 806 | + num_chunks * sizeof (scm_t_uint32), | ||
| 807 | "random bignum chunks"); | ||
| 808 | return scm_i_normbig (result); | ||
| 809 | } | ||
| 810 | @@ -348,9 +342,17 @@ SCM_DEFINE (scm_random, "random", 1, 1, 0, | ||
| 811 | SCM_VALIDATE_RSTATE (2, state); | ||
| 812 | if (SCM_I_INUMP (n)) | ||
| 813 | { | ||
| 814 | - unsigned long m = SCM_I_INUM (n); | ||
| 815 | - SCM_ASSERT_RANGE (1, n, m > 0); | ||
| 816 | - return scm_from_ulong (scm_c_random (SCM_RSTATE (state), m)); | ||
| 817 | + unsigned long m = (unsigned long) SCM_I_INUM (n); | ||
| 818 | + SCM_ASSERT_RANGE (1, n, SCM_I_INUM (n) > 0); | ||
| 819 | +#if SCM_SIZEOF_UNSIGNED_LONG <= 4 | ||
| 820 | + return scm_from_uint32 (scm_c_random (SCM_RSTATE (state), | ||
| 821 | + (scm_t_uint32) m)); | ||
| 822 | +#elif SCM_SIZEOF_UNSIGNED_LONG <= 8 | ||
| 823 | + return scm_from_uint64 (scm_c_random64 (SCM_RSTATE (state), | ||
| 824 | + (scm_t_uint64) m)); | ||
| 825 | +#else | ||
| 826 | +#error "Cannot deal with this platform's unsigned long size" | ||
| 827 | +#endif | ||
| 828 | } | ||
| 829 | SCM_VALIDATE_NIM (1, n); | ||
| 830 | if (SCM_REALP (n)) | ||
| 831 | diff --git a/libguile/random.h b/libguile/random.h | ||
| 832 | index 6ec43ff..0690b59 100644 | ||
| 833 | --- a/libguile/random.h | ||
| 834 | +++ b/libguile/random.h | ||
| 835 | @@ -3,7 +3,7 @@ | ||
| 836 | #ifndef SCM_RANDOM_H | ||
| 837 | #define SCM_RANDOM_H | ||
| 838 | |||
| 839 | -/* Copyright (C) 1999,2000,2001, 2006 Free Software Foundation, Inc. | ||
| 840 | +/* Copyright (C) 1999,2000,2001, 2006, 2010 Free Software Foundation, Inc. | ||
| 841 | * | ||
| 842 | * This library is free software; you can redistribute it and/or | ||
| 843 | * modify it under the terms of the GNU Lesser General Public | ||
| 844 | @@ -45,6 +45,7 @@ typedef struct scm_t_rstate { | ||
| 845 | |||
| 846 | typedef struct scm_t_rng { | ||
| 847 | size_t rstate_size; /* size of random state */ | ||
| 848 | + /* Though this returns an unsigned long, it's only 32 bits of randomness. */ | ||
| 849 | unsigned long (*random_bits) (scm_t_rstate *state); /* gives 32 random bits */ | ||
| 850 | void (*init_rstate) (scm_t_rstate *state, const char *seed, int n); | ||
| 851 | scm_t_rstate *(*copy_rstate) (scm_t_rstate *state); | ||
| 852 | @@ -62,6 +63,7 @@ typedef struct scm_t_i_rstate { | ||
| 853 | unsigned long c; | ||
| 854 | } scm_t_i_rstate; | ||
| 855 | |||
| 856 | +/* Though this returns an unsigned long, it's only 32 bits of randomness. */ | ||
| 857 | SCM_API unsigned long scm_i_uniform32 (scm_t_i_rstate *); | ||
| 858 | SCM_API void scm_i_init_rstate (scm_t_i_rstate *, const char *seed, int n); | ||
| 859 | SCM_API scm_t_i_rstate *scm_i_copy_rstate (scm_t_i_rstate *); | ||
| 860 | @@ -76,7 +78,10 @@ SCM_API scm_t_rstate *scm_c_default_rstate (void); | ||
| 861 | SCM_API double scm_c_uniform01 (scm_t_rstate *); | ||
| 862 | SCM_API double scm_c_normal01 (scm_t_rstate *); | ||
| 863 | SCM_API double scm_c_exp1 (scm_t_rstate *); | ||
| 864 | +/* Though this returns an unsigned long, it's only 32 bits of randomness. */ | ||
| 865 | SCM_API unsigned long scm_c_random (scm_t_rstate *, unsigned long m); | ||
| 866 | +/* This one returns 64 bits of randomness. */ | ||
| 867 | +SCM_API scm_t_uint64 scm_c_random64 (scm_t_rstate *state, scm_t_uint64 m); | ||
| 868 | SCM_API SCM scm_c_random_bignum (scm_t_rstate *, SCM m); | ||
| 869 | |||
| 870 | |||
| 871 | diff --git a/libguile/socket.c b/libguile/socket.c | ||
| 872 | index f34b6d4..cb954f4 100644 | ||
| 873 | --- a/libguile/socket.c | ||
| 874 | +++ b/libguile/socket.c | ||
| 875 | @@ -347,7 +347,7 @@ scm_to_ipv6 (scm_t_uint8 dst[16], SCM src) | ||
| 876 | scm_remember_upto_here_1 (src); | ||
| 877 | } | ||
| 878 | else | ||
| 879 | - scm_wrong_type_arg (NULL, 0, src); | ||
| 880 | + scm_wrong_type_arg_msg ("scm_to_ipv6", 0, src, "integer"); | ||
| 881 | } | ||
| 882 | |||
| 883 | #ifdef HAVE_INET_PTON | ||
| 884 | @@ -397,8 +397,8 @@ SCM_DEFINE (scm_inet_ntop, "inet-ntop", 2, 0, 0, | ||
| 885 | "@var{family} can be @code{AF_INET} or @code{AF_INET6}. E.g.,\n\n" | ||
| 886 | "@lisp\n" | ||
| 887 | "(inet-ntop AF_INET 2130706433) @result{} \"127.0.0.1\"\n" | ||
| 888 | - "(inet-ntop AF_INET6 (- (expt 2 128) 1)) @result{}\n" | ||
| 889 | - "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff\n" | ||
| 890 | + "(inet-ntop AF_INET6 (- (expt 2 128) 1))\n" | ||
| 891 | + " @result{} \"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff\"\n" | ||
| 892 | "@end lisp") | ||
| 893 | #define FUNC_NAME s_scm_inet_ntop | ||
| 894 | { | ||
| 895 | @@ -1167,7 +1167,8 @@ scm_to_sockaddr (SCM address, size_t *address_size) | ||
| 896 | { | ||
| 897 | struct sockaddr_in6 c_inet6; | ||
| 898 | |||
| 899 | - scm_to_ipv6 (c_inet6.sin6_addr.s6_addr, address); | ||
| 900 | + scm_to_ipv6 (c_inet6.sin6_addr.s6_addr, | ||
| 901 | + SCM_SIMPLE_VECTOR_REF (address, 1)); | ||
| 902 | c_inet6.sin6_port = | ||
| 903 | htons (scm_to_ushort (SCM_SIMPLE_VECTOR_REF (address, 2))); | ||
| 904 | c_inet6.sin6_flowinfo = | ||
| 905 | diff --git a/libguile/srfi-4.c b/libguile/srfi-4.c | ||
| 906 | index b0e052a..f2a9d7f 100644 | ||
| 907 | --- a/libguile/srfi-4.c | ||
| 908 | +++ b/libguile/srfi-4.c | ||
| 909 | @@ -1,6 +1,6 @@ | ||
| 910 | /* srfi-4.c --- Uniform numeric vector datatypes. | ||
| 911 | * | ||
| 912 | - * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. | ||
| 913 | + * Copyright (C) 2001, 2004, 2006, 2010 Free Software Foundation, Inc. | ||
| 914 | * | ||
| 915 | * This library is free software; you can redistribute it and/or | ||
| 916 | * modify it under the terms of the GNU Lesser General Public | ||
| 917 | @@ -84,11 +84,7 @@ static const int uvec_sizes[12] = { | ||
| 918 | 1, 1, | ||
| 919 | 2, 2, | ||
| 920 | 4, 4, | ||
| 921 | -#if SCM_HAVE_T_INT64 | ||
| 922 | 8, 8, | ||
| 923 | -#else | ||
| 924 | - sizeof (SCM), sizeof (SCM), | ||
| 925 | -#endif | ||
| 926 | sizeof(float), sizeof(double), | ||
| 927 | 2*sizeof(float), 2*sizeof(double) | ||
| 928 | }; | ||
| 929 | @@ -127,10 +123,8 @@ uvec_print (SCM uvec, SCM port, scm_print_state *pstate) | ||
| 930 | scm_t_int16 *s16; | ||
| 931 | scm_t_uint32 *u32; | ||
| 932 | scm_t_int32 *s32; | ||
| 933 | -#if SCM_HAVE_T_INT64 | ||
| 934 | scm_t_uint64 *u64; | ||
| 935 | scm_t_int64 *s64; | ||
| 936 | -#endif | ||
| 937 | float *f32; | ||
| 938 | double *f64; | ||
| 939 | SCM *fake_64; | ||
| 940 | @@ -148,13 +142,8 @@ uvec_print (SCM uvec, SCM port, scm_print_state *pstate) | ||
| 941 | case SCM_UVEC_S16: np.s16 = (scm_t_int16 *) uptr; break; | ||
| 942 | case SCM_UVEC_U32: np.u32 = (scm_t_uint32 *) uptr; break; | ||
| 943 | case SCM_UVEC_S32: np.s32 = (scm_t_int32 *) uptr; break; | ||
| 944 | -#if SCM_HAVE_T_INT64 | ||
| 945 | case SCM_UVEC_U64: np.u64 = (scm_t_uint64 *) uptr; break; | ||
| 946 | case SCM_UVEC_S64: np.s64 = (scm_t_int64 *) uptr; break; | ||
| 947 | -#else | ||
| 948 | - case SCM_UVEC_U64: | ||
| 949 | - case SCM_UVEC_S64: np.fake_64 = (SCM *) uptr; break; | ||
| 950 | -#endif | ||
| 951 | case SCM_UVEC_F32: np.f32 = (float *) uptr; break; | ||
| 952 | case SCM_UVEC_F64: np.f64 = (double *) uptr; break; | ||
| 953 | case SCM_UVEC_C32: np.f32 = (float *) uptr; break; | ||
| 954 | @@ -179,14 +168,8 @@ uvec_print (SCM uvec, SCM port, scm_print_state *pstate) | ||
| 955 | case SCM_UVEC_S16: scm_intprint (*np.s16, 10, port); np.s16++; break; | ||
| 956 | case SCM_UVEC_U32: scm_uintprint (*np.u32, 10, port); np.u32++; break; | ||
| 957 | case SCM_UVEC_S32: scm_intprint (*np.s32, 10, port); np.s32++; break; | ||
| 958 | -#if SCM_HAVE_T_INT64 | ||
| 959 | case SCM_UVEC_U64: scm_uintprint (*np.u64, 10, port); np.u64++; break; | ||
| 960 | case SCM_UVEC_S64: scm_intprint (*np.s64, 10, port); np.s64++; break; | ||
| 961 | -#else | ||
| 962 | - case SCM_UVEC_U64: | ||
| 963 | - case SCM_UVEC_S64: scm_iprin1 (*np.fake_64, port, pstate); | ||
| 964 | - np.fake_64++; break; | ||
| 965 | -#endif | ||
| 966 | case SCM_UVEC_F32: scm_i_print_double (*np.f32, port); np.f32++; break; | ||
| 967 | case SCM_UVEC_F64: scm_i_print_double (*np.f64, port); np.f64++; break; | ||
| 968 | case SCM_UVEC_C32: | ||
| 969 | @@ -222,20 +205,6 @@ uvec_equalp (SCM a, SCM b) | ||
| 970 | result = SCM_BOOL_F; | ||
| 971 | else if (SCM_UVEC_LENGTH (a) != SCM_UVEC_LENGTH (b)) | ||
| 972 | result = SCM_BOOL_F; | ||
| 973 | -#if SCM_HAVE_T_INT64 == 0 | ||
| 974 | - else if (SCM_UVEC_TYPE (a) == SCM_UVEC_U64 | ||
| 975 | - || SCM_UVEC_TYPE (a) == SCM_UVEC_S64) | ||
| 976 | - { | ||
| 977 | - SCM *aptr = (SCM *)SCM_UVEC_BASE (a), *bptr = (SCM *)SCM_UVEC_BASE (b); | ||
| 978 | - size_t len = SCM_UVEC_LENGTH (a), i; | ||
| 979 | - for (i = 0; i < len; i++) | ||
| 980 | - if (scm_is_false (scm_num_eq_p (*aptr++, *bptr++))) | ||
| 981 | - { | ||
| 982 | - result = SCM_BOOL_F; | ||
| 983 | - break; | ||
| 984 | - } | ||
| 985 | - } | ||
| 986 | -#endif | ||
| 987 | else if (memcmp (SCM_UVEC_BASE (a), SCM_UVEC_BASE (b), | ||
| 988 | SCM_UVEC_LENGTH (a) * uvec_sizes[SCM_UVEC_TYPE(a)]) != 0) | ||
| 989 | result = SCM_BOOL_F; | ||
| 990 | @@ -244,24 +213,6 @@ uvec_equalp (SCM a, SCM b) | ||
| 991 | return result; | ||
| 992 | } | ||
| 993 | |||
| 994 | -/* Mark hook. Only used when U64 and S64 are implemented as SCMs. */ | ||
| 995 | - | ||
| 996 | -#if SCM_HAVE_T_INT64 == 0 | ||
| 997 | -static SCM | ||
| 998 | -uvec_mark (SCM uvec) | ||
| 999 | -{ | ||
| 1000 | - if (SCM_UVEC_TYPE (uvec) == SCM_UVEC_U64 | ||
| 1001 | - || SCM_UVEC_TYPE (uvec) == SCM_UVEC_S64) | ||
| 1002 | - { | ||
| 1003 | - SCM *ptr = (SCM *)SCM_UVEC_BASE (uvec); | ||
| 1004 | - size_t len = SCM_UVEC_LENGTH (uvec), i; | ||
| 1005 | - for (i = 0; i < len; i++) | ||
| 1006 | - scm_gc_mark (*ptr++); | ||
| 1007 | - } | ||
| 1008 | - return SCM_BOOL_F; | ||
| 1009 | -} | ||
| 1010 | -#endif | ||
| 1011 | - | ||
| 1012 | /* Smob free hook for uniform numeric vectors. */ | ||
| 1013 | static size_t | ||
| 1014 | uvec_free (SCM uvec) | ||
| 1015 | @@ -318,15 +269,6 @@ alloc_uvec (int type, size_t len) | ||
| 1016 | if (len > SCM_I_SIZE_MAX / uvec_sizes[type]) | ||
| 1017 | scm_out_of_range (NULL, scm_from_size_t (len)); | ||
| 1018 | base = scm_gc_malloc (len * uvec_sizes[type], uvec_names[type]); | ||
| 1019 | -#if SCM_HAVE_T_INT64 == 0 | ||
| 1020 | - if (type == SCM_UVEC_U64 || type == SCM_UVEC_S64) | ||
| 1021 | - { | ||
| 1022 | - SCM *ptr = (SCM *)base; | ||
| 1023 | - size_t i; | ||
| 1024 | - for (i = 0; i < len; i++) | ||
| 1025 | - *ptr++ = SCM_UNSPECIFIED; | ||
| 1026 | - } | ||
| 1027 | -#endif | ||
| 1028 | return take_uvec (type, base, len); | ||
| 1029 | } | ||
| 1030 | |||
| 1031 | @@ -349,17 +291,10 @@ uvec_fast_ref (int type, const void *base, size_t c_idx) | ||
| 1032 | return scm_from_uint32 (((scm_t_uint32*)base)[c_idx]); | ||
| 1033 | else if (type == SCM_UVEC_S32) | ||
| 1034 | return scm_from_int32 (((scm_t_int32*)base)[c_idx]); | ||
| 1035 | -#if SCM_HAVE_T_INT64 | ||
| 1036 | else if (type == SCM_UVEC_U64) | ||
| 1037 | return scm_from_uint64 (((scm_t_uint64*)base)[c_idx]); | ||
| 1038 | else if (type == SCM_UVEC_S64) | ||
| 1039 | return scm_from_int64 (((scm_t_int64*)base)[c_idx]); | ||
| 1040 | -#else | ||
| 1041 | - else if (type == SCM_UVEC_U64) | ||
| 1042 | - return ((SCM *)base)[c_idx]; | ||
| 1043 | - else if (type == SCM_UVEC_S64) | ||
| 1044 | - return ((SCM *)base)[c_idx]; | ||
| 1045 | -#endif | ||
| 1046 | else if (type == SCM_UVEC_F32) | ||
| 1047 | return scm_from_double (((float*)base)[c_idx]); | ||
| 1048 | else if (type == SCM_UVEC_F64) | ||
| 1049 | @@ -374,22 +309,6 @@ uvec_fast_ref (int type, const void *base, size_t c_idx) | ||
| 1050 | return SCM_BOOL_F; | ||
| 1051 | } | ||
| 1052 | |||
| 1053 | -#if SCM_HAVE_T_INT64 == 0 | ||
| 1054 | -static SCM scm_uint64_min, scm_uint64_max; | ||
| 1055 | -static SCM scm_int64_min, scm_int64_max; | ||
| 1056 | - | ||
| 1057 | -static void | ||
| 1058 | -assert_exact_integer_range (SCM val, SCM min, SCM max) | ||
| 1059 | -{ | ||
| 1060 | - if (!scm_is_integer (val) | ||
| 1061 | - || scm_is_false (scm_exact_p (val))) | ||
| 1062 | - scm_wrong_type_arg_msg (NULL, 0, val, "exact integer"); | ||
| 1063 | - if (scm_is_true (scm_less_p (val, min)) | ||
| 1064 | - || scm_is_true (scm_gr_p (val, max))) | ||
| 1065 | - scm_out_of_range (NULL, val); | ||
| 1066 | -} | ||
| 1067 | -#endif | ||
| 1068 | - | ||
| 1069 | static SCM_C_INLINE_KEYWORD void | ||
| 1070 | uvec_fast_set_x (int type, void *base, size_t c_idx, SCM val) | ||
| 1071 | { | ||
| 1072 | @@ -405,23 +324,10 @@ uvec_fast_set_x (int type, void *base, size_t c_idx, SCM val) | ||
| 1073 | (((scm_t_uint32*)base)[c_idx]) = scm_to_uint32 (val); | ||
| 1074 | else if (type == SCM_UVEC_S32) | ||
| 1075 | (((scm_t_int32*)base)[c_idx]) = scm_to_int32 (val); | ||
| 1076 | -#if SCM_HAVE_T_INT64 | ||
| 1077 | else if (type == SCM_UVEC_U64) | ||
| 1078 | (((scm_t_uint64*)base)[c_idx]) = scm_to_uint64 (val); | ||
| 1079 | else if (type == SCM_UVEC_S64) | ||
| 1080 | (((scm_t_int64*)base)[c_idx]) = scm_to_int64 (val); | ||
| 1081 | -#else | ||
| 1082 | - else if (type == SCM_UVEC_U64) | ||
| 1083 | - { | ||
| 1084 | - assert_exact_integer_range (val, scm_uint64_min, scm_uint64_max); | ||
| 1085 | - ((SCM *)base)[c_idx] = val; | ||
| 1086 | - } | ||
| 1087 | - else if (type == SCM_UVEC_S64) | ||
| 1088 | - { | ||
| 1089 | - assert_exact_integer_range (val, scm_int64_min, scm_int64_max); | ||
| 1090 | - ((SCM *)base)[c_idx] = val; | ||
| 1091 | - } | ||
| 1092 | -#endif | ||
| 1093 | else if (type == SCM_UVEC_F32) | ||
| 1094 | (((float*)base)[c_idx]) = scm_to_double (val); | ||
| 1095 | else if (type == SCM_UVEC_F64) | ||
| 1096 | @@ -1027,16 +933,12 @@ SCM_DEFINE (scm_uniform_vector_write, "uniform-vector-write", 1, 3, 0, | ||
| 1097 | |||
| 1098 | #define TYPE SCM_UVEC_U64 | ||
| 1099 | #define TAG u64 | ||
| 1100 | -#if SCM_HAVE_T_UINT64 | ||
| 1101 | #define CTYPE scm_t_uint64 | ||
| 1102 | -#endif | ||
| 1103 | #include "libguile/srfi-4.i.c" | ||
| 1104 | |||
| 1105 | #define TYPE SCM_UVEC_S64 | ||
| 1106 | #define TAG s64 | ||
| 1107 | -#if SCM_HAVE_T_INT64 | ||
| 1108 | #define CTYPE scm_t_int64 | ||
| 1109 | -#endif | ||
| 1110 | #include "libguile/srfi-4.i.c" | ||
| 1111 | |||
| 1112 | #define TYPE SCM_UVEC_F32 | ||
| 1113 | @@ -1094,23 +996,9 @@ scm_init_srfi_4 (void) | ||
| 1114 | { | ||
| 1115 | scm_tc16_uvec = scm_make_smob_type ("uvec", 0); | ||
| 1116 | scm_set_smob_equalp (scm_tc16_uvec, uvec_equalp); | ||
| 1117 | -#if SCM_HAVE_T_INT64 == 0 | ||
| 1118 | - scm_set_smob_mark (scm_tc16_uvec, uvec_mark); | ||
| 1119 | -#endif | ||
| 1120 | scm_set_smob_free (scm_tc16_uvec, uvec_free); | ||
| 1121 | scm_set_smob_print (scm_tc16_uvec, uvec_print); | ||
| 1122 | |||
| 1123 | -#if SCM_HAVE_T_INT64 == 0 | ||
| 1124 | - scm_uint64_min = | ||
| 1125 | - scm_permanent_object (scm_from_int (0)); | ||
| 1126 | - scm_uint64_max = | ||
| 1127 | - scm_permanent_object (scm_c_read_string ("18446744073709551615")); | ||
| 1128 | - scm_int64_min = | ||
| 1129 | - scm_permanent_object (scm_c_read_string ("-9223372036854775808")); | ||
| 1130 | - scm_int64_max = | ||
| 1131 | - scm_permanent_object (scm_c_read_string ("9223372036854775807")); | ||
| 1132 | -#endif | ||
| 1133 | - | ||
| 1134 | #include "libguile/srfi-4.x" | ||
| 1135 | |||
| 1136 | } | ||
| 1137 | diff --git a/libguile/srfi-4.h b/libguile/srfi-4.h | ||
| 1138 | index 7abbac8..2348c5a 100644 | ||
| 1139 | --- a/libguile/srfi-4.h | ||
| 1140 | +++ b/libguile/srfi-4.h | ||
| 1141 | @@ -2,7 +2,7 @@ | ||
| 1142 | #define SCM_SRFI_4_H | ||
| 1143 | /* srfi-4.c --- Homogeneous numeric vector datatypes. | ||
| 1144 | * | ||
| 1145 | - * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. | ||
| 1146 | + * Copyright (C) 2001, 2004, 2006, 2010 Free Software Foundation, Inc. | ||
| 1147 | * | ||
| 1148 | * This library is free software; you can redistribute it and/or | ||
| 1149 | * modify it under the terms of the GNU Lesser General Public | ||
| 1150 | @@ -186,7 +186,6 @@ SCM_API SCM scm_u64vector_to_list (SCM uvec); | ||
| 1151 | SCM_API SCM scm_list_to_u64vector (SCM l); | ||
| 1152 | SCM_API SCM scm_any_to_u64vector (SCM obj); | ||
| 1153 | |||
| 1154 | -#if SCM_HAVE_T_UINT64 | ||
| 1155 | SCM_API SCM scm_take_u64vector (scm_t_uint64 *data, size_t n); | ||
| 1156 | SCM_API const scm_t_uint64 *scm_array_handle_u64_elements (scm_t_array_handle *h); | ||
| 1157 | SCM_API scm_t_uint64 *scm_array_handle_u64_writable_elements (scm_t_array_handle *h); | ||
| 1158 | @@ -198,7 +197,6 @@ SCM_API scm_t_uint64 *scm_u64vector_writable_elements (SCM uvec, | ||
| 1159 | scm_t_array_handle *h, | ||
| 1160 | size_t *lenp, | ||
| 1161 | ssize_t *incp); | ||
| 1162 | -#endif | ||
| 1163 | |||
| 1164 | SCM_API SCM scm_s64vector_p (SCM obj); | ||
| 1165 | SCM_API SCM scm_make_s64vector (SCM n, SCM fill); | ||
| 1166 | @@ -210,7 +208,6 @@ SCM_API SCM scm_s64vector_to_list (SCM uvec); | ||
| 1167 | SCM_API SCM scm_list_to_s64vector (SCM l); | ||
| 1168 | SCM_API SCM scm_any_to_s64vector (SCM obj); | ||
| 1169 | |||
| 1170 | -#if SCM_HAVE_T_INT64 | ||
| 1171 | SCM_API SCM scm_take_s64vector (scm_t_int64 *data, size_t n); | ||
| 1172 | SCM_API const scm_t_int64 *scm_array_handle_s64_elements (scm_t_array_handle *h); | ||
| 1173 | SCM_API scm_t_int64 *scm_array_handle_s64_writable_elements (scm_t_array_handle *h); | ||
| 1174 | @@ -221,7 +218,6 @@ SCM_API scm_t_int64 *scm_s64vector_writable_elements (SCM uvec, | ||
| 1175 | scm_t_array_handle *h, | ||
| 1176 | size_t *lenp, | ||
| 1177 | ssize_t *incp); | ||
| 1178 | -#endif | ||
| 1179 | |||
| 1180 | SCM_API SCM scm_f32vector_p (SCM obj); | ||
| 1181 | SCM_API SCM scm_make_f32vector (SCM n, SCM fill); | ||
| 1182 | diff --git a/libguile/threads.c b/libguile/threads.c | ||
| 1183 | index 95a905c..f2bb556 100644 | ||
| 1184 | --- a/libguile/threads.c | ||
| 1185 | +++ b/libguile/threads.c | ||
| 1186 | @@ -276,7 +276,7 @@ unblock_from_queue (SCM queue) | ||
| 1187 | var 't' | ||
| 1188 | // save registers. | ||
| 1189 | SCM_FLUSH_REGISTER_WINDOWS; // sparc only | ||
| 1190 | - setjmp (t->regs); // here's most of the magic | ||
| 1191 | + SCM_I_SETJMP (t->regs); // here's most of the magic | ||
| 1192 | |||
| 1193 | ... and returns. | ||
| 1194 | |||
| 1195 | @@ -330,7 +330,7 @@ unblock_from_queue (SCM queue) | ||
| 1196 | t->top = SCM_STACK_PTR (&t); | ||
| 1197 | // save registers. | ||
| 1198 | SCM_FLUSH_REGISTER_WINDOWS; | ||
| 1199 | - setjmp (t->regs); | ||
| 1200 | + SCM_I_SETJMP (t->regs); | ||
| 1201 | res = func(data); | ||
| 1202 | scm_enter_guile (t); | ||
| 1203 | |||
| 1204 | @@ -388,7 +388,7 @@ suspend (void) | ||
| 1205 | t->top = SCM_STACK_PTR (&t); | ||
| 1206 | /* save registers. */ | ||
| 1207 | SCM_FLUSH_REGISTER_WINDOWS; | ||
| 1208 | - setjmp (t->regs); | ||
| 1209 | + SCM_I_SETJMP (t->regs); | ||
| 1210 | return t; | ||
| 1211 | } | ||
| 1212 | |||
| 1213 | diff --git a/libguile/threads.h b/libguile/threads.h | ||
| 1214 | index 2b0e067..e22d9bd 100644 | ||
| 1215 | --- a/libguile/threads.h | ||
| 1216 | +++ b/libguile/threads.h | ||
| 1217 | @@ -107,7 +107,7 @@ typedef struct scm_i_thread { | ||
| 1218 | /* For keeping track of the stack and registers. */ | ||
| 1219 | SCM_STACKITEM *base; | ||
| 1220 | SCM_STACKITEM *top; | ||
| 1221 | - jmp_buf regs; | ||
| 1222 | + scm_i_jmp_buf regs; | ||
| 1223 | #ifdef __ia64__ | ||
| 1224 | void *register_backing_store_base; | ||
| 1225 | scm_t_contregs *pending_rbs_continuation; | ||
| 1226 | diff --git a/libguile/throw.c b/libguile/throw.c | ||
| 1227 | index 92c5a1a..fcfde47 100644 | ||
| 1228 | --- a/libguile/throw.c | ||
| 1229 | +++ b/libguile/throw.c | ||
| 1230 | @@ -53,7 +53,7 @@ static scm_t_bits tc16_jmpbuffer; | ||
| 1231 | #define DEACTIVATEJB(x) \ | ||
| 1232 | (SCM_SET_CELL_WORD_0 ((x), (SCM_CELL_WORD_0 (x) & ~(1L << 16L)))) | ||
| 1233 | |||
| 1234 | -#define JBJMPBUF(OBJ) ((jmp_buf *) SCM_CELL_WORD_1 (OBJ)) | ||
| 1235 | +#define JBJMPBUF(OBJ) ((scm_i_jmp_buf *) SCM_CELL_WORD_1 (OBJ)) | ||
| 1236 | #define SETJBJMPBUF(x, v) (SCM_SET_CELL_WORD_1 ((x), (scm_t_bits) (v))) | ||
| 1237 | #define SCM_JBDFRAME(x) ((scm_t_debug_frame *) SCM_CELL_WORD_2 (x)) | ||
| 1238 | #define SCM_SETJBDFRAME(x, v) (SCM_SET_CELL_WORD_2 ((x), (scm_t_bits) (v))) | ||
| 1239 | @@ -75,7 +75,7 @@ make_jmpbuf (void) | ||
| 1240 | { | ||
| 1241 | SCM answer; | ||
| 1242 | SCM_NEWSMOB2 (answer, tc16_jmpbuffer, 0, 0); | ||
| 1243 | - SETJBJMPBUF(answer, (jmp_buf *)0); | ||
| 1244 | + SETJBJMPBUF(answer, (scm_i_jmp_buf *)0); | ||
| 1245 | DEACTIVATEJB(answer); | ||
| 1246 | return answer; | ||
| 1247 | } | ||
| 1248 | @@ -85,7 +85,7 @@ make_jmpbuf (void) | ||
| 1249 | |||
| 1250 | struct jmp_buf_and_retval /* use only on the stack, in scm_catch */ | ||
| 1251 | { | ||
| 1252 | - jmp_buf buf; /* must be first */ | ||
| 1253 | + scm_i_jmp_buf buf; /* must be first */ | ||
| 1254 | SCM throw_tag; | ||
| 1255 | SCM retval; | ||
| 1256 | }; | ||
| 1257 | @@ -179,7 +179,7 @@ scm_c_catch (SCM tag, | ||
| 1258 | pre_unwind.lazy_catch_p = 0; | ||
| 1259 | SCM_SETJBPREUNWIND(jmpbuf, &pre_unwind); | ||
| 1260 | |||
| 1261 | - if (setjmp (jbr.buf)) | ||
| 1262 | + if (SCM_I_SETJMP (jbr.buf)) | ||
| 1263 | { | ||
| 1264 | SCM throw_tag; | ||
| 1265 | SCM throw_args; | ||
| 1266 | @@ -821,7 +821,7 @@ scm_ithrow (SCM key, SCM args, int noreturn SCM_UNUSED) | ||
| 1267 | jbr->throw_tag = key; | ||
| 1268 | jbr->retval = args; | ||
| 1269 | scm_i_set_last_debug_frame (SCM_JBDFRAME (jmpbuf)); | ||
| 1270 | - longjmp (*JBJMPBUF (jmpbuf), 1); | ||
| 1271 | + SCM_I_LONGJMP (*JBJMPBUF (jmpbuf), 1); | ||
| 1272 | } | ||
| 1273 | |||
| 1274 | /* Otherwise, it's some random piece of junk. */ | ||
| 1275 | diff --git a/libguile/vectors.c b/libguile/vectors.c | ||
| 1276 | index eeb8569..074655c 100644 | ||
| 1277 | --- a/libguile/vectors.c | ||
| 1278 | +++ b/libguile/vectors.c | ||
| 1279 | @@ -1,4 +1,4 @@ | ||
| 1280 | -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. | ||
| 1281 | +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2010 Free Software Foundation, Inc. | ||
| 1282 | * | ||
| 1283 | * This library is free software; you can redistribute it and/or | ||
| 1284 | * modify it under the terms of the GNU Lesser General Public | ||
| 1285 | @@ -465,7 +465,9 @@ SCM_DEFINE (scm_vector_move_left_x, "vector-move-left!", 5, 0, 0, | ||
| 1286 | |||
| 1287 | i = scm_to_unsigned_integer (start1, 0, len1); | ||
| 1288 | e = scm_to_unsigned_integer (end1, i, len1); | ||
| 1289 | - j = scm_to_unsigned_integer (start2, 0, len2 - (i-e)); | ||
| 1290 | + SCM_ASSERT_RANGE (SCM_ARG3, end1, (e-i) < len2); | ||
| 1291 | + j = scm_to_unsigned_integer (start2, 0, len2); | ||
| 1292 | + SCM_ASSERT_RANGE (SCM_ARG5, start2, j <= len2 - (e - i)); | ||
| 1293 | |||
| 1294 | i *= inc1; | ||
| 1295 | e *= inc1; | ||
| 1296 | @@ -503,7 +505,11 @@ SCM_DEFINE (scm_vector_move_right_x, "vector-move-right!", 5, 0, 0, | ||
| 1297 | |||
| 1298 | i = scm_to_unsigned_integer (start1, 0, len1); | ||
| 1299 | e = scm_to_unsigned_integer (end1, i, len1); | ||
| 1300 | - j = scm_to_unsigned_integer (start2, 0, len2 - (i-e)); | ||
| 1301 | + SCM_ASSERT_RANGE (SCM_ARG3, end1, (e-i) < len2); | ||
| 1302 | + j = scm_to_unsigned_integer (start2, 0, len2); | ||
| 1303 | + SCM_ASSERT_RANGE (SCM_ARG5, start2, j <= len2 - (e - i)); | ||
| 1304 | + | ||
| 1305 | + j += (e - i); | ||
| 1306 | |||
| 1307 | i *= inc1; | ||
| 1308 | e *= inc1; | ||
| 1309 | diff --git a/scripts/snarf-check-and-output-texi b/scripts/snarf-check-and-output-texi | ||
| 1310 | index ea33e17..8cd42e8 100755 | ||
| 1311 | --- a/scripts/snarf-check-and-output-texi | ||
| 1312 | +++ b/scripts/snarf-check-and-output-texi | ||
| 1313 | @@ -267,6 +267,17 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@" | ||
| 1314 | (set! *file* file) | ||
| 1315 | (set! *line* line)) | ||
| 1316 | |||
| 1317 | + ;; newer gccs like to throw around more location markers into the | ||
| 1318 | + ;; preprocessed source; these (hash . hash) bits are what they translate to | ||
| 1319 | + ;; in snarfy terms. | ||
| 1320 | + (('location ('string . file) ('int . line) ('hash . 'hash)) | ||
| 1321 | + (set! *file* file) | ||
| 1322 | + (set! *line* line)) | ||
| 1323 | + | ||
| 1324 | + (('location ('hash . 'hash) ('string . file) ('int . line) ('hash . 'hash)) | ||
| 1325 | + (set! *file* file) | ||
| 1326 | + (set! *line* line)) | ||
| 1327 | + | ||
| 1328 | (('arglist rest ...) | ||
| 1329 | (set! *args* (do-arglist rest))) | ||
| 1330 | |||
| 1331 | diff --git a/srfi/srfi-19.scm b/srfi/srfi-19.scm | ||
| 1332 | index ffce990..482ec4e 100644 | ||
| 1333 | --- a/srfi/srfi-19.scm | ||
| 1334 | +++ b/srfi/srfi-19.scm | ||
| 1335 | @@ -1,6 +1,6 @@ | ||
| 1336 | ;;; srfi-19.scm --- Time/Date Library | ||
| 1337 | |||
| 1338 | -;; Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 1339 | +;; Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | ||
| 1340 | ;; | ||
| 1341 | ;; This library is free software; you can redistribute it and/or | ||
| 1342 | ;; modify it under the terms of the GNU Lesser General Public | ||
| 1343 | @@ -41,7 +41,8 @@ | ||
| 1344 | (define-module (srfi srfi-19) | ||
| 1345 | :use-module (srfi srfi-6) | ||
| 1346 | :use-module (srfi srfi-8) | ||
| 1347 | - :use-module (srfi srfi-9)) | ||
| 1348 | + :use-module (srfi srfi-9) | ||
| 1349 | + :autoload (ice-9 rdelim) (read-line)) | ||
| 1350 | |||
| 1351 | (begin-deprecated | ||
| 1352 | ;; Prevent `export' from re-exporting core bindings. This behaviour | ||
| 1353 | @@ -339,7 +340,7 @@ | ||
| 1354 | (set-tm:hour result (date-hour date)) | ||
| 1355 | ;; FIXME: SRFI day ranges from 0-31. (not compatible with set-tm:mday). | ||
| 1356 | (set-tm:mday result (date-day date)) | ||
| 1357 | - (set-tm:month result (- (date-month date) 1)) | ||
| 1358 | + (set-tm:mon result (- (date-month date) 1)) | ||
| 1359 | ;; FIXME: need to signal error on range violation. | ||
| 1360 | (set-tm:year result (+ 1900 (date-year date))) | ||
| 1361 | (set-tm:isdst result -1) | ||
| 1362 | @@ -528,33 +529,38 @@ | ||
| 1363 | ;; -- these depend on time-monotonic having the same definition as time-tai! | ||
| 1364 | (define (time-monotonic->time-utc time-in) | ||
| 1365 | (if (not (eq? (time-type time-in) time-monotonic)) | ||
| 1366 | - (priv:time-error caller 'incompatible-time-types time-in)) | ||
| 1367 | + (priv:time-error 'time-monotonic->time-utc | ||
| 1368 | + 'incompatible-time-types time-in)) | ||
| 1369 | (let ((ntime (copy-time time-in))) | ||
| 1370 | (set-time-type! ntime time-tai) | ||
| 1371 | (priv:time-tai->time-utc! ntime ntime 'time-monotonic->time-utc))) | ||
| 1372 | |||
| 1373 | (define (time-monotonic->time-utc! time-in) | ||
| 1374 | (if (not (eq? (time-type time-in) time-monotonic)) | ||
| 1375 | - (priv:time-error caller 'incompatible-time-types time-in)) | ||
| 1376 | + (priv:time-error 'time-monotonic->time-utc! | ||
| 1377 | + 'incompatible-time-types time-in)) | ||
| 1378 | (set-time-type! time-in time-tai) | ||
| 1379 | - (priv:time-tai->time-utc! ntime ntime 'time-monotonic->time-utc)) | ||
| 1380 | + (priv:time-tai->time-utc! time-in time-in 'time-monotonic->time-utc)) | ||
| 1381 | |||
| 1382 | (define (time-monotonic->time-tai time-in) | ||
| 1383 | (if (not (eq? (time-type time-in) time-monotonic)) | ||
| 1384 | - (priv:time-error caller 'incompatible-time-types time-in)) | ||
| 1385 | + (priv:time-error 'time-monotonic->time-tai | ||
| 1386 | + 'incompatible-time-types time-in)) | ||
| 1387 | (let ((ntime (copy-time time-in))) | ||
| 1388 | (set-time-type! ntime time-tai) | ||
| 1389 | ntime)) | ||
| 1390 | |||
| 1391 | (define (time-monotonic->time-tai! time-in) | ||
| 1392 | (if (not (eq? (time-type time-in) time-monotonic)) | ||
| 1393 | - (priv:time-error caller 'incompatible-time-types time-in)) | ||
| 1394 | + (priv:time-error 'time-monotonic->time-tai! | ||
| 1395 | + 'incompatible-time-types time-in)) | ||
| 1396 | (set-time-type! time-in time-tai) | ||
| 1397 | time-in) | ||
| 1398 | |||
| 1399 | (define (time-utc->time-monotonic time-in) | ||
| 1400 | (if (not (eq? (time-type time-in) time-utc)) | ||
| 1401 | - (priv:time-error caller 'incompatible-time-types time-in)) | ||
| 1402 | + (priv:time-error 'time-utc->time-monotonic | ||
| 1403 | + 'incompatible-time-types time-in)) | ||
| 1404 | (let ((ntime (priv:time-utc->time-tai! time-in (make-time-unnormalized #f #f #f) | ||
| 1405 | 'time-utc->time-monotonic))) | ||
| 1406 | (set-time-type! ntime time-monotonic) | ||
| 1407 | @@ -562,7 +568,8 @@ | ||
| 1408 | |||
| 1409 | (define (time-utc->time-monotonic! time-in) | ||
| 1410 | (if (not (eq? (time-type time-in) time-utc)) | ||
| 1411 | - (priv:time-error caller 'incompatible-time-types time-in)) | ||
| 1412 | + (priv:time-error 'time-utc->time-monotonic! | ||
| 1413 | + 'incompatible-time-types time-in)) | ||
| 1414 | (let ((ntime (priv:time-utc->time-tai! time-in time-in | ||
| 1415 | 'time-utc->time-monotonic!))) | ||
| 1416 | (set-time-type! ntime time-monotonic) | ||
| 1417 | @@ -570,14 +577,16 @@ | ||
| 1418 | |||
| 1419 | (define (time-tai->time-monotonic time-in) | ||
| 1420 | (if (not (eq? (time-type time-in) time-tai)) | ||
| 1421 | - (priv:time-error caller 'incompatible-time-types time-in)) | ||
| 1422 | + (priv:time-error 'time-tai->time-monotonic | ||
| 1423 | + 'incompatible-time-types time-in)) | ||
| 1424 | (let ((ntime (copy-time time-in))) | ||
| 1425 | (set-time-type! ntime time-monotonic) | ||
| 1426 | ntime)) | ||
| 1427 | |||
| 1428 | (define (time-tai->time-monotonic! time-in) | ||
| 1429 | (if (not (eq? (time-type time-in) time-tai)) | ||
| 1430 | - (priv:time-error caller 'incompatible-time-types time-in)) | ||
| 1431 | + (priv:time-error 'time-tai->time-monotonic! | ||
| 1432 | + 'incompatible-time-types time-in)) | ||
| 1433 | (set-time-type! time-in time-monotonic) | ||
| 1434 | time-in) | ||
| 1435 | |||
| 1436 | @@ -780,7 +789,7 @@ | ||
| 1437 | (define (priv:year-day day month year) | ||
| 1438 | (let ((days-pr (assoc month priv:month-assoc))) | ||
| 1439 | (if (not days-pr) | ||
| 1440 | - (priv:error 'date-year-day 'invalid-month-specification month)) | ||
| 1441 | + (priv:time-error 'date-year-day 'invalid-month-specification month)) | ||
| 1442 | (if (and (priv:leap-year? year) (> month 2)) | ||
| 1443 | (+ day (cdr days-pr) 1) | ||
| 1444 | (+ day (cdr days-pr))))) | ||
| 1445 | @@ -1263,7 +1272,7 @@ | ||
| 1446 | ((#\8) 8) | ||
| 1447 | ((#\9) 9) | ||
| 1448 | (else (priv:time-error 'bad-date-template-string | ||
| 1449 | - (list "Non-integer character" ch i))))) | ||
| 1450 | + (list "Non-integer character" ch))))) | ||
| 1451 | |||
| 1452 | ;; read an integer upto n characters long on port; upto -> #f is any length | ||
| 1453 | (define (priv:integer-reader upto port) | ||
| 1454 | diff --git a/srfi/srfi-35.scm b/srfi/srfi-35.scm | ||
| 1455 | index 2035466..ee20a10 100644 | ||
| 1456 | --- a/srfi/srfi-35.scm | ||
| 1457 | +++ b/srfi/srfi-35.scm | ||
| 1458 | @@ -57,6 +57,19 @@ | ||
| 1459 | (number->string (object-address ct) | ||
| 1460 | 16)))))) | ||
| 1461 | |||
| 1462 | +(define (%make-condition-type layout id parent all-fields) | ||
| 1463 | + (let ((struct (make-struct %condition-type-vtable 0 | ||
| 1464 | + (make-struct-layout layout) ;; layout | ||
| 1465 | + print-condition ;; printer | ||
| 1466 | + id parent all-fields))) | ||
| 1467 | + | ||
| 1468 | + ;; Hack to associate STRUCT with a name, providing a better name for | ||
| 1469 | + ;; GOOPS classes as returned by `class-of' et al. | ||
| 1470 | + (set-struct-vtable-name! struct (cond ((symbol? id) id) | ||
| 1471 | + ((string? id) (string->symbol id)) | ||
| 1472 | + (else (string->symbol "")))) | ||
| 1473 | + struct)) | ||
| 1474 | + | ||
| 1475 | (define (condition-type? obj) | ||
| 1476 | "Return true if OBJ is a condition type." | ||
| 1477 | (and (struct? obj) | ||
| 1478 | @@ -104,10 +117,8 @@ supertypes." | ||
| 1479 | field-names parent-fields))) | ||
| 1480 | (let* ((all-fields (append parent-fields field-names)) | ||
| 1481 | (layout (struct-layout-for-condition all-fields))) | ||
| 1482 | - (make-struct %condition-type-vtable 0 | ||
| 1483 | - (make-struct-layout layout) ;; layout | ||
| 1484 | - print-condition ;; printer | ||
| 1485 | - id parent all-fields)) | ||
| 1486 | + (%make-condition-type layout | ||
| 1487 | + id parent all-fields)) | ||
| 1488 | (error "invalid condition type field names" | ||
| 1489 | field-names))) | ||
| 1490 | (error "parent is not a condition type" parent)) | ||
| 1491 | @@ -126,13 +137,10 @@ supertypes." | ||
| 1492 | (let* ((all-fields (append-map condition-type-all-fields | ||
| 1493 | parents)) | ||
| 1494 | (layout (struct-layout-for-condition all-fields))) | ||
| 1495 | - (make-struct %condition-type-vtable 0 | ||
| 1496 | - (make-struct-layout layout) ;; layout | ||
| 1497 | - print-condition ;; printer | ||
| 1498 | - id | ||
| 1499 | - parents ;; list of parents! | ||
| 1500 | - all-fields | ||
| 1501 | - all-fields))))) | ||
| 1502 | + (%make-condition-type layout | ||
| 1503 | + id | ||
| 1504 | + parents ;; list of parents! | ||
| 1505 | + all-fields))))) | ||
| 1506 | |||
| 1507 | |||
| 1508 | ;;; | ||
| 1509 | diff --git a/test-suite/standalone/Makefile.am b/test-suite/standalone/Makefile.am | ||
| 1510 | index e7cfd82..058ce93 100644 | ||
| 1511 | --- a/test-suite/standalone/Makefile.am | ||
| 1512 | +++ b/test-suite/standalone/Makefile.am | ||
| 1513 | @@ -28,7 +28,9 @@ check_SCRIPTS = | ||
| 1514 | BUILT_SOURCES = | ||
| 1515 | EXTRA_DIST = | ||
| 1516 | |||
| 1517 | -TESTS_ENVIRONMENT = "${top_builddir}/pre-inst-guile-env" | ||
| 1518 | +TESTS_ENVIRONMENT = \ | ||
| 1519 | + builddir="$(builddir)" \ | ||
| 1520 | + "${top_builddir}/pre-inst-guile-env" | ||
| 1521 | |||
| 1522 | test_cflags = \ | ||
| 1523 | -I$(top_srcdir)/test-suite/standalone \ | ||
| 1524 | diff --git a/test-suite/standalone/test-asmobs b/test-suite/standalone/test-asmobs | ||
| 1525 | index 2ea75d9..9689ab9 100755 | ||
| 1526 | --- a/test-suite/standalone/test-asmobs | ||
| 1527 | +++ b/test-suite/standalone/test-asmobs | ||
| 1528 | @@ -2,7 +2,8 @@ | ||
| 1529 | exec guile -q -s "$0" "$@" | ||
| 1530 | !# | ||
| 1531 | |||
| 1532 | -(load-extension "libtest-asmobs" "libtest_asmobs_init") | ||
| 1533 | +(load-extension (string-append (getenv "builddir") "/libtest-asmobs") | ||
| 1534 | + "libtest_asmobs_init") | ||
| 1535 | |||
| 1536 | (define (test x v) | ||
| 1537 | (if v | ||
| 1538 | diff --git a/test-suite/standalone/test-conversion.c b/test-suite/standalone/test-conversion.c | ||
| 1539 | index 41f99d3..caa835d 100644 | ||
| 1540 | --- a/test-suite/standalone/test-conversion.c | ||
| 1541 | +++ b/test-suite/standalone/test-conversion.c | ||
| 1542 | @@ -1,4 +1,4 @@ | ||
| 1543 | -/* Copyright (C) 1999,2000,2001,2003,2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | ||
| 1544 | +/* Copyright (C) 1999,2000,2001,2003,2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 1545 | * | ||
| 1546 | * This library is free software; you can redistribute it and/or | ||
| 1547 | * modify it under the terms of the GNU Lesser General Public | ||
| 1548 | @@ -702,10 +702,8 @@ DEFSTST (scm_to_int16) | ||
| 1549 | DEFUTST (scm_to_uint16) | ||
| 1550 | DEFSTST (scm_to_int32) | ||
| 1551 | DEFUTST (scm_to_uint32) | ||
| 1552 | -#ifdef SCM_HAVE_T_INT64 | ||
| 1553 | DEFSTST (scm_to_int64) | ||
| 1554 | DEFUTST (scm_to_uint64) | ||
| 1555 | -#endif | ||
| 1556 | |||
| 1557 | #define TEST_8S(v,f,r,re,te) test_8s (v, tst_##f, #f, r, re, te) | ||
| 1558 | #define TEST_8U(v,f,r,re,te) test_8u (v, tst_##f, #f, r, re, te) | ||
| 1559 | @@ -745,11 +743,9 @@ test_int_sizes () | ||
| 1560 | TEST_7S (scm_from_int32, SCM_T_INT32_MAX+1LL, "-2147483648"); | ||
| 1561 | TEST_7U (scm_from_uint32, SCM_T_UINT32_MAX, "4294967295"); | ||
| 1562 | |||
| 1563 | -#if SCM_HAVE_T_INT64 | ||
| 1564 | TEST_7S (scm_from_int64, SCM_T_INT64_MIN, "-9223372036854775808"); | ||
| 1565 | TEST_7S (scm_from_int64, SCM_T_INT64_MAX, "9223372036854775807"); | ||
| 1566 | TEST_7U (scm_from_uint64, SCM_T_UINT64_MAX, "18446744073709551615"); | ||
| 1567 | -#endif | ||
| 1568 | |||
| 1569 | TEST_8S ("91", scm_to_schar, 91, 0, 0); | ||
| 1570 | TEST_8U ("91", scm_to_uchar, 91, 0, 0); | ||
| 1571 | @@ -794,7 +790,6 @@ test_int_sizes () | ||
| 1572 | TEST_8U ("-1", scm_to_uint32, 0, 1, 0); | ||
| 1573 | TEST_8U ("#f", scm_to_uint32, 0, 0, 1); | ||
| 1574 | |||
| 1575 | -#if SCM_HAVE_T_INT64 | ||
| 1576 | TEST_8S ("-9223372036854775808", scm_to_int64, SCM_T_INT64_MIN, 0, 0); | ||
| 1577 | TEST_8S ("9223372036854775807", scm_to_int64, SCM_T_INT64_MAX, 0, 0); | ||
| 1578 | TEST_8S ("9223372036854775808", scm_to_int64, 0, 1, 0); | ||
| 1579 | @@ -803,7 +798,6 @@ test_int_sizes () | ||
| 1580 | TEST_8U ("18446744073709551616", scm_to_uint64, 0, 1, 0); | ||
| 1581 | TEST_8U ("-1", scm_to_uint64, 0, 1, 0); | ||
| 1582 | TEST_8U ("#f", scm_to_uint64, 0, 0, 1); | ||
| 1583 | -#endif | ||
| 1584 | |||
| 1585 | } | ||
| 1586 | |||
| 1587 | diff --git a/test-suite/tests/goops.test b/test-suite/tests/goops.test | ||
| 1588 | index fa53fd2..fb2535a 100644 | ||
| 1589 | --- a/test-suite/tests/goops.test | ||
| 1590 | +++ b/test-suite/tests/goops.test | ||
| 1591 | @@ -140,7 +140,12 @@ | ||
| 1592 | (eq? (class-of "foo") <string>)) | ||
| 1593 | |||
| 1594 | (pass-if "port" | ||
| 1595 | - (is-a? (%make-void-port "w") <port>))) | ||
| 1596 | + (is-a? (%make-void-port "w") <port>)) | ||
| 1597 | + | ||
| 1598 | + (pass-if "struct vtable" | ||
| 1599 | + ;; Previously, `class-of' would fail for nameless structs, i.e., structs | ||
| 1600 | + ;; for which `struct-vtable-name' is #f. | ||
| 1601 | + (is-a? (class-of (make-vtable-vtable "prprpr" 0)) <class>))) | ||
| 1602 | |||
| 1603 | |||
| 1604 | (with-test-prefix "defining classes" | ||
| 1605 | diff --git a/test-suite/tests/socket.test b/test-suite/tests/socket.test | ||
| 1606 | index 4bfc415..e73f585 100644 | ||
| 1607 | --- a/test-suite/tests/socket.test | ||
| 1608 | +++ b/test-suite/tests/socket.test | ||
| 1609 | @@ -1,6 +1,6 @@ | ||
| 1610 | ;;;; socket.test --- test socket functions -*- scheme -*- | ||
| 1611 | ;;;; | ||
| 1612 | -;;;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 1613 | +;;;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | ||
| 1614 | ;;;; | ||
| 1615 | ;;;; This library is free software; you can redistribute it and/or | ||
| 1616 | ;;;; modify it under the terms of the GNU Lesser General Public | ||
| 1617 | @@ -174,13 +174,28 @@ | ||
| 1618 | ;;; AF_UNIX sockets and `make-socket-address' | ||
| 1619 | ;;; | ||
| 1620 | |||
| 1621 | +(define %tmpdir | ||
| 1622 | + ;; Honor `$TMPDIR', which tmpnam(3) doesn't do. | ||
| 1623 | + (or (getenv "TMPDIR") "/tmp")) | ||
| 1624 | + | ||
| 1625 | +(define %curdir | ||
| 1626 | + ;; Remember the current working directory. | ||
| 1627 | + (getcwd)) | ||
| 1628 | + | ||
| 1629 | +;; Temporarily cd to %TMPDIR. The goal is to work around path name | ||
| 1630 | +;; limitations, which can lead to exceptions like: | ||
| 1631 | +;; | ||
| 1632 | +;; (misc-error "scm_to_sockaddr" | ||
| 1633 | +;; "unix address path too long: ~A" | ||
| 1634 | +;; ("/tmp/nix-build-fb7bph4ifh0vr3ihigm702dzffdnapfj-guile-coverage-1.9.5.drv-0/guile-test-socket-1258553296-77619") | ||
| 1635 | +;; #f) | ||
| 1636 | +(chdir %tmpdir) | ||
| 1637 | + | ||
| 1638 | (define (temp-file-path) | ||
| 1639 | - ;; Return a temporary file path that honors `$TMPDIR', which `tmpnam' | ||
| 1640 | - ;; doesn't do. | ||
| 1641 | - (let ((dir (or (getenv "TMPDIR") "/tmp"))) | ||
| 1642 | - (string-append dir "/guile-test-socket-" | ||
| 1643 | - (number->string (current-time)) "-" | ||
| 1644 | - (number->string (random 100000))))) | ||
| 1645 | + ;; Return a temporary file name, assuming the current directory is %TMPDIR. | ||
| 1646 | + (string-append "guile-test-socket-" | ||
| 1647 | + (number->string (current-time)) "-" | ||
| 1648 | + (number->string (random 100000)))) | ||
| 1649 | |||
| 1650 | |||
| 1651 | (if (defined? 'AF_UNIX) | ||
| 1652 | @@ -320,3 +335,91 @@ | ||
| 1653 | |||
| 1654 | #t))) | ||
| 1655 | |||
| 1656 | + | ||
| 1657 | +(if (defined? 'AF_INET6) | ||
| 1658 | + (with-test-prefix "AF_INET6/SOCK_STREAM" | ||
| 1659 | + | ||
| 1660 | + ;; testing `bind', `listen' and `connect' on stream-oriented sockets | ||
| 1661 | + | ||
| 1662 | + (let ((server-socket (socket AF_INET6 SOCK_STREAM 0)) | ||
| 1663 | + (server-bound? #f) | ||
| 1664 | + (server-listening? #f) | ||
| 1665 | + (server-pid #f) | ||
| 1666 | + (ipv6-addr 1) ; ::1 | ||
| 1667 | + (server-port 8889) | ||
| 1668 | + (client-port 9998)) | ||
| 1669 | + | ||
| 1670 | + (pass-if "bind" | ||
| 1671 | + (catch 'system-error | ||
| 1672 | + (lambda () | ||
| 1673 | + (bind server-socket AF_INET6 ipv6-addr server-port) | ||
| 1674 | + (set! server-bound? #t) | ||
| 1675 | + #t) | ||
| 1676 | + (lambda args | ||
| 1677 | + (let ((errno (system-error-errno args))) | ||
| 1678 | + (cond ((= errno EADDRINUSE) (throw 'unresolved)) | ||
| 1679 | + (else (apply throw args))))))) | ||
| 1680 | + | ||
| 1681 | + (pass-if "bind/sockaddr" | ||
| 1682 | + (let* ((sock (socket AF_INET6 SOCK_STREAM 0)) | ||
| 1683 | + (sockaddr (make-socket-address AF_INET6 ipv6-addr client-port))) | ||
| 1684 | + (catch 'system-error | ||
| 1685 | + (lambda () | ||
| 1686 | + (bind sock sockaddr) | ||
| 1687 | + #t) | ||
| 1688 | + (lambda args | ||
| 1689 | + (let ((errno (system-error-errno args))) | ||
| 1690 | + (cond ((= errno EADDRINUSE) (throw 'unresolved)) | ||
| 1691 | + (else (apply throw args)))))))) | ||
| 1692 | + | ||
| 1693 | + (pass-if "listen" | ||
| 1694 | + (if (not server-bound?) | ||
| 1695 | + (throw 'unresolved) | ||
| 1696 | + (begin | ||
| 1697 | + (listen server-socket 123) | ||
| 1698 | + (set! server-listening? #t) | ||
| 1699 | + #t))) | ||
| 1700 | + | ||
| 1701 | + (if server-listening? | ||
| 1702 | + (let ((pid (primitive-fork))) | ||
| 1703 | + ;; Spawn a server process. | ||
| 1704 | + (case pid | ||
| 1705 | + ((-1) (throw 'unresolved)) | ||
| 1706 | + ((0) ;; the kid: serve two connections and exit | ||
| 1707 | + (let serve ((conn | ||
| 1708 | + (false-if-exception (accept server-socket))) | ||
| 1709 | + (count 1)) | ||
| 1710 | + (if (not conn) | ||
| 1711 | + (exit 1) | ||
| 1712 | + (if (> count 0) | ||
| 1713 | + (serve (false-if-exception (accept server-socket)) | ||
| 1714 | + (- count 1))))) | ||
| 1715 | + (exit 0)) | ||
| 1716 | + (else ;; the parent | ||
| 1717 | + (set! server-pid pid) | ||
| 1718 | + #t)))) | ||
| 1719 | + | ||
| 1720 | + (pass-if "connect" | ||
| 1721 | + (if (not server-pid) | ||
| 1722 | + (throw 'unresolved) | ||
| 1723 | + (let ((s (socket AF_INET6 SOCK_STREAM 0))) | ||
| 1724 | + (connect s AF_INET6 ipv6-addr server-port) | ||
| 1725 | + #t))) | ||
| 1726 | + | ||
| 1727 | + (pass-if "connect/sockaddr" | ||
| 1728 | + (if (not server-pid) | ||
| 1729 | + (throw 'unresolved) | ||
| 1730 | + (let ((s (socket AF_INET6 SOCK_STREAM 0))) | ||
| 1731 | + (connect s (make-socket-address AF_INET6 ipv6-addr server-port)) | ||
| 1732 | + #t))) | ||
| 1733 | + | ||
| 1734 | + (pass-if "accept" | ||
| 1735 | + (if (not server-pid) | ||
| 1736 | + (throw 'unresolved) | ||
| 1737 | + (let ((status (cdr (waitpid server-pid)))) | ||
| 1738 | + (eq? 0 (status:exit-val status))))) | ||
| 1739 | + | ||
| 1740 | + #t))) | ||
| 1741 | + | ||
| 1742 | +;; Switch back to the previous directory. | ||
| 1743 | +(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 @@ | |||
| 1 | SECTION = "unknown" | ||
| 2 | LICENSE = "GPL" | ||
| 3 | DEPENDS = "gettext-native gmp-native" | ||
| 4 | |||
| 5 | inherit autotools native | ||
| 6 | |||
| 7 | S="${WORKDIR}/guile-${PV}" | ||
| 8 | |||
| 9 | do_configure_append() { | ||
| 10 | find ${S} -name Makefile | xargs sed -i s:'-Werror':'':g | ||
| 11 | } | ||
| 12 | |||
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 @@ | |||
| 1 | require guile-native.inc | ||
| 2 | SRC_URI = "http://ftp.gnu.org/pub/gnu/guile/guile-${PV}.tar.gz \ | ||
| 3 | file://configure-fix.patch \ | ||
| 4 | file://cpp-linemarkers.patch \ | ||
| 5 | " | ||
| 6 | |||
| 7 | SRC_URI[md5sum] = "991b5b3efcbbc3f7507d05bc42f80a5e" | ||
| 8 | 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 @@ | |||
| 1 | DESCRIPTION = "Guile is an interpreter for the Scheme programming language, \ | ||
| 2 | packaged as a library which can be incorporated into your programs." | ||
| 3 | HOMEPAGE = "http://www.gnu.org/software/guile/guile.html" | ||
| 4 | SECTION = "devel/scheme" | ||
| 5 | DEPENDS = "guile-native gmp libtool" | ||
| 6 | LICENSE = "GPL" | ||
| 7 | PACKAGES =+ "${PN}-el" | ||
| 8 | FILES_${PN}-el = "${datadir}/emacs" | ||
| 9 | DESCRIPTION_${PN}-el = "Emacs lisp files for Guile" | ||
| 10 | |||
| 11 | inherit autotools | ||
| 12 | |||
| 13 | acpaths = "-I ${S}/guile-config" | ||
| 14 | |||
| 15 | EXTRA_OECONF = " \ | ||
| 16 | --without-threads \ | ||
| 17 | --without-included-ltdl \ | ||
| 18 | " | ||
| 19 | |||
| 20 | do_compile() { | ||
| 21 | for i in $(find ${S} -name "Makefile") ; do | ||
| 22 | sed -i -e s:-Werror::g $i | ||
| 23 | done | ||
| 24 | |||
| 25 | (cd libguile; oe_runmake CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" LDFLAGS="${BUILD_LDFLAGS}" guile_filter_doc_snarfage) | ||
| 26 | oe_runmake preinstguile="`which guile`" | ||
| 27 | |||
| 28 | sed -i -e s:${STAGING_DIR_TARGET}::g \ | ||
| 29 | -e s:/${TARGET_SYS}::g \ | ||
| 30 | -e s:-L/usr/lib::g \ | ||
| 31 | -e s:-isystem/usr/include::g \ | ||
| 32 | -e s:,/usr/lib:,\$\{libdir\}:g \ | ||
| 33 | guile-1.8.pc | ||
| 34 | } | ||
| 35 | |||
| 36 | SYSROOT_PREPROCESS_FUNCS = "guile_cross_config" | ||
| 37 | |||
| 38 | guile_cross_config() { | ||
| 39 | # Create guile-config returning target values instead of native values | ||
| 40 | install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS} | ||
| 41 | echo '#!'`which guile`$' \\\n-e main -s\n!#\n(define %guile-build-info '\'\( >guile-config.cross | ||
| 42 | sed -n $'s:-isystem[^ ]* ::;s:-Wl,-rpath-link,[^ ]* ::;s:^[ \t]*{[ \t]*": (:;s:",[ \t]*": . ":;s:" *}, *\\\\:"):;/^ (/p' <libguile/libpath.h >>guile-config.cross | ||
| 43 | echo '))' >>guile-config.cross | ||
| 44 | cat guile-config/guile-config >>guile-config.cross | ||
| 45 | install guile-config.cross ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/guile-config | ||
| 46 | } | ||
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 @@ | |||
| 1 | require guile.inc | ||
| 2 | |||
| 3 | PR = "r1" | ||
| 4 | |||
| 5 | SRC_URI = "http://ftp.gnu.org/pub/gnu/guile/guile-${PV}.tar.gz \ | ||
| 6 | file://configure-fix.patch \ | ||
| 7 | file://18.diff \ | ||
| 8 | " | ||
| 9 | |||
| 10 | |||
| 11 | SRC_URI[md5sum] = "991b5b3efcbbc3f7507d05bc42f80a5e" | ||
| 12 | 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 @@ | |||
| 1 | --- htop-0.6.6/configure.ac 2007-05-21 13:06:15.000000000 -0500 | ||
| 2 | +++ htop-0.6.6-cross/configure.ac 2007-11-16 14:12:16.000000000 -0600 | ||
| 3 | @@ -58,8 +58,8 @@ | ||
| 4 | fi, | ||
| 5 | AC_DEFINE(PROCDIR, "/proc", [Path of proc filesystem])) | ||
| 6 | |||
| 7 | -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.)) | ||
| 8 | -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.)) | ||
| 9 | +#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.)) | ||
| 10 | +#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.)) | ||
| 11 | |||
| 12 | AC_CONFIG_FILES([Makefile]) | ||
| 13 | 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 @@ | |||
| 1 | DESCRIPTION = "htop process monitor" | ||
| 2 | HOMEPAGE = "http://htop.sf.net" | ||
| 3 | SECTION = "console/utils" | ||
| 4 | PRIORITY = "optional" | ||
| 5 | LICENSE = "GPLv2" | ||
| 6 | |||
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=c312653532e8e669f30e5ec8bdc23be3" | ||
| 8 | |||
| 9 | DEPENDS = "ncurses" | ||
| 10 | RDEPENDS_${PN} = "ncurses-terminfo" | ||
| 11 | |||
| 12 | SRC_URI = "${SOURCEFORGE_MIRROR}/htop/htop-${PV}.tar.gz \ | ||
| 13 | file://remove-proc-test.patch" | ||
| 14 | |||
| 15 | inherit autotools | ||
| 16 | |||
| 17 | SRC_URI[md5sum] = "7c5507f35f363f3f40183a2ba3c561f8" | ||
| 18 | SRC_URI[sha256sum] = "4de65c38e1886bccd30ed692b30eb9bf195240680781bfe1eaf5faf84ee6fbfd" | ||
| 19 | |||
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 @@ | |||
| 1 | DESCRIPTION = "A general purpose cryptographic library based on the code from GnuPG" | ||
| 2 | HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/" | ||
| 3 | BUGTRACKER = "https://bugs.g10code.com/gnupg/index" | ||
| 4 | SECTION = "libs" | ||
| 5 | PRIORITY = "optional" | ||
| 6 | |||
| 7 | BBCLASSEXTEND = "native" | ||
| 8 | |||
| 9 | # helper program gcryptrnd and getrandom are under GPL, rest LGPL | ||
| 10 | LICENSE = "GPLv2+ & LGPLv2.1+" | ||
| 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
| 12 | file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff" | ||
| 13 | |||
| 14 | DEPENDS = "libgpg-error" | ||
| 15 | |||
| 16 | SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \ | ||
| 17 | file://add-pkgconfig-support.patch" | ||
| 18 | |||
| 19 | inherit autotools binconfig pkgconfig | ||
| 20 | |||
| 21 | EXTRA_OECONF = "--without-pth --disable-asm --with-capabilities" | ||
| 22 | |||
| 23 | # libgcrypt.pc is added locally and thus installed here | ||
| 24 | do_install_append() { | ||
| 25 | install -d ${D}/${libdir}/pkgconfig | ||
| 26 | install -m 0644 ${S}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/ | ||
| 27 | } | ||
| 28 | |||
| 29 | ARM_INSTRUCTION_SET = "arm" | ||
| 30 | |||
| 31 | # move libgcrypt-config into -dev package | ||
| 32 | FILES_${PN} = "${libdir}/lib*.so.*" | ||
| 33 | 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 @@ | |||
| 1 | Index: libgcrypt-1.2.4/configure.ac | ||
| 2 | =================================================================== | ||
| 3 | --- libgcrypt-1.2.4.orig/configure.ac 2008-03-19 22:14:50.000000000 +0000 | ||
| 4 | +++ libgcrypt-1.2.4/configure.ac 2008-03-19 22:14:58.000000000 +0000 | ||
| 5 | @@ -807,6 +807,7 @@ | ||
| 6 | doc/Makefile | ||
| 7 | src/Makefile | ||
| 8 | src/gcrypt.h | ||
| 9 | +src/libgcrypt.pc | ||
| 10 | src/libgcrypt-config | ||
| 11 | tests/Makefile | ||
| 12 | w32-dll/Makefile | ||
| 13 | Index: libgcrypt-1.2.4/src/libgcrypt.pc.in | ||
| 14 | =================================================================== | ||
| 15 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
| 16 | +++ libgcrypt-1.2.4/src/libgcrypt.pc.in 2008-03-19 22:14:58.000000000 +0000 | ||
| 17 | @@ -0,0 +1,32 @@ | ||
| 18 | +# Process this file with autoconf to produce a pkg-config metadata file. | ||
| 19 | +# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation | ||
| 20 | +# Author: Simon Josefsson | ||
| 21 | +# | ||
| 22 | +# This file is free software; as a special exception the author gives | ||
| 23 | +# unlimited permission to copy and/or distribute it, with or without | ||
| 24 | +# modifications, as long as this notice is preserved. | ||
| 25 | +# | ||
| 26 | +# This file is distributed in the hope that it will be useful, but | ||
| 27 | +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the | ||
| 28 | +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| 29 | + | ||
| 30 | +prefix=@prefix@ | ||
| 31 | +exec_prefix=@exec_prefix@ | ||
| 32 | +libdir=@libdir@ | ||
| 33 | +includedir=@includedir@ | ||
| 34 | + | ||
| 35 | +# API info | ||
| 36 | +api_version=@LIBGCRYPT_CONFIG_API_VERSION@ | ||
| 37 | + | ||
| 38 | +# Misc information. | ||
| 39 | +symmetric_ciphers=@LIBGCRYPT_CIPHERS@ | ||
| 40 | +asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@ | ||
| 41 | +digests=@LIBGCRYPT_DIGESTS@ | ||
| 42 | + | ||
| 43 | +Name: libgcrypt | ||
| 44 | +Description: GNU crypto library | ||
| 45 | +URL: http://www.gnupg.org | ||
| 46 | +Version: @VERSION@ | ||
| 47 | +Libs: -L${libdir} -lgcrypt | ||
| 48 | +Libs.private: -L${libdir} -lgpg-error | ||
| 49 | +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 @@ | |||
| 1 | require libgcrypt.inc | ||
| 2 | |||
| 3 | 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 @@ | |||
| 1 | |||
| 2 | # | ||
| 3 | # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher | ||
| 4 | # | ||
| 5 | |||
| 6 | Index: libgpg-error-1.8/configure.ac | ||
| 7 | =================================================================== | ||
| 8 | --- libgpg-error-1.8.orig/configure.ac 2010-05-06 06:01:08.000000000 -0700 | ||
| 9 | +++ libgpg-error-1.8/configure.ac 2010-07-21 02:20:20.923261305 -0700 | ||
| 10 | @@ -140,6 +140,7 @@ | ||
| 11 | AC_SUBST(GPG_ERROR_CONFIG_CFLAGS) | ||
| 12 | AC_SUBST(GPG_ERROR_CONFIG_ISUBDIRAFTER) | ||
| 13 | AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config]) | ||
| 14 | +AC_CONFIG_FILES([src/gpg-error.pc]) | ||
| 15 | |||
| 16 | |||
| 17 | # Special defines for certain platforms | ||
| 18 | Index: libgpg-error-1.8/src/Makefile.am | ||
| 19 | =================================================================== | ||
| 20 | --- libgpg-error-1.8.orig/src/Makefile.am 2010-04-14 02:16:44.000000000 -0700 | ||
| 21 | +++ libgpg-error-1.8/src/Makefile.am 2010-07-21 02:22:36.655012496 -0700 | ||
| 22 | @@ -37,13 +37,15 @@ | ||
| 23 | bin_SCRIPTS = gpg-error-config | ||
| 24 | m4datadir = $(datadir)/aclocal | ||
| 25 | m4data_DATA = gpg-error.m4 | ||
| 26 | +pkgconfigdir = $(libdir)/pkgconfig | ||
| 27 | +pkgconfig_DATA = gpg-error.pc | ||
| 28 | |||
| 29 | EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ | ||
| 30 | mkerrnos.awk errnos.in README \ | ||
| 31 | mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \ | ||
| 32 | mkheader.awk gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \ | ||
| 33 | err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \ | ||
| 34 | - gpg-error.def.in versioninfo.rc.in | ||
| 35 | + gpg-error.def.in versioninfo.rc.in gpg-error.pc.in | ||
| 36 | |||
| 37 | BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ | ||
| 38 | err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \ | ||
| 39 | Index: libgpg-error-1.8/src/gpg-error.pc.in | ||
| 40 | =================================================================== | ||
| 41 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
| 42 | +++ libgpg-error-1.8/src/gpg-error.pc.in 2010-07-21 02:20:20.923261305 -0700 | ||
| 43 | @@ -0,0 +1,10 @@ | ||
| 44 | +prefix=@prefix@ | ||
| 45 | +exec_prefix=@exec_prefix@ | ||
| 46 | +libdir=@libdir@ | ||
| 47 | +includedir=@includedir@ | ||
| 48 | + | ||
| 49 | +Name: gpg-error | ||
| 50 | +Description: a library that defines common error values for all GnuPG components | ||
| 51 | +Version: @VERSION@ | ||
| 52 | +Libs: -L{libdir} -lgpg-error | ||
| 53 | +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 @@ | |||
| 1 | DESCRIPTION = "a small library that defines common error values for all GnuPG components" | ||
| 2 | HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/" | ||
| 3 | BUGTRACKER = "https://bugs.g10code.com/gnupg/index" | ||
| 4 | |||
| 5 | BBCLASSEXTEND = "native" | ||
| 6 | |||
| 7 | LICENSE = "GPLv2+ & LGPLv2.1+" | ||
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ | ||
| 9 | file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
| 10 | file://src/gpg-error.h;endline=23;md5=83c16c8f5cea85affa1ff270a6f4fcff \ | ||
| 11 | file://src/init.c;endline=20;md5=b69742f2a8827d494c6f6a4b1768416c" | ||
| 12 | |||
| 13 | |||
| 14 | SECTION = "libs" | ||
| 15 | LICENSE = "GPLv2+ & LGPLv2.1+" | ||
| 16 | DEPENDS = "gettext" | ||
| 17 | PR = "r0" | ||
| 18 | |||
| 19 | SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \ | ||
| 20 | file://pkgconfig.patch;" | ||
| 21 | |||
| 22 | # move libgpg-error-config into -dev package | ||
| 23 | FILES_${PN} = "${libdir}/lib*.so.*" | ||
| 24 | FILES_${PN}-dev += "${bindir}/*" | ||
| 25 | |||
| 26 | 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 @@ | |||
| 1 | PROVIDES += "virtual/libusb0" | ||
| 2 | |||
| 3 | inherit lib_package | ||
| 4 | |||
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 @@ | |||
| 1 | diff -aurp mysql-4.1.22.old/acinclude.m4 mysql-4.1.22/acinclude.m4 | ||
| 2 | --- mysql-4.1.22.old/acinclude.m4 2008-09-18 13:00:13.000000000 -0500 | ||
| 3 | +++ mysql-4.1.22/acinclude.m4 2008-09-18 12:58:41.000000000 -0500 | ||
| 4 | @@ -1,5 +1,88 @@ | ||
| 5 | # Local macros for automake & autoconf | ||
| 6 | |||
| 7 | +AH_TEMPLATE([SPRINTF_RETURNS_INT], [sprintf returns an int]) | ||
| 8 | +AH_TEMPLATE([SPRINTF_RETURNS_PTR], [sprintf returns a char *]) | ||
| 9 | +AH_TEMPLATE([SPRINTF_RETURNS_GARBAGE], [sprintf returns something unknown to us]) | ||
| 10 | + | ||
| 11 | +AC_DEFUN([MYSQL_SPRINTF_RET], [ | ||
| 12 | + AC_CACHE_CHECK([return type of sprintf], | ||
| 13 | + [mysql_cv_func_sprintf_ret], [ | ||
| 14 | + old_CFLAGS="$CFLAGS" | ||
| 15 | + CFLAGS="$CFLAGS -Werror" | ||
| 16 | + AC_COMPILE_IFELSE([ | ||
| 17 | +#include <stdio.h> | ||
| 18 | +int sprintf(char *str, const char *format, ...); | ||
| 19 | + ], [mysql_cv_func_sprintf_ret=int], | ||
| 20 | + AC_COMPILE_IFELSE([ | ||
| 21 | +#include <stdio.h> | ||
| 22 | +char * sprintf(char *str, const char *format, ...); | ||
| 23 | + ], [mysql_cv_func_sprintf_ret=ptr], | ||
| 24 | + [mysql_cv_func_sprintf_ret=unknown]) | ||
| 25 | + ) | ||
| 26 | + CFLAGS="$old_CFLAGS" | ||
| 27 | + ]) | ||
| 28 | + if test x"$mysql_cv_func_sprintf_ret" = "xint"; then | ||
| 29 | + AC_DEFINE([SPRINTF_RETURNS_INT], [1]) | ||
| 30 | + elif test x"$mysql_cv_func_sprintf_ret" = "xptr"; then | ||
| 31 | + AC_DEFINE([SPRINTF_RETURNS_PTR], [1]) | ||
| 32 | + else | ||
| 33 | + AC_DEFINE([SPRINTF_RETURNS_GARBAGE], [1]) | ||
| 34 | + fi | ||
| 35 | +]) | ||
| 36 | + | ||
| 37 | +# _MYSQL_FUNC_ATOMIC_ADD | ||
| 38 | +# ---------------------- | ||
| 39 | +# Check for Linux specific atomic_add function | ||
| 40 | +AC_DEFUN([_MYSQL_FUNC_ATOMIC_ADD], | ||
| 41 | +[AC_CACHE_CHECK([for atomic_add], [mysql_cv_func_atomic_add], | ||
| 42 | +[AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <asm/atomic.h>]], | ||
| 43 | + [ | ||
| 44 | +int main() | ||
| 45 | +{ | ||
| 46 | + atomic_t v; | ||
| 47 | + | ||
| 48 | + atomic_set(&v, 23); | ||
| 49 | + atomic_add(5, &v); | ||
| 50 | + return atomic_read(&v) == 28 ? 0 : -1; | ||
| 51 | +} | ||
| 52 | + ])], | ||
| 53 | + [mysql_cv_func_atomic_add=yes], | ||
| 54 | + [mysql_cv_func_atomic_add=no])]) | ||
| 55 | + if test x"$mysql_func_atomic_add" = "xyes"; then | ||
| 56 | + AC_DEFINE([HAVE_ATOMIC_ADD], [1]) | ||
| 57 | + fi[]dnl | ||
| 58 | +])# _MYSQL_FUNC_ATOMIC_ADD | ||
| 59 | + | ||
| 60 | +# _MYSQL_FUNC_ATOMIC_SUB | ||
| 61 | +# ---------------------- | ||
| 62 | +# Check for Linux specific atomic_sub function | ||
| 63 | +AC_DEFUN([_MYSQL_FUNC_ATOMIC_SUB], | ||
| 64 | +[AC_CACHE_CHECK([for atomic_sub], [mysql_cv_func_atomic_sub], | ||
| 65 | +[AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <asm/atomic.h>]], | ||
| 66 | + [ | ||
| 67 | +int main() | ||
| 68 | +{ | ||
| 69 | + atomic_t v; | ||
| 70 | + | ||
| 71 | + atomic_set(&v, 23); | ||
| 72 | + atomic_sub(5, &v); | ||
| 73 | + return atomic_read(&v) == 18 ? 0 : -1; | ||
| 74 | +} | ||
| 75 | + ])], | ||
| 76 | + [mysql_cv_func_atomic_sub=yes], | ||
| 77 | + [mysql_cv_func_atomic_sub=no])]) | ||
| 78 | + if test x"$mysql_func_atomic_sub" = "xyes"; then | ||
| 79 | + AC_DEFINE([HAVE_ATOMIC_SUB], [1]) | ||
| 80 | + fi[]dnl | ||
| 81 | +])# _MYSQL_FUNC_ATOMIC_SUB | ||
| 82 | + | ||
| 83 | +# MYSQL_FUNCS_ATOMIC | ||
| 84 | +# ------------------ | ||
| 85 | +# Check for Linux specific atomic add and sub functions | ||
| 86 | +AC_DEFUN([MYSQL_FUNCS_ATOMIC], [ | ||
| 87 | + AC_REQUIRE([_MYSQL_FUNC_ATOMIC_ADD])dnl | ||
| 88 | + AC_REQUIRE([_MYSQL_FUNC_ATOMIC_SUB])dnl | ||
| 89 | +])# MYSQL_FUNCS_ATOMIC | ||
| 90 | |||
| 91 | AC_DEFUN([MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY], [ | ||
| 92 | AC_CACHE_CHECK([HIST_ENTRY is declared in readline/readline.h], mysql_cv_hist_entry_declared, | ||
| 93 | @@ -344,7 +427,7 @@ dnl ------------------------------------ | ||
| 94 | AC_DEFUN([MYSQL_CHECK_ULONG], | ||
| 95 | [AC_MSG_CHECKING(for type ulong) | ||
| 96 | AC_CACHE_VAL(ac_cv_ulong, | ||
| 97 | -[AC_TRY_RUN([#include <stdio.h> | ||
| 98 | +[AC_TRY_LINK([#include <stdio.h> | ||
| 99 | #include <sys/types.h> | ||
| 100 | main() | ||
| 101 | { | ||
| 102 | @@ -362,7 +445,7 @@ fi | ||
| 103 | AC_DEFUN([MYSQL_CHECK_UCHAR], | ||
| 104 | [AC_MSG_CHECKING(for type uchar) | ||
| 105 | AC_CACHE_VAL(ac_cv_uchar, | ||
| 106 | -[AC_TRY_RUN([#include <stdio.h> | ||
| 107 | +[AC_TRY_LINK([#include <stdio.h> | ||
| 108 | #include <sys/types.h> | ||
| 109 | main() | ||
| 110 | { | ||
| 111 | @@ -380,7 +463,7 @@ fi | ||
| 112 | AC_DEFUN([MYSQL_CHECK_UINT], | ||
| 113 | [AC_MSG_CHECKING(for type uint) | ||
| 114 | AC_CACHE_VAL(ac_cv_uint, | ||
| 115 | -[AC_TRY_RUN([#include <stdio.h> | ||
| 116 | +[AC_TRY_LINK([#include <stdio.h> | ||
| 117 | #include <sys/types.h> | ||
| 118 | main() | ||
| 119 | { | ||
| 120 | @@ -399,7 +482,7 @@ fi | ||
| 121 | AC_DEFUN([MYSQL_CHECK_IN_ADDR_T], | ||
| 122 | [AC_MSG_CHECKING(for type in_addr_t) | ||
| 123 | AC_CACHE_VAL(ac_cv_in_addr_t, | ||
| 124 | -[AC_TRY_RUN([#include <stdio.h> | ||
| 125 | +[AC_TRY_LINK([#include <stdio.h> | ||
| 126 | #include <sys/types.h> | ||
| 127 | #include <sys/socket.h> | ||
| 128 | #include <netinet/in.h> | ||
| 129 | @@ -460,7 +543,7 @@ fi | ||
| 130 | AC_DEFUN([MYSQL_CHECK_FP_EXCEPT], | ||
| 131 | [AC_MSG_CHECKING(for type fp_except) | ||
| 132 | AC_CACHE_VAL(ac_cv_fp_except, | ||
| 133 | -[AC_TRY_RUN([#include <stdio.h> | ||
| 134 | +[AC_TRY_LINK([#include <stdio.h> | ||
| 135 | #include <sys/types.h> | ||
| 136 | #include <ieeefp.h> | ||
| 137 | main() | ||
| 138 | diff -aurp mysql-4.1.22.old/configure.in mysql-4.1.22/configure.in | ||
| 139 | --- mysql-4.1.22.old/configure.in 2008-09-18 13:00:14.000000000 -0500 | ||
| 140 | +++ mysql-4.1.22/configure.in 2008-09-18 12:54:00.000000000 -0500 | ||
| 141 | @@ -236,8 +236,6 @@ then | ||
| 142 | else | ||
| 143 | AC_PATH_PROG(AS, as, as) | ||
| 144 | fi | ||
| 145 | -# Still need ranlib for readline; local static use only so no libtool. | ||
| 146 | -AC_PROG_RANLIB | ||
| 147 | # We use libtool | ||
| 148 | #AC_LIBTOOL_WIN32_DLL | ||
| 149 | AC_PROG_LIBTOOL | ||
| 150 | @@ -258,44 +256,7 @@ AC_PROG_YACC | ||
| 151 | AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf) | ||
| 152 | AC_CHECK_PROG(DVIS, tex, manual.dvi) | ||
| 153 | |||
| 154 | -AC_MSG_CHECKING("return type of sprintf") | ||
| 155 | - | ||
| 156 | -#check the return type of sprintf | ||
| 157 | -case $SYSTEM_TYPE in | ||
| 158 | - *netware*) | ||
| 159 | - AC_DEFINE(SPRINTF_RETURNS_INT, [1]) AC_MSG_RESULT("int") | ||
| 160 | - ;; | ||
| 161 | - *) | ||
| 162 | -AC_TRY_RUN([ | ||
| 163 | - int main() | ||
| 164 | - { | ||
| 165 | - char* s = "hello"; | ||
| 166 | - char buf[6]; | ||
| 167 | - if((int)sprintf(buf, s) == strlen(s)) | ||
| 168 | - return 0; | ||
| 169 | - | ||
| 170 | - return -1; | ||
| 171 | - } | ||
| 172 | - ], | ||
| 173 | - [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) | ||
| 174 | - AC_MSG_RESULT("int")], | ||
| 175 | - [AC_TRY_RUN([ | ||
| 176 | - int main() | ||
| 177 | - { | ||
| 178 | - char* s = "hello"; | ||
| 179 | - char buf[6]; | ||
| 180 | - if((char*)sprintf(buf,s) == buf + strlen(s)) | ||
| 181 | - return 0; | ||
| 182 | - return -1; | ||
| 183 | - } ], | ||
| 184 | - [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf]) | ||
| 185 | - AC_MSG_RESULT("ptr")], | ||
| 186 | - [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf]) | ||
| 187 | - AC_MSG_RESULT("garbage")]) | ||
| 188 | - ]) | ||
| 189 | - ;; | ||
| 190 | -esac | ||
| 191 | - | ||
| 192 | +MYSQL_SPRINTF_RET | ||
| 193 | |||
| 194 | # option, cache_name, variable, | ||
| 195 | # code to execute if yes, code to exectute if fail | ||
| 196 | @@ -878,47 +839,7 @@ struct request_info *req; | ||
| 197 | AC_SUBST(WRAPLIBS) | ||
| 198 | |||
| 199 | if test "$TARGET_LINUX" = "true"; then | ||
| 200 | - AC_MSG_CHECKING([for atomic operations]) | ||
| 201 | - | ||
| 202 | - AC_LANG_SAVE | ||
| 203 | - AC_LANG_CPLUSPLUS | ||
| 204 | - | ||
| 205 | - atom_ops= | ||
| 206 | - AC_TRY_RUN([ | ||
| 207 | -#include <asm/atomic.h> | ||
| 208 | -int main() | ||
| 209 | -{ | ||
| 210 | - atomic_t v; | ||
| 211 | - | ||
| 212 | - atomic_set(&v, 23); | ||
| 213 | - atomic_add(5, &v); | ||
| 214 | - return atomic_read(&v) == 28 ? 0 : -1; | ||
| 215 | -} | ||
| 216 | - ], | ||
| 217 | - [AC_DEFINE([HAVE_ATOMIC_ADD], [1], | ||
| 218 | - [atomic_add() from <asm/atomic.h> (Linux only)]) | ||
| 219 | - atom_ops="${atom_ops}atomic_add "], | ||
| 220 | - ) | ||
| 221 | - AC_TRY_RUN([ | ||
| 222 | -#include <asm/atomic.h> | ||
| 223 | -int main() | ||
| 224 | -{ | ||
| 225 | - atomic_t v; | ||
| 226 | - | ||
| 227 | - atomic_set(&v, 23); | ||
| 228 | - atomic_sub(5, &v); | ||
| 229 | - return atomic_read(&v) == 18 ? 0 : -1; | ||
| 230 | -} | ||
| 231 | - ], | ||
| 232 | - [AC_DEFINE([HAVE_ATOMIC_SUB], [1], | ||
| 233 | - [atomic_sub() from <asm/atomic.h> (Linux only)]) | ||
| 234 | - atom_ops="${atom_ops}atomic_sub "], | ||
| 235 | - ) | ||
| 236 | - | ||
| 237 | - if test -z "$atom_ops"; then atom_ops="no"; fi | ||
| 238 | - AC_MSG_RESULT($atom_ops) | ||
| 239 | - | ||
| 240 | - AC_LANG_RESTORE | ||
| 241 | + MYSQL_FUNC_ATOMIC | ||
| 242 | |||
| 243 | AC_ARG_WITH(pstack, | ||
| 244 | [ --with-pstack Use the pstack backtrace library], | ||
| 245 | @@ -971,13 +892,13 @@ fi | ||
| 246 | # Later in this script LIBS will be augmented with a threads library. | ||
| 247 | NON_THREADED_LIBS="$LIBS" | ||
| 248 | |||
| 249 | -AC_MSG_CHECKING([for int8]) | ||
| 250 | +AC_CACHE_CHECK([for int8], [mysql_cv_type_int8], [ | ||
| 251 | case $SYSTEM_TYPE in | ||
| 252 | *netware) | ||
| 253 | AC_MSG_RESULT([no]) | ||
| 254 | ;; | ||
| 255 | *) | ||
| 256 | -AC_TRY_RUN([ | ||
| 257 | +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | ||
| 258 | #ifdef HAVE_STDLIB_H | ||
| 259 | #include <stdlib.h> | ||
| 260 | #endif | ||
| 261 | @@ -988,22 +909,21 @@ AC_TRY_RUN([ | ||
| 262 | |||
| 263 | #ifdef HAVE_SYS_TYPES_H | ||
| 264 | #include <sys/types.h> | ||
| 265 | -#endif | ||
| 266 | - | ||
| 267 | +#endif]], [ | ||
| 268 | int main() | ||
| 269 | { | ||
| 270 | int8 i; | ||
| 271 | return 0; | ||
| 272 | -} | ||
| 273 | -], | ||
| 274 | -[AC_DEFINE([HAVE_INT_8_16_32], [1], | ||
| 275 | - [whether int8, int16 and int32 types exist]) | ||
| 276 | -AC_MSG_RESULT([yes])], | ||
| 277 | -[AC_MSG_RESULT([no])] | ||
| 278 | -) | ||
| 279 | +}])], [mysql_cv_type_int8=yes], [mysql_cv_type_int8=no]) | ||
| 280 | ;; | ||
| 281 | esac | ||
| 282 | |||
| 283 | +if test x"$mysql_cv_type_int8" = "xyes"; then | ||
| 284 | + AC_DEFINE([HAVE_INT_8_16_32], [1], | ||
| 285 | + [whether int8, int16 and int32 types exist]) | ||
| 286 | +fi | ||
| 287 | +]) | ||
| 288 | + | ||
| 289 | # | ||
| 290 | # Some system specific hacks | ||
| 291 | # | ||
| 292 | @@ -1814,7 +1734,7 @@ then | ||
| 293 | AC_MSG_ERROR("MySQL needs a long long type.") | ||
| 294 | fi | ||
| 295 | # off_t is not a builtin type | ||
| 296 | -MYSQL_CHECK_SIZEOF(off_t, 4) | ||
| 297 | +AC_CHECK_SIZEOF(off_t, 4) | ||
| 298 | if test "$ac_cv_sizeof_off_t" -eq 0 | ||
| 299 | then | ||
| 300 | AC_MSG_ERROR("MySQL needs a off_t type.") | ||
| 301 | diff -aurp mysql-4.1.22.old/innobase/configure.in mysql-4.1.22/innobase/configure.in | ||
| 302 | --- mysql-4.1.22.old/innobase/configure.in 2008-09-18 13:00:14.000000000 -0500 | ||
| 303 | +++ mysql-4.1.22/innobase/configure.in 2008-09-18 12:55:39.000000000 -0500 | ||
| 304 | @@ -3,6 +3,7 @@ AC_INIT | ||
| 305 | AC_CANONICAL_SYSTEM | ||
| 306 | AM_MAINTAINER_MODE | ||
| 307 | AM_CONFIG_HEADER(ib_config.h) | ||
| 308 | +AC_CONFIG_AUX_DIR([..]) | ||
| 309 | AM_INIT_AUTOMAKE(ib, 0.90) | ||
| 310 | |||
| 311 | # This is need before AC_PROG_CC | ||
| 312 | @@ -32,7 +33,6 @@ CFLAGS="$CFLAGS " | ||
| 313 | CXXFLAGS="$CXXFLAGS " | ||
| 314 | |||
| 315 | AC_PROG_CC | ||
| 316 | -AC_PROG_RANLIB | ||
| 317 | AC_PROG_INSTALL | ||
| 318 | AC_PROG_LIBTOOL | ||
| 319 | 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 @@ | |||
| 1 | Index: mysql-4.1.22/configure.in | ||
| 2 | =================================================================== | ||
| 3 | --- mysql-4.1.22.orig/configure.in 2009-01-28 16:33:28.000000000 +0000 | ||
| 4 | +++ mysql-4.1.22/configure.in 2009-01-28 16:43:26.000000000 +0000 | ||
| 5 | @@ -471,8 +471,8 @@ | ||
| 6 | |||
| 7 | # Lock for PS | ||
| 8 | AC_PATH_PROG(PS, ps, ps) | ||
| 9 | -AC_MSG_CHECKING("how to check if pid exists") | ||
| 10 | -PS=$ac_cv_path_PS | ||
| 11 | +AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC], | ||
| 12 | +[ | ||
| 13 | # Linux style | ||
| 14 | if $PS p $$ 2> /dev/null | grep $0 > /dev/null | ||
| 15 | then | ||
| 16 | @@ -511,8 +511,9 @@ | ||
| 17 | AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.]) | ||
| 18 | esac | ||
| 19 | fi | ||
| 20 | -AC_SUBST(FIND_PROC) | ||
| 21 | -AC_MSG_RESULT("$FIND_PROC") | ||
| 22 | +ac_cv_FIND_PROC="$FIND_PROC" | ||
| 23 | +]) | ||
| 24 | +AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC]) | ||
| 25 | |||
| 26 | # Check if a pid is valid | ||
| 27 | 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 @@ | |||
| 1 | --- mysql-4.1.22/configure.in.old 2008-09-18 20:11:15.000000000 -0500 | ||
| 2 | +++ mysql-4.1.22/configure.in 2008-09-18 20:12:28.000000000 -0500 | ||
| 3 | @@ -456,9 +456,9 @@ else | ||
| 4 | fi | ||
| 5 | fi | ||
| 6 | |||
| 7 | -AC_SUBST(HOSTNAME) | ||
| 8 | -AC_SUBST(PERL) | ||
| 9 | -AC_SUBST(PERL5) | ||
| 10 | +AC_SUBST(HOSTNAME,/bin/hostname) | ||
| 11 | +AC_SUBST(PERL,$(bindir)/perl) | ||
| 12 | +AC_SUBST(PERL5,$(bindir)/perl) | ||
| 13 | |||
| 14 | # for build ndb docs | ||
| 15 | |||
| 16 | @@ -516,16 +516,17 @@ AC_MSG_RESULT("$FIND_PROC") | ||
| 17 | |||
| 18 | # Check if a pid is valid | ||
| 19 | AC_PATH_PROG(KILL, kill, kill) | ||
| 20 | +AC_SUBST(KILL,/bin/kill) | ||
| 21 | AC_MSG_CHECKING("for kill switches") | ||
| 22 | -if $ac_cv_path_KILL -0 $$ | ||
| 23 | +if $KILL -0 $$ | ||
| 24 | then | ||
| 25 | - CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null" | ||
| 26 | + CHECK_PID="$KILL -0 \$\$PID > /dev/null 2> /dev/null" | ||
| 27 | elif kill -s 0 $$ | ||
| 28 | then | ||
| 29 | - CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null" | ||
| 30 | + CHECK_PID="$KILL -s 0 \$\$PID > /dev/null 2> /dev/null" | ||
| 31 | else | ||
| 32 | AC_MSG_WARN([kill -0 to check for pid seems to fail]) | ||
| 33 | - CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null" | ||
| 34 | + CHECK_PID="$KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null" | ||
| 35 | fi | ||
| 36 | AC_SUBST(CHECK_PID) | ||
| 37 | 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 @@ | |||
| 1 | [client] | ||
| 2 | #password = password | ||
| 3 | port = 3306 | ||
| 4 | socket = /tmp/mysql.sock | ||
| 5 | |||
| 6 | [mysqld_safe] | ||
| 7 | err-log = /var/log/mysql.err | ||
| 8 | |||
| 9 | [mysqld] | ||
| 10 | user = mysql | ||
| 11 | port = 3306 | ||
| 12 | socket = /tmp/mysql.sock | ||
| 13 | pid-file = /var/lib/mysql/mysqld.pid | ||
| 14 | log-error = /var/log/mysqld.err | ||
| 15 | basedir = /usr | ||
| 16 | datadir = /var/mysql | ||
| 17 | skip-locking | ||
| 18 | skip-innodb | ||
| 19 | skip-networking | ||
| 20 | bind-address = localhost | ||
| 21 | |||
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 @@ | |||
| 1 | # MySQL init script | ||
| 2 | |||
| 3 | . /etc/default/rcS | ||
| 4 | |||
| 5 | case "$1" in | ||
| 6 | start) | ||
| 7 | /usr/bin/mysqld_safe & | ||
| 8 | ;; | ||
| 9 | stop) | ||
| 10 | if test -f /var/lib/mysql/mysqld.pid ; then | ||
| 11 | PID=`cat /var/lib/mysql/mysqld.pid` | ||
| 12 | kill $PID | ||
| 13 | fi | ||
| 14 | ;; | ||
| 15 | restart) | ||
| 16 | $0 stop | ||
| 17 | $0 start | ||
| 18 | ;; | ||
| 19 | *) | ||
| 20 | echo "Usage: /etc/init.d/mysqld {start|stop|restart}" | ||
| 21 | ;; | ||
| 22 | esac | ||
| 23 | |||
| 24 | 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 @@ | |||
| 1 | require mysql5_${PV}.inc | ||
| 2 | inherit native | ||
| 3 | PR ="r2" | ||
| 4 | |||
| 5 | SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \ | ||
| 6 | file://fix-abi-check-gcc45.patch" | ||
| 7 | |||
| 8 | RDEPENDS_${PN} = "" | ||
| 9 | PACKAGES = "" | ||
| 10 | DEPENDS = "ncurses-native" | ||
| 11 | EXTRA_OEMAKE = "" | ||
| 12 | EXTRA_OECONF = " --with-embedded-server " | ||
| 13 | |||
| 14 | do_install() { | ||
| 15 | oe_runmake 'DESTDIR=${D}' install | ||
| 16 | mv -f ${D}${libdir}/mysql/* ${D}${libdir} | ||
| 17 | rmdir ${D}${libdir}/mysql | ||
| 18 | |||
| 19 | install -d ${D}${bindir} | ||
| 20 | install -m 0755 sql/gen_lex_hash ${D}${bindir}/ | ||
| 21 | } | ||
| 22 | |||
| 23 | NATIVE_INSTALL_WORKS = "1" | ||
| 24 | |||
| 25 | PSTAGING_DISABLED = "1" | ||
| 26 | |||
| 27 | SRC_URI[md5sum] = "32e7373c16271606007374396e6742ad" | ||
| 28 | 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 @@ | |||
| 1 | Index: mysql-5.1.40/sql/Makefile.am | ||
| 2 | =================================================================== | ||
| 3 | --- mysql-5.1.40.orig/sql/Makefile.am | ||
| 4 | +++ mysql-5.1.40/sql/Makefile.am | ||
| 5 | @@ -174,10 +174,10 @@ link_sources: | ||
| 6 | # This generates lex_hash.h | ||
| 7 | # NOTE Built sources should depend on their sources not the tool | ||
| 8 | # this avoid the rebuild of the built files in a source dist | ||
| 9 | -lex_hash.h: gen_lex_hash.cc lex.h | ||
| 10 | - $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) | ||
| 11 | - ./gen_lex_hash$(EXEEXT) > $@-t | ||
| 12 | - $(MV) $@-t $@ | ||
| 13 | +GEN_LEX_HASH = ./gen_lex_hash$(EXEEXT) | ||
| 14 | + | ||
| 15 | +lex_hash.h: gen_lex_hash$(EXEEXT) | ||
| 16 | + $(GEN_LEX_HASH) > $@ | ||
| 17 | |||
| 18 | # For testing of udf_example.so | ||
| 19 | 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 @@ | |||
| 1 | Index: mysql-4.1.22/configure.in | ||
| 2 | =================================================================== | ||
| 3 | --- mysql-4.1.22.orig/configure.in 2009-01-28 16:33:28.000000000 +0000 | ||
| 4 | +++ mysql-4.1.22/configure.in 2009-01-28 16:43:26.000000000 +0000 | ||
| 5 | @@ -471,8 +471,8 @@ | ||
| 6 | |||
| 7 | # Lock for PS | ||
| 8 | AC_PATH_PROG(PS, ps, ps) | ||
| 9 | -AC_MSG_CHECKING("how to check if pid exists") | ||
| 10 | -PS=$ac_cv_path_PS | ||
| 11 | +AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC], | ||
| 12 | +[ | ||
| 13 | # Linux style | ||
| 14 | if $PS p $$ 2> /dev/null | grep $0 > /dev/null | ||
| 15 | then | ||
| 16 | @@ -511,8 +511,9 @@ | ||
| 17 | AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.]) | ||
| 18 | esac | ||
| 19 | fi | ||
| 20 | -AC_SUBST(FIND_PROC) | ||
| 21 | -AC_MSG_RESULT("$FIND_PROC") | ||
| 22 | +ac_cv_FIND_PROC="$FIND_PROC" | ||
| 23 | +]) | ||
| 24 | +AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC]) | ||
| 25 | |||
| 26 | # Check if a pid is valid | ||
| 27 | 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 @@ | |||
| 1 | Index: mysql-5.1.40/configure.in | ||
| 2 | =================================================================== | ||
| 3 | --- mysql-5.1.40.orig/configure.in | ||
| 4 | +++ mysql-5.1.40/configure.in | ||
| 5 | @@ -226,8 +226,6 @@ else | ||
| 6 | AC_PATH_PROG(AS, as, as) | ||
| 7 | fi | ||
| 8 | |||
| 9 | -# Still need ranlib for readline; local static use only so no libtool. | ||
| 10 | -AC_PROG_RANLIB | ||
| 11 | # We use libtool | ||
| 12 | #AC_LIBTOOL_WIN32_DLL | ||
| 13 | AC_PROG_LIBTOOL | ||
| 14 | @@ -255,39 +253,7 @@ AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL | ||
| 15 | AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf) | ||
| 16 | AC_CHECK_PROG(DVIS, tex, manual.dvi) | ||
| 17 | |||
| 18 | -#check the return type of sprintf | ||
| 19 | -AC_MSG_CHECKING("return type of sprintf") | ||
| 20 | -AC_TRY_RUN([ | ||
| 21 | - int main() | ||
| 22 | - { | ||
| 23 | - char* s = "hello"; | ||
| 24 | - char buf[6]; | ||
| 25 | - if((int)sprintf(buf, s) == strlen(s)) | ||
| 26 | - return 0; | ||
| 27 | - | ||
| 28 | - return -1; | ||
| 29 | - } | ||
| 30 | - ], | ||
| 31 | - [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) | ||
| 32 | - AC_MSG_RESULT("int")], | ||
| 33 | - [AC_TRY_RUN([ | ||
| 34 | - int main() | ||
| 35 | - { | ||
| 36 | - char* s = "hello"; | ||
| 37 | - char buf[6]; | ||
| 38 | - if((char*)sprintf(buf,s) == buf + strlen(s)) | ||
| 39 | - return 0; | ||
| 40 | - return -1; | ||
| 41 | - } ], | ||
| 42 | - [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf]) | ||
| 43 | - AC_MSG_RESULT("ptr")], | ||
| 44 | - [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf]) | ||
| 45 | - AC_MSG_RESULT("garbage")] | ||
| 46 | - )], | ||
| 47 | - # Cross compile, assume POSIX | ||
| 48 | - [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) | ||
| 49 | - AC_MSG_RESULT("int (we assume)")] | ||
| 50 | -) | ||
| 51 | +MYSQL_SPRINTF_RET | ||
| 52 | |||
| 53 | AC_PATH_PROG(uname_prog, uname, no) | ||
| 54 | |||
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 @@ | |||
| 1 | From: Date: July 20 2010 7:44pm | ||
| 2 | Subject: bzr commit into mysql-5.1-bugteam branch (davi:3493) Bug#52514 | ||
| 3 | List-Archive: http://lists.mysql.com/commits/113968 | ||
| 4 | X-Bug: 52514 | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: multipart/mixed; boundary="===============9147207462624717749==" | ||
| 7 | |||
| 8 | --===============9147207462624717749== | ||
| 9 | MIME-Version: 1.0 | ||
| 10 | Content-Type: text/plain; charset="us-ascii" | ||
| 11 | Content-Transfer-Encoding: 7bit | ||
| 12 | Content-Disposition: inline | ||
| 13 | |||
| 14 | # At a local mysql-5.1-bugteam repository of davi | ||
| 15 | |||
| 16 | 3493 Davi Arnaut 2010-07-20 | ||
| 17 | Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5 | ||
| 18 | due to GCC preprocessor change | ||
| 19 | |||
| 20 | The problem is that newer GCC versions treats missing headers | ||
| 21 | as fatal errors. The solution is to use a guard macro to prevent | ||
| 22 | the inclusion of system headers when checking the ABI with the | ||
| 23 | C Preprocessor. | ||
| 24 | |||
| 25 | Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638 | ||
| 26 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836 | ||
| 27 | @ Makefile.am | ||
| 28 | Define guard macro. | ||
| 29 | @ configure.in | ||
| 30 | Remove workaround. | ||
| 31 | @ include/mysql.h | ||
| 32 | Guard the header inclusion. | ||
| 33 | @ include/mysql.h.pp | ||
| 34 | Header is not included anymore. | ||
| 35 | |||
| 36 | modified: | ||
| 37 | Makefile.am | ||
| 38 | configure.in | ||
| 39 | include/mysql.h | ||
| 40 | include/mysql.h.pp | ||
| 41 | === modified file 'Makefile.am' | ||
| 42 | Index: mysql-5.1.40/Makefile.am | ||
| 43 | =================================================================== | ||
| 44 | --- mysql-5.1.40.orig/Makefile.am 2009-10-07 01:46:13.000000000 +0800 | ||
| 45 | +++ mysql-5.1.40/Makefile.am 2010-08-17 20:07:24.843148001 +0800 | ||
| 46 | @@ -312,7 +312,7 @@ | ||
| 47 | do_abi_check: | ||
| 48 | set -ex; \ | ||
| 49 | for file in $(abi_headers); do \ | ||
| 50 | - @CC@ -E -nostdinc -dI \ | ||
| 51 | + @CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \ | ||
| 52 | -I$(top_srcdir)/include \ | ||
| 53 | -I$(top_srcdir)/include/mysql \ | ||
| 54 | -I$(top_srcdir)/sql \ | ||
| 55 | Index: mysql-5.1.40/include/mysql.h | ||
| 56 | =================================================================== | ||
| 57 | --- mysql-5.1.40.orig/include/mysql.h 2009-10-07 01:46:50.000000000 +0800 | ||
| 58 | +++ mysql-5.1.40/include/mysql.h 2010-08-17 20:07:24.843148001 +0800 | ||
| 59 | @@ -44,7 +44,9 @@ | ||
| 60 | #endif | ||
| 61 | |||
| 62 | #ifndef _global_h /* If not standard header */ | ||
| 63 | +#ifndef MYSQL_ABI_CHECK | ||
| 64 | #include <sys/types.h> | ||
| 65 | +#endif | ||
| 66 | #ifdef __LCC__ | ||
| 67 | #include <winsock2.h> /* For windows */ | ||
| 68 | #endif | ||
| 69 | Index: mysql-5.1.40/include/mysql.h.pp | ||
| 70 | =================================================================== | ||
| 71 | --- mysql-5.1.40.orig/include/mysql.h.pp 2009-10-07 01:46:50.000000000 +0800 | ||
| 72 | +++ mysql-5.1.40/include/mysql.h.pp 2010-08-17 20:07:24.843148001 +0800 | ||
| 73 | @@ -1,4 +1,3 @@ | ||
| 74 | -#include <sys/types.h> | ||
| 75 | typedef char my_bool; | ||
| 76 | typedef int my_socket; | ||
| 77 | #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 @@ | |||
| 1 | --- mysql-4.1.22/configure.in.old 2008-09-18 20:11:15.000000000 -0500 | ||
| 2 | +++ mysql-4.1.22/configure.in 2008-09-18 20:12:28.000000000 -0500 | ||
| 3 | @@ -456,9 +456,9 @@ else | ||
| 4 | fi | ||
| 5 | fi | ||
| 6 | |||
| 7 | -AC_SUBST(HOSTNAME) | ||
| 8 | -AC_SUBST(PERL) | ||
| 9 | -AC_SUBST(PERL5) | ||
| 10 | +AC_SUBST(HOSTNAME,/bin/hostname) | ||
| 11 | +AC_SUBST(PERL,$(bindir)/perl) | ||
| 12 | +AC_SUBST(PERL5,$(bindir)/perl) | ||
| 13 | |||
| 14 | # for build ndb docs | ||
| 15 | |||
| 16 | @@ -516,16 +516,17 @@ AC_MSG_RESULT("$FIND_PROC") | ||
| 17 | |||
| 18 | # Check if a pid is valid | ||
| 19 | AC_PATH_PROG(KILL, kill, kill) | ||
| 20 | +AC_SUBST(KILL,/bin/kill) | ||
| 21 | AC_MSG_CHECKING("for kill switches") | ||
| 22 | -if $ac_cv_path_KILL -0 $$ | ||
| 23 | +if $KILL -0 $$ | ||
| 24 | then | ||
| 25 | - CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null" | ||
| 26 | + CHECK_PID="$KILL -0 \$\$PID > /dev/null 2> /dev/null" | ||
| 27 | elif kill -s 0 $$ | ||
| 28 | then | ||
| 29 | - CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null" | ||
| 30 | + CHECK_PID="$KILL -s 0 \$\$PID > /dev/null 2> /dev/null" | ||
| 31 | else | ||
| 32 | AC_MSG_WARN([kill -0 to check for pid seems to fail]) | ||
| 33 | - CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null" | ||
| 34 | + CHECK_PID="$KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null" | ||
| 35 | fi | ||
| 36 | AC_SUBST(CHECK_PID) | ||
| 37 | 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 @@ | |||
| 1 | Index: mysql-5.1.40/config/ac-macros/misc.m4 | ||
| 2 | =================================================================== | ||
| 3 | --- mysql-5.1.40.orig/config/ac-macros/misc.m4 | ||
| 4 | +++ mysql-5.1.40/config/ac-macros/misc.m4 | ||
| 5 | @@ -476,7 +476,7 @@ AC_DEFUN([MYSQL_STACK_DIRECTION], | ||
| 6 | { | ||
| 7 | exit (find_stack_direction() < 0); | ||
| 8 | }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1, | ||
| 9 | - ac_cv_c_stack_direction=)]) | ||
| 10 | + ac_cv_c_stack_direction=0)]) | ||
| 11 | AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) | ||
| 12 | ])dnl | ||
| 13 | |||
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 @@ | |||
| 1 | [client] | ||
| 2 | #password = password | ||
| 3 | port = 3306 | ||
| 4 | socket = /tmp/mysql.sock | ||
| 5 | |||
| 6 | [mysqld_safe] | ||
| 7 | err-log = /var/log/mysql.err | ||
| 8 | |||
| 9 | [mysqld] | ||
| 10 | user = mysql | ||
| 11 | port = 3306 | ||
| 12 | socket = /tmp/mysql.sock | ||
| 13 | pid-file = /var/lib/mysql/mysqld.pid | ||
| 14 | log-error = /var/log/mysqld.err | ||
| 15 | basedir = /usr | ||
| 16 | datadir = /var/mysql | ||
| 17 | skip-locking | ||
| 18 | loose-skip-innodb | ||
| 19 | skip-networking | ||
| 20 | bind-address = localhost | ||
| 21 | |||
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 @@ | |||
| 1 | # MySQL init script | ||
| 2 | |||
| 3 | . /etc/default/rcS | ||
| 4 | |||
| 5 | case "$1" in | ||
| 6 | start) | ||
| 7 | /usr/bin/mysqld_safe & | ||
| 8 | ;; | ||
| 9 | stop) | ||
| 10 | if test -f /var/lib/mysql/mysqld.pid ; then | ||
| 11 | PID=`cat /var/lib/mysql/mysqld.pid` | ||
| 12 | kill $PID | ||
| 13 | fi | ||
| 14 | ;; | ||
| 15 | restart) | ||
| 16 | $0 stop | ||
| 17 | $0 start | ||
| 18 | ;; | ||
| 19 | *) | ||
| 20 | echo "Usage: /etc/init.d/mysqld {start|stop|restart}" | ||
| 21 | ;; | ||
| 22 | esac | ||
| 23 | |||
| 24 | 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 @@ | |||
| 1 | Index: mysql-5.1.40/storage/innodb_plugin/plug.in | ||
| 2 | =================================================================== | ||
| 3 | --- mysql-5.1.40.orig/storage/innodb_plugin/plug.in | ||
| 4 | +++ mysql-5.1.40/storage/innodb_plugin/plug.in | ||
| 5 | @@ -63,35 +63,6 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ | ||
| 6 | ;; | ||
| 7 | esac | ||
| 8 | AC_SUBST(INNODB_DYNAMIC_CFLAGS) | ||
| 9 | - AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins) | ||
| 10 | - AC_TRY_RUN( | ||
| 11 | - [ | ||
| 12 | - #include <pthread.h> | ||
| 13 | - #include <string.h> | ||
| 14 | - | ||
| 15 | - int main(int argc, char** argv) { | ||
| 16 | - pthread_t x1; | ||
| 17 | - pthread_t x2; | ||
| 18 | - pthread_t x3; | ||
| 19 | - | ||
| 20 | - memset(&x1, 0x0, sizeof(x1)); | ||
| 21 | - memset(&x2, 0x0, sizeof(x2)); | ||
| 22 | - memset(&x3, 0x0, sizeof(x3)); | ||
| 23 | - | ||
| 24 | - __sync_bool_compare_and_swap(&x1, x2, x3); | ||
| 25 | - | ||
| 26 | - return(0); | ||
| 27 | - } | ||
| 28 | - ], | ||
| 29 | - [ | ||
| 30 | - AC_DEFINE([HAVE_ATOMIC_PTHREAD_T], [1], | ||
| 31 | - [pthread_t can be used by GCC atomic builtins]) | ||
| 32 | - AC_MSG_RESULT(yes) | ||
| 33 | - ], | ||
| 34 | - [ | ||
| 35 | - AC_MSG_RESULT(no) | ||
| 36 | - ] | ||
| 37 | - ) | ||
| 38 | |||
| 39 | # Try using solaris atomics on SunOS if GCC atomics are not available | ||
| 40 | 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 @@ | |||
| 1 | require ${PN}_${PV}.inc | ||
| 2 | |||
| 3 | DEPENDS += mysql5-native | ||
| 4 | |||
| 5 | SRC_URI[md5sum] = "32e7373c16271606007374396e6742ad" | ||
| 6 | 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 @@ | |||
| 1 | DESCRIPTION = "The MySQL Open Source Database System" | ||
| 2 | HOMEPAGE = "http://www.mysql.com/" | ||
| 3 | SECTION = "libs" | ||
| 4 | LICENSE = "GPLv2" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=477ab0a4c8ca64b482b3f2a365d0fdfa" | ||
| 6 | |||
| 7 | DEPENDS = "ncurses" | ||
| 8 | PR = "r5" | ||
| 9 | |||
| 10 | SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \ | ||
| 11 | file://configure.in.patch \ | ||
| 12 | file://plug.in.patch \ | ||
| 13 | file://misc.m4.patch \ | ||
| 14 | file://Makefile.am.patch \ | ||
| 15 | file://fix_host_path.patch \ | ||
| 16 | file://configure-ps-cache-check.patch \ | ||
| 17 | file://fix-abi-check-gcc45.patch \ | ||
| 18 | file://my.cnf \ | ||
| 19 | file://mysqld.sh" | ||
| 20 | |||
| 21 | S = "${WORKDIR}/mysql-${PV}" | ||
| 22 | |||
| 23 | BINCONFIG_GLOB = "mysql_config" | ||
| 24 | |||
| 25 | inherit autotools binconfig update-rc.d | ||
| 26 | |||
| 27 | INITSCRIPT_PACKAGES = "${PN}-server" | ||
| 28 | INITSCRIPT_NAME = "mysqld" | ||
| 29 | INITSCRIPT_PARAMS = "start 45 S . stop 45 0 6 1 ." | ||
| 30 | |||
| 31 | export ac_cv_path_PS=/bin/ps | ||
| 32 | export ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null" | ||
| 33 | PARALLEL_MAKE = " " | ||
| 34 | EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" | ||
| 35 | 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 " | ||
| 36 | |||
| 37 | do_configure_append() { | ||
| 38 | sed -i /comp_err/d ${S}/sql/share/Makefile | ||
| 39 | } | ||
| 40 | |||
| 41 | SYSROOT_PREPROCESS_FUNCS += "mysql5_sysroot_preprocess" | ||
| 42 | |||
| 43 | # We need to append this so it runs *after* binconfig's preprocess function | ||
| 44 | mysql5_sysroot_preprocess () { | ||
| 45 | sed -i -es,^pkgincludedir=\'/usr/include/mysql\',pkgincludedir=\'${STAGING_INCDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config | ||
| 46 | sed -i -es,^pkglibdir=\'/usr/lib/mysql\',pkglibdir=\'${STAGING_LIBDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config | ||
| 47 | } | ||
| 48 | |||
| 49 | do_install() { | ||
| 50 | oe_runmake 'DESTDIR=${D}' install | ||
| 51 | mv -f ${D}${libdir}/mysql/* ${D}${libdir} | ||
| 52 | rmdir ${D}${libdir}/mysql | ||
| 53 | |||
| 54 | install -d ${D}/etc/init.d | ||
| 55 | install -m 0644 ${WORKDIR}/my.cnf ${D}/etc/ | ||
| 56 | install -m 0755 ${WORKDIR}/mysqld.sh ${D}/etc/init.d/mysqld | ||
| 57 | } | ||
| 58 | |||
| 59 | pkg_postinst_mysql5-server () { | ||
| 60 | if [ "x$D" != "x" ]; then | ||
| 61 | exit 1 | ||
| 62 | fi | ||
| 63 | |||
| 64 | grep mysql /etc/passwd || adduser --disabled-password --home=/var/mysql --ingroup nogroup mysql | ||
| 65 | |||
| 66 | #Install the database | ||
| 67 | test -d /usr/bin || mkdir -p /usr/bin | ||
| 68 | test -e /usr/bin/hostname || ln -s /bin/hostname /usr/bin/hostname | ||
| 69 | mkdir /var/lib/mysql | ||
| 70 | chown mysql.nogroup /var/lib/mysql | ||
| 71 | |||
| 72 | mysql_install_db | ||
| 73 | |||
| 74 | } | ||
| 75 | |||
| 76 | pkg_postrm_mysql5-server () { | ||
| 77 | grep mysql /etc/passwd && deluser mysql | ||
| 78 | } | ||
| 79 | |||
| 80 | PACKAGES = "${PN}-dbg ${PN} \ | ||
| 81 | libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-dbg \ | ||
| 82 | libmysqlclient libmysqlclient-dev libmysqlclient-dbg \ | ||
| 83 | ${PN}-client ${PN}-server ${PN}-leftovers" | ||
| 84 | CONFFILES_${PN}-server += "${sysconfdir}/my.cnf" | ||
| 85 | |||
| 86 | FILES_${PN} = " " | ||
| 87 | RDEPENDS_${PN} = "${PN}-client ${PN}-server" | ||
| 88 | ALLOW_EMPTY_${PN} = "1" | ||
| 89 | |||
| 90 | FILES_libmysqlclient = "${libdir}/libmysqlclient.so.*" | ||
| 91 | FILES_libmysqlclient-dev = " \ | ||
| 92 | ${includedir}/mysql/ \ | ||
| 93 | ${libdir}/lib* \ | ||
| 94 | ${libdir}/plugin/* \ | ||
| 95 | ${sysconfdir}/aclocal \ | ||
| 96 | ${bindir}/mysql_config" | ||
| 97 | FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \ | ||
| 98 | /usr/mysql-test/lib/My/SafeProcess/.debug/my_safe_process" | ||
| 99 | |||
| 100 | FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*" | ||
| 101 | FILES_libmysqlclient-r-dev = "${libdir}/libmysqlclient_r.*" | ||
| 102 | FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*" | ||
| 103 | |||
| 104 | FILES_${PN}-client = "\ | ||
| 105 | ${bindir}/myisam_ftdump \ | ||
| 106 | ${bindir}/mysql \ | ||
| 107 | ${bindir}/mysql_client_test \ | ||
| 108 | ${bindir}/mysql_client_test_embedded \ | ||
| 109 | ${bindir}/mysql_find_rows \ | ||
| 110 | ${bindir}/mysql_fix_extensions \ | ||
| 111 | ${bindir}/mysql_waitpid \ | ||
| 112 | ${bindir}/mysqlaccess \ | ||
| 113 | ${bindir}/mysqladmin \ | ||
| 114 | ${bindir}/mysqlbug \ | ||
| 115 | ${bindir}/mysqlcheck \ | ||
| 116 | ${bindir}/mysqldump \ | ||
| 117 | ${bindir}/mysqldumpslow \ | ||
| 118 | ${bindir}/mysqlimport \ | ||
| 119 | ${bindir}/mysqlshow \ | ||
| 120 | ${bindir}/mysqlslap \ | ||
| 121 | ${bindir}/mysqltest_embedded \ | ||
| 122 | ${libexecdir}/mysqlmanager" | ||
| 123 | |||
| 124 | FILES_${PN}-server = "\ | ||
| 125 | ${bindir}/comp_err \ | ||
| 126 | ${bindir}/isamchk \ | ||
| 127 | ${bindir}/isamlog \ | ||
| 128 | ${bindir}/msql2mysql \ | ||
| 129 | ${bindir}/my_print_defaults \ | ||
| 130 | ${bindir}/myisamchk \ | ||
| 131 | ${bindir}/myisamlog \ | ||
| 132 | ${bindir}/myisampack \ | ||
| 133 | ${bindir}/mysql_convert_table_format \ | ||
| 134 | ${bindir}/mysql_fix_privilege_tables \ | ||
| 135 | ${bindir}/mysql_install_db \ | ||
| 136 | ${bindir}/mysql_secure_installation \ | ||
| 137 | ${bindir}/mysql_setpermission \ | ||
| 138 | ${bindir}/mysql_tzinfo_to_sql \ | ||
| 139 | ${bindir}/mysql_upgrade \ | ||
| 140 | ${bindir}/mysql_zap \ | ||
| 141 | ${bindir}/mysqlbinlog \ | ||
| 142 | ${bindir}/mysqld_multi \ | ||
| 143 | ${bindir}/mysqld_safe \ | ||
| 144 | ${bindir}/mysqlhotcopy \ | ||
| 145 | ${bindir}/mysqltest \ | ||
| 146 | ${bindir}/ndb_delete_all \ | ||
| 147 | ${bindir}/ndb_desc \ | ||
| 148 | ${bindir}/ndb_drop_index \ | ||
| 149 | ${bindir}/ndb_drop_table \ | ||
| 150 | ${bindir}/ndb_mgm \ | ||
| 151 | ${bindir}/ndb_restore \ | ||
| 152 | ${bindir}/ndb_select_all \ | ||
| 153 | ${bindir}/ndb_select_count \ | ||
| 154 | ${bindir}/ndb_show_tables \ | ||
| 155 | ${bindir}/ndb_waiter \ | ||
| 156 | ${bindir}/pack_isam \ | ||
| 157 | ${bindir}/perror \ | ||
| 158 | ${bindir}/replace \ | ||
| 159 | ${bindir}/resolve_stack_dump \ | ||
| 160 | ${bindir}/resolveip \ | ||
| 161 | ${libexecdir}/mysqld \ | ||
| 162 | ${sbindir}/mysqld \ | ||
| 163 | ${sbindir}/ndb_cpcd \ | ||
| 164 | ${sbindir}/ndbd \ | ||
| 165 | ${sbindir}/ndb_mgmd \ | ||
| 166 | ${datadir}/mysql/ \ | ||
| 167 | ${localstatedir}/mysql/ \ | ||
| 168 | ${sysconfdir}/init.d \ | ||
| 169 | ${sysconfdir}/my.cnf" | ||
| 170 | |||
| 171 | DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}" | ||
| 172 | 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 @@ | |||
| 1 | # This is the most basic ntp configuration file | ||
| 2 | # The driftfile must remain in a place specific to this | ||
| 3 | # machine - it records the machine specific clock error | ||
| 4 | driftfile /etc/ntp.drift | ||
| 5 | # This obtains a random server which will be close | ||
| 6 | # (in IP terms) to the machine. Add other servers | ||
| 7 | # as required, or change this. | ||
| 8 | #server pool.ntp.org | ||
| 9 | # Using local hardware clock as fallback | ||
| 10 | server 127.127.1.0 | ||
| 11 | fudge 127.127.1.0 stratum 14 | ||
| 12 | # Defining a default security setting | ||
| 13 | 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 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | # | ||
| 3 | # ntpd init.d script for ntpdc from ntp.isc.org | ||
| 4 | test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0 | ||
| 5 | # rcS contains TICKADJ | ||
| 6 | test -r /etc/default/rcS && . /etc/default/rcS | ||
| 7 | |||
| 8 | # Functions to do individual actions | ||
| 9 | settick(){ | ||
| 10 | # If TICKADJ is set we *must* adjust it before we start, because the | ||
| 11 | # driftfile relies on the correct setting | ||
| 12 | test -n "$TICKADJ" -a -x /usr/bin/tickadj && { | ||
| 13 | echo -n "Setting tick to $TICKADJ: " | ||
| 14 | /usr/bin/tickadj "$TICKADJ" | ||
| 15 | echo "done" | ||
| 16 | } | ||
| 17 | } | ||
| 18 | startdaemon(){ | ||
| 19 | # The -g option allows ntpd to step the time to correct it just | ||
| 20 | # once. The daemon will exit if the clock drifts too much after | ||
| 21 | # this. If ntpd seems to disappear after a while assume TICKADJ | ||
| 22 | # above is set to a totally incorrect value. | ||
| 23 | echo -n "Starting ntpd: " | ||
| 24 | start-stop-daemon --start -x /usr/bin/ntpd -- -p /var/run/ntp.pid "$@" | ||
| 25 | echo "done" | ||
| 26 | } | ||
| 27 | stopdaemon(){ | ||
| 28 | echo -n "Stopping ntpd: " | ||
| 29 | start-stop-daemon --stop -p /var/run/ntp.pid | ||
| 30 | echo "done" | ||
| 31 | } | ||
| 32 | |||
| 33 | case "$1" in | ||
| 34 | start) | ||
| 35 | settick | ||
| 36 | startdaemon -g -x | ||
| 37 | ;; | ||
| 38 | stop) | ||
| 39 | stopdaemon | ||
| 40 | ;; | ||
| 41 | force-reload) | ||
| 42 | stopdaemon | ||
| 43 | settick | ||
| 44 | startdaemon -g -x | ||
| 45 | ;; | ||
| 46 | restart) | ||
| 47 | # Don't reset the tick here | ||
| 48 | stopdaemon | ||
| 49 | startdaemon -g -x | ||
| 50 | ;; | ||
| 51 | reload) | ||
| 52 | # Must do this by hand, but don't do -g | ||
| 53 | stopdaemon | ||
| 54 | startdaemon -x | ||
| 55 | ;; | ||
| 56 | *) | ||
| 57 | echo "Usage: ntpd { start | stop | restart | reload }" >&2 | ||
| 58 | exit 1 | ||
| 59 | ;; | ||
| 60 | esac | ||
| 61 | |||
| 62 | 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 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | |||
| 3 | FLAGS="defaults 23" | ||
| 4 | |||
| 5 | test -f /usr/bin/ntpd || exit 0 | ||
| 6 | |||
| 7 | case "$1" in | ||
| 8 | start) | ||
| 9 | echo -n "Starting NTP server: ntpd" | ||
| 10 | start-stop-daemon --start --quiet --exec /usr/bin/ntpd | ||
| 11 | echo "." | ||
| 12 | ;; | ||
| 13 | stop) | ||
| 14 | echo -n "Stopping NTP server: ntpd" | ||
| 15 | start-stop-daemon --stop --quiet --exec /usr/bin/ntpd | ||
| 16 | echo "." | ||
| 17 | ;; | ||
| 18 | restart|force-reload) | ||
| 19 | echo -n "Restarting NTP server: ntpd... " | ||
| 20 | start-stop-daemon --stop --quiet --exec /usr/bin/ntpd | ||
| 21 | sleep 2 | ||
| 22 | start-stop-daemon --start --quiet --exec /usr/bin/ntpd | ||
| 23 | echo "done." | ||
| 24 | ;; | ||
| 25 | *) | ||
| 26 | echo "Usage: /etc/init.d/ntp {start|stop|restart|force-reload}" | ||
| 27 | exit 1 | ||
| 28 | ;; | ||
| 29 | esac | ||
| 30 | |||
| 31 | 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 @@ | |||
| 1 | --- a/include/ntp_syscall.h.orig 2009-05-19 16:44:55.048156467 -0400 | ||
| 2 | +++ b/include/ntp_syscall.h 2009-05-19 16:46:19.293323686 -0400 | ||
| 3 | @@ -14,6 +14,14 @@ | ||
| 4 | # include <sys/timex.h> | ||
| 5 | #endif | ||
| 6 | |||
| 7 | +#if defined(ADJ_NANO) && !defined(MOD_NANO) | ||
| 8 | +#define MOD_NANO ADJ_NANO | ||
| 9 | +#endif | ||
| 10 | + | ||
| 11 | +#if defined(ADJ_TAI) && !defined(MOD_TAI) | ||
| 12 | +#define MOD_TAI ADJ_TAI | ||
| 13 | +#endif | ||
| 14 | + | ||
| 15 | #ifndef NTP_SYSCALLS_LIBC | ||
| 16 | #ifdef NTP_SYSCALLS_STD | ||
| 17 | # 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 @@ | |||
| 1 | # This is the most basic ntp configuration file | ||
| 2 | # The driftfile must remain in a place specific to this | ||
| 3 | # machine - it records the machine specific clock error | ||
| 4 | driftfile /etc/ntp.drift | ||
| 5 | # This obtains a random server which will be close | ||
| 6 | # (in IP terms) to the machine. Add other servers | ||
| 7 | # as required, or change this. | ||
| 8 | server pool.ntp.org | ||
| 9 | # Using local hardware clock as fallback | ||
| 10 | server 127.127.1.0 | ||
| 11 | fudge 127.127.1.0 stratum 14 | ||
| 12 | # Defining a default security setting | ||
| 13 | 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 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | # | ||
| 3 | # ntpd init.d script for ntpdc from ntp.isc.org | ||
| 4 | test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0 | ||
| 5 | # rcS contains TICKADJ | ||
| 6 | test -r /etc/default/rcS && . /etc/default/rcS | ||
| 7 | |||
| 8 | # Functions to do individual actions | ||
| 9 | settick(){ | ||
| 10 | # If TICKADJ is set we *must* adjust it before we start, because the | ||
| 11 | # driftfile relies on the correct setting | ||
| 12 | test -n "$TICKADJ" -a -x /usr/bin/tickadj && { | ||
| 13 | echo -n "Setting tick to $TICKADJ: " | ||
| 14 | /usr/bin/tickadj "$TICKADJ" | ||
| 15 | echo "done" | ||
| 16 | } | ||
| 17 | } | ||
| 18 | startdaemon(){ | ||
| 19 | # The -g option allows ntpd to step the time to correct it just | ||
| 20 | # once. The daemon will exit if the clock drifts too much after | ||
| 21 | # this. If ntpd seems to disappear after a while assume TICKADJ | ||
| 22 | # above is set to a totally incorrect value. | ||
| 23 | echo -n "Starting ntpd: " | ||
| 24 | start-stop-daemon --start -x /usr/bin/ntpd -- -p /var/run/ntp.pid "$@" | ||
| 25 | echo "done" | ||
| 26 | } | ||
| 27 | stopdaemon(){ | ||
| 28 | echo -n "Stopping ntpd: " | ||
| 29 | start-stop-daemon --stop -p /var/run/ntp.pid | ||
| 30 | echo "done" | ||
| 31 | } | ||
| 32 | |||
| 33 | case "$1" in | ||
| 34 | start) | ||
| 35 | settick | ||
| 36 | startdaemon -g | ||
| 37 | ;; | ||
| 38 | stop) | ||
| 39 | stopdaemon | ||
| 40 | ;; | ||
| 41 | force-reload) | ||
| 42 | stopdaemon | ||
| 43 | settick | ||
| 44 | startdaemon -g | ||
| 45 | ;; | ||
| 46 | restart) | ||
| 47 | # Don't reset the tick here | ||
| 48 | stopdaemon | ||
| 49 | startdaemon -g | ||
| 50 | ;; | ||
| 51 | reload) | ||
| 52 | # Must do this by hand, but don't do -g | ||
| 53 | stopdaemon | ||
| 54 | startdaemon | ||
| 55 | ;; | ||
| 56 | *) | ||
| 57 | echo "Usage: ntpd { start | stop | restart | reload }" >&2 | ||
| 58 | exit 1 | ||
| 59 | ;; | ||
| 60 | esac | ||
| 61 | |||
| 62 | 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 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | PATH=/sbin:/bin:/usr/bin | ||
| 4 | |||
| 5 | test -x /usr/bin/ntpdate || exit 0 | ||
| 6 | |||
| 7 | if test -f /etc/default/ntpdate ; then | ||
| 8 | . /etc/default/ntpdate | ||
| 9 | else | ||
| 10 | NTPSERVERS="pool.ntp.org" | ||
| 11 | fi | ||
| 12 | |||
| 13 | test -n "$NTPSERVERS" || exit 0 | ||
| 14 | |||
| 15 | # This is a heuristic: The idea is that if a static interface is brought | ||
| 16 | # up, that is a major event, and we can put in some extra effort to fix | ||
| 17 | # the system time. Feel free to change this, especially if you regularly | ||
| 18 | # bring up new network interfaces. | ||
| 19 | if [ "$METHOD" = static ]; then | ||
| 20 | OPTS="-b" | ||
| 21 | fi | ||
| 22 | |||
| 23 | if [ "$METHOD" = loopback ]; then | ||
| 24 | exit 0 | ||
| 25 | fi | ||
| 26 | |||
| 27 | ( | ||
| 28 | |||
| 29 | LOCKFILE=/var/lock/ntpdate | ||
| 30 | |||
| 31 | # Avoid running more than one at a time | ||
| 32 | if [ -x /usr/bin/lockfile-create ]; then | ||
| 33 | lockfile-create $LOCKFILE | ||
| 34 | lockfile-touch $LOCKFILE & | ||
| 35 | LOCKTOUCHPID="$!" | ||
| 36 | fi | ||
| 37 | |||
| 38 | if /usr/bin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then | ||
| 39 | if [ "$UPDATE_HWCLOCK" = "yes" ]; then | ||
| 40 | hwclock --systohc || : | ||
| 41 | fi | ||
| 42 | fi | ||
| 43 | |||
| 44 | if [ -x /usr/bin/lockfile-create ] ; then | ||
| 45 | kill $LOCKTOUCHPID | ||
| 46 | lockfile-remove $LOCKFILE | ||
| 47 | fi | ||
| 48 | |||
| 49 | ) & | ||
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 @@ | |||
| 1 | Index: ntp-4.2.2p3-r0/ntp-4.2.2p3/util/tickadj.c | ||
| 2 | =================================================================== | ||
| 3 | --- ntp-4.2.2p3/util/tickadj.c 2004-02-25 06:58:33.000000000 +0100 | ||
| 4 | +++ ntp-4.2.2p3/util/tickadj.c 2007-07-07 01:00:54.000000000 +0200 | ||
| 5 | @@ -21,7 +21,8 @@ | ||
| 6 | # include <unistd.h> | ||
| 7 | #endif /* HAVE_UNISTD_H */ | ||
| 8 | |||
| 9 | -#ifdef HAVE___ADJTIMEX /* Linux */ | ||
| 10 | +/* proper handling here has been moved to upstream ntp bugzilla */ | ||
| 11 | +#ifdef linux | ||
| 12 | |||
| 13 | #include <sys/timex.h> | ||
| 14 | struct timex txc; | ||
| 15 | @@ -91,7 +92,7 @@ | ||
| 16 | } | ||
| 17 | |||
| 18 | if (!errflg) { | ||
| 19 | - if (__adjtimex(&txc) < 0) | ||
| 20 | + if (adjtimex(&txc) < 0) | ||
| 21 | perror("adjtimex"); | ||
| 22 | else if (!quiet) | ||
| 23 | printf("tick = %ld\ntick_adj = %d\n", | ||
| 24 | @@ -146,7 +147,7 @@ | ||
| 25 | #endif | ||
| 26 | } | ||
| 27 | |||
| 28 | - if (__adjtimex(&txc) < 0) | ||
| 29 | + if (adjtimex(&txc) < 0) | ||
| 30 | { | ||
| 31 | perror("adjtimex"); | ||
| 32 | } | ||
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 @@ | |||
| 1 | require ntp_${PV}.bb | ||
| 2 | DEPENDS = "openssl" | ||
| 3 | |||
| 4 | S = "${WORKDIR}/ntp-${PV}" | ||
| 5 | |||
| 6 | EXTRA_OECONF = "--with-openssl-libdir=${STAGING_LIBDIR} \ | ||
| 7 | --with-openssl-incdir=${STAGING_INCDIR}/openssl" | ||
| 8 | |||
| 9 | |||
| 10 | SRC_URI[md5sum] = "98e16c7aa4ecd4c004b51bff18962e95" | ||
| 11 | 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 @@ | |||
| 1 | DESCRIPTION = "The Network Time Protocol (NTP) is used to \ | ||
| 2 | synchronize the time of a computer client or server to \ | ||
| 3 | another server or reference time source, such as a radio \ | ||
| 4 | or satellite receiver or modem." | ||
| 5 | HOMEPAGE = "http://ntp.isc.org/bin/view/Main/WebHome" | ||
| 6 | SECTION = "console/network" | ||
| 7 | PRIORITY = "optional" | ||
| 8 | LICENSE = "ntp" | ||
| 9 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670" | ||
| 10 | RSUGGESTS_${PN} = "iana-etc" | ||
| 11 | |||
| 12 | SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ | ||
| 13 | file://ipv6only-workaround.patch \ | ||
| 14 | file://ntpd \ | ||
| 15 | file://ntp.conf \ | ||
| 16 | file://ntpdate" | ||
| 17 | |||
| 18 | inherit autotools update-rc.d | ||
| 19 | |||
| 20 | INITSCRIPT_NAME = "ntpd" | ||
| 21 | # No dependencies, so just go in at the standard level (20) | ||
| 22 | INITSCRIPT_PARAMS = "defaults" | ||
| 23 | |||
| 24 | # The ac_cv_header_readline_history is to stop ntpdc depending on either | ||
| 25 | # readline or curses | ||
| 26 | EXTRA_OECONF = "--without-openssl --without-crypto ac_cv_header_readline_history_h=no" | ||
| 27 | CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" | ||
| 28 | |||
| 29 | PACKAGES += "ntpdate ${PN}-bin ${PN}-tickadj ${PN}-utils" | ||
| 30 | # NOTE: you don't need ntpdate, use "ntpdc -q -g -x" | ||
| 31 | |||
| 32 | # This should use rc.update | ||
| 33 | 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 @@ | |||
| 1 | require ntp.inc | ||
| 2 | |||
| 3 | PR = "r1" | ||
| 4 | |||
| 5 | SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ | ||
| 6 | file://tickadj.c.patch \ | ||
| 7 | file://ntp-4.2.4_p6-nano.patch \ | ||
| 8 | file://ntpd \ | ||
| 9 | file://ntp.conf \ | ||
| 10 | file://ntpdate" | ||
| 11 | |||
| 12 | SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2" | ||
| 13 | SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e" | ||
| 14 | |||
| 15 | EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd" | ||
| 16 | |||
| 17 | do_install_append() { | ||
| 18 | install -d ${D}/${sysconfdir}/init.d | ||
| 19 | install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir} | ||
| 20 | install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d | ||
| 21 | install -d ${D}/${sysconfdir}/network/if-up.d | ||
| 22 | install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d | ||
| 23 | } | ||
| 24 | |||
| 25 | FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace" | ||
| 26 | FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd" | ||
| 27 | FILES_${PN}-tickadj = "${bindir}/tickadj" | ||
| 28 | FILES_ntp-utils = "${bindir}/*" | ||
| 29 | FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate" | ||
| 30 | |||
| 31 | # ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms | ||
| 32 | # with wonky clocks (e.g. OpenSlug) | ||
| 33 | RDEPENDS_${PN} = "${PN}-tickadj" | ||
| 34 | |||
| 35 | pkg_postinst_ntpdate() { | ||
| 36 | if test "x$D" != "x"; then | ||
| 37 | exit 1 | ||
| 38 | else | ||
| 39 | if ! grep -q -s ntpdate /var/spool/cron/root; then | ||
| 40 | echo "adding crontab" | ||
| 41 | test -d /var/spool/cron || mkdir -p /var/spool/cron | ||
| 42 | echo "30 * * * * /usr/bin/ntpdate -b -s -u pool.ntp.org" >> /var/spool/cron/root | ||
| 43 | fi | ||
| 44 | fi | ||
| 45 | } | ||
| 46 | |||
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 @@ | |||
| 1 | diff --git a/src/interfaces/ecpg/Makefile b/src/interfaces/ecpg/Makefile | ||
| 2 | index dcd578f..1428423 100644 | ||
| 3 | --- a/src/interfaces/ecpg/Makefile | ||
| 4 | +++ b/src/interfaces/ecpg/Makefile | ||
| 5 | @@ -8,7 +8,6 @@ all install installdirs uninstall dep depend distprep: | ||
| 6 | $(MAKE) -C ecpglib $@ | ||
| 7 | $(MAKE) -C compatlib $@ | ||
| 8 | $(MAKE) -C preproc $@ | ||
| 9 | - $(MAKE) -C test $@ | ||
| 10 | |||
| 11 | clean distclean maintainer-clean: | ||
| 12 | -$(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 @@ | |||
| 1 | Index: postgresql-8.4.4/configure.in | ||
| 2 | =================================================================== | ||
| 3 | --- postgresql-8.4.4.orig/configure.in | ||
| 4 | +++ postgresql-8.4.4/configure.in | ||
| 5 | @@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch un | ||
| 6 | |||
| 7 | AC_INIT([PostgreSQL], [8.4.4], [pgsql-bugs@postgresql.org]) | ||
| 8 | |||
| 9 | -m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.61], [], [m4_fatal([Autoconf version 2.61 is required. | ||
| 10 | -Untested combinations of 'autoconf' and PostgreSQL versions are not | ||
| 11 | -recommended. You can remove the check from 'configure.in' but it is then | ||
| 12 | -your responsibility whether the result works or not.])]) | ||
| 13 | AC_COPYRIGHT([Copyright (c) 1996-2009, PostgreSQL Global Development Group]) | ||
| 14 | AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) | ||
| 15 | 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 @@ | |||
| 1 | DESCRIPTION = "PostgreSQL is a powerful, open source relational database system." | ||
| 2 | HOMEPAGE = "http://www.postgresql.com" | ||
| 3 | LICENSE = "BSD" | ||
| 4 | |||
| 5 | DEPENDS = "zlib readline tzcode-native" | ||
| 6 | |||
| 7 | ARM_INSTRUCTION_SET = "arm" | ||
| 8 | |||
| 9 | #WARNING: this recipe assumes you have the timezone compiler present in /usr/sbin/zic | ||
| 10 | |||
| 11 | SRC_URI = "ftp://ftp-archives.postgresql.org/pub/source/v${PV}/${P}.tar.bz2" | ||
| 12 | |||
| 13 | LEAD_SONAME = "libpq.so" | ||
| 14 | |||
| 15 | # LDFLAGS for shared libraries | ||
| 16 | export LDFLAGS_SL = "${LDFLAGS}" | ||
| 17 | |||
| 18 | inherit autotools pkgconfig | ||
| 19 | |||
| 20 | do_compile_append() { | ||
| 21 | cp /usr/sbin/zic ${S}/src/timezone/ | ||
| 22 | } | ||
| 23 | |||
| 24 | PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \ | ||
| 25 | libecpg-compat-dbg libecpg-compat \ | ||
| 26 | libecpg-dbg libecpg libecpg-dev \ | ||
| 27 | libpq-dbg libpq libpq-dev \ | ||
| 28 | libpgtypes-dbg libpgtypes " | ||
| 29 | |||
| 30 | FILES_${PN}-client = "${bindir}/clusterdb \ | ||
| 31 | ${bindir}/createdb \ | ||
| 32 | ${bindir}/createlang \ | ||
| 33 | ${bindir}/createuser \ | ||
| 34 | ${bindir}/dropdb \ | ||
| 35 | ${bindir}/droplang \ | ||
| 36 | ${bindir}/dropuser \ | ||
| 37 | ${bindir}/pg_dump \ | ||
| 38 | ${bindir}/pg_dumpall \ | ||
| 39 | ${bindir}/pg_restore \ | ||
| 40 | ${bindir}/psql \ | ||
| 41 | ${bindir}/reindexdb \ | ||
| 42 | ${bindir}/vacuumdb \ | ||
| 43 | ${bindir}/vacuumlo \ | ||
| 44 | ${datadir}/${PN}/psqlrc.sample" | ||
| 45 | |||
| 46 | FILES_${PN}-doc += "${prefix}/doc/" | ||
| 47 | FILES_${PN}-timezone = "${datadir}/${PN}/timezone" | ||
| 48 | FILES_${PN}-server-dev = "${includedir}/${PN}/server" | ||
| 49 | |||
| 50 | FILES_libecpg = "${libdir}/libecpg*.so.*" | ||
| 51 | FILES_libecpg-dbg = "${libdir}/.debug/libecpg*" | ||
| 52 | FILES_libecpg-dev = "${libdir}/libecpg*.a ${libdir}/libecpg*.so \ | ||
| 53 | ${libdir}/libpgtypes*.a ${libdir}/libpgtypes*.so \ | ||
| 54 | ${includedir}/ecpg*.h ${includedir}/${PN}/ecpg*.h \ | ||
| 55 | ${includedir}/pgtypes*.h ${includedir}/${PN}/informix \ | ||
| 56 | ${includedir}/sql3types.h ${includedir}/sqlca.h" | ||
| 57 | |||
| 58 | FILES_libpq = "${libdir}/libpq*.so.*" | ||
| 59 | FILES_libpq-dbg = "${libdir}/.debug/libpq* ${libdir}/${PN}/pgxs/src/test/regress/.debug/*" | ||
| 60 | FILES_libpq-dev = "${libdir}/libpq*.a ${libdir}/libpq*.so ${libdir}/libpgport.a \ | ||
| 61 | ${includedir}" | ||
| 62 | |||
| 63 | FILES_libecpg-compat = "${libdir}/libecpg_compat*.so.*" | ||
| 64 | FILES_libecpg-compat-dbg = "${libdir}/.debug/libecpg_compat*" | ||
| 65 | FILES_libpgtypes = "${libdir}/libpgtypes*.so.*" | ||
| 66 | 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 @@ | |||
| 1 | require postgresql.inc | ||
| 2 | |||
| 3 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=29b81b066680be9ffd98cb9d2afb9de6" | ||
| 4 | |||
| 5 | DEFAULT_PREFERENCE = "-1" | ||
| 6 | |||
| 7 | SRC_URI = "ftp://ftp.postgresql.org/pub/source/v${PV}/${P}.tar.bz2 \ | ||
| 8 | file://remove.autoconf.version.check.patch" | ||
| 9 | |||
| 10 | SRC_URI[md5sum] = "4bf2448ad965bca3940df648c02194df" | ||
| 11 | 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 @@ | |||
| 1 | diff -urN sqlite-2.8.17.orig/main.mk sqlite-2.8.17/main.mk | ||
| 2 | --- sqlite-2.8.17.orig/main.mk 2005-04-23 22:43:23.000000000 +0000 | ||
| 3 | +++ sqlite-2.8.17/main.mk 2009-04-02 20:10:36.000000000 +0000 | ||
| 4 | @@ -139,7 +139,7 @@ | ||
| 5 | # This is the default Makefile target. The objects listed here | ||
| 6 | # are what get build when you type just "make" with no arguments. | ||
| 7 | # | ||
| 8 | -all: sqlite.h config.h libsqlite.a sqlite$(EXE) | ||
| 9 | +all: sqlite.h config.h libsqlite.so sqlite$(EXE) | ||
| 10 | |||
| 11 | # Generate the file "last_change" which contains the date of change | ||
| 12 | # of the most recently modified source code file | ||
| 13 | @@ -148,13 +148,12 @@ | ||
| 14 | cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \ | ||
| 15 | | awk '{print $$5,$$6}' >last_change | ||
| 16 | |||
| 17 | -libsqlite.a: $(LIBOBJ) | ||
| 18 | - $(AR) libsqlite.a $(LIBOBJ) | ||
| 19 | - $(RANLIB) libsqlite.a | ||
| 20 | - | ||
| 21 | -sqlite$(EXE): $(TOP)/src/shell.c libsqlite.a sqlite.h | ||
| 22 | - $(TCCX) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ | ||
| 23 | - libsqlite.a $(LIBREADLINE) $(THREADLIB) | ||
| 24 | +libsqlite.so: $(LIBOBJ) | ||
| 25 | + $(CC) $(LDFLAGS) -shared -o libsqlite.so -Wl,-soname,libsqlite.so.0 $(LIBOBJ) | ||
| 26 | + | ||
| 27 | +sqlite$(EXE): $(TOP)/src/shell.c libsqlite.so sqlite.h | ||
| 28 | + $(TCCX) $(LDFLAGS) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ | ||
| 29 | + -lsqlite $(LIBREADLINE) $(THREADLIB) | ||
| 30 | |||
| 31 | sqlite_analyzer$(EXE): $(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC) \ | ||
| 32 | $(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 @@ | |||
| 1 | diff -bur sqlite-2.8.17~orig/main.mk sqlite-2.8.17/main.mk | ||
| 2 | --- sqlite-2.8.17~orig/main.mk 2006-02-13 04:09:33.000000000 -0600 | ||
| 3 | +++ sqlite-2.8.17/main.mk 2006-02-13 04:15:42.000000000 -0600 | ||
| 4 | @@ -58,7 +58,7 @@ | ||
| 5 | expr.o func.o hash.o insert.o \ | ||
| 6 | main.o opcodes.o os.o pager.o parse.o pragma.o printf.o random.o \ | ||
| 7 | select.o table.o tokenize.o trigger.o update.o util.o \ | ||
| 8 | - vacuum.o vdbe.o vdbeaux.o where.o tclsqlite.o | ||
| 9 | + vacuum.o vdbe.o vdbeaux.o where.o | ||
| 10 | |||
| 11 | # All of the source code files. | ||
| 12 | # | ||
| 13 | @@ -91,7 +91,6 @@ | ||
| 14 | $(TOP)/src/sqlite.h.in \ | ||
| 15 | $(TOP)/src/sqliteInt.h \ | ||
| 16 | $(TOP)/src/table.c \ | ||
| 17 | - $(TOP)/src/tclsqlite.c \ | ||
| 18 | $(TOP)/src/tokenize.c \ | ||
| 19 | $(TOP)/src/trigger.c \ | ||
| 20 | $(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 @@ | |||
| 1 | # Package Information for pkg-config | ||
| 2 | |||
| 3 | prefix=/usr | ||
| 4 | exec_prefix=${prefix} | ||
| 5 | libdir=${exec_prefix}/lib | ||
| 6 | includedir=${prefix}/include | ||
| 7 | |||
| 8 | Name: SQLite | ||
| 9 | Description: SQL database engine | ||
| 10 | Version: 2.8.17 | ||
| 11 | Libs: -L${libdir} -lsqlite | ||
| 12 | 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 @@ | |||
| 1 | DESCRIPTION = "An Embeddable SQL Database Engine" | ||
| 2 | HOMEPAGE = "http://www.sqlite.org/" | ||
| 3 | SECTION = "libs" | ||
| 4 | PRIORITY = "optional" | ||
| 5 | DEPENDS = "readline ncurses" | ||
| 6 | LICENSE = "PD" | ||
| 7 | LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=10;md5=e98469a8efa024a38ad5b2e4b92f4a96" | ||
| 8 | |||
| 9 | PR = "r7" | ||
| 10 | |||
| 11 | SRC_URI = "http://www.hwaci.com/sw/sqlite/sqlite-${PV}.tar.gz \ | ||
| 12 | file://mainmk_build_dynamic.patch \ | ||
| 13 | file://mainmk_no_tcl.patch \ | ||
| 14 | file://sqlite.pc" | ||
| 15 | |||
| 16 | SOURCES = "attach.o auth.o btree.o btree_rb.o build.o copy.o date.o delete.o \ | ||
| 17 | expr.o func.o hash.o insert.o main.o opcodes.o os.o pager.o \ | ||
| 18 | parse.o pragma.o printf.o random.o select.o table.o tokenize.o \ | ||
| 19 | trigger.o update.o util.o vacuum.o vdbe.o vdbeaux.o where.o" | ||
| 20 | |||
| 21 | inherit autotools pkgconfig | ||
| 22 | |||
| 23 | do_configure() { | ||
| 24 | echo "main.mk is patched, no need to configure" | ||
| 25 | # make pkgconfig.bbclass pick this up | ||
| 26 | mv ${WORKDIR}/sqlite.pc ${S} | ||
| 27 | } | ||
| 28 | |||
| 29 | do_compile() { | ||
| 30 | oe_runmake -f Makefile.linux-gcc \ | ||
| 31 | TOP="${S}" \ | ||
| 32 | BCC="${BUILD_CC}" \ | ||
| 33 | TCC="${CC}" \ | ||
| 34 | OPTS="-fPIC -D'INTPTR_TYPE=int'" \ | ||
| 35 | TCL_FLAGS= LIBTCL= \ | ||
| 36 | READLINE_FLAGS="-DHAVE_READLINE=1 -I${STAGING_INCDIR}" \ | ||
| 37 | LIBREADLINE="-L. -L${STAGING_LIBDIR} -lreadline -lncurses" | ||
| 38 | } | ||
| 39 | |||
| 40 | do_install() { | ||
| 41 | install -d ${D}${libdir} ${D}${bindir} | ||
| 42 | install sqlite ${D}${bindir} | ||
| 43 | install -m 0755 libsqlite.so ${D}${libdir}/libsqlite.so.0.8.6 | ||
| 44 | ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so | ||
| 45 | ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0 | ||
| 46 | ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0.8 | ||
| 47 | install -d ${D}${includedir} | ||
| 48 | install -m 0644 sqlite.h ${D}${includedir}/sqlite.h | ||
| 49 | install -d ${D}${libdir}/pkgconfig | ||
| 50 | install -m 0644 ${S}/sqlite.pc ${D}${libdir}/pkgconfig/sqlite.pc | ||
| 51 | } | ||
| 52 | |||
| 53 | PACKAGES += "${PN}-bin" | ||
| 54 | FILES_${PN}-bin = "${bindir}/*" | ||
| 55 | FILES_${PN} = "${libdir}/*.so.*" | ||
| 56 | |||
| 57 | SRC_URI[md5sum] = "838dbac20b56d2c4292e98848505a05b" | ||
| 58 | SRC_URI[sha256sum] = "3f35ebfb67867fb5b583a03e480f900206af637efe7179b32294a6a0cf806f37" | ||
| 59 | |||
| 60 | BBCLASSEXTEND = "native" | ||
