summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Gregory <dp@xora.org.uk>2006-08-27 17:20:35 +0000
committerGraeme Gregory <dp@xora.org.uk>2006-08-27 17:20:35 +0000
commit69383bc09ea895755f1ed236c686e5c6cdf9ced7 (patch)
tree79debc84d115e3331af9e384af855e5dfdb25d2c
parentb59ce10791fa913ef0915e48a514f04ca2815977 (diff)
parent2ef9cf97f34b7ec69f1df908413afa462e09ba61 (diff)
merge of '31791b517fd0fdc4e50c48d20a836408a23727d3'
and 'ce3b6559d2cb3ba65a6dd0f69e76c890fe48f129'
-rw-r--r--classes/base.bbclass8
-rw-r--r--classes/package.bbclass4
-rw-r--r--conf/distro/angstrom-2007.1.conf (renamed from conf/distro/angstrom-2006.9.conf)2
-rw-r--r--conf/distro/include/angstrom.inc5
-rw-r--r--conf/distro/include/sane-srcdates.inc2
-rw-r--r--conf/distro/openomap.conf23
-rw-r--r--conf/machine/h4000.conf1
-rw-r--r--conf/machine/omap5912osk.conf2
-rw-r--r--contrib/feed-browser/includes/.mtn2git_empty0
-rw-r--r--contrib/feed-browser/includes/config.inc118
-rw-r--r--contrib/feed-browser/includes/functions.inc455
-rw-r--r--contrib/feed-browser/index.php475
-rw-r--r--contrib/feed-browser/update.php52
-rw-r--r--contrib/python/.mtn2git_empty0
-rwxr-xr-xcontrib/python/generate-manifest.py326
-rw-r--r--packages/avahi/avahi_0.6.13.bb64
-rw-r--r--packages/avetanabt/avetanabt_20060413.bb63
-rw-r--r--packages/avetanabt/avetanabt_cvs.bb8
-rw-r--r--packages/busybox/busybox_1.2.1.bb2
-rw-r--r--packages/db/db-native_4.3.29.bb4
-rw-r--r--packages/dbus/dbus-glib-native/.mtn2git_empty0
-rw-r--r--packages/dbus/dbus-glib-native/run-with-tmp-session-bus.patch32
-rw-r--r--packages/dbus/dbus-glib-native_0.71.bb3
-rw-r--r--packages/dbus/dbus-native_0.92.bb27
-rw-r--r--packages/dbus/dbus_0.92.bb5
-rw-r--r--packages/glibc/glibc-package.bbclass2
-rw-r--r--packages/glibc/glibc_2.4.bb4
-rw-r--r--packages/gnome/gconf-dbus_svn.bb5
-rw-r--r--packages/gnome/libgnomecups_0.2.2.bb2
-rw-r--r--packages/gpe-edit/gpe-edit_0.32.bb4
-rw-r--r--packages/gstreamer/gst-plugins-base_0.10.7.bb5
-rw-r--r--packages/gstreamer/gst-plugins-ugly_0.10.4.bb2
-rw-r--r--packages/gstreamer/gstreamer_0.10.8.bb31
-rwxr-xr-xpackages/initscripts/initscripts-1.0/checkroot.sh5
-rwxr-xr-xpackages/initscripts/initscripts-1.0/devices2
-rw-r--r--packages/initscripts/initscripts-1.0/slugos/devices.patch4
-rw-r--r--packages/initscripts/initscripts_1.0.bb2
-rw-r--r--packages/ipsec-tools/ipsec-tools.inc3
-rw-r--r--packages/libvncserver/libvncserver_0.8.2.bb2
-rw-r--r--packages/linux/handhelds-pxa-2.6_cvs.bb4
-rw-r--r--packages/linux/linux-omap1_2.6.12-rc2.bb20
-rw-r--r--packages/networkmanager/networkmanager_0.6.4.bb2
-rw-r--r--packages/nfs-utils/nfs-utils_1.0.6.bb4
-rw-r--r--packages/pango/pango_1.14.0.bb8
-rw-r--r--packages/patch/patch-2.5.9/global-reject-file.diff201
-rw-r--r--packages/patch/patch-2.5.9/unified-reject-files.diff305
-rw-r--r--packages/patch/patch_2.5.9.bb5
-rw-r--r--packages/python/python-2.4.3-manifest.inc6
-rw-r--r--packages/qemu/files/arm_nptl.patch857
-rw-r--r--packages/qemu/qemu-0.8.0/.mtn2git_empty0
-rw-r--r--packages/qemu/qemu-0.8.0/arm_nptl.patch854
-rw-r--r--packages/qemu/qemu-0.8.2/.mtn2git_empty0
-rw-r--r--packages/qemu/qemu-0.8.2/arm_nptl.patch857
-rw-r--r--packages/qemu/qemu-native_0.8.0.bb1
-rw-r--r--packages/qemu/qemu-native_0.8.2.bb7
-rw-r--r--packages/qemu/qemu_0.8.0.bb5
-rw-r--r--packages/qemu/qemu_0.8.2.bb11
-rw-r--r--packages/qemu/qemu_cvs.bb7
-rw-r--r--packages/subversion/subversion_1.3.2.bb23
-rw-r--r--packages/syslog-ng/files/syslog-ng.conf89
-rw-r--r--packages/syslog-ng/syslog-ng_1.6.8.bb5
-rw-r--r--packages/udev/udev-097/links.conf20
-rw-r--r--packages/udev/udev_097.bb2
-rw-r--r--packages/xorg-xserver/xserver-kdrive_git.bb10
64 files changed, 4481 insertions, 576 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 6f8468b119..e413afb2b3 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -50,7 +50,7 @@ def base_set_filespath(path, d):
overrides = overrides + ":"
for o in overrides.split(":"):
filespath.append(os.path.join(p, o))
- bb.data.setVar("FILESPATH", ":".join(filespath), d)
+ return ":".join(filespath)
FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
@@ -601,8 +601,6 @@ base_do_compile() {
fi
}
-
-addtask stage after do_compile
base_do_stage () {
:
}
@@ -614,13 +612,13 @@ do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${T
${STAGING_DATADIR} \
${S} ${B}"
-addtask populate_staging after do_compile
+addtask populate_staging after do_package
python do_populate_staging () {
bb.build.exec_func('do_stage', d)
}
-addtask install after do_compile
+addtask install after do_compile
do_install[dirs] = "${S} ${B}"
base_do_install() {
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 0d6a7734af..9b913ecf82 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -725,7 +725,7 @@ python package_do_split_locales() {
bb.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d)
}
-PACKAGEFUNCS ?= " do_install package_do_split_locales \
+PACKAGEFUNCS ?= " package_do_split_locales \
populate_packages package_do_shlibs \
package_do_pkgconfig read_shlibdeps"
python package_do_package () {
@@ -738,4 +738,4 @@ do_package[dirs] = "${D}"
do_package[deptask] = "do_package"
populate_packages[dirs] = "${D}"
EXPORT_FUNCTIONS do_package do_shlibs do_split_locales mapping_rename_hook
-addtask package before do_build after do_populate_staging
+addtask package before do_build after do_install
diff --git a/conf/distro/angstrom-2006.9.conf b/conf/distro/angstrom-2007.1.conf
index ca7ddc873d..327d4123cc 100644
--- a/conf/distro/angstrom-2006.9.conf
+++ b/conf/distro/angstrom-2007.1.conf
@@ -32,6 +32,8 @@ FEED_URIS += " \
SRCDATE_gconf-dbus = "20060719"
SRCDATE_gnome-vfs-dbus = "20060803"
+PREFERRED_VERSION_qemu-native = "0.8.2"
+
CVS_TARBALL_STASH = "\
http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4/sources/ \
http://www.oesources.org/source/current/"
diff --git a/conf/distro/include/angstrom.inc b/conf/distro/include/angstrom.inc
index 9c2679aff1..7e765bd925 100644
--- a/conf/distro/include/angstrom.inc
+++ b/conf/distro/include/angstrom.inc
@@ -16,8 +16,8 @@ MAINTAINER = "Angstrom Developers <angstrom-dev@linuxtogo.org>"
INHERIT += "package_ipk debian multimachine"
#Generate locales on the buildsystem instead of on the target. Speeds up first boot, set to "1" to enable
-PREFERRED_PROVIDER_qemu-native = "qemu-qop-nogfx-native"
-ENABLE_BINARY_LOCALE_GENERATION ?= ""
+PREFERRED_PROVIDER_qemu-native = "qemu-native"
+ENABLE_BINARY_LOCALE_GENERATION ?= "1"
#Use the ARM EABI when building for an ARM cpu. We can't use overrides
@@ -32,6 +32,7 @@ TARGET_OS = "linux${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1)=='arm']}"
#Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info
FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
BUILD_OPTIMIZATION = "-Os"
+CXXFLAGS += "-fvisibility-inlines-hidden"
#ARM EABI is softfloat by default, but let's make sure :)
TARGET_FPU_arm = "soft"
diff --git a/conf/distro/include/sane-srcdates.inc b/conf/distro/include/sane-srcdates.inc
index b9cc82e1d3..0696ad1909 100644
--- a/conf/distro/include/sane-srcdates.inc
+++ b/conf/distro/include/sane-srcdates.inc
@@ -72,7 +72,7 @@ SRCDATE_oprofile ?= "20060214"
SRCDATE_portaudio ?= "20060814"
SRCDATE_putty ?= "20060814"
SRCDATE_python-cairo ?= "20060814"
-SRCDATE_qemu-native ?= "20060526"
+SRCDATE_qemu-native ?= "20060723"
SRCDATE_roadster ?= "20060814"
SRCDATE_sctzap ?= "20060814"
SRCDATE_tslib ?= "20051101"
diff --git a/conf/distro/openomap.conf b/conf/distro/openomap.conf
index 192400b9a1..fb06ca7f47 100644
--- a/conf/distro/openomap.conf
+++ b/conf/distro/openomap.conf
@@ -9,3 +9,26 @@ TARGET_FPU ?= "soft"
# 2.4 vs 2.6 is a distro decision.
MODUTILS = "26"
BOOTSTRAP_EXTRA_RDEPENDS += "udev"
+
+PREFERRED_PROVIDER_task-bootstrap = "task-bootstrap"
+
+PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
+PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc:gcc-cross"
+PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}g++:gcc-cross"
+
+#EABI stuff
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}-libc-for-gcc = "glibc-intermediate"
+PREFERRED_PROVIDER_virtual/arm-angstrom-linux-gnueabi-libc-for-gcc = "glibc-intermediate"
+PREFERRED_PROVIDER_virtual/arm-linux-libc-for-gcc = "glibc-intermediate"
+
+
+#use EABI toolchain
+PREFERRED_VERSION_gcc ?= "4.1.1"
+PREFERRED_VERSION_gcc-cross ?= "4.1.1"
+PREFERRED_VERSION_gcc-cross-initial ?= "4.1.1"
+PREFERRED_VERSION_binutils ?= "2.17"
+PREFERRED_VERSION_binutils-cross ?= "2.17"
+PREFERRED_VERSION_linux-libc-headers ?= "2.6.15.99"
+PREFERRED_VERSION_glibc ?= "2.4"
+PREFERRED_VERSION_glibc-intermediate ?= "2.4"
+
diff --git a/conf/machine/h4000.conf b/conf/machine/h4000.conf
index 410de9a100..41301c1721 100644
--- a/conf/machine/h4000.conf
+++ b/conf/machine/h4000.conf
@@ -11,6 +11,7 @@ PREFERRED_PROVIDER_xserver = "xserver-kdrive"
PREFERRED_PROVIDER_virtual/kernel = "handhelds-pxa-2.6"
ROOT_FLASH_SIZE = "32"
+MODUTILS = "26"
PCMCIA_MANAGER = "pcmciautils"
BOOT_MODULES = " ${@linux_module_packages('${H4000_MODULES}', d)}"
diff --git a/conf/machine/omap5912osk.conf b/conf/machine/omap5912osk.conf
index 49ea6f6b90..a2c01add5d 100644
--- a/conf/machine/omap5912osk.conf
+++ b/conf/machine/omap5912osk.conf
@@ -10,6 +10,8 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-omap1"
PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
PREFERRED_VERSION_u-boot = "LABEL.2006.06.30.2020"
+#PREFERRED_VERSION_linux-omap1 = "2.6.17-omap1"
+PREFERRED_VERSION_linux-omap1 = "2.6.12-rc2"
BOOTSTRAP_EXTRA_RDEPENDS += "modutils-collateral"
diff --git a/contrib/feed-browser/includes/.mtn2git_empty b/contrib/feed-browser/includes/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/contrib/feed-browser/includes/.mtn2git_empty
diff --git a/contrib/feed-browser/includes/config.inc b/contrib/feed-browser/includes/config.inc
new file mode 100644
index 0000000000..0a270a8eb0
--- /dev/null
+++ b/contrib/feed-browser/includes/config.inc
@@ -0,0 +1,118 @@
+<?php
+
+define('DB_FILENAME', './feeds.db');
+
+$feeds = array(
+ array(
+ 'distro_name'=>'OpenZaurus',
+ 'distro_version'=>'3.5.4',
+ 'feed_base_url'=>'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4/feed/',
+ 'feeds'=>array(
+ array(
+ 'name'=>'base',
+ 'url'=>'base',
+ ),
+ array(
+ 'name'=>'opie',
+ 'url'=>'opie',
+ ),
+ array(
+ 'name'=>'x11',
+ 'url'=>'x11',
+ ),
+ array(
+ 'name'=>'upgrades',
+ 'url'=>'upgrades',
+ ),
+ array(
+ 'name'=>'perl',
+ 'url'=>'perl',
+ ),
+ array(
+ 'name'=>'python',
+ 'url'=>'python',
+ ),
+ array(
+ 'name'=>'Collie upgrades',
+ 'url'=>'upgrades/machine/collie',
+ ),
+ array(
+ 'name'=>'Tosa upgrades',
+ 'url'=>'upgrades/machine/tosa',
+ ),
+ array(
+ 'name'=>'Poodle upgrades',
+ 'url'=>'upgrades/machine/poodle',
+ ),
+ array(
+ 'name'=>'Poodle',
+ 'url'=>'machine/poodle',
+ ),
+ array(
+ 'name'=>'Collie',
+ 'url'=>'machine/collie',
+ ),
+ array(
+ 'name'=>'Tosa',
+ 'url'=>'machine/tosa',
+ )
+ )
+ ),
+ array(
+ 'distro_name'=>'OpenZaurus',
+ 'distro_version'=>'3.5.4.1',
+ 'feed_base_url'=>'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/',
+ 'feeds'=>array(
+ array(
+ 'name'=>'base',
+ 'url'=>'base',
+ ),
+ array(
+ 'name'=>'opie',
+ 'url'=>'opie',
+ ),
+ array(
+ 'name'=>'perl',
+ 'url'=>'perl',
+ ),
+ array(
+ 'name'=>'python',
+ 'url'=>'python',
+ ),
+ array(
+ 'name'=>'upgrades',
+ 'url'=>'upgrades',
+ ),
+ array(
+ 'name'=>'x11',
+ 'url'=>'x11',
+ ),
+ array(
+ 'name'=>'C7x0',
+ 'url'=>'machine/c7x0',
+ ),
+ array(
+ 'name'=>'Spitz',
+ 'url'=>'machine/spitz',
+ ),
+ array(
+ 'name'=>'Akita',
+ 'url'=>'machine/akita',
+ ),
+ array(
+ 'name'=>'Akita upgrades',
+ 'url'=>'upgrades/machine/akita',
+ ),
+ array(
+ 'name'=>'C7x0 upgrades',
+ 'url'=>'upgrades/machine/c7x0',
+ ),
+ array(
+ 'name'=>'Spitz upgrades',
+ 'url'=>'upgrades/machine/spitz',
+ )
+ )
+ )
+);
+
+?>
diff --git a/contrib/feed-browser/includes/functions.inc b/contrib/feed-browser/includes/functions.inc
new file mode 100644
index 0000000000..4745c75910
--- /dev/null
+++ b/contrib/feed-browser/includes/functions.inc
@@ -0,0 +1,455 @@
+<?php
+/*
+ * (c) Koen Kooi 2006
+ * (c) Marcin Juszkiewicz 2006
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License along
+ * with this library; see the file COPYING.LIB. If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *
+ */
+
+error_reporting(E_ALL);
+
+function db_query($query)
+{
+ $result = FALSE;
+
+ if($db_h = sqlite_open(DB_FILENAME))
+ {
+ $query_h = sqlite_query ($db_h, $query);
+ $result = sqlite_fetch_all ($query_h, SQLITE_ASSOC);
+ sqlite_close($db_h);
+ }
+
+ return $result;
+}
+
+function db_query_n($query)
+{
+ $result = FALSE;
+
+ if($db_h = sqlite_open(DB_FILENAME))
+ {
+ $query_h = sqlite_query ($db_h, $query);
+ sqlite_close($db_h);
+ }
+
+ return $result;
+}
+
+function db_table_exists ($db, $mytable)
+{
+ if($query = sqlite_query ($db, "SELECT name FROM sqlite_master WHERE type='table'"))
+ {
+ $tables = sqlite_fetch_all ($query, SQLITE_ASSOC);
+
+ if (!$tables)
+ {
+ return FALSE;
+ }
+ else
+ {
+ foreach ($tables as $table)
+ {
+ if ($table['name'] == $mytable)
+ {
+ return TRUE;
+ }
+ }
+ }
+ }
+
+ // function which is expected to return something need to return something always
+ return FALSE;
+}
+
+function insert_feeds ($db)
+{
+ global $feeds;
+
+ if(isset($feeds))
+ {
+ $id = 1;
+
+ foreach($feeds as $distro)
+ {
+ foreach($distro['feeds'] as $feed)
+ {
+ sqlite_query($db, "INSERT INTO feeds (f_id, f_name, f_uri) VALUES
+ (
+ {$id},
+ '{$distro['distro_name']} {$distro['distro_version']} {$feed['name']}',
+ '{$distro['feed_base_url']}{$feed['url']}'
+ )");
+
+ $id++;
+ }
+ }
+ }
+}
+
+function searchletter($searchletter = '')
+{
+ $ipkgoutput = "<div id='letters'>";
+ $alfabet = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y');
+
+ foreach($alfabet as $letter)
+ {
+ if($letter == $searchletter)
+ {
+ $ipkgoutput .= sprintf(" %s |", $letter );
+ }
+ else
+ {
+ $ipkgoutput .= sprintf(" <a href='?action=letter&amp;g=%s' title='packages which names begins with \"%s\"'>%s</a> |", $letter, $letter, $letter );
+ }
+ }
+
+ $ipkgoutput .= " <a href='?action=letter&amp;g=z' title='packages which names begins with \"z\"'>z</a></div>";
+
+ return $ipkgoutput;
+}
+
+function searchpkg ($searchword)
+{
+ if($result = db_query("SELECT DISTINCT p_name,p_desc,p_section FROM packages WHERE p_name LIKE '$searchword' ORDER BY p_name ASC"))
+ {
+ return generate_list_of_packages($result);
+ }
+}
+
+function generate_list_of_packages($query_result)
+{
+ $ipkgoutput = "<table>\n";
+ $ipkgoutput .="<tr><th>Package</th><th>Section</th><th>Description</th></tr>\n";
+
+ foreach($query_result as $package)
+ {
+ if (!strstr ($package['p_name'], 'locale'))
+ {
+ if(strlen($package['p_desc']) > 40)
+ {
+ $pos = strpos($package['p_desc'],' ', 40);
+
+ if($pos)
+ {
+ $package['p_desc'] = substr($package['p_desc'], 0, $pos) . '...';
+ }
+ }
+
+ $ipkgoutput .= sprintf
+ ("<tr><td><a href='?action=details&amp;pnm=%s'>%s</a></td><td><a href=\"?action=section&amp;section=%s\">%s</a></td><td> %s</td></tr>\n",
+ urlencode($package['p_name']), $package['p_name'], $package['p_section'], $package['p_section'], htmlentities($package['p_desc']));
+ }
+
+ }
+
+ $ipkgoutput .= '</table>';
+
+ return $ipkgoutput;
+}
+
+function searchsection($section)
+{
+ if($result = db_query("SELECT DISTINCT p_name,p_desc,p_section FROM packages WHERE p_section LIKE '$section%' ORDER BY p_section ASC, p_name ASC"))
+ {
+ return generate_list_of_packages($result);
+ }
+}
+
+function pkgdetails ($package)
+{
+ $result = db_query("SELECT * FROM packages,feeds
+ WHERE (packages.p_name='$package' OR packages.p_provides='$package')
+ AND feeds.f_id = packages.p_feed
+ ORDER BY packages.p_version DESC, feeds.f_name ASC, packages.p_arch DESC ");
+
+ // display first result
+
+ if ($result)
+ {
+ $package = $result[0];
+
+ $details = sprintf("<h1>Package details for %s %s</h1>", $package['packages.p_name'], $package['packages.p_version']);
+ $details .= sprintf ("<p id='description'>%s</p>", htmlentities($package['packages.p_desc']));
+ $details .= "<dl>";
+
+ $details .= sprintf ("\n<dt>Maintainer:</dt><dd>%s</dd>", str_replace(array('@',', '), array(' at ', '<br />'), htmlentities($package['packages.p_maintainer'])));
+
+ if($package['packages.p_homepage'])
+ {
+ $details .= sprintf ("\n<dt>Homepage:</dt><dd>%s</dd>", $package['packages.p_homepage']);
+ }
+
+ if($package['packages.p_section'])
+ {
+ $details .= sprintf ("\n<dt>Section:</dt><dd><a href='?action=section&amp;section=%s'>%s</a></dd>", $package['packages.p_section'],$package['packages.p_section']);
+ }
+
+ if($package['packages.p_depends'])
+ {
+ $details .= sprintf ("\n<dt>Depends:</dt><dd>%s</dd>", addlinks ($package['packages.p_depends']));
+ }
+
+ if($package['packages.p_recommends'])
+ {
+ $details .= sprintf ("\n<dt>Recommends:</dt><dd>%s</dd>", addlinks ($package['packages.p_recommends']));
+ }
+
+ if($package['packages.p_replaces'])
+ {
+ $details .= sprintf ("\n<dt>Replaces:</dt><dd>%s</dd>", addlinks ($package['packages.p_replaces']));
+ }
+
+ if($package['packages.p_provides'])
+ {
+ $details .= sprintf ("\n<dt>Provides:</dt><dd>%s</dd>", addlinks ($package['packages.p_provides']));
+ }
+
+ if($package['packages.p_conflicts'])
+ {
+ $details .= sprintf ("\n<dt>Conflicts:</dt><dd>%s</dd>", addlinks ($package['packages.p_conflicts']));
+ }
+
+ $size = $package['packages.p_size'];
+
+ if(strlen($size) > 6)
+ {
+ $size = sprintf("%02.2f Megabytes", $size / (1024 * 1024));
+ }
+
+ if(strlen($size) > 3 && strlen($size) < 7)
+ {
+ $size = sprintf("%02.2f Kilobytes", $size / (1024 ));
+ }
+
+ if(strlen($size) < 4)
+ {
+ $size = sprintf("%s Bytes", $size);
+ }
+
+ $details .= sprintf ("\n<dt>Size:</dt><dd>%s</dd></dl>", $size);
+
+ if($package['packages.p_source'])
+ {
+ $sourcearray = explode (" ", $package['packages.p_source']);
+
+ $details .= "\n<h2>Source:</h2><ul>";
+
+ foreach ($sourcearray as $key => $source_url)
+ {
+ if (substr ($source_url, 0, 4) == "http" || substr ($source_url, 0, 3) == "ftp")
+ {
+ $url_parts = parse_url($source_url);
+
+ $details .= sprintf ("<li><a href='%s'>%s</a></li>", $source_url, array_pop(explode('/', $url_parts['path'])));
+ }
+ else
+ {
+ $details .= sprintf ("<li>%s</li>", $source_url);
+ }
+ }
+
+ $details .= '</ul>';
+
+ }
+
+ $details .= "\n<h2>Available versions and architectures:</h2><ul id='download'>\n";
+
+ foreach($result as $packages_a)
+ {
+ $details .= sprintf("\n<li><a class='download' href='%s' title='%s %s for %s'>%s %s</a> for %s (%s feed)</li>\n",
+ $packages_a['feeds.f_uri']."/".$packages_a['packages.p_file'],
+ $packages_a['packages.p_name'],
+ $packages_a['packages.p_version'],
+ $packages_a['packages.p_arch'],
+ $packages_a['packages.p_name'],
+ $packages_a['packages.p_version'],
+ $packages_a['packages.p_arch'],
+ $packages_a['feeds.f_name']
+ );
+ }
+
+ $details .= "</ul>\n";
+ }
+ else
+ {
+ $details = "<h1>Sorry, package not found\n</h1><a href='./'>return</a>\n";
+ }
+
+ return $details;
+}
+
+function addlinks ($input)
+{
+ // split input elements up
+ $elements = explode (', ', $input);
+
+ $offset = 0;
+
+ foreach ($elements as $element)
+ {
+ // strip version number
+ $element = ereg_replace('^(.*)( \((.*)\))+$', '\\1', $element);
+
+ // do we have this package in the db?
+ $result = db_query ("SELECT DISTINCT p_name FROM packages WHERE p_name='{$element}' OR p_provides='{$element}'");
+
+ if(isset($result[0]['p_name']))
+ {
+ // find position of string in line
+ $pos = strpos ($input, $element, $offset);
+ $link = sprintf("<a href=\"?action=details&amp;pnm=%s\">$element</a>", urlencode ($element));
+
+ // replace element with a link
+ $input = substr_replace ($input, $link, $pos, strlen ($element));
+
+ // update offset
+ $offset = ($pos + strlen ($link));
+ }
+ else
+ {
+ $offset += strlen ($element);
+ }
+ }
+
+ return $input;
+}
+
+function sectionslist()
+{
+ $ipkgoutput = '';
+
+ if($result = db_query ("SELECT DISTINCT p_section FROM packages ORDER BY p_section"))
+ {
+ $section_up = '';
+
+ $sections = array();
+
+ foreach($result as $package)
+ {
+ $section_split = explode('/', $package['p_section']);
+
+ if($section_up != $section_split[0])
+ {
+ $section_up = $section_split[0];
+ }
+
+ if(isset($section_split[1])) // x11/gnome/libs
+ {
+ $sections[$section_up][$section_split[1]] = $section_split[1];
+
+ if(isset($section_split[2])) // x11/gnome/libs
+ {
+ $sections[ $section_up ][ $section_split[1] ] = array($section_split[2]=>$section_split[2]);
+ }
+ }
+ }
+
+ $output = "<ul id='sections'>\n";
+
+ foreach($sections as $section_name1=>$item)
+ {
+ $output .= sprintf ("<li><a href='?action=section&amp;section=%s' title='%s'>%s</a>",
+ urlencode($section_name1),
+ urlencode($section_name1),
+ $section_name1);
+
+ if(is_array($item))
+ {
+ $output .= '<ul class="subsections">';
+
+ foreach($item as $section_name2=>$subitem)
+ {
+ $section_name = "{$section_name1}/{$section_name2}";
+ $output .= sprintf ("<li><a href='?action=section&amp;section=%s' title='%s'>%s</a>",
+ urlencode($section_name),
+ urlencode($section_name),
+ $section_name2);
+
+ if(is_array($subitem))
+ {
+ $output .= '<ul class="subsections">';
+
+ foreach($subitem as $section_name3=>$subitem2)
+ {
+ $section_name = "{$section_name1}/{$section_name2}/{$section_name3}";
+ $output .= sprintf ("<li><a href='?action=section&amp;section=%s' title='%s'>%s</a></li>",
+ urlencode($section_name),
+ urlencode($section_name),
+ $section_name3);
+ }
+
+ $output .= '</ul>';
+ }
+
+ $output .= '</li>';
+ }
+
+ $output .= '</ul>';
+ }
+
+ $output .= '</li>';
+ }
+
+ $output .= "</ul>\n";
+ }
+
+ return $output;
+}
+
+function check_database()
+{
+ if($db = sqlite_open(DB_FILENAME))
+ {
+ //initialize db
+ if (db_table_exists ($db, 'packages') === FALSE)
+ {
+ sqlite_query ($db, "CREATE TABLE packages (
+ p_name varchar(50),
+ p_version varchar(10),
+ p_arch varchar(12),
+ p_depends varchar(50),
+ p_maintainer varchar(50),
+ p_homepage varchar(100),
+ p_section varchar(20),
+ p_replaces varchar(50),
+ p_provides varchar(50),
+ p_recommends varchar(50),
+ p_conflicts varchar(50),
+ p_size int(10),
+ p_md5 char(32),
+ p_source varchar(500),
+ p_feed varchar(20),
+ p_file varchar(100),
+ p_desc varchar(1000))");
+ }
+
+ if (db_table_exists ($db, 'feeds') === FALSE)
+ {
+ sqlite_query ($db, "CREATE TABLE feeds (
+ f_id int(8),
+ f_name varchar(32),
+ f_uri varchar(100),
+ f_comments varchar(500))");
+
+ insert_feeds ($db) ;
+ }
+
+ sqlite_close($db);
+ }
+}
+
+
+
+?>
diff --git a/contrib/feed-browser/index.php b/contrib/feed-browser/index.php
index 3b1230ce22..df7282db7d 100644
--- a/contrib/feed-browser/index.php
+++ b/contrib/feed-browser/index.php
@@ -30,9 +30,8 @@
*
*/
-error_reporting(E_ALL);
-
-define('DB_FILENAME', './feeds.db');
+require_once 'includes/config.inc';
+require_once 'includes/functions.inc';
check_database();
@@ -69,7 +68,6 @@ switch($action)
break;
}
-
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
@@ -87,472 +85,3 @@ switch($action)
</div>
</body>
</html>
-<?php
-
-function db_table_exists ($db, $mytable)
-{
- if($query = sqlite_query ($db, "SELECT name FROM sqlite_master WHERE type='table'"))
- {
- $tables = sqlite_fetch_all ($query, SQLITE_ASSOC);
-
- if (!$tables)
- {
- return FALSE;
- }
- else
- {
- foreach ($tables as $table)
- {
- if ($table['name'] == $mytable)
- {
- return TRUE;
- }
- }
- }
- }
-
- // function which is expected to return something need to return something always
- return FALSE;
-}
-
-function db_query($query)
-{
- $result = FALSE;
-
- if($db_h = sqlite_open(DB_FILENAME))
- {
- if($query_h = sqlite_query ($db_h, $query))
- {
- $result = sqlite_fetch_all ($query_h, SQLITE_ASSOC);
- }
-
- sqlite_close($db_h);
- }
-
- return ($result);
-}
-
-function test_insert_ipkgs ($db)
-{
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-base', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/base')
- ");
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-opie', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/opie')
- ");
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-perl', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/perl')
- ");
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-python', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/python')
- ");
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-upgrades', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/upgrades')
- ");
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-x11', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/x11')
- ");
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-machine-c7x0', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/machine/c7x0')
- ");
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-machine-spitz', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/machine/spitz')
- ");
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-machine-akita', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/machine/akita')
- ");
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-upgrades-machine-akita', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/upgrades/machine/akita')
- ");
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-upgrades-machine-c7x0', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/upgrades/machine/c7x0')
- ");
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-upgrades-machine-spitz', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/upgrades/machine/spitz')
- ");
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('3541-upgrades-machine-tosa', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/upgrades/machine/tosa')
- ");
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('354-base', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4/feed/base')
- ");
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('354-opie', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4/feed/opie')
- ");
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('354-x11', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4/feed/x11')
- ");
-
- sqlite_query($db,
- "INSERT INTO feeds (f_name, f_uri)
- VALUES ('354-upgrades', 'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4/feed/upgrades')
- ");
-
-}
-
-function searchletter($searchletter = '')
-{
- $ipkgoutput = "<div id='letters'>";
- $alfabet = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y');
-
- foreach($alfabet as $letter)
- {
- if($letter == $searchletter)
- {
- $ipkgoutput .= sprintf(" %s |", $letter );
- }
- else
- {
- $ipkgoutput .= sprintf(" <a href='?action=letter&amp;g=%s' title='packages which names begins with \"%s\"'>%s</a> |", $letter, $letter, $letter );
- }
- }
-
- $ipkgoutput .= " <a href='?action=letter&amp;g=z' title='packages which names begins with \"z\"'>z</a></div>";
-
- return $ipkgoutput;
-}
-
-function searchpkg ($searchword)
-{
- if($result = db_query("SELECT DISTINCT p_name,p_desc,p_section FROM packages WHERE p_name LIKE '$searchword' ORDER BY p_name ASC"))
- {
- return generate_list_of_packages($result);
- }
-}
-
-function generate_list_of_packages($query_result)
-{
- $ipkgoutput = "<table>\n";
- $ipkgoutput .="<tr><th>Package</th><th>Section</th><th>Description</th></tr>\n";
-
- foreach($query_result as $package)
- {
- if (!strstr ($package['p_name'], 'locale'))
- {
- if(strlen($package['p_desc']) > 40)
- {
- $pos = strpos($package['p_desc'],' ', 40);
-
- if($pos)
- {
- $package['p_desc'] = substr($package['p_desc'], 0, $pos) . '...';
- }
- }
-
- $ipkgoutput .= sprintf
- ("<tr><td><a href='?action=details&amp;pnm=%s'>%s</a></td><td><a href=\"?action=section&amp;section=%s\">%s</a></td><td> %s</td></tr>\n",
- urlencode($package['p_name']), $package['p_name'], $package['p_section'], $package['p_section'], htmlentities($package['p_desc']));
- }
-
- }
-
- $ipkgoutput .= '</table>';
-
- return $ipkgoutput;
-}
-
-function searchsection($section)
-{
- if($result = db_query("SELECT DISTINCT p_name,p_desc,p_section FROM packages WHERE p_section LIKE '$section%' ORDER BY p_section ASC, p_name ASC"))
- {
- return generate_list_of_packages($result);
- }
-}
-
-function pkgdetails ($package)
-{
- $result = db_query("SELECT * FROM packages,feeds
- WHERE (packages.p_name='$package' OR packages.p_provides='$package')
- AND feeds.f_name = packages.p_feed
- ORDER BY packages.p_version DESC, feeds.f_name ASC, packages.p_arch DESC ");
-
- // display first result
-
- if ($result)
- {
- $package = $result[0];
-
- $details = sprintf("<h1>Package details for %s %s</h1>", $package['packages.p_name'], $package['packages.p_version']);
- $details .= sprintf ("<p id='description'>%s</p>", htmlentities($package['packages.p_desc']));
- $details .= "<dl>";
-
- $details .= sprintf ("\n<dt>Maintainer:</dt><dd>%s</dd>", str_replace(array('@',', '), array(' at ', '<br />'), htmlentities($package['packages.p_maintainer'])));
-
- if($package['packages.p_homepage'])
- {
- $details .= sprintf ("\n<dt>Homepage:</dt><dd>%s</dd>", $package['packages.p_homepage']);
- }
-
- if($package['packages.p_section'])
- {
- $details .= sprintf ("\n<dt>Section:</dt><dd><a href='?action=section&amp;section=%s'>%s</a></dd>", $package['packages.p_section'],$package['packages.p_section']);
- }
-
- if($package['packages.p_depends'])
- {
- $details .= sprintf ("\n<dt>Depends:</dt><dd>%s</dd>", addlinks ($package['packages.p_depends']));
- }
-
- if($package['packages.p_recommends'])
- {
- $details .= sprintf ("\n<dt>Recommends:</dt><dd>%s</dd>", addlinks ($package['packages.p_recommends']));
- }
-
- if($package['packages.p_replaces'])
- {
- $details .= sprintf ("\n<dt>Replaces:</dt><dd>%s</dd>", addlinks ($package['packages.p_replaces']));
- }
-
- if($package['packages.p_provides'])
- {
- $details .= sprintf ("\n<dt>Provides:</dt><dd>%s</dd>", addlinks ($package['packages.p_provides']));
- }
-
- if($package['packages.p_conflicts'])
- {
- $details .= sprintf ("\n<dt>Conflicts:</dt><dd>%s</dd>", addlinks ($package['packages.p_conflicts']));
- }
-
- $size = $package['packages.p_size'];
-
- if(strlen($size) > 6)
- {
- $size = sprintf("%02.2f Megabytes", $size / (1024 * 1024));
- }
-
- if(strlen($size) > 3 && strlen($size) < 7)
- {
- $size = sprintf("%02.2f Kilobytes", $size / (1024 ));
- }
-
- if(strlen($size) < 4)
- {
- $size = sprintf("%s Bytes", $size);
- }
-
- $details .= sprintf ("\n<dt>Size:</dt><dd>%s</dd></dl>", $size);
-
- if($package['packages.p_source'])
- {
- $sourcearray = explode (" ", $package['packages.p_source']);
-
- $details .= "\n<h2>Source:</h2><ul>";
-
- foreach ($sourcearray as $key => $source_url)
- {
- if (substr ($source_url, 0, 4) == "http" || substr ($source_url, 0, 3) == "ftp")
- {
- $url_parts = parse_url($source_url);
-
- $details .= sprintf ("<li><a href='%s'>%s</a></li>", $source_url, array_pop(explode('/', $url_parts['path'])));
- }
- else
- {
- $details .= sprintf ("<li>%s</li>", $source_url);
- }
- }
-
- $details .= '</ul>';
-
- }
-
- $details .= "\n<h2>Available versions and architectures:</h2><ul id='download'>\n";
-
- foreach($result as $packages_a)
- {
- $details .= sprintf("\n<li><a class='download' href='%s' title='%s %s for %s'>%s %s</a> for %s (%s feed)</li>\n",
- $packages_a['feeds.f_uri']."/".$packages_a['packages.p_file'],
- $packages_a['packages.p_name'],
- $packages_a['packages.p_version'],
- $packages_a['packages.p_arch'],
- $packages_a['packages.p_name'],
- $packages_a['packages.p_version'],
- $packages_a['packages.p_arch'],
- $packages_a['feeds.f_name']
- );
- }
-
- $details .= "</ul>\n";
- }
- else
- {
- $details = "<h1>Sorry, package not found\n</h1><a href='./'>return</a>\n";
- }
-
- return $details;
-}
-
-function addlinks ($input)
-{
- // split input elements up
- $elements = explode (', ', $input);
-
- $offset = 0;
-
- foreach ($elements as $element)
- {
- // strip version number
- $element = ereg_replace('^(.*)( \((.*)\))+$', '\\1', $element);
-
- // do we have this package in the db?
- $result = db_query ("SELECT DISTINCT p_name FROM packages WHERE p_name='{$element}' OR p_provides='{$element}'");
-
- if(isset($result[0]['p_name']))
- {
- // find position of string in line
- $pos = strpos ($input, $element, $offset);
- $link = sprintf("<a href=\"?action=details&amp;pnm=%s\">$element</a>", urlencode ($element));
-
- // replace element with a link
- $input = substr_replace ($input, $link, $pos, strlen ($element));
-
- // update offset
- $offset = ($pos + strlen ($link));
- }
- else
- {
- $offset += strlen ($element);
- }
- }
-
- return $input;
-}
-
-function sectionslist()
-{
- $ipkgoutput = '';
-
- if($result = db_query ("SELECT DISTINCT p_section FROM packages ORDER BY p_section"))
- {
- $ipkgoutput = "<ul id='sections'>\n";
-
- $section_up = $result[0]['p_section'];
- $section_level = FALSE;
- $opie_top = FALSE;
-
- foreach($result as $item)
- {
- $section_name = $item['p_section'];
-
- if(0 === strpos($section_name, 'opie') AND !$opie_top)
- {
- $opie_top = TRUE;
-
- $section_up = 'opie';
- }
- elseif($opie_top AND 0 !== strpos($section_name, 'opie'))
- {
- $opie_top = FALSE;
- }
-
- if(
- strpos($section_name, '/') // subsection
- )
- {
- if(0 === strpos($section_name, $section_up . '/')) // console/network are not part of console/net
- {
- if(!$section_level)
- {
- $ipkgoutput .= '<li><ul class="subsections">';
- }
-
- $section_name = str_replace($section_up . '/', '', $item['p_section']);
- $section_level = TRUE;
- }
- }
- elseif($section_level)
- {
- $section_up = $section_name;
- $ipkgoutput .= '</ul></li>';
- $section_level = FALSE;
- }
- else
- {
- $section_up = $section_name;
- }
-
- $ipkgoutput .= sprintf ("<li><a href='?action=section&amp;section=%s' title='%s'>%s</a></li>",
- urlencode($item['p_section']),
- urlencode($item['p_section']),
- $section_name);
- }
-
- if($section_level)
- {
- $ipkgoutput .= '</ul></li>';
- }
-
- $ipkgoutput .= "</ul>\n";
- }
-
- return $ipkgoutput;
-}
-
-function check_database()
-{
- if($db = sqlite_open(DB_FILENAME))
- {
- //initialize db
- if (db_table_exists ($db, 'packages') === FALSE)
- {
- sqlite_query ($db, "CREATE TABLE packages (
- p_name varchar(50),
- p_version varchar(10),
- p_arch varchar(12),
- p_depends varchar(50),
- p_maintainer varchar(50),
- p_homepage varchar(100),
- p_section varchar(20),
- p_replaces varchar(50),
- p_provides varchar(50),
- p_recommends varchar(50),
- p_conflicts varchar(50),
- p_size int(10),
- p_md5 char(32),
- p_source varchar(500),
- p_feed varchar(20),
- p_file varchar(100),
- p_desc varchar(1000))");
- }
-
- if (db_table_exists ($db, 'feeds') === FALSE)
- {
- sqlite_query ($db, "CREATE TABLE feeds (
- f_name varchar(20),
- f_uri varchar(100),
- f_comments varchar(500))");
-
- test_insert_ipkgs ($db) ;
- }
-
- sqlite_close($db);
- }
-}
-
-?>
diff --git a/contrib/feed-browser/update.php b/contrib/feed-browser/update.php
index 1b5e7c34fc..786e898494 100644
--- a/contrib/feed-browser/update.php
+++ b/contrib/feed-browser/update.php
@@ -16,6 +16,8 @@
*
*/
+require_once 'includes/config.inc';
+require_once 'includes/functions.inc';
/*
A package entry looks like this:
@@ -35,18 +37,16 @@
Description: IPv4 link-local address allocator
*/
-error_reporting(E_ALL);
+check_database();
$start = time();
$p_count = 0;
-define('DB_FILENAME', './feeds.db');
-
-$feeds = db_query("SELECT f_name, f_uri FROM feeds");
+$feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds");
foreach($feeds as $feed)
{
- print("Updating {$feed['f_name']}: {$feed['f_uri']}\n");
+ print("Updating {$feed['f_name']}: ");
db_query_n("DELETE FROM packages WHERE p_feed = '{$feed['f_name']}'");
$count = 0;
@@ -59,8 +59,8 @@ foreach($feeds as $feed)
'name'=>'', 'version'=>'', 'arch'=>'', 'depends'=>'',
'maintainer'=>'', 'homepage'=>'', 'section'=>'', 'replaces'=>'',
'provides'=>'', 'recommends'=>'', 'conflicts'=>'', 'size'=>'',
- 'md5sum'=>'', 'source'=>'', 'feed'=>'', 'file'=>'', 'desc'=>''
- );
+ 'md5sum'=>'', 'source'=>'', 'feed'=>$feed['f_id'], 'file'=>'', 'desc'=>''
+ );
while (!feof($packagesgz_h))
{
@@ -75,7 +75,7 @@ foreach($feeds as $feed)
'name'=>'', 'version'=>'', 'arch'=>'', 'depends'=>'',
'maintainer'=>'', 'homepage'=>'', 'section'=>'', 'replaces'=>'',
'provides'=>'', 'recommends'=>'', 'conflicts'=>'', 'size'=>'',
- 'md5sum'=>'', 'source'=>'', 'feed'=>'', 'file'=>'', 'desc'=>''
+ 'md5sum'=>'', 'source'=>'', 'feed'=>$feed['f_id'], 'file'=>'', 'desc'=>''
);
}
@@ -135,6 +135,7 @@ foreach($feeds as $feed)
}
$p_count = $count + $p_count;
+ print("$count packages\n");
gzclose($packagesgz_h);
}
//close the db
@@ -160,7 +161,7 @@ function insert_ipkgs(&$package_info)
{
db_query_n("INSERT INTO packages VALUES (
'{$package_info['name']}', '{$package_info['version']}',
- '{$package_info['arch']}', '{$package_info['depends']}',
+ '{$package_info['arch']}', '{$package_info['depends']}',
'{$package_info['maintainer']}', '{$package_info['homepage']}',
'{$package_info['section']}', '{$package_info['replaces']}',
'{$package_info['provides']}', '{$package_info['recommends']}',
@@ -168,38 +169,7 @@ function insert_ipkgs(&$package_info)
'{$package_info['md5sum']}', '{$package_info['source']}',
'{$package_info['feed']}', '{$package_info['file']}',
'{$package_info['desc']}'
- )");
-}
-
-
-function db_query($query)
-{
- $result = FALSE;
-
- if($db_h = sqlite_open(DB_FILENAME))
- {
- $query_h = sqlite_query ($db_h, $query);
- $result = sqlite_fetch_all ($query_h, SQLITE_ASSOC);
- sqlite_close($db_h);
- }
-
- return $result;
+ )");
}
-
-function db_query_n($query)
-{
- $result = FALSE;
-
- if($db_h = sqlite_open(DB_FILENAME))
- {
- $query_h = sqlite_query ($db_h, $query);
- sqlite_close($db_h);
- }
-
- return $result;
-}
-
-
-
?>
diff --git a/contrib/python/.mtn2git_empty b/contrib/python/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/contrib/python/.mtn2git_empty
diff --git a/contrib/python/generate-manifest.py b/contrib/python/generate-manifest.py
new file mode 100755
index 0000000000..2fd681dc01
--- /dev/null
+++ b/contrib/python/generate-manifest.py
@@ -0,0 +1,326 @@
+#!/usr/bin/env python
+
+# generate Python Manifest for the OpenEmbedded build system
+# (C) 2002-2006 Michael Lauer <mickey@Vanille.de>
+# MIT license
+
+import os
+import sys
+import time
+
+VERSION = "2.4.3"
+# increase when touching python-core
+BASEREV = 0
+
+__author__ = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
+__version__ = "$Revision: 1.20 $"
+
+class MakefileMaker:
+
+ def __init__( self, outfile ):
+ """initialize"""
+ self.packages = {}
+ self.sourcePrefix = "/lib/python%s/" % VERSION[:3]
+ self.targetPrefix = "${libdir}/python%s" % VERSION[:3]
+ self.output = outfile
+ self.out( "#" * 120 )
+ self.out( "### AUTO-GENERATED by '%s' [(C) 2002-2006 Michael 'Mickey' Lauer <mickey@Vanille.de>] on %s" % ( sys.argv[0], time.asctime() ) )
+ self.out( "###" )
+ self.out( "### Visit THE Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy" )
+ self.out( "###" )
+ self.out( "### Warning: Manual edits will be lost!" )
+ self.out( "###" )
+ self.out( "#" * 120 )
+ #
+ # helper functions
+ #
+
+ def out( self, data ):
+ """print a line to the output file"""
+ print >> self.output, data
+
+ def setPrefix( self, sourcePrefix, targetPrefix ):
+ """set a file prefix for addPackage files"""
+ self.sourcePrefix = sourcePrefix
+ self.targetPrefix = targetPrefix
+
+ def doProlog( self ):
+ self.out( """ """ )
+ self.out( "" )
+
+ def addPackage( self, revision, name, description, dependencies, filenames ):
+ """add a package to the Makefile"""
+ if type( filenames ) == type( "" ):
+ filenames = filenames.split()
+ fullFilenames = []
+ for filename in filenames:
+ if filename[0] != "/":
+ fullFilenames.append( ( "%s%s" % ( self.sourcePrefix, filename ), "%s%s" % ( self.targetPrefix, filename ) ) )
+ else:
+ fullFilenames.append( ( filename, filename ) )
+ self.packages[name] = revision, description, dependencies, fullFilenames
+
+ def doBody( self ):
+ """generate body of Makefile"""
+
+ global VERSION
+
+ #
+ # generate provides line
+ #
+
+ provideLine = 'PROVIDES+="'
+ for name in self.packages:
+ provideLine += "%s " % name
+ provideLine += '"'
+
+ self.out( provideLine )
+ self.out( "" )
+
+ #
+ # generate package line
+ #
+
+ packageLine = 'PACKAGES="'
+ for name in self.packages:
+ packageLine += "%s " % name
+ packageLine += '"'
+
+ self.out( packageLine )
+ self.out( "" )
+
+ #
+ # generate package variables
+ #
+
+ for name, data in self.packages.iteritems():
+ rev, desc, deps, files = data
+
+ #
+ # write out the description, revision and dependencies
+ #
+ self.out( 'DESCRIPTION_%s="%s"' % ( name, desc ) )
+ self.out( 'PR_%s="ml%d"' % ( name, rev + BASEREV ) )
+ self.out( 'RDEPENDS_%s="%s"' % ( name, deps.replace( ",", "" ) ) )
+
+ line = 'FILES_%s="' % name
+
+ #
+ # check which directories to make in the temporary directory
+ #
+
+ dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
+ for source, target in files:
+ dirset[os.path.dirname( target )] = True
+
+ #
+ # generate which files to copy for the target (-dfR because whole directories are also allowed)
+ #
+
+ for source, target in files:
+ line += "%s " % target
+
+ line += '"'
+ self.out( line )
+
+# for source, target in files:
+# if ( source.find( "lib-dynload" ) != -1 ) or \
+# ( source.endswith( "python" ) ) or \
+# ( source.endswith( "pydoc" ) ): # MACHDEP
+# self.out( "\t cp -dfR $(STAGING_LIBDIR)/..%s $(IPKTMP_DIR)%s/;" % ( source, os.path.dirname( target ) ) )
+# else:
+# self.out( "\t cp -dfR $(STAGING_DIR)%s $(IPKTMP_DIR)%s/;" % ( source, os.path.dirname( target ) ) )
+#
+ self.out( "" )
+
+ def doEpilog( self ):
+ self.out( """""" )
+ self.out( "" )
+
+ def make( self ):
+ self.doProlog()
+ self.doBody()
+ self.doEpilog()
+
+if __name__ == "__main__":
+
+ if len( sys.argv ) > 1:
+ os.popen( "rm -f ./%s" % sys.argv[1] )
+ outfile = file( sys.argv[1], "w" )
+ else:
+ outfile = sys.stdout
+
+ m = MakefileMaker( outfile )
+
+ # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
+ # Parameters: revision, name, description, dependencies, filenames
+ #
+
+ m.setPrefix( "/", "/usr/" )
+
+ m.addPackage( 1, "python-core", "Python Interpreter and core modules (needed!)", "",
+ "lib/python2.4/__future__.* lib/python2.4/copy.* lib/python2.4/copy_reg.* lib/python2.4/ConfigParser.py " +
+ "lib/python2.4/getopt.* lib/python2.4/linecache.* lib/python2.4/new.* " +
+ "lib/python2.4/os.* lib/python2.4/posixpath.* " +
+ "lib/python2.4/warnings.* lib/python2.4/site.* lib/python2.4/stat.* " +
+ "lib/python2.4/UserDict.* lib/python2.4/UserList.* lib/python2.4/UserString.* " +
+ "lib/python2.4/lib-dynload/binascii.so lib/python2.4/lib-dynload/struct.so lib/python2.4/lib-dynload/time.so " +
+ "lib/python2.4/lib-dynload/xreadlines.so lib/python2.4/types.* bin/python" )
+
+ m.addPackage( 0, "python-devel", "Python Development Package", "python-core",
+ "include lib/python2.4/config" ) # package
+
+ m.addPackage( 0, "python-idle", "Python Integrated Development Environment", "python-core, python-tkinter",
+ "bin/idle lib/python2.4/idlelib" ) # package
+
+ m.addPackage( 0, "python-pydoc", "Python Interactive Help Support", "python-core, python-lang, python-stringold, python-re",
+ "bin/pydoc lib/python2.4/pydoc.*" )
+
+ m.setPrefix( "/lib/python2.4/", "${libdir}/python2.4/" )
+
+ m.addPackage( 0, "python-audio", "Python Audio Handling", "python-core",
+ "wave.* chunk.* lib-dynload/ossaudiodev.so lib-dynload/audioop.so" )
+
+ m.addPackage( 0, "python-bsddb", "Python Berkeley Database Bindings", "python-core",
+ "bsddb" ) # package
+
+ m.addPackage( 0, "python-codecs", "Python Codecs, Encodings & i18n Support", "python-core",
+ "codecs.* encodings gettext.* locale.* lib-dynload/_locale.so lib-dynload/unicodedata.so stringprep.* xdrlib.*" )
+
+ m.addPackage( 0, "python-compile", "Python Bytecode Compilation Support", "python-core",
+ "py_compile.* compileall.*" )
+
+ m.addPackage( 0, "python-compiler", "Python Compiler Support", "python-core",
+ "compiler" ) # package
+
+ m.addPackage( 0, "python-compression", "Python High Level Compression Support", "python-core, python-zlib",
+ "gzip.* zipfile.*" )
+
+ m.addPackage( 0, "python-crypt", "Python Basic Cryptographic and Hashing Support", "python-core",
+ "lib-dynload/crypt.so lib-dynload/md5.so lib-dynload/rotor.so lib-dynload/sha.so" )
+
+ m.addPackage( 0, "python-textutils", "Python Option Parsing, Text Wrapping and Comma-Separated-Value Support", "python-core, python-io, python-re, python-stringold",
+ "lib-dynload/_csv.so csv.* optparse.* textwrap.*" )
+
+ m.addPackage( 1, "python-curses", "Python Curses Support", "python-core",
+ "curses lib-dynload/_curses.so lib-dynload/_curses_panel.so" ) # package
+
+ m.addPackage( 0, "python-datetime", "Python Calendar and Time support", "python-core, python-codecs",
+ "_strptime.* calendar.* lib-dynload/datetime.so" )
+
+ m.addPackage( 0, "python-db", "Python File-Based Database Support", "python-core",
+ "anydbm.* dumbdbm.* whichdb.* " )
+
+ m.addPackage( 0, "python-distutils", "Python Distribution Utilities", "python-core",
+ "config distutils" ) # package
+
+ m.addPackage( 0, "python-email", "Python Email Support", "python-core, python-io, python-re",
+ "email" ) # package
+
+ m.addPackage( 0, "python-fcntl", "Python's fcntl Interface", "python-core",
+ "lib-dynload/fcntl.so" )
+
+ m.addPackage( 0, "python-hotshot", "Python Hotshot Profiler", "python-core",
+ "hotshot lib-dynload/_hotshot.so" )
+
+ m.addPackage( 0, "python-html", "Python HTML Processing", "python-core",
+ "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* " )
+
+ m.addPackage( 0, "python-gdbm", "Python GNU Database Support", "python-core, libgdbm3",
+ "lib-dynload/gdbm.so" )
+
+ m.addPackage( 0, "python-image", "Python Graphical Image Handling", "python-core",
+ "colorsys.* imghdr.* lib-dynload/imageop.so lib-dynload/rgbimg.so" )
+
+ m.addPackage( 0, "python-io", "Python Low-Level I/O", "python-core, python-math",
+ "lib-dynload/_socket.so lib-dynload/_ssl.so lib-dynload/select.so lib-dynload/termios.so lib-dynload/cStringIO.so "
+ "pipes.* socket.* tempfile.* StringIO.* " )
+
+ m.addPackage( 0, "python-lang", "Python Low-Level Language Support", "python-core",
+ "lib-dynload/array.so lib-dynload/parser.so lib-dynload/operator.so lib-dynload/_weakref.so " +
+ "lib-dynload/itertools.so lib-dynload/collections.so " +
+ "atexit.* code.* codeop.* dis.* inspect.* keyword.* opcode.* repr.* token.* tokenize.* traceback.* linecache.* weakref.*" )
+
+ m.addPackage( 0, "python-logging", "Python Logging Support", "python-core",
+ "logging" ) # package
+
+ m.addPackage( 0, "python-lib-old-and-deprecated", "Python Deprecated Libraries", "python-core",
+ "lib-old" ) # package
+
+ m.addPackage( 0, "python-tkinter", "Python Tcl/Tk Bindings", "python-core",
+ "lib-dynload/_tkinter.so lib-tk" ) # package
+
+ m.addPackage( 0, "python-math", "Python Math Support", "python-core",
+ "lib-dynload/cmath.so lib-dynload/math.so lib-dynload/_random.so random.* sets.*" )
+
+ m.addPackage( 0, "python-mime", "Python MIME Handling APIs", "python-core, python-io",
+ "mimetools.* quopri.* rfc822.*" )
+
+ m.addPackage( 0, "python-mmap", "Python Memory-Mapped-File Support", "python-core, python-io",
+ "lib-dynload/mmap.so " )
+
+ m.addPackage( 0, "python-unixadmin", "Python Unix Administration Support", "python-core",
+ "lib-dynload/nis.so lib-dynload/grp.so lib-dynload/pwd.so getpass.*" )
+
+ m.addPackage( 1, "python-netclient", "Python Internet Protocol Clients", "python-core, python-datetime, python-io, python-lang, python-logging, python-mime",
+ "*Cookie*.* " +
+ "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib.* urllib2.* urlparse.*" )
+
+ m.addPackage( 0, "python-netserver", "Python Internet Protocol Servers", "python-core, python-netclient",
+ "cgi.* BaseHTTPServer.* SimpleHTTPServer.* SocketServer.*" )
+
+ m.addPackage( 0, "python-pickle", "Python Persistence Support", "python-core, python-codecs, python-re",
+ "pickle.* shelve.* lib-dynload/cPickle.so" )
+
+ m.addPackage( 0, "python-pprint", "Python Pretty-Print Support", "python-core",
+ "pprint.*" )
+
+ m.addPackage( 0, "python-profile", "Python Basic Profiling Support", "python-core",
+ "profile.* pstats.*" )
+
+ m.addPackage( 0, "python-re", "Python Regular Expression APIs", "python-core",
+ "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
+
+ m.addPackage( 0, "python-readline", "Python Readline Support", "python-core, libreadline4",
+ "lib-dynload/readline.so rlcompleter.*" )
+
+ m.addPackage( 0, "python-resource", "Python Resource Control Interface", "python-core",
+ "lib-dynload/resource.so" )
+
+ m.addPackage( 0, "python-shell", "Python Shell-Like Functionality", "python-core, python-re",
+ "commands.* dircache.* fnmatch.* glob.* popen2.* shutil.*" )
+
+ m.addPackage( 0, "python-subprocess", "Python Subprocess Support", "python-core, python-io, python-re",
+ "subprocess.*" )
+
+ m.addPackage( 0, "python-stringold", "Python String APIs [deprecated]", "python-core, python-re",
+ "lib-dynload/strop.so string.*" )
+
+ m.addPackage( 0, "python-syslog", "Python's syslog Interface", "python-core",
+ "lib-dynload/syslog.so" )
+
+ m.addPackage( 0, "python-terminal", "Python Terminal Controlling Support", "python-core, python-io",
+ "pty.* tty.*" )
+
+ m.addPackage( 0, "python-tests", "Python Tests", "python-core",
+ "test" ) # package
+
+ m.addPackage( 0, "python-threading", "Python Threading & Synchronization Support", "python-core, python-lang",
+ "_threading_local.* bisect.* dummy_thread.* dummy_threading.* mutex.* threading.* Queue.*" )
+
+ m.addPackage( 0, "python-unittest", "Python Unit Testing Framework", "python-core, python-stringold, python-lang",
+ "unittest.*" )
+
+ m.addPackage( 0, "python-xml", "Python basic XML support.", "python-core, python-re",
+ "lib-dynload/pyexpat.so xml xmllib.*" ) # package
+
+ m.addPackage( 0, "python-xmlrpc", "Python XMLRPC Support", "python-core, python-xml, python-netserver, python-lang",
+ "xmlrpclib.* SimpleXMLRPCServer.*" )
+
+ m.addPackage( 1, "python-zlib", "Python zlib Support.", "python-core",
+ "lib-dynload/zlib.so" )
+
+ m.addPackage( 0, "python-mailbox", "Python Mailbox Format Support", "python-core, python-mime",
+ "mailbox.*" )
+
+ m.make()
diff --git a/packages/avahi/avahi_0.6.13.bb b/packages/avahi/avahi_0.6.13.bb
new file mode 100644
index 0000000000..7584a02514
--- /dev/null
+++ b/packages/avahi/avahi_0.6.13.bb
@@ -0,0 +1,64 @@
+DESCRIPTION = "Avahi implements the DNS-SD over Multicast DNS"
+SECTION = "network"
+PRIORITY = "optional"
+AUTHOR = "Lennart Poettering <lennart@poettering.net>"
+HOMEPAGE = "http://avahi.org"
+MAINTAINER = "Philipp Zabel <philipp.zabel@gmail.com>"
+LICENSE= "GPL"
+PR = "r0"
+
+DEPENDS = "expat libdaemon dbus"
+RRECOMMENDS = "libnss-mdns"
+
+SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz"
+
+PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-dev avahi-doc avahi-utils"
+
+FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
+FILES_libavahi-core= "${libdir}/libavahi-core.so.*"
+FILES_avahi-daemon = "${sbindir}/avahi-daemon \
+ ${sysconfdir}/avahi/avahi-daemon.conf \
+ ${sysconfdir}/avahi/hosts \
+ ${sysconfdir}/avahi/services \
+ ${sysconfdir}/dbus-1 \
+ ${sysconfdir}/init.d/avahi-daemon \
+ ${datadir}/avahi/introspection/*.introspect \
+ ${datadir}/avahi/avahi-service.dtd \
+ ${datadir}/avahi/service-types"
+FILES_libavahi-client = "${libdir}/libavahi-client.so.*"
+FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
+ ${sysconfdir}/avahi/avahi-dnsconfd.action \
+ ${sysconfdir}/init.d/avahi-dnsconfd"
+FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
+FILES_avahi-utils = "${bindir}/avahi-*"
+
+CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
+
+EXTRA_OECONF = "--with-distro=debian --disable-gdbm --disable-gtk --disable-mono --disable-monodoc --disable-qt3 --disable-qt4 --disable-python"
+inherit autotools pkgconfig update-rc.d
+
+
+do_stage() {
+ autotools_stage_all
+}
+
+INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
+INITSCRIPT_NAME_avahi-daemon = "avahi-daemon"
+INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19"
+INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd"
+INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19"
+
+pkg_postinst_avahi-daemon () {
+ # can't do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+ grep avahi /etc/group || addgroup avahi
+ grep avahi /etc/passwd || adduser --disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi
+ /etc/init.d/dbus-1 force-reload
+}
+
+pkg_postrm_avahi-daemon () {
+ deluser avahi || true
+ delgroup avahi || true
+}
diff --git a/packages/avetanabt/avetanabt_20060413.bb b/packages/avetanabt/avetanabt_20060413.bb
new file mode 100644
index 0000000000..8472e0e0ce
--- /dev/null
+++ b/packages/avetanabt/avetanabt_20060413.bb
@@ -0,0 +1,63 @@
+DESCRIPTION = "avetanaBT: Bluetooth API implementation for Java (JSR-82)"
+SECTION = "devel"
+DEPENDS = "findutils-native jikes-native kaffeh-native fastjar-native bluez-libs classpath"
+MAINTAINER = "Mustafa Yuecel <yuecelm@ee.ethz.ch>"
+LICENSE = "GPL"
+HOMEPAGE = "http://sourceforge.net/projects/avetanabt/"
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/avetanabt/avetanaBluetooth-${PV}.tgz"
+
+S = "${WORKDIR}/avetanabt"
+
+PACKAGES = "${PN}"
+FILES_${PN} = "${libdir}/libavetanaBT.so ${datadir}/avetanabt/avetanaBT.jar"
+
+do_compile() {
+
+ # doing nearly the same as in Makefile written...
+
+ # clean build directory
+ mkdir -p build
+ rm -fr build/*
+
+ # generate classes
+ # javac -> jikes
+ ${STAGING_BINDIR}/find {de,javax,com} -iname *.java > file.list
+ ${STAGING_BINDIR}/jikes -verbose --bootclasspath ${STAGING_DIR}/${BUILD_SYS}/share/kaffeh/rt.jar -d build @file.list
+
+ # create own version.xml (add version information available at runtime)
+ head -n 4 version.xml >> build/version.xml
+ echo " <build value=\"cvs${SRCDATE}\" date=\"${SRCDATE}\" time=\"${@time.strftime('%H:%M',time.gmtime())}\"/>" >> build/version.xml
+ tail -n 3 version.xml >> build/version.xml
+
+ # move classes into jar archive
+ # jar -> fastjar
+ ${STAGING_BINDIR}/fastjar -v -cf avetanaBT.jar -C build de -C build javax -C build com -C build version.xml
+
+ # JNI generated header file - de_avetana_bluetooth_stack_BlueZ.h
+ # javah -> kaffeh
+ ${STAGING_BINDIR}/kaffeh -jni -classpath avetanaBT.jar:${STAGING_DIR}/${BUILD_SYS}/share/kaffeh/rt.jar -d c de.avetana.bluetooth.stack.BlueZ
+
+ # Native language (C) library - libavetanaBT.so
+ ${CXX} ${CXXFLAGS} -shared -lbluetooth -I${STAGING_INCDIR}/classpath c/BlueZ.cpp -o libavetanaBT.so ${LDFLAGS}
+
+}
+
+do_stage() {
+
+ install -d ${STAGING_DIR}/${BUILD_SYS}/share/avetanabt
+ install avetanaBT.jar ${STAGING_DIR}/${BUILD_SYS}/share/avetanabt/
+
+}
+
+do_install() {
+
+ install -d ${D}${libdir}
+ install -m 0755 libavetanaBT.so ${D}${libdir}/
+
+ install -d ${D}${datadir}/avetanabt
+ install avetanaBT.jar ${D}${datadir}/avetanabt/
+
+}
diff --git a/packages/avetanabt/avetanabt_cvs.bb b/packages/avetanabt/avetanabt_cvs.bb
index 7f6bea2a20..c25699caf0 100644
--- a/packages/avetanabt/avetanabt_cvs.bb
+++ b/packages/avetanabt/avetanabt_cvs.bb
@@ -5,10 +5,12 @@ MAINTAINER = "Mustafa Yuecel <yuecelm@ee.ethz.ch>"
LICENSE = "GPL"
HOMEPAGE = "http://sourceforge.net/projects/avetanabt/"
-PV = "0.0+cvs${SRCDATE}"
-PR = "r3"
+DEFAULT_PREFERENCE = "-1"
-SRC_URI = "cvs://anonymous@cvs.sourceforge.net/cvsroot/avetanabt;module=avetanabt"
+PV = "20060413+cvs${SRCDATE}"
+PR = "r5"
+
+SRC_URI = "cvs://anonymous@avetanabt.cvs.sourceforge.net/cvsroot/avetanabt;module=avetanabt"
S = "${WORKDIR}/avetanabt"
diff --git a/packages/busybox/busybox_1.2.1.bb b/packages/busybox/busybox_1.2.1.bb
index 8b399f1626..741df3f62d 100644
--- a/packages/busybox/busybox_1.2.1.bb
+++ b/packages/busybox/busybox_1.2.1.bb
@@ -74,7 +74,7 @@ do_install () {
install -d ${D}/busybox
ls ${D} -R
- mv ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/
+ cp -dPr ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/
# Move the busybox binary back to /bin
install -d ${D}${base_bindir}
mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
diff --git a/packages/db/db-native_4.3.29.bb b/packages/db/db-native_4.3.29.bb
index 12a875ff13..aac4e2021b 100644
--- a/packages/db/db-native_4.3.29.bb
+++ b/packages/db/db-native_4.3.29.bb
@@ -10,4 +10,8 @@ inherit native
require db_${PV}.bb
+do_package() {
+:
+}
+
PACKAGES = ""
diff --git a/packages/dbus/dbus-glib-native/.mtn2git_empty b/packages/dbus/dbus-glib-native/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/dbus/dbus-glib-native/.mtn2git_empty
diff --git a/packages/dbus/dbus-glib-native/run-with-tmp-session-bus.patch b/packages/dbus/dbus-glib-native/run-with-tmp-session-bus.patch
new file mode 100644
index 0000000000..186abdb56b
--- /dev/null
+++ b/packages/dbus/dbus-glib-native/run-with-tmp-session-bus.patch
@@ -0,0 +1,32 @@
+--- dbus-glib-0.71/tools/Makefile.am.orig 2006-08-27 12:54:34.351198198 +0200
++++ dbus-glib-0.71/tools/Makefile.am 2006-08-27 12:55:12.533584373 +0200
+@@ -9,7 +9,7 @@
+ BUILT_SOURCES = dbus-glib-bindings.h dbus-bus-introspect.xml
+
+ dbus-bus-introspect.xml:
+- DBUS_TOP_BUILDDIR=$(top_builddir) dbus-send --system --print-reply=literal --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Introspectable.Introspect > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
++ DBUS_TOP_BUILDDIR=$(top_builddir) ./run-with-tmp-session-bus.sh dbus-send --print-reply=literal --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Introspectable.Introspect > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
+
+ EXTRA_DIST = run-with-tmp-session-bus.sh
+
+--- dbus-glib-0.71/tools/run-with-tmp-session-bus.sh.orig 2006-08-27 11:52:17.497666746 +0200
++++ dbus-glib-0.71/tools/run-with-tmp-session-bus.sh 2006-08-27 12:53:22.626715838 +0200
+@@ -27,16 +27,15 @@
+ echo "escaped service dir is: $ESCAPED_SERVICE_DIR" >&2
+
+ ## create a configuration file based on the standard session.conf
+-cat $DBUS_TOP_BUILDDIR/tools/session.conf | \
++cat $datadir/dbus/session.conf | \
+ sed -e 's/<servicedir>.*$/<servicedir>'$ESCAPED_SERVICE_DIR'<\/servicedir>/g' | \
+ sed -e 's/<include.*$//g' \
+ > $CONFIG_FILE
+
+ echo "Created configuration file $CONFIG_FILE" >&2
+
+-export PATH=$DBUS_TOP_BUILDDIR/bus:$PATH
+ ## the libtool script found by the path search should already do this, but
+-export LD_LIBRARY_PATH=$DBUS_TOP_BUILDDIR/dbus/.libs:$LD_LIBRARY_PATH
++export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH
+
+ unset DBUS_SESSION_BUS_ADDRESS
+ unset DBUS_SESSION_BUS_PID
diff --git a/packages/dbus/dbus-glib-native_0.71.bb b/packages/dbus/dbus-glib-native_0.71.bb
index 81a15c9b35..200a7133b2 100644
--- a/packages/dbus/dbus-glib-native_0.71.bb
+++ b/packages/dbus/dbus-glib-native_0.71.bb
@@ -6,7 +6,8 @@ LICENSE = "GPL"
DEPENDS = "expat glib-2.0 virtual/libintl dbus-native"
SRC_URI = "http://freedesktop.org/software/dbus/releases/dbus-glib-${PV}.tar.gz \
- file://cross.patch;patch=1"
+ file://cross.patch;patch=1 \
+ file://run-with-tmp-session-bus.patch;patch=1"
inherit autotools pkgconfig gettext native
diff --git a/packages/dbus/dbus-native_0.92.bb b/packages/dbus/dbus-native_0.92.bb
new file mode 100644
index 0000000000..db2d7014ef
--- /dev/null
+++ b/packages/dbus/dbus-native_0.92.bb
@@ -0,0 +1,27 @@
+SECTION = "base"
+PR = "r0"
+HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
+DESCRIPTION = "message bus system for applications to talk to one another"
+LICENSE = "GPL"
+
+S = "${WORKDIR}/dbus-${PV}"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/dbus"
+DEPENDS = "glib-2.0-native"
+
+SRC_URI = "http://freedesktop.org/software/dbus/releases/dbus-${PV}.tar.gz \
+ file://cross.patch;patch=1 \
+ file://tmpdir.patch;patch=1"
+
+inherit autotools pkgconfig gettext native
+
+EXTRA_OECONF = "--disable-qt --disable-qt3 --disable-gtk --disable-tests \
+ --disable-checks --disable-xml-docs --disable-doxygen-docs \
+ --with-xml=expat --without-x"
+
+do_stage () {
+ oe_runmake install
+ autotools_stage_all
+
+ # for dbus-glib-native introspection generation
+ install -m 0644 bus/session.conf ${STAGING_DATADIR}/dbus/session.conf
+}
diff --git a/packages/dbus/dbus_0.92.bb b/packages/dbus/dbus_0.92.bb
index a4ab61322f..7981a3f525 100644
--- a/packages/dbus/dbus_0.92.bb
+++ b/packages/dbus/dbus_0.92.bb
@@ -1,12 +1,11 @@
-DEFAULT_PREFERENCE="-1"
-
SECTION = "base"
-PR = "r1"
HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
DESCRIPTION = "message bus system for applications to talk to one another"
LICENSE = "GPL"
DEPENDS = "expat glib-2.0 virtual/libintl"
+PR = "r1"
+
SRC_URI = "http://freedesktop.org/software/dbus/releases/dbus-${PV}.tar.gz \
file://cross.patch;patch=1 \
file://tmpdir.patch;patch=1 \
diff --git a/packages/glibc/glibc-package.bbclass b/packages/glibc/glibc-package.bbclass
index 3ce10b54de..ecf086815d 100644
--- a/packages/glibc/glibc-package.bbclass
+++ b/packages/glibc/glibc-package.bbclass
@@ -143,7 +143,7 @@ do_prep_locale_tree() {
for i in $treedir/${datadir}/i18n/charmaps/*gz; do
gunzip $i
done
- cp -a ${STAGING_LIBDIR}/* $treedir/lib
+ cp -a ${D}/lib/* $treedir/lib
if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]; then
cp -a ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib
fi
diff --git a/packages/glibc/glibc_2.4.bb b/packages/glibc/glibc_2.4.bb
index 5d8df56280..5ee57d4430 100644
--- a/packages/glibc/glibc_2.4.bb
+++ b/packages/glibc/glibc_2.4.bb
@@ -3,7 +3,6 @@ HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
LICENSE = "LGPL"
SECTION = "libs"
PRIORITY = "required"
-DEFAULT_PREFERENCE = "-1"
PR = "r10"
# the -isystem in bitbake.conf screws up glibc do_stage
@@ -16,7 +15,7 @@ FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-2.4"
GLIBC_ADDONS ?= "ports,nptl,libidn"
GLIBC_EXTRA_OECONF ?= ""
-GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN"
+GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN"
#
# For now, we will skip building of a gcc package if it is a uclibc one
@@ -123,6 +122,7 @@ do_munge() {
addtask munge before do_patch after do_unpack
+
do_configure () {
# override this function to avoid the autoconf/automake/aclocal/autoheader
# calls for now
diff --git a/packages/gnome/gconf-dbus_svn.bb b/packages/gnome/gconf-dbus_svn.bb
index 9fb02f8211..5ab880d921 100644
--- a/packages/gnome/gconf-dbus_svn.bb
+++ b/packages/gnome/gconf-dbus_svn.bb
@@ -1,5 +1,5 @@
SECTION = "x11/utils"
-DEPENDS = "gtk+ glib-2.0 dbus libxml2 popt"
+DEPENDS = "gtk+ glib-2.0 dbus dbus-glib libxml2 popt"
DESCRIPTION = "Settings daemon using DBUS for communication."
LICENSE = "GPL"
MAINTAINER = "Florian Boor <florian@kernelconcepts.de>"
@@ -21,7 +21,8 @@ S = "${WORKDIR}/trunk"
PARALLEL_MAKE = ""
-FILES_${PN} += " ${libdir}/GConf/2/*.so ${libdir}/dbus-1.0 ${sysconfdir} ${datadir}/dbus*"
+FILES_${PN} += " ${libdir}/gconf-dbus/2/*.so ${libdir}/dbus-1.0 ${sysconfdir} ${datadir}/dbus*"
+FILES_${PN}-dbg += "${libdir}/gconf-dbus/2/.debug"
EXTRA_OECONF = " --with-ipc=dbus --disable-gtk-doc --enable-gtk --host=${HOST_SYS} --enable-shared --disable-static"
diff --git a/packages/gnome/libgnomecups_0.2.2.bb b/packages/gnome/libgnomecups_0.2.2.bb
index 86214904c8..53251ba84b 100644
--- a/packages/gnome/libgnomecups_0.2.2.bb
+++ b/packages/gnome/libgnomecups_0.2.2.bb
@@ -2,7 +2,7 @@ DESCRIPTION="Gnome Cups Manager"
LICENSE="GPLv2"
PR="r0"
-DEPENDS="glib-2.0 gtk+ pango cups intltool"
+DEPENDS="glib-2.0 gtk+ pango cups intltool libgnomeui"
inherit gnome pkgconfig
diff --git a/packages/gpe-edit/gpe-edit_0.32.bb b/packages/gpe-edit/gpe-edit_0.32.bb
index af59b81e43..e504ec2271 100644
--- a/packages/gpe-edit/gpe-edit_0.32.bb
+++ b/packages/gpe-edit/gpe-edit_0.32.bb
@@ -1,6 +1,8 @@
MAINTAINER = "Phil Blundell <pb@handhelds.org>"
-SECTION = "gpe"DESCRIPTION = "Editor for the GPE Palmtop Environment"
+SECTION = "gpe"
+DESCRIPTION = "Editor for the GPE Palmtop Environment"
LICENSE = "GPL"
+PR = "r1"
DEPENDS = "gtk+ libgpewidget"
diff --git a/packages/gstreamer/gst-plugins-base_0.10.7.bb b/packages/gstreamer/gst-plugins-base_0.10.7.bb
index 48e24bf756..1679ecb1ca 100644
--- a/packages/gstreamer/gst-plugins-base_0.10.7.bb
+++ b/packages/gstreamer/gst-plugins-base_0.10.7.bb
@@ -1,2 +1,7 @@
require gst-plugins.inc
PROVIDES_${PN} += "gst-plugins"
+
+do_stage() {
+ autotools_stage_all
+}
+
diff --git a/packages/gstreamer/gst-plugins-ugly_0.10.4.bb b/packages/gstreamer/gst-plugins-ugly_0.10.4.bb
new file mode 100644
index 0000000000..7c548acf7d
--- /dev/null
+++ b/packages/gstreamer/gst-plugins-ugly_0.10.4.bb
@@ -0,0 +1,2 @@
+require gst-plugins.inc
+DEPENDS += "gst-plugins-base"
diff --git a/packages/gstreamer/gstreamer_0.10.8.bb b/packages/gstreamer/gstreamer_0.10.8.bb
new file mode 100644
index 0000000000..251eb42a5d
--- /dev/null
+++ b/packages/gstreamer/gstreamer_0.10.8.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \
+It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime."
+SECTION = "multimedia"
+PRIORITY = "optional"
+LICENSE = "LGPL"
+HOMEPAGE = "http://www.gstreamer.net/"
+MAINTAINER = "Felix Domke <tmbinc@elitedvb.net>"
+DEPENDS = "libxml2 glib-2.0 gettext-native popt"
+
+PR = "r0"
+# until we have decided a final naming scheme,
+# don't use this package as a replacement for
+# version 0.8
+DEFAULT_PREFERENCE = "-1"
+
+inherit autotools pkgconfig
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.bz2"
+EXTRA_OECONF = "--disable-docs-build --disable-dependency-tracking --with-check=no"
+
+do_stage() {
+ oe_runmake install prefix=${STAGING_DIR} \
+ bindir=${STAGING_BINDIR} \
+ includedir=${STAGING_INCDIR} \
+ libdir=${STAGING_LIBDIR} \
+ datadir=${STAGING_DATADIR} \
+ mandir=${STAGING_DIR}/share/man
+}
+
+FILES_${PN} += " ${libdir}/gstreamer-0.10/*.so"
+FILES_${PN}-dev += " ${libdir}/gstreamer-0.10/*.la ${libdir}/gstreamer-0.10/*.a"
diff --git a/packages/initscripts/initscripts-1.0/checkroot.sh b/packages/initscripts/initscripts-1.0/checkroot.sh
index 8255038c32..0283e1acca 100755
--- a/packages/initscripts/initscripts-1.0/checkroot.sh
+++ b/packages/initscripts/initscripts-1.0/checkroot.sh
@@ -148,7 +148,12 @@ fi
# remount the rootfs rw but do not try to change mtab because it
# is on a ro fs until the remount succeeded. Then clean up old mtabs
# and finally write the new mtab.
+# This part is only needed if the rootfs was mounted ro.
#
+if [ $(grep rootfs /proc/mounts | awk '{print $4}') = rw ]; then
+ exit 0
+fi
+echo "Remounting root file system..."
mount -n -o remount,$rootmode /
if test "$rootmode" = rw
then
diff --git a/packages/initscripts/initscripts-1.0/devices b/packages/initscripts/initscripts-1.0/devices
index 28fb71fe3f..fb0f851d16 100755
--- a/packages/initscripts/initscripts-1.0/devices
+++ b/packages/initscripts/initscripts-1.0/devices
@@ -6,7 +6,7 @@
. /etc/default/rcS
# exit without doing anything if udev is active
-if test -e /dev/.udevdb; then
+if test -e /dev/.udev -o -e /dev/.udevdb; then
exit 0
fi
diff --git a/packages/initscripts/initscripts-1.0/slugos/devices.patch b/packages/initscripts/initscripts-1.0/slugos/devices.patch
index 26b1841d5b..2583b62f48 100644
--- a/packages/initscripts/initscripts-1.0/slugos/devices.patch
+++ b/packages/initscripts/initscripts-1.0/slugos/devices.patch
@@ -8,8 +8,8 @@
. /etc/default/rcS
# exit without doing anything if udev is active
--if test -e /dev/.udevdb; then
-+if test -e /dev/.udevdb -o -e /dev/.permanent; then
+-if test -e /dev/.udev -o -e /dev/.udevdb; then
++if test -e /dev/.udev -o -e /dev/.udevdb -o -e /dev/.permanent; then
exit 0
fi
diff --git a/packages/initscripts/initscripts_1.0.bb b/packages/initscripts/initscripts_1.0.bb
index 0d14403a36..29747d41c2 100644
--- a/packages/initscripts/initscripts_1.0.bb
+++ b/packages/initscripts/initscripts_1.0.bb
@@ -6,7 +6,7 @@ DEPENDS = "makedevs"
DEPENDS_openzaurus = "makedevs virtual/kernel"
RDEPENDS = "makedevs"
LICENSE = "GPL"
-PR = "r74"
+PR = "r75"
SRC_URI = "file://halt \
file://ramdisk \
diff --git a/packages/ipsec-tools/ipsec-tools.inc b/packages/ipsec-tools/ipsec-tools.inc
index 2b1669f987..31ec6c87bf 100644
--- a/packages/ipsec-tools/ipsec-tools.inc
+++ b/packages/ipsec-tools/ipsec-tools.inc
@@ -3,7 +3,8 @@ Linux-2.6 IPsec implementation."
DEPENDS = "virtual/kernel openssl readline flex"
LICENSE = "BSD"
MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
-SECTION = "console/net"
+SECTION = "console/network"
+PR = "r1"
inherit autotools
diff --git a/packages/libvncserver/libvncserver_0.8.2.bb b/packages/libvncserver/libvncserver_0.8.2.bb
index 480a888745..8ceec7e62a 100644
--- a/packages/libvncserver/libvncserver_0.8.2.bb
+++ b/packages/libvncserver/libvncserver_0.8.2.bb
@@ -6,7 +6,7 @@ MAINTAINER = "Patrik Gfeller <gfellerpatrik@gmx.net>"
SECTION = "libs"
PRIORITY = "optional"
PROVIDES = "x11vnc"
-DEPENDS = "virtual/libsdl virtual/libx11 zlib jpeg"
+DEPENDS = "virtual/libsdl virtual/libx11 zlib jpeg libxext"
PR = "r2"
SRC_URI = "${SOURCEFORGE_MIRROR}/libvncserver/LibVNCServer-${PV}.tar.gz;md5sum=17a18e398af6c1730f72068022a152aa"
diff --git a/packages/linux/handhelds-pxa-2.6_cvs.bb b/packages/linux/handhelds-pxa-2.6_cvs.bb
index 7dfcb4d237..75f4425638 100644
--- a/packages/linux/handhelds-pxa-2.6_cvs.bb
+++ b/packages/linux/handhelds-pxa-2.6_cvs.bb
@@ -27,8 +27,8 @@ ALLOW_EMPTY_htcuniversal = 1
K_MAJOR = "2"
K_MINOR = "6"
-K_MICRO = "16"
-HHV = "5"
+K_MICRO = "17"
+HHV = "0"
#
KERNEL_PRIORITY = "${@'%d' % (int(bb.data.getVar('K_MAJOR',d,1)) * 100000000 + int(bb.data.getVar('K_MINOR',d,1)) * 1000000 + int(bb.data.getVar('K_MICRO',d,1)) * 10000 + float(bb.data.getVar('HHV',d,1)))}"
diff --git a/packages/linux/linux-omap1_2.6.12-rc2.bb b/packages/linux/linux-omap1_2.6.12-rc2.bb
index 7ea9e16091..46e7d0ba95 100644
--- a/packages/linux/linux-omap1_2.6.12-rc2.bb
+++ b/packages/linux/linux-omap1_2.6.12-rc2.bb
@@ -14,7 +14,7 @@ KERNEL_IMAGETYPE = "vmlinux"
KERNEL_OUTPUT = "arch/${ARCH}/boot/compressed/${KERNEL_IMAGETYPE}"
KERNEL_CCSUFFIX = "-3.3.4"
-#DEPENDS = "uboot"
+DEPENDS = "u-boot"
inherit kernel
@@ -25,13 +25,17 @@ do_configure_prepend() {
oe_runmake oldconfig
}
-do_deploy_omap5912osk() {
- install -d ${DEPLOY_DIR_IMAGE}
- arm-linux-objcopy -O binary -R .note -R .comment -S arch/arm/boot/compressed/vmlinux ${DEPLOY_DIR}/linux.bin
- gzip -f -9 ${DEPLOY_DIR}/linux.bin
- mkimage -A arm -O linux -T kernel -C gzip -a 0x10c08000 -e 0x10c08000 -n "OE" -d ${DEPLOY_DIR}/linux.bin.gz ${DEPLOY_DIR}/uImage_bb.cc
- cp ${DEPLOY_DIR}/uImage_bb.cc /tftpboot
-# install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}-${DATETIME}.bin
+do_deploy() {
+ if [ "${MACHINE}" == "omap5912osk" ]; then
+ install -d ${DEPLOY_DIR_IMAGE}
+ arm-linux-objcopy -O binary -R .note -R .comment -S arch/arm/boot/compressed/vmlinux ${DEPLOY_DIR_IMAGE}/linux.bin
+ gzip -f -9 ${DEPLOY_DIR_IMAGE}/linux.bin
+ mkimage -A arm -O linux -T kernel -C gzip -a 0x10c08000 -e 0x10c08000 -n "OE" -d ${DEPLOY_DIR_IMAGE}/linux.bin.gz ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}-${DATETIME}.bin
+ rm ${DEPLOY_DIR_IMAGE}/linux.bin.gz
+
+# cp ${DEPLOY_DIR}/uImage_bb.cc /tftpboot
+# install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}-${DATETIME}.bin
+ fi
}
diff --git a/packages/networkmanager/networkmanager_0.6.4.bb b/packages/networkmanager/networkmanager_0.6.4.bb
index d30a101bcb..e9c02ba3dd 100644
--- a/packages/networkmanager/networkmanager_0.6.4.bb
+++ b/packages/networkmanager/networkmanager_0.6.4.bb
@@ -4,7 +4,7 @@ LICENSE = "GPL"
HOMEPAGE = "http://www.gnome.org"
MAINTAINER = "Milan Plzik <mmp@handhelds.org>"
PRIORITY = "optional"
-DEPENDS = "libnl dbus dbus-glib libhal-nm libgpewidget gnome-keyring gconf-dbus wireless-tools"
+DEPENDS = "libnl dbus dbus-glib libhal-nm libgpewidget gnome-keyring gconf-dbus wireless-tools libglade"
RDEPENDS = "wpa-supplicant dhcdbd gnome-keyring hicolor-icon-theme"
PR = "r1"
diff --git a/packages/nfs-utils/nfs-utils_1.0.6.bb b/packages/nfs-utils/nfs-utils_1.0.6.bb
index 17bc5a6f9f..4f5e64b352 100644
--- a/packages/nfs-utils/nfs-utils_1.0.6.bb
+++ b/packages/nfs-utils/nfs-utils_1.0.6.bb
@@ -1,9 +1,9 @@
DESCRIPTION = "userspace utilities for kernel nfs"
PRIORITY = "optional"
-SECTION = "console/networking"
+SECTION = "console/network"
MAINTAINER = "dyoung <dyoung@thestuffguy.com>"
LICENSE = "GPL"
-PR = "r5"
+PR = "r6"
SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.gz \
file://acinclude-lossage.patch;patch=1 \
diff --git a/packages/pango/pango_1.14.0.bb b/packages/pango/pango_1.14.0.bb
index 77eee85214..19fc1d7a92 100644
--- a/packages/pango/pango_1.14.0.bb
+++ b/packages/pango/pango_1.14.0.bb
@@ -7,6 +7,8 @@ Open Source framework for the layout and rendering of \
internationalized text."
PR = "r0"
+PACKAGES_DYNAMIC = "pango-module-*"
+
RRECOMMENDS_${PN} = "pango-module-basic-x pango-module-basic-fc"
# seems to go wrong with default cflags
@@ -26,11 +28,7 @@ FILES_${PN} = "/etc ${bindir} ${libdir}/libpango*.so.*"
LIBV = "1.5.0"
do_stage () {
- for lib in pango pangox pangoft2 pangoxft pangocairo; do
- oe_libinstall -so -C pango lib$lib-1.0 ${STAGING_LIBDIR}/
- done
- install -d ${STAGING_INCDIR}/pango
- install -m 0644 ${S}/pango/pango*.h ${STAGING_INCDIR}/pango/
+ autotools_stage_all
}
postinst_prologue() {
diff --git a/packages/patch/patch-2.5.9/global-reject-file.diff b/packages/patch/patch-2.5.9/global-reject-file.diff
new file mode 100644
index 0000000000..66065fcbf5
--- /dev/null
+++ b/packages/patch/patch-2.5.9/global-reject-file.diff
@@ -0,0 +1,201 @@
+Index: patch-2.5.9/patch.man
+===================================================================
+--- patch-2.5.9.orig/patch.man
++++ patch-2.5.9/patch.man
+@@ -520,6 +520,15 @@ file.
+ \fB\*=reject\-unified\fP
+ Produce unified reject files. The default is to produce context type reject files.
+ .TP
++.BI \*=global\-reject\-file= rejectfile
++Put all rejects into
++.I rejectfile
++instead of creating separate reject files for all files that have rejects. The
++.I rejectfile
++will contain headers that identify which file each reject refers to. Note that
++the global reject file is created even if \-\-dry\-run is specified (while
++non-global reject files will only be created without \-\-dry\-run).
++.TP
+ \fB\-R\fP or \fB\*=reverse\fP
+ Assume that this patch was created with the old and new files swapped.
+ (Yes, I'm afraid that does happen occasionally, human nature being what it
+Index: patch-2.5.9/patch.c
+===================================================================
+--- patch-2.5.9.orig/patch.c
++++ patch-2.5.9/patch.c
+@@ -67,6 +67,7 @@ static bool similar (char const *, size_
+ static bool spew_output (struct outstate *);
+ static char const *make_temp (char);
+ static int numeric_string (char const *, bool, char const *);
++static void reject_header (const char *filename);
+ static void abort_hunk (void);
+ static void cleanup (void);
+ static void get_some_switches (void);
+@@ -98,6 +99,7 @@ static int Argc;
+ static char * const *Argv;
+
+ static FILE *rejfp; /* reject file pointer */
++static char *global_reject;
+
+ static char const *patchname;
+ static char *rejname;
+@@ -172,6 +174,10 @@ main (int argc, char **argv)
+ /* Make sure we clean up in case of disaster. */
+ set_signals (false);
+
++ /* initialize global reject file */
++ if (global_reject)
++ init_reject ();
++
+ for (
+ open_patch_file (patchname);
+ there_is_another_patch();
+@@ -208,8 +214,9 @@ main (int argc, char **argv)
+ init_output (TMPOUTNAME, exclusive, &outstate);
+ }
+
+- /* initialize reject file */
+- init_reject ();
++ /* initialize per-patch reject file */
++ if (!global_reject)
++ init_reject ();
+
+ /* find out where all the lines are */
+ if (!skip_rest_of_patch)
+@@ -278,6 +285,8 @@ main (int argc, char **argv)
+
+ newwhere = pch_newfirst() + last_offset;
+ if (skip_rest_of_patch) {
++ if (!failed)
++ reject_header(outname);
+ abort_hunk();
+ failed++;
+ if (verbosity == VERBOSE)
+@@ -292,6 +301,8 @@ main (int argc, char **argv)
+ say ("Patch attempted to create file %s, which already exists.\n",
+ quotearg (inname));
+
++ if (!failed)
++ reject_header(outname);
+ abort_hunk();
+ failed++;
+ if (verbosity != SILENT)
+@@ -299,6 +310,8 @@ main (int argc, char **argv)
+ format_linenum (numbuf, newwhere));
+ }
+ else if (! apply_hunk (&outstate, where)) {
++ if (!failed)
++ reject_header(outname);
+ abort_hunk ();
+ failed++;
+ if (verbosity != SILENT)
+@@ -332,7 +345,8 @@ main (int argc, char **argv)
+ fclose (outstate.ofp);
+ outstate.ofp = 0;
+ }
+- fclose (rejfp);
++ if (!global_reject)
++ fclose (rejfp);
+ continue;
+ }
+
+@@ -412,13 +426,13 @@ main (int argc, char **argv)
+ }
+ }
+ if (diff_type != ED_DIFF) {
+- if (fclose (rejfp) != 0)
++ if (!global_reject && fclose (rejfp) != 0)
+ write_fatal ();
+ if (failed) {
+ somefailed = true;
+ say ("%d out of %d hunk%s %s", failed, hunk, "s" + (hunk == 1),
+ skip_rest_of_patch ? "ignored" : "FAILED");
+- if (outname) {
++ if (!global_reject && outname) {
+ char *rej = rejname;
+ if (!rejname) {
+ rej = xmalloc (strlen (outname) + 5);
+@@ -445,6 +459,20 @@ main (int argc, char **argv)
+ }
+ set_signals (true);
+ }
++ if (global_reject)
++ {
++ if (fclose (rejfp) != 0)
++ write_fatal ();
++ if (somefailed)
++ {
++ say (" -- saving rejects to file %s\n", quotearg (global_reject));
++ /*if (! dry_run)
++ {*/
++ move_file (TMPREJNAME, &TMPREJNAME_needs_removal,
++ global_reject, 0644, false);
++ /*}*/
++ }
++ }
+ if (outstate.ofp && (ferror (outstate.ofp) || fclose (outstate.ofp) != 0))
+ write_fatal ();
+ cleanup ();
+@@ -523,6 +551,7 @@ static struct option const longopts[] =
+ {"posix", no_argument, NULL, CHAR_MAX + 7},
+ {"quoting-style", required_argument, NULL, CHAR_MAX + 8},
+ {"unified-reject-files", no_argument, NULL, CHAR_MAX + 9},
++ {"global-reject-file", required_argument, NULL, CHAR_MAX + 10},
+ {NULL, no_argument, NULL, 0}
+ };
+
+@@ -582,6 +611,7 @@ static char const *const option_help[] =
+ " --dry-run Do not actually change any files; just print what would happen.",
+ " --posix Conform to the POSIX standard.",
+ " --unified-reject-files Create unified reject files.",
++" --global-reject-file=file Put all rejects into one file.",
+ "",
+ " -d DIR --directory=DIR Change the working directory to DIR first.",
+ #if HAVE_SETMODE_DOS
+@@ -784,6 +814,9 @@ get_some_switches (void)
+ case CHAR_MAX + 9:
+ unified_reject_files = true;
+ break;
++ case CHAR_MAX + 10:
++ global_reject = savestr (optarg);
++ break;
+ default:
+ usage (stderr, 2);
+ }
+@@ -933,6 +966,37 @@ locate_hunk (LINENUM fuzz)
+ }
+
+ static char *
++format_timestamp (char timebuf[37], bool which)
++{
++ time_t ts = pch_timestamp(which);
++ if (ts != -1)
++ {
++ struct tm *tm = localtime(&ts);
++ strftime(timebuf, 37, "\t%Y-%m-%d %H:%M:%S.000000000 %z", tm);
++ }
++ else
++ timebuf[0] = 0;
++ return timebuf;
++}
++
++/* Write a header in a reject file that combines multiple hunks. */
++static void
++reject_header (const char *outname)
++{
++ char timebuf0[37], timebuf1[37];
++ if (!global_reject)
++ return;
++ if (diff_type == UNI_DIFF)
++ fprintf(rejfp, "--- %s.orig%s\n+++ %s%s\n",
++ outname, format_timestamp(timebuf0, reverse),
++ outname, format_timestamp(timebuf1, !reverse));
++ else
++ fprintf(rejfp, "*** %s.orig%s\n--- %s%s\n",
++ outname, format_timestamp(timebuf0, reverse),
++ outname, format_timestamp(timebuf1, !reverse));
++}
++
++static char *
+ format_linerange (char rangebuf[LINENUM_LENGTH_BOUND*2 + 2],
+ LINENUM first, LINENUM lines)
+ {
diff --git a/packages/patch/patch-2.5.9/unified-reject-files.diff b/packages/patch/patch-2.5.9/unified-reject-files.diff
new file mode 100644
index 0000000000..6bfa00dd75
--- /dev/null
+++ b/packages/patch/patch-2.5.9/unified-reject-files.diff
@@ -0,0 +1,305 @@
+Generate unified diff style reject files. Also include the C function names
+in reject files whenever possible.
+
+ $ cat > f.orig
+ < a() {
+ < 2
+ < 3
+ <
+ < 5
+ < 6
+ < }
+
+ $ sed -e 's/5/5a/' f.orig > f
+ $ diff -U2 -p f.orig f > f.diff
+ $ sed -e 's/5/5a/' -e 's/6/6x/' f.orig > f
+ $ ./patch -F0 -s --no-backup-if-mismatch f --reject-unified < f.diff
+ > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
+
+ $ cat f.rej
+ > @@ -3,5 +3,5 @@ a() {
+ > 3
+ >
+ > -5
+ > +5a
+ > 6
+ > }
+
+ $ ./patch -F0 -s --no-backup-if-mismatch f < f.diff
+ > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
+
+ $ cat f.rej
+ > *************** a() {
+ > *** 3,7 ****
+ > 3
+ >
+ > - 5
+ > 6
+ > }
+ > --- 3,7 ----
+ > 3
+ >
+ > + 5a
+ > 6
+ > }
+
+ $ diff -Nu -p /dev/null f.orig > f2.diff
+ $ ./patch -F0 -s --no-backup-if-mismatch f --reject-unified < f2.diff
+ > Patch attempted to create file f, which already exists.
+ > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
+
+ $ cat f.rej
+ > @@ -0,0 +1,7 @@
+ > +a() {
+ > +2
+ > +3
+ > +
+ > +5
+ > +6
+ > +}
+
+ $ rm -f f f.orig f.rej f.diff f2.diff
+
+Index: patch-2.5.9/pch.c
+===================================================================
+--- patch-2.5.9.orig/pch.c
++++ patch-2.5.9/pch.c
+@@ -68,6 +68,7 @@ static LINENUM p_sline; /* and the lin
+ static LINENUM p_hunk_beg; /* line number of current hunk */
+ static LINENUM p_efake = -1; /* end of faked up lines--don't free */
+ static LINENUM p_bfake = -1; /* beg of faked up lines */
++static char *p_c_function; /* the C function a hunk is in */
+
+ enum nametype { OLD, NEW, INDEX, NONE };
+
+@@ -888,6 +889,19 @@ another_hunk (enum diff difftype, bool r
+ next_intuit_at(line_beginning,p_input_line);
+ return chars_read == (size_t) -1 ? -1 : 0;
+ }
++ s = buf;
++ while (*s == '*')
++ s++;
++ if (*s == ' ')
++ {
++ p_c_function = s;
++ while (*s != '\n')
++ s++;
++ *s = '\0';
++ p_c_function = savestr (p_c_function);
++ }
++ else
++ p_c_function = NULL;
+ p_hunk_beg = p_input_line + 1;
+ while (p_end < p_max) {
+ chars_read = get_line ();
+@@ -1277,8 +1291,18 @@ another_hunk (enum diff difftype, bool r
+ else
+ p_repl_lines = 1;
+ if (*s == ' ') s++;
+- if (*s != '@')
++ if (*s++ != '@')
+ malformed ();
++ if (*s++ == '@' && *s == ' ' && *s != '\0')
++ {
++ p_c_function = s;
++ while (*s != '\n')
++ s++;
++ *s = '\0';
++ p_c_function = savestr (p_c_function);
++ }
++ else
++ p_c_function = NULL;
+ if (!p_ptrn_lines)
+ p_first++; /* do append rather than insert */
+ if (!p_repl_lines)
+@@ -1884,6 +1908,12 @@ pch_hunk_beg (void)
+ return p_hunk_beg;
+ }
+
++char const *
++pch_c_function (void)
++{
++ return p_c_function;
++}
++
+ /* Is the newline-terminated line a valid `ed' command for patch
+ input? If so, return the command character; if not, return 0.
+ This accepts accepts just a subset of the valid commands, but it's
+Index: patch-2.5.9/pch.h
+===================================================================
+--- patch-2.5.9.orig/pch.h
++++ patch-2.5.9/pch.h
+@@ -25,6 +25,7 @@
+ LINENUM pch_end (void);
+ LINENUM pch_first (void);
+ LINENUM pch_hunk_beg (void);
++char const *pch_c_function (void);
+ LINENUM pch_newfirst (void);
+ LINENUM pch_prefix_context (void);
+ LINENUM pch_ptrn_lines (void);
+Index: patch-2.5.9/patch.man
+===================================================================
+--- patch-2.5.9.orig/patch.man
++++ patch-2.5.9/patch.man
+@@ -517,6 +517,9 @@ instead of the default
+ .B \&.rej
+ file.
+ .TP
++\fB\*=reject\-unified\fP
++Produce unified reject files. The default is to produce context type reject files.
++.TP
+ \fB\-R\fP or \fB\*=reverse\fP
+ Assume that this patch was created with the old and new files swapped.
+ (Yes, I'm afraid that does happen occasionally, human nature being what it
+Index: patch-2.5.9/common.h
+===================================================================
+--- patch-2.5.9.orig/common.h
++++ patch-2.5.9/common.h
+@@ -146,6 +146,7 @@ XTERN int invc;
+ XTERN struct stat instat;
+ XTERN bool dry_run;
+ XTERN bool posixly_correct;
++XTERN bool unified_reject_files;
+
+ XTERN char const *origprae;
+ XTERN char const *origbase;
+Index: patch-2.5.9/patch.c
+===================================================================
+--- patch-2.5.9.orig/patch.c
++++ patch-2.5.9/patch.c
+@@ -522,6 +522,7 @@ static struct option const longopts[] =
+ {"no-backup-if-mismatch", no_argument, NULL, CHAR_MAX + 6},
+ {"posix", no_argument, NULL, CHAR_MAX + 7},
+ {"quoting-style", required_argument, NULL, CHAR_MAX + 8},
++ {"unified-reject-files", no_argument, NULL, CHAR_MAX + 9},
+ {NULL, no_argument, NULL, 0}
+ };
+
+@@ -580,6 +581,7 @@ static char const *const option_help[] =
+ " --verbose Output extra information about the work being done.",
+ " --dry-run Do not actually change any files; just print what would happen.",
+ " --posix Conform to the POSIX standard.",
++" --unified-reject-files Create unified reject files.",
+ "",
+ " -d DIR --directory=DIR Change the working directory to DIR first.",
+ #if HAVE_SETMODE_DOS
+@@ -779,6 +781,9 @@ get_some_switches (void)
+ (enum quoting_style) i);
+ }
+ break;
++ case CHAR_MAX + 9:
++ unified_reject_files = true;
++ break;
+ default:
+ usage (stderr, 2);
+ }
+@@ -927,6 +932,24 @@ locate_hunk (LINENUM fuzz)
+ return 0;
+ }
+
++static char *
++format_linerange (char rangebuf[LINENUM_LENGTH_BOUND*2 + 2],
++ LINENUM first, LINENUM lines)
++{
++ if (lines == 1)
++ rangebuf = format_linenum (rangebuf, first);
++ else
++ {
++ char *rb;
++ rangebuf = format_linenum (rangebuf + LINENUM_LENGTH_BOUND + 1, lines);
++ rb = rangebuf-1;
++ rangebuf = format_linenum (rangebuf - LINENUM_LENGTH_BOUND - 1,
++ (lines > 0) ? first : 0);
++ *rb = ',';
++ }
++ return rangebuf;
++}
++
+ /* We did not find the pattern, dump out the hunk so they can handle it. */
+
+ static void
+@@ -943,8 +966,83 @@ abort_hunk (void)
+ (int) NEW_CONTEXT_DIFF <= (int) diff_type ? " ****" : "";
+ char const *minuses =
+ (int) NEW_CONTEXT_DIFF <= (int) diff_type ? " ----" : " -----";
++ char const *function = pch_c_function();
++ if (function == NULL)
++ function = "";
++
++ if (unified_reject_files)
++ {
++ /* produce unified reject files */
++ char rangebuf0[LINENUM_LENGTH_BOUND*2 + 2];
++ char rangebuf1[LINENUM_LENGTH_BOUND*2 + 2];
++ LINENUM j;
++
++ /* Find the beginning of the remove and insert section. */
++ for (j = 0; j <= pat_end; j++)
++ if (pch_char (j) == '=')
++ break;
++ for (i = j+1; i <= pat_end; i++)
++ if (pch_char (i) == '^')
++ break;
++ if (pch_char (0) != '*' || j > pat_end || i > pat_end+1)
++ fatal ("internal error in abort_hunk");
++ i = 1; j++;
++
++ /* @@ -from,lines +to,lines @@ */
++ fprintf (rejfp, "@@ -%s +%s @@%s\n",
++ format_linerange (rangebuf0, oldfirst, pch_ptrn_lines()),
++ format_linerange (rangebuf1, newfirst, pch_repl_lines()),
++ function);
++
++ while ( (i <= pat_end && pch_char (i) != '=')
++ || (j <= pat_end && pch_char (j) != '^'))
++ {
++ if (i <= pat_end
++ && (pch_char (i) == '-' || pch_char (i) == '!'))
++ {
++ fputc('-', rejfp);
++ pch_write_line (i++, rejfp);
++ }
++ else if (j <= pat_end
++ && (pch_char (j) == '+' || pch_char (j) == '!'))
++ {
++ fputc('+', rejfp);
++ pch_write_line (j++, rejfp);
++ }
++ else if ((i <= pat_end
++ && (pch_char (i) == ' ' || pch_char (i) == '\n')) &&
++ (j > pat_end
++ || (pch_char (j) == ' ' || pch_char (j) == '\n')))
++ {
++ /* Unless j is already past the end, lines i and j
++ must be equal here. */
++
++ if (pch_char (i) == ' ')
++ fputc(' ', rejfp);
++ pch_write_line (i++, rejfp);
++ if (j <= pat_end)
++ j++;
++ }
++ else if ((j <= pat_end &&
++ (pch_char (j) == ' ' || pch_char (j) == '\n')) &&
++ (pch_char (i) == '='))
++ {
++ if (pch_char (j) == ' ')
++ fputc(' ', rejfp);
++ pch_write_line (j++, rejfp);
++ }
++ else
++ fatal ("internal error in abort_hunk");
++ }
++
++ if (ferror (rejfp))
++ write_fatal ();
++ return;
++ }
+
+- fprintf(rejfp, "***************\n");
++ /* produce context type reject files */
++
++ fprintf(rejfp, "***************%s\n", function);
+ for (i=0; i<=pat_end; i++) {
+ char numbuf0[LINENUM_LENGTH_BOUND + 1];
+ char numbuf1[LINENUM_LENGTH_BOUND + 1];
diff --git a/packages/patch/patch_2.5.9.bb b/packages/patch/patch_2.5.9.bb
index 103337b4c9..940b15a205 100644
--- a/packages/patch/patch_2.5.9.bb
+++ b/packages/patch/patch_2.5.9.bb
@@ -3,5 +3,8 @@ require patch.inc
SRC_URI = "${GNU_MIRROR}/patch/patch-2.5.4.tar.gz \
file://2.5.9.patch;patch=1 \
file://debian.patch;patch=1 \
- file://install.patch;patch=1"
+ file://install.patch;patch=1 \
+ file://unified-reject-files.diff;patch=1 \
+ file://global-reject-file.diff;patch=1 "
S = "${WORKDIR}/patch-2.5.4"
+PR = "r1" \ No newline at end of file
diff --git a/packages/python/python-2.4.3-manifest.inc b/packages/python/python-2.4.3-manifest.inc
index 82c886658c..1d14654f85 100644
--- a/packages/python/python-2.4.3-manifest.inc
+++ b/packages/python/python-2.4.3-manifest.inc
@@ -1,5 +1,5 @@
########################################################################################################################
-### AUTO-GENERATED by './generate-oe.py' [(C) 2002-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>] on Wed Aug 2 23:25:58 2006
+### AUTO-GENERATED by './generate-oe.py' [(C) 2002-2006 Michael 'Mickey' Lauer <mickey@Vanille.de>] on Fri Aug 25 15:00:35 2006
###
### Visit THE Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
###
@@ -148,8 +148,8 @@ RDEPENDS_python-netserver="python-core python-netclient"
FILES_python-netserver="${libdir}/python2.4/cgi.* ${libdir}/python2.4/BaseHTTPServer.* ${libdir}/python2.4/SimpleHTTPServer.* ${libdir}/python2.4/SocketServer.* "
DESCRIPTION_python-curses="Python Curses Support"
-PR_python-curses="ml0"
-RDEPENDS_python-curses="python-core libncurses5"
+PR_python-curses="ml1"
+RDEPENDS_python-curses="python-core"
FILES_python-curses="${libdir}/python2.4/curses ${libdir}/python2.4/lib-dynload/_curses.so ${libdir}/python2.4/lib-dynload/_curses_panel.so "
DESCRIPTION_python-syslog="Python's syslog Interface"
diff --git a/packages/qemu/files/arm_nptl.patch b/packages/qemu/files/arm_nptl.patch
new file mode 100644
index 0000000000..f9b10aebc5
--- /dev/null
+++ b/packages/qemu/files/arm_nptl.patch
@@ -0,0 +1,857 @@
+Index: qemu/configure
+===================================================================
+--- qemu.orig/configure 2006-08-26 16:31:53.000000000 +0100
++++ qemu/configure 2006-08-26 16:31:53.000000000 +0100
+@@ -97,6 +97,7 @@
+ build_docs="no"
+ build_acpi_tables="no"
+ uname_release=""
++nptl="yes"
+
+ # OS specific
+ targetos=`uname -s`
+@@ -243,6 +244,8 @@
+ ;;
+ --enable-iasl) build_acpi_tables="yes"
+ ;;
++ --disable-nptl) nptl="no"
++ ;;
+ esac
+ done
+
+@@ -441,6 +444,23 @@
+ fi
+ fi
+
++# check NPTL support
++cat > $TMPC <<EOF
++#include <sched.h>
++void foo()
++{
++#ifndef CLONE_SETTLS
++#error bork
++#endif
++}
++EOF
++
++if $cc -c -o $TMPO $TMPC 2> /dev/null ; then
++ :
++else
++ nptl="no"
++fi
++
+ ##########################################
+ # SDL probe
+
+@@ -559,6 +579,7 @@
+ fi
+ echo "FMOD support $fmod $fmod_support"
+ echo "kqemu support $kqemu"
++echo "NPTL support $nptl"
+ echo "Documentation $build_docs"
+ [ ! -z "$uname_release" ] && \
+ echo "uname -r $uname_release"
+@@ -880,6 +901,14 @@
+ echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
+ fi
+ fi
++else
++ if test "$nptl" = "yes" ; then
++ case "$target_cpu" in
++ arm | armeb)
++ echo "#define USE_NPTL 1" >> $config_h
++ ;;
++ esac
++ fi
+ fi
+
+ if test "$cocoa" = "yes" ; then
+Index: qemu/exec-all.h
+===================================================================
+--- qemu.orig/exec-all.h 2006-08-26 16:28:32.000000000 +0100
++++ qemu/exec-all.h 2006-08-26 16:31:53.000000000 +0100
+@@ -347,163 +347,7 @@
+ extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
+ extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
+
+-#ifdef __powerpc__
+-static inline int testandset (int *p)
+-{
+- int ret;
+- __asm__ __volatile__ (
+- "0: lwarx %0,0,%1\n"
+- " xor. %0,%3,%0\n"
+- " bne 1f\n"
+- " stwcx. %2,0,%1\n"
+- " bne- 0b\n"
+- "1: "
+- : "=&r" (ret)
+- : "r" (p), "r" (1), "r" (0)
+- : "cr0", "memory");
+- return ret;
+-}
+-#endif
+-
+-#ifdef __i386__
+-static inline int testandset (int *p)
+-{
+- long int readval = 0;
+-
+- __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
+- : "+m" (*p), "+a" (readval)
+- : "r" (1)
+- : "cc");
+- return readval;
+-}
+-#endif
+-
+-#ifdef __x86_64__
+-static inline int testandset (int *p)
+-{
+- long int readval = 0;
+-
+- __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
+- : "+m" (*p), "+a" (readval)
+- : "r" (1)
+- : "cc");
+- return readval;
+-}
+-#endif
+-
+-#ifdef __s390__
+-static inline int testandset (int *p)
+-{
+- int ret;
+-
+- __asm__ __volatile__ ("0: cs %0,%1,0(%2)\n"
+- " jl 0b"
+- : "=&d" (ret)
+- : "r" (1), "a" (p), "0" (*p)
+- : "cc", "memory" );
+- return ret;
+-}
+-#endif
+-
+-#ifdef __alpha__
+-static inline int testandset (int *p)
+-{
+- int ret;
+- unsigned long one;
+-
+- __asm__ __volatile__ ("0: mov 1,%2\n"
+- " ldl_l %0,%1\n"
+- " stl_c %2,%1\n"
+- " beq %2,1f\n"
+- ".subsection 2\n"
+- "1: br 0b\n"
+- ".previous"
+- : "=r" (ret), "=m" (*p), "=r" (one)
+- : "m" (*p));
+- return ret;
+-}
+-#endif
+-
+-#ifdef __sparc__
+-static inline int testandset (int *p)
+-{
+- int ret;
+-
+- __asm__ __volatile__("ldstub [%1], %0"
+- : "=r" (ret)
+- : "r" (p)
+- : "memory");
+-
+- return (ret ? 1 : 0);
+-}
+-#endif
+-
+-#ifdef __arm__
+-static inline int testandset (int *spinlock)
+-{
+- register unsigned int ret;
+- __asm__ __volatile__("swp %0, %1, [%2]"
+- : "=r"(ret)
+- : "0"(1), "r"(spinlock));
+-
+- return ret;
+-}
+-#endif
+-
+-#ifdef __mc68000
+-static inline int testandset (int *p)
+-{
+- char ret;
+- __asm__ __volatile__("tas %1; sne %0"
+- : "=r" (ret)
+- : "m" (p)
+- : "cc","memory");
+- return ret;
+-}
+-#endif
+-
+-#ifdef __ia64
+-#include <ia64intrin.h>
+-
+-static inline int testandset (int *p)
+-{
+- return __sync_lock_test_and_set (p, 1);
+-}
+-#endif
+-
+-typedef int spinlock_t;
+-
+-#define SPIN_LOCK_UNLOCKED 0
+-
+-#if defined(CONFIG_USER_ONLY)
+-static inline void spin_lock(spinlock_t *lock)
+-{
+- while (testandset(lock));
+-}
+-
+-static inline void spin_unlock(spinlock_t *lock)
+-{
+- *lock = 0;
+-}
+-
+-static inline int spin_trylock(spinlock_t *lock)
+-{
+- return !testandset(lock);
+-}
+-#else
+-static inline void spin_lock(spinlock_t *lock)
+-{
+-}
+-
+-static inline void spin_unlock(spinlock_t *lock)
+-{
+-}
+-
+-static inline int spin_trylock(spinlock_t *lock)
+-{
+- return 1;
+-}
+-#endif
++#include "qemu_spinlock.h"
+
+ extern spinlock_t tb_lock;
+
+Index: qemu/linux-user/arm/syscall.h
+===================================================================
+--- qemu.orig/linux-user/arm/syscall.h 2006-03-09 19:18:11.000000000 +0000
++++ qemu/linux-user/arm/syscall.h 2006-08-26 16:31:53.000000000 +0100
+@@ -28,7 +28,9 @@
+ #define ARM_SYSCALL_BASE 0x900000
+ #define ARM_THUMB_SYSCALL 0
+
+-#define ARM_NR_cacheflush (ARM_SYSCALL_BASE + 0xf0000 + 2)
++#define ARM_NR_BASE 0xf0000
++#define ARM_NR_cacheflush (ARM_NR_BASE + 2)
++#define ARM_NR_set_tls (ARM_NR_BASE + 5)
+
+ #define ARM_NR_semihosting 0x123456
+ #define ARM_NR_thumb_semihosting 0xAB
+Index: qemu/linux-user/main.c
+===================================================================
+--- qemu.orig/linux-user/main.c 2006-08-26 16:28:40.000000000 +0100
++++ qemu/linux-user/main.c 2006-08-26 16:31:53.000000000 +0100
+@@ -309,6 +309,50 @@
+ }
+ }
+
++/* Handle a jump to the kernel code page. */
++static int
++do_kernel_trap(CPUARMState *env)
++{
++ uint32_t addr;
++ uint32_t *ptr;
++ uint32_t cpsr;
++
++ switch (env->regs[15]) {
++ case 0xffff0fc0: /* __kernel_cmpxchg */
++ /* XXX: This only works between threads, not between processes.
++ Use native atomic operations. */
++ /* ??? This probably breaks horribly if the access segfaults. */
++ cpu_lock();
++ ptr = (uint32_t *)env->regs[2];
++ cpsr = cpsr_read(env);
++ if (*ptr == env->regs[0]) {
++ *ptr = env->regs[1];
++ env->regs[0] = 0;
++ cpsr |= CPSR_C;
++ } else {
++ env->regs[0] = -1;
++ cpsr &= ~CPSR_C;
++ }
++ cpsr_write(env, cpsr, CPSR_C);
++ cpu_unlock();
++ break;
++ case 0xffff0fe0: /* __kernel_get_tls */
++ env->regs[0] = env->cp15.c13_tls;
++ break;
++ default:
++ return 1;
++ }
++ /* Jump back to the caller. */
++ addr = env->regs[14];
++ if (addr & 1) {
++ env->thumb = 1;
++ addr &= ~1;
++ }
++ env->regs[15] = addr;
++
++ return 0;
++}
++
+ void cpu_loop(CPUARMState *env)
+ {
+ int trapnr;
+@@ -365,10 +409,8 @@
+ }
+ }
+
+- if (n == ARM_NR_cacheflush) {
+- arm_cache_flush(env->regs[0], env->regs[1]);
+- } else if (n == ARM_NR_semihosting
+- || n == ARM_NR_thumb_semihosting) {
++ if (n == ARM_NR_semihosting
++ || n == ARM_NR_thumb_semihosting) {
+ env->regs[0] = do_arm_semihosting (env);
+ } else if (n == 0 || n >= ARM_SYSCALL_BASE
+ || (env->thumb && n == ARM_THUMB_SYSCALL)) {
+@@ -379,14 +421,34 @@
+ n -= ARM_SYSCALL_BASE;
+ env->eabi = 0;
+ }
+- env->regs[0] = do_syscall(env,
+- n,
+- env->regs[0],
+- env->regs[1],
+- env->regs[2],
+- env->regs[3],
+- env->regs[4],
+- env->regs[5]);
++ if ( n > ARM_NR_BASE) {
++ switch (n)
++ {
++ case ARM_NR_cacheflush:
++ arm_cache_flush(env->regs[0], env->regs[1]);
++ break;
++#ifdef USE_NPTL
++ case ARM_NR_set_tls:
++ cpu_set_tls(env, env->regs[0]);
++ env->regs[0] = 0;
++ break;
++#endif
++ default:
++ printf ("Error: Bad syscall: %x\n", n);
++ goto error;
++ }
++ }
++ else
++ {
++ env->regs[0] = do_syscall(env,
++ n,
++ env->regs[0],
++ env->regs[1],
++ env->regs[2],
++ env->regs[3],
++ env->regs[4],
++ env->regs[5]);
++ }
+ } else {
+ goto error;
+ }
+@@ -425,6 +487,10 @@
+ }
+ }
+ break;
++ case EXCP_KERNEL_TRAP:
++ if (do_kernel_trap(env))
++ goto error;
++ break;
+ default:
+ error:
+ fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
+@@ -1639,6 +1705,10 @@
+ ts->heap_base = info->brk;
+ /* This will be filled in on the first SYS_HEAPINFO call. */
+ ts->heap_limit = 0;
++ /* Register the magic kernel code page. The cpu will generate a
++ special exception when it tries to execute code here. We can't
++ put real code here because it may be in use by the host kernel. */
++ page_set_flags(0xffff0000, 0xffff0fff, 0);
+ }
+ #elif defined(TARGET_SPARC)
+ {
+Index: qemu/linux-user/qemu.h
+===================================================================
+--- qemu.orig/linux-user/qemu.h 2006-08-26 16:28:40.000000000 +0100
++++ qemu/linux-user/qemu.h 2006-08-26 16:33:50.000000000 +0100
+@@ -75,6 +75,9 @@
+ uint32_t v86mask;
+ #endif
+ int used; /* non zero if used */
++#ifdef USE_NPTL
++ uint32_t *child_tidptr;
++#endif
+ struct image_info *info;
+ uint8_t stack[0];
+ } __attribute__((aligned(16))) TaskState;
+Index: qemu/linux-user/syscall.c
+===================================================================
+--- qemu.orig/linux-user/syscall.c 2006-08-26 16:28:40.000000000 +0100
++++ qemu/linux-user/syscall.c 2006-08-26 16:31:53.000000000 +0100
+@@ -66,9 +66,18 @@
+ #include <linux/kd.h>
+
+ #include "qemu.h"
++#include "qemu_spinlock.h"
+
+ //#define DEBUG
+
++#ifdef USE_NPTL
++#define CLONE_NPTL_FLAGS2 (CLONE_SETTLS | \
++ CLONE_PARENT_SETTID | CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)
++#else
++/* XXX: Hardcode the above values. */
++#define CLONE_NPTL_FLAGS2 0
++#endif
++
+ #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC)
+ /* 16 bit uid wrappers emulation */
+ #define USE_UID16
+@@ -1602,20 +1611,38 @@
+ thread/process */
+ #define NEW_STACK_SIZE 8192
+
++#ifdef USE_NPTL
++static spinlock_t nptl_lock = SPIN_LOCK_UNLOCKED;
++#endif
++
+ static int clone_func(void *arg)
+ {
+ CPUState *env = arg;
++#ifdef HAVE_NPTL
++ /* Wait until the parent has finshed initializing the tls state. */
++ while (!spin_trylock(&nptl_lock))
++ usleep(1);
++ spin_unlock(&nptl_lock);
++#endif
+ cpu_loop(env);
+ /* never exits */
+ return 0;
+ }
+
+-int do_fork(CPUState *env, unsigned int flags, unsigned long newsp)
++int do_fork(CPUState *env, unsigned int flags, unsigned long newsp,
++ uint32_t *parent_tidptr, void *newtls,
++ uint32_t *child_tidptr)
+ {
+ int ret;
+ TaskState *ts;
+ uint8_t *new_stack;
+ CPUState *new_env;
++#ifdef USE_NPTL
++ unsigned int nptl_flags;
++
++ if (flags & CLONE_PARENT_SETTID)
++ *parent_tidptr = gettid();
++#endif
+
+ if (flags & CLONE_VM) {
+ ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE);
+@@ -1665,16 +1692,60 @@
+ #error unsupported target CPU
+ #endif
+ new_env->opaque = ts;
++#ifdef USE_NPTL
++ nptl_flags = flags;
++ flags &= ~CLONE_NPTL_FLAGS2;
++ if (nptl_flags & CLONE_CHILD_CLEARTID) {
++ ts->child_tidptr = child_tidptr;
++ }
++ if (nptl_flags & CLONE_SETTLS)
++ cpu_set_tls (new_env, newtls);
++ /* Grab the global cpu lock so that the thread setup appears
++ atomic. */
++ if (nptl_flags & CLONE_CHILD_SETTID)
++ spin_lock(&nptl_lock);
++#else
++ if (flags & CLONE_NPTL_FLAGS2)
++ return -EINVAL;
++#endif
++
+ #ifdef __ia64__
+ ret = __clone2(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env);
+ #else
+ ret = clone(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env);
+ #endif
++#ifdef USE_NPTL
++ if (ret != -1) {
++ if (nptl_flags & CLONE_CHILD_SETTID)
++ *child_tidptr = ret;
++ }
++ /* Allow the child to continue. */
++ if (nptl_flags & CLONE_CHILD_SETTID)
++ spin_unlock(&nptl_lock);
++#endif
+ } else {
+- /* if no CLONE_VM, we consider it is a fork */
+- if ((flags & ~CSIGNAL) != 0)
+- return -EINVAL;
+- ret = fork();
++ /* if no CLONE_VM, we consider it is a fork */
++ if ((flags & ~(CSIGNAL | CLONE_NPTL_FLAGS2)) != 0)
++ return -EINVAL;
++ ret = fork();
++#ifdef USE_NPTL
++ /* There is a race condition here. The parent process could
++ theoretically read the TID in the child process before the child
++ tid is set. This would require using either ptrace
++ (not implemented) or having *_tidptr to point at a shared memory
++ mapping. We can't repeat the spinlock hack used above because
++ the child process gets its own copy of the lock. */
++ if (ret == 0) {
++ /* Child Process. */
++ if (flags & CLONE_CHILD_SETTID)
++ *child_tidptr = gettid();
++ ts = (TaskState *)env->opaque;
++ if (flags & CLONE_CHILD_CLEARTID)
++ ts->child_tidptr = child_tidptr;
++ if (flags & CLONE_SETTLS)
++ cpu_set_tls (env, newtls);
++ }
++#endif
+ }
+ return ret;
+ }
+@@ -1918,7 +1989,7 @@
+ ret = do_brk(arg1);
+ break;
+ case TARGET_NR_fork:
+- ret = get_errno(do_fork(cpu_env, SIGCHLD, 0));
++ ret = get_errno(do_fork(cpu_env, SIGCHLD, 0, NULL, NULL, NULL));
+ break;
+ case TARGET_NR_waitpid:
+ {
+@@ -2989,7 +3060,8 @@
+ ret = get_errno(fsync(arg1));
+ break;
+ case TARGET_NR_clone:
+- ret = get_errno(do_fork(cpu_env, arg1, arg2));
++ ret = get_errno(do_fork(cpu_env, arg1, arg2, (uint32_t *)arg3,
++ (void *)arg4, (uint32_t *)arg5));
+ break;
+ #ifdef __NR_exit_group
+ /* new thread calls */
+@@ -3339,7 +3411,8 @@
+ #endif
+ #ifdef TARGET_NR_vfork
+ case TARGET_NR_vfork:
+- ret = get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHLD, 0));
++ ret = get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
++ NULL, NULL, NULL));
+ break;
+ #endif
+ #ifdef TARGET_NR_ugetrlimit
+@@ -3838,4 +3911,3 @@
+ #endif
+ return ret;
+ }
+-
+Index: qemu/target-arm/cpu.h
+===================================================================
+--- qemu.orig/target-arm/cpu.h 2006-03-09 19:18:27.000000000 +0000
++++ qemu/target-arm/cpu.h 2006-08-26 16:31:53.000000000 +0100
+@@ -35,6 +35,9 @@
+ #define EXCP_IRQ 5
+ #define EXCP_FIQ 6
+ #define EXCP_BKPT 7
++#define EXCP_KERNEL_TRAP 8 /* Jumped to kernel code page. */
++
++
+
+ /* We currently assume float and double are IEEE single and double
+ precision respectively.
+@@ -85,6 +88,7 @@
+ uint32_t c9_data;
+ uint32_t c13_fcse; /* FCSE PID. */
+ uint32_t c13_context; /* Context ID. */
++ uint32_t c13_tls; /* Paul Brook told me to just add this ;) */
+ } cp15;
+
+ /* Internal CPU feature flags. */
+@@ -135,6 +139,15 @@
+ int cpu_arm_signal_handler(int host_signum, struct siginfo *info,
+ void *puc);
+
++void cpu_lock(void);
++void cpu_unlock(void);
++#if defined(USE_NPTL)
++static inline void cpu_set_tls(CPUARMState *env, void *newtls)
++{
++ env->cp15.c13_tls = (uint32_t)newtls;
++}
++#endif
++
+ #define CPSR_M (0x1f)
+ #define CPSR_T (1 << 5)
+ #define CPSR_F (1 << 6)
+@@ -146,7 +159,11 @@
+ #define CPSR_J (1 << 24)
+ #define CPSR_IT_0_1 (3 << 25)
+ #define CPSR_Q (1 << 27)
+-#define CPSR_NZCV (0xf << 28)
++#define CPSR_V (1 << 28)
++#define CPSR_C (1 << 29)
++#define CPSR_Z (1 << 30)
++#define CPSR_N (1 << 31)
++#define CPSR_NZCV (CPSR_N | CPSR_Z | CPSR_C | CPSR_V)
+
+ #define CACHED_CPSR_BITS (CPSR_T | CPSR_Q | CPSR_NZCV)
+ /* Return the current CPSR value. */
+Index: qemu/target-arm/exec.h
+===================================================================
+--- qemu.orig/target-arm/exec.h 2006-03-09 19:18:27.000000000 +0000
++++ qemu/target-arm/exec.h 2006-08-26 16:31:53.000000000 +0100
+@@ -51,8 +51,6 @@
+
+ /* In op_helper.c */
+
+-void cpu_lock(void);
+-void cpu_unlock(void);
+ void helper_set_cp15(CPUState *, uint32_t, uint32_t);
+ uint32_t helper_get_cp15(CPUState *, uint32_t);
+
+Index: qemu/target-arm/op.c
+===================================================================
+--- qemu.orig/target-arm/op.c 2006-08-26 16:28:48.000000000 +0100
++++ qemu/target-arm/op.c 2006-08-26 16:31:53.000000000 +0100
+@@ -891,6 +891,12 @@
+ cpu_loop_exit();
+ }
+
++void OPPROTO op_kernel_trap(void)
++{
++ env->exception_index = EXCP_KERNEL_TRAP;
++ cpu_loop_exit();
++}
++
+ /* VFP support. We follow the convention used for VFP instrunctions:
+ Single precition routines have a "s" suffix, double precision a
+ "d" suffix. */
+Index: qemu/target-arm/translate.c
+===================================================================
+--- qemu.orig/target-arm/translate.c 2006-08-26 16:28:48.000000000 +0100
++++ qemu/target-arm/translate.c 2006-08-26 16:31:53.000000000 +0100
+@@ -2382,6 +2382,7 @@
+ s->is_jmp = DISAS_JUMP;
+ }
+
++
+ /* generate intermediate code in gen_opc_buf and gen_opparam_buf for
+ basic block 'tb'. If search_pc is TRUE, also generate PC
+ information for each intermediate instruction. */
+@@ -2416,6 +2417,15 @@
+ nb_gen_labels = 0;
+ lj = -1;
+ do {
++#ifdef CONFIG_USER_ONLY
++ /* Intercept jump to the magic kernel page. */
++ if (dc->pc > 0xffff0000) {
++ gen_op_kernel_trap();
++ dc->is_jmp = DISAS_UPDATE;
++ break;
++ }
++#endif
++
+ if (env->nb_breakpoints > 0) {
+ for(j = 0; j < env->nb_breakpoints; j++) {
+ if (env->breakpoints[j] == dc->pc) {
+Index: qemu/qemu_spinlock.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ qemu/qemu_spinlock.h 2006-08-26 16:31:53.000000000 +0100
+@@ -0,0 +1,182 @@
++/*
++ * internal execution defines for qemu
++ *
++ * Copyright (c) 2003 Fabrice Bellard
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#ifndef _QEMU_SPINLOCK_H
++#define _QEMU_SPINLOCK_H
++
++#ifdef __powerpc__
++static inline int testandset (int *p)
++{
++ int ret;
++ __asm__ __volatile__ (
++ "0: lwarx %0,0,%1\n"
++ " xor. %0,%3,%0\n"
++ " bne 1f\n"
++ " stwcx. %2,0,%1\n"
++ " bne- 0b\n"
++ "1: "
++ : "=&r" (ret)
++ : "r" (p), "r" (1), "r" (0)
++ : "cr0", "memory");
++ return ret;
++}
++#endif
++
++#ifdef __i386__
++static inline int testandset (int *p)
++{
++ long int readval = 0;
++
++ __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
++ : "+m" (*p), "+a" (readval)
++ : "r" (1)
++ : "cc");
++ return readval;
++}
++#endif
++
++#ifdef __x86_64__
++static inline int testandset (int *p)
++{
++ long int readval = 0;
++
++ __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
++ : "+m" (*p), "+a" (readval)
++ : "r" (1)
++ : "cc");
++ return readval;
++}
++#endif
++
++#ifdef __s390__
++static inline int testandset (int *p)
++{
++ int ret;
++
++ __asm__ __volatile__ ("0: cs %0,%1,0(%2)\n"
++ " jl 0b"
++ : "=&d" (ret)
++ : "r" (1), "a" (p), "0" (*p)
++ : "cc", "memory" );
++ return ret;
++}
++#endif
++
++#ifdef __alpha__
++static inline int testandset (int *p)
++{
++ int ret;
++ unsigned long one;
++
++ __asm__ __volatile__ ("0: mov 1,%2\n"
++ " ldl_l %0,%1\n"
++ " stl_c %2,%1\n"
++ " beq %2,1f\n"
++ ".subsection 2\n"
++ "1: br 0b\n"
++ ".previous"
++ : "=r" (ret), "=m" (*p), "=r" (one)
++ : "m" (*p));
++ return ret;
++}
++#endif
++
++#ifdef __sparc__
++static inline int testandset (int *p)
++{
++ int ret;
++
++ __asm__ __volatile__("ldstub [%1], %0"
++ : "=r" (ret)
++ : "r" (p)
++ : "memory");
++
++ return (ret ? 1 : 0);
++}
++#endif
++
++#ifdef __arm__
++static inline int testandset (int *spinlock)
++{
++ register unsigned int ret;
++ __asm__ __volatile__("swp %0, %1, [%2]"
++ : "=r"(ret)
++ : "0"(1), "r"(spinlock));
++
++ return ret;
++}
++#endif
++
++#ifdef __mc68000
++static inline int testandset (int *p)
++{
++ char ret;
++ __asm__ __volatile__("tas %1; sne %0"
++ : "=r" (ret)
++ : "m" (p)
++ : "cc","memory");
++ return ret;
++}
++#endif
++
++#ifdef __ia64
++#include <ia64intrin.h>
++
++static inline int testandset (int *p)
++{
++ return __sync_lock_test_and_set (p, 1);
++}
++#endif
++
++typedef int spinlock_t;
++
++#define SPIN_LOCK_UNLOCKED 0
++
++#if defined(CONFIG_USER_ONLY)
++static inline void spin_lock(spinlock_t *lock)
++{
++ while (testandset(lock));
++}
++
++static inline void spin_unlock(spinlock_t *lock)
++{
++ *lock = 0;
++}
++
++static inline int spin_trylock(spinlock_t *lock)
++{
++ return !testandset(lock);
++}
++#else
++static inline void spin_lock(spinlock_t *lock)
++{
++}
++
++static inline void spin_unlock(spinlock_t *lock)
++{
++}
++
++static inline int spin_trylock(spinlock_t *lock)
++{
++ return 1;
++}
++#endif
++
++#endif /* ! _QEMU_SPINLOCK_H */
diff --git a/packages/qemu/qemu-0.8.0/.mtn2git_empty b/packages/qemu/qemu-0.8.0/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/qemu/qemu-0.8.0/.mtn2git_empty
diff --git a/packages/qemu/qemu-0.8.0/arm_nptl.patch b/packages/qemu/qemu-0.8.0/arm_nptl.patch
new file mode 100644
index 0000000000..daf105071c
--- /dev/null
+++ b/packages/qemu/qemu-0.8.0/arm_nptl.patch
@@ -0,0 +1,854 @@
+diff -ur qemu-0.8.0.orig/configure qemu-0.8.0/configure
+--- qemu-0.8.0.orig/configure 2005-12-20 00:51:53.000000000 +0200
++++ qemu-0.8.0/configure 2006-07-12 15:26:40.000000000 +0300
+@@ -89,6 +89,7 @@
+ cocoa="no"
+ check_gfx="yes"
+ check_gcc="yes"
++nptl=yes
+
+ # OS specific
+ targetos=`uname -s`
+@@ -205,6 +206,8 @@
+ ;;
+ --disable-gcc-check) check_gcc="no"
+ ;;
++ --disable-nptl) nptl="no"
++ ;;
+ esac
+ done
+
+@@ -299,6 +302,23 @@
+ fi
+ fi
+
++# check NPTL support
++cat > $TMPC <<EOF
++#include <sched.h>
++void foo()
++{
++#ifndef CLONE_SETTLS
++#error bork
++#endif
++}
++EOF
++
++if $cc -c -o $TMPO $TMPC 2> /dev/null ; then
++ :
++else
++ nptl="no"
++fi
++
+ ##########################################
+ # SDL probe
+
+@@ -489,6 +509,7 @@
+ fi
+ echo ""
+ echo "kqemu support $kqemu"
++echo "NPTL support $nptl"
+ if test $kqemu = "yes" -a $linux = "yes" ; then
+ echo ""
+ echo "KQEMU Linux module configuration:"
+@@ -793,6 +814,14 @@
+ fi
+ echo "" >> $config_mak
+ fi
++else
++ if test "$nptl" = "yes" ; then
++ case "$target_cpu" in
++ arm | armeb)
++ echo "#define USE_NPTL 1" >> $config_h
++ ;;
++ esac
++ fi
+ fi
+
+ if test "$cocoa" = "yes" ; then
+Only in qemu-0.8.0: configure.rej~
+Only in qemu-0.8.0: configure~
+diff -ur qemu-0.8.0.orig/exec-all.h qemu-0.8.0/exec-all.h
+--- qemu-0.8.0.orig/exec-all.h 2005-12-20 00:51:53.000000000 +0200
++++ qemu-0.8.0/exec-all.h 2006-07-12 15:23:46.000000000 +0300
+@@ -347,163 +347,7 @@
+ extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
+ extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
+
+-#ifdef __powerpc__
+-static inline int testandset (int *p)
+-{
+- int ret;
+- __asm__ __volatile__ (
+- "0: lwarx %0,0,%1\n"
+- " xor. %0,%3,%0\n"
+- " bne 1f\n"
+- " stwcx. %2,0,%1\n"
+- " bne- 0b\n"
+- "1: "
+- : "=&r" (ret)
+- : "r" (p), "r" (1), "r" (0)
+- : "cr0", "memory");
+- return ret;
+-}
+-#endif
+-
+-#ifdef __i386__
+-static inline int testandset (int *p)
+-{
+- long int readval = 0;
+-
+- __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
+- : "+m" (*p), "+a" (readval)
+- : "r" (1)
+- : "cc");
+- return readval;
+-}
+-#endif
+-
+-#ifdef __x86_64__
+-static inline int testandset (int *p)
+-{
+- long int readval = 0;
+-
+- __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
+- : "+m" (*p), "+a" (readval)
+- : "r" (1)
+- : "cc");
+- return readval;
+-}
+-#endif
+-
+-#ifdef __s390__
+-static inline int testandset (int *p)
+-{
+- int ret;
+-
+- __asm__ __volatile__ ("0: cs %0,%1,0(%2)\n"
+- " jl 0b"
+- : "=&d" (ret)
+- : "r" (1), "a" (p), "0" (*p)
+- : "cc", "memory" );
+- return ret;
+-}
+-#endif
+-
+-#ifdef __alpha__
+-static inline int testandset (int *p)
+-{
+- int ret;
+- unsigned long one;
+-
+- __asm__ __volatile__ ("0: mov 1,%2\n"
+- " ldl_l %0,%1\n"
+- " stl_c %2,%1\n"
+- " beq %2,1f\n"
+- ".subsection 2\n"
+- "1: br 0b\n"
+- ".previous"
+- : "=r" (ret), "=m" (*p), "=r" (one)
+- : "m" (*p));
+- return ret;
+-}
+-#endif
+-
+-#ifdef __sparc__
+-static inline int testandset (int *p)
+-{
+- int ret;
+-
+- __asm__ __volatile__("ldstub [%1], %0"
+- : "=r" (ret)
+- : "r" (p)
+- : "memory");
+-
+- return (ret ? 1 : 0);
+-}
+-#endif
+-
+-#ifdef __arm__
+-static inline int testandset (int *spinlock)
+-{
+- register unsigned int ret;
+- __asm__ __volatile__("swp %0, %1, [%2]"
+- : "=r"(ret)
+- : "0"(1), "r"(spinlock));
+-
+- return ret;
+-}
+-#endif
+-
+-#ifdef __mc68000
+-static inline int testandset (int *p)
+-{
+- char ret;
+- __asm__ __volatile__("tas %1; sne %0"
+- : "=r" (ret)
+- : "m" (p)
+- : "cc","memory");
+- return ret;
+-}
+-#endif
+-
+-#ifdef __ia64
+-#include <ia64intrin.h>
+-
+-static inline int testandset (int *p)
+-{
+- return __sync_lock_test_and_set (p, 1);
+-}
+-#endif
+-
+-typedef int spinlock_t;
+-
+-#define SPIN_LOCK_UNLOCKED 0
+-
+-#if defined(CONFIG_USER_ONLY)
+-static inline void spin_lock(spinlock_t *lock)
+-{
+- while (testandset(lock));
+-}
+-
+-static inline void spin_unlock(spinlock_t *lock)
+-{
+- *lock = 0;
+-}
+-
+-static inline int spin_trylock(spinlock_t *lock)
+-{
+- return !testandset(lock);
+-}
+-#else
+-static inline void spin_lock(spinlock_t *lock)
+-{
+-}
+-
+-static inline void spin_unlock(spinlock_t *lock)
+-{
+-}
+-
+-static inline int spin_trylock(spinlock_t *lock)
+-{
+- return 1;
+-}
+-#endif
++#include "qemu_spinlock.h"
+
+ extern spinlock_t tb_lock;
+
+diff -ur qemu-0.8.0.orig/linux-user/arm/syscall.h qemu-0.8.0/linux-user/arm/syscall.h
+--- qemu-0.8.0.orig/linux-user/arm/syscall.h 2005-12-20 00:51:53.000000000 +0200
++++ qemu-0.8.0/linux-user/arm/syscall.h 2006-07-12 15:23:46.000000000 +0300
+@@ -28,7 +28,9 @@
+ #define ARM_SYSCALL_BASE 0x900000
+ #define ARM_THUMB_SYSCALL 0
+
+-#define ARM_NR_cacheflush (ARM_SYSCALL_BASE + 0xf0000 + 2)
++#define ARM_NR_BASE 0xf0000
++#define ARM_NR_cacheflush (ARM_NR_BASE + 2)
++#define ARM_NR_set_tls (ARM_NR_BASE + 5)
+
+ #define ARM_NR_semihosting 0x123456
+ #define ARM_NR_thumb_semihosting 0xAB
+diff -ur qemu-0.8.0.orig/linux-user/main.c qemu-0.8.0/linux-user/main.c
+--- qemu-0.8.0.orig/linux-user/main.c 2006-07-12 15:20:37.000000000 +0300
++++ qemu-0.8.0/linux-user/main.c 2006-07-12 15:23:46.000000000 +0300
+@@ -326,6 +326,50 @@
+ }
+ }
+
++/* Handle a jump to the kernel code page. */
++static int
++do_kernel_trap(CPUARMState *env)
++{
++ uint32_t addr;
++ uint32_t *ptr;
++ uint32_t cpsr;
++
++ switch (env->regs[15]) {
++ case 0xffff0fc0: /* __kernel_cmpxchg */
++ /* XXX: This only works between threads, not between processes.
++ Use native atomic operations. */
++ /* ??? This probably breaks horribly if the access segfaults. */
++ cpu_lock();
++ ptr = (uint32_t *)env->regs[2];
++ cpsr = cpsr_read(env);
++ if (*ptr == env->regs[0]) {
++ *ptr = env->regs[1];
++ env->regs[0] = 0;
++ cpsr |= CPSR_C;
++ } else {
++ env->regs[0] = -1;
++ cpsr &= ~CPSR_C;
++ }
++ cpsr_write(env, cpsr, CPSR_C);
++ cpu_unlock();
++ break;
++ case 0xffff0fe0: /* __kernel_get_tls */
++ env->regs[0] = env->cp15.c13_tls;
++ break;
++ default:
++ return 1;
++ }
++ /* Jump back to the caller. */
++ addr = env->regs[14];
++ if (addr & 1) {
++ env->thumb = 1;
++ addr &= ~1;
++ }
++ env->regs[15] = addr;
++
++ return 0;
++}
++
+ void cpu_loop(CPUARMState *env)
+ {
+ int trapnr;
+@@ -368,10 +412,8 @@
+ n = insn & 0xffffff;
+ }
+
+- if (n == ARM_NR_cacheflush) {
+- arm_cache_flush(env->regs[0], env->regs[1]);
+- } else if (n == ARM_NR_semihosting
+- || n == ARM_NR_thumb_semihosting) {
++ if (n == ARM_NR_semihosting
++ || n == ARM_NR_thumb_semihosting) {
+ env->regs[0] = do_arm_semihosting (env);
+ } else if (n >= ARM_SYSCALL_BASE
+ || (env->thumb && n == ARM_THUMB_SYSCALL)) {
+@@ -381,14 +423,34 @@
+ } else {
+ n -= ARM_SYSCALL_BASE;
+ }
+- env->regs[0] = do_syscall(env,
+- n,
+- env->regs[0],
+- env->regs[1],
+- env->regs[2],
+- env->regs[3],
+- env->regs[4],
+- env->regs[5]);
++ if ( n > ARM_NR_BASE) {
++ switch (n)
++ {
++ case ARM_NR_cacheflush:
++ arm_cache_flush(env->regs[0], env->regs[1]);
++ break;
++#ifdef USE_NPTL
++ case ARM_NR_set_tls:
++ cpu_set_tls(env, env->regs[0]);
++ env->regs[0] = 0;
++ break;
++#endif
++ default:
++ printf ("Error: Bad syscall: %x\n", n);
++ goto error;
++ }
++ }
++ else
++ {
++ env->regs[0] = do_syscall(env,
++ n,
++ env->regs[0],
++ env->regs[1],
++ env->regs[2],
++ env->regs[3],
++ env->regs[4],
++ env->regs[5]);
++ }
+ } else {
+ goto error;
+ }
+@@ -427,6 +489,10 @@
+ }
+ }
+ break;
++ case EXCP_KERNEL_TRAP:
++ if (do_kernel_trap(env))
++ goto error;
++ break;
+ default:
+ error:
+ fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
+@@ -1602,6 +1668,10 @@
+ ts->heap_base = info->brk;
+ /* This will be filled in on the first SYS_HEAPINFO call. */
+ ts->heap_limit = 0;
++ /* Register the magic kernel code page. The cpu will generate a
++ special exception when it tries to execute code here. We can't
++ put real code here because it may be in use by the host kernel. */
++ page_set_flags(0xffff0000, 0xffff0fff, 0);
+ }
+ #elif defined(TARGET_SPARC)
+ {
+diff -ur qemu-0.8.0.orig/linux-user/qemu.h qemu-0.8.0/linux-user/qemu.h
+--- qemu-0.8.0.orig/linux-user/qemu.h 2005-12-20 00:51:53.000000000 +0200
++++ qemu-0.8.0/linux-user/qemu.h 2006-07-12 15:23:46.000000000 +0300
+@@ -76,6 +76,9 @@
+ uint32_t v86mask;
+ #endif
+ int used; /* non zero if used */
++#ifdef USE_NPTL
++ uint32_t *child_tidptr;
++#endif
+ uint8_t stack[0];
+ } __attribute__((aligned(16))) TaskState;
+
+Only in qemu-0.8.0.orig/linux-user: signal.c.orig
+diff -ur qemu-0.8.0.orig/linux-user/syscall.c qemu-0.8.0/linux-user/syscall.c
+--- qemu-0.8.0.orig/linux-user/syscall.c 2006-07-12 15:20:37.000000000 +0300
++++ qemu-0.8.0/linux-user/syscall.c 2006-07-12 15:36:51.000000000 +0300
+@@ -72,9 +72,18 @@
+ #include <linux/kd.h>
+
+ #include "qemu.h"
++#include "qemu_spinlock.h"
+
+ //#define DEBUG
+
++#ifdef USE_NPTL
++#define CLONE_NPTL_FLAGS2 (CLONE_SETTLS | \
++ CLONE_PARENT_SETTID | CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)
++#else
++/* XXX: Hardcode the above values. */
++#define CLONE_NPTL_FLAGS2 0
++#endif
++
+ #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC)
+ /* 16 bit uid wrappers emulation */
+ #define USE_UID16
+@@ -1527,20 +1536,38 @@
+ thread/process */
+ #define NEW_STACK_SIZE 8192
+
++#ifdef USE_NPTL
++static spinlock_t nptl_lock = SPIN_LOCK_UNLOCKED;
++#endif
++
+ static int clone_func(void *arg)
+ {
+ CPUState *env = arg;
++#ifdef HAVE_NPTL
++ /* Wait until the parent has finshed initializing the tls state. */
++ while (!spin_trylock(&nptl_lock))
++ usleep(1);
++ spin_unlock(&nptl_lock);
++#endif
+ cpu_loop(env);
+ /* never exits */
+ return 0;
+ }
+
+-int do_fork(CPUState *env, unsigned int flags, unsigned long newsp)
++int do_fork(CPUState *env, unsigned int flags, unsigned long newsp,
++ uint32_t *parent_tidptr, void *newtls,
++ uint32_t *child_tidptr)
+ {
+ int ret;
+ TaskState *ts;
+ uint8_t *new_stack;
+ CPUState *new_env;
++#ifdef USE_NPTL
++ unsigned int nptl_flags;
++
++ if (flags & CLONE_PARENT_SETTID)
++ *parent_tidptr = gettid();
++#endif
+
+ if (flags & CLONE_VM) {
+ ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE);
+@@ -1576,16 +1603,62 @@
+ #error unsupported target CPU
+ #endif
+ new_env->opaque = ts;
++#ifdef USE_NPTL
++ nptl_flags = flags;
++ flags &= ~CLONE_NPTL_FLAGS2;
++
++ if (nptl_flags & CLONE_CHILD_CLEARTID) {
++ ts->child_tidptr = child_tidptr;
++ }
++
++ if (nptl_flags & CLONE_SETTLS)
++ cpu_set_tls (new_env, newtls);
++ /* Grab the global cpu lock so that the thread setup appears
++ atomic. */
++ if (nptl_flags & CLONE_CHILD_SETTID)
++ spin_lock(&nptl_lock);
++#else
++ if (flags & CLONE_NPTL_FLAGS2)
++ return -EINVAL;
++#endif
++
+ #ifdef __ia64__
+ ret = clone2(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env);
+ #else
+ ret = clone(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env);
+ #endif
++#ifdef USE_NPTL
++ if (ret != -1) {
++ if (nptl_flags & CLONE_CHILD_SETTID)
++ *child_tidptr = ret;
++ }
++ /* Allow the child to continue. */
++ if (nptl_flags & CLONE_CHILD_SETTID)
++ spin_unlock(&nptl_lock);
++#endif
+ } else {
+ /* if no CLONE_VM, we consider it is a fork */
+- if ((flags & ~CSIGNAL) != 0)
++ if ((flags & ~(CSIGNAL | CLONE_NPTL_FLAGS2)) != 0)
+ return -EINVAL;
+ ret = fork();
++#ifdef USE_NPTL
++ /* There is a race condition here. The parent process could
++ theoretically read the TID in the child process before the child
++ tid is set. This would require using either ptrace
++ (not implemented) or having *_tidptr to point at a shared memory
++ mapping. We can't repeat the spinlock hack used above because
++ the child process gets its own copy of the lock. */
++ if (ret == 0) {
++ /* Child Process. */
++ if (flags & CLONE_CHILD_SETTID)
++ *child_tidptr = gettid();
++ ts = (TaskState *)env->opaque;
++ if (flags & CLONE_CHILD_CLEARTID)
++ ts->child_tidptr = child_tidptr;
++ if (flags & CLONE_SETTLS)
++ cpu_set_tls (env, newtls);
++ }
++#endif
+ }
+ return ret;
+ }
+@@ -1757,7 +1830,7 @@
+ ret = do_brk((char *)arg1);
+ break;
+ case TARGET_NR_fork:
+- ret = get_errno(do_fork(cpu_env, SIGCHLD, 0));
++ ret = get_errno(do_fork(cpu_env, SIGCHLD, 0, NULL, NULL, NULL));
+ break;
+ case TARGET_NR_waitpid:
+ {
+@@ -2564,7 +2637,8 @@
+ ret = get_errno(fsync(arg1));
+ break;
+ case TARGET_NR_clone:
+- ret = get_errno(do_fork(cpu_env, arg1, arg2));
++ ret = get_errno(do_fork(cpu_env, arg1, arg2, (uint32_t *)arg3,
++ (void *)arg4, (uint32_t *)arg5));
+ break;
+ #ifdef __NR_exit_group
+ /* new thread calls */
+@@ -2925,7 +2999,8 @@
+ #endif
+ #ifdef TARGET_NR_vfork
+ case TARGET_NR_vfork:
+- ret = get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHLD, 0));
++ ret = get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
++ NULL, NULL, NULL));
+ break;
+ #endif
+ #ifdef TARGET_NR_ugetrlimit
+@@ -3347,4 +3422,3 @@
+ #endif
+ return ret;
+ }
+-
+Only in qemu-0.8.0.orig/linux-user: syscall.c.orig
+Only in qemu-0.8.0/linux-user: syscall.c.rej~
+Only in qemu-0.8.0/linux-user: syscall.c~
+Only in qemu-0.8.0: qemu_spinlock.h
+diff -ur qemu-0.8.0.orig/target-arm/cpu.h qemu-0.8.0/target-arm/cpu.h
+--- qemu-0.8.0.orig/target-arm/cpu.h 2005-12-20 00:51:53.000000000 +0200
++++ qemu-0.8.0/target-arm/cpu.h 2006-07-12 15:27:28.000000000 +0300
+@@ -34,6 +34,9 @@
+ #define EXCP_DATA_ABORT 4
+ #define EXCP_IRQ 5
+ #define EXCP_FIQ 6
++#define EXCP_BKPT 7
++#define EXCP_KERNEL_TRAP 8 /* Jumped to kernel code page. */
++
+
+ /* We currently assume float and double are IEEE single and double
+ precision respectively.
+@@ -83,6 +86,7 @@
+ uint32_t c9_data;
+ uint32_t c13_fcse; /* FCSE PID. */
+ uint32_t c13_context; /* Context ID. */
++ uint32_t c13_tls; /* Paul Brook told me to just add this ;) */
+ } cp15;
+
+ /* exception/interrupt handling */
+@@ -126,6 +130,15 @@
+ int cpu_arm_signal_handler(int host_signum, struct siginfo *info,
+ void *puc);
+
++void cpu_lock(void);
++void cpu_unlock(void);
++#if defined(USE_NPTL)
++static inline void cpu_set_tls(CPUARMState *env, void *newtls)
++{
++ env->cp15.c13_tls = (uint32_t)newtls;
++}
++#endif
++
+ #define CPSR_M (0x1f)
+ #define CPSR_T (1 << 5)
+ #define CPSR_F (1 << 6)
+@@ -137,7 +150,11 @@
+ #define CPSR_J (1 << 24)
+ #define CPSR_IT_0_1 (3 << 25)
+ #define CPSR_Q (1 << 27)
+-#define CPSR_NZCV (0xf << 28)
++#define CPSR_V (1 << 28)
++#define CPSR_C (1 << 29)
++#define CPSR_Z (1 << 30)
++#define CPSR_N (1 << 31)
++#define CPSR_NZCV (CPSR_N | CPSR_Z | CPSR_C | CPSR_V)
+
+ #define CACHED_CPSR_BITS (CPSR_T | CPSR_Q | CPSR_NZCV)
+ /* Return the current CPSR value. */
+Only in qemu-0.8.0/target-arm: cpu.h~
+diff -ur qemu-0.8.0.orig/target-arm/exec.h qemu-0.8.0/target-arm/exec.h
+--- qemu-0.8.0.orig/target-arm/exec.h 2005-12-20 00:51:53.000000000 +0200
++++ qemu-0.8.0/target-arm/exec.h 2006-07-12 15:23:46.000000000 +0300
+@@ -51,8 +51,6 @@
+
+ /* In op_helper.c */
+
+-void cpu_lock(void);
+-void cpu_unlock(void);
+ void helper_set_cp15(CPUState *, uint32_t, uint32_t);
+ uint32_t helper_get_cp15(CPUState *, uint32_t);
+
+diff -ur qemu-0.8.0.orig/target-arm/op.c qemu-0.8.0/target-arm/op.c
+--- qemu-0.8.0.orig/target-arm/op.c 2005-12-20 00:51:53.000000000 +0200
++++ qemu-0.8.0/target-arm/op.c 2006-07-12 15:23:46.000000000 +0300
+@@ -885,6 +885,12 @@
+ cpu_loop_exit();
+ }
+
++void OPPROTO op_kernel_trap(void)
++{
++ env->exception_index = EXCP_KERNEL_TRAP;
++ cpu_loop_exit();
++}
++
+ /* VFP support. We follow the convention used for VFP instrunctions:
+ Single precition routines have a "s" suffix, double precision a
+ "d" suffix. */
+diff -ur qemu-0.8.0.orig/target-arm/translate.c qemu-0.8.0/target-arm/translate.c
+--- qemu-0.8.0.orig/target-arm/translate.c 2005-12-20 00:51:53.000000000 +0200
++++ qemu-0.8.0/target-arm/translate.c 2006-07-12 15:23:46.000000000 +0300
+@@ -2282,6 +2282,7 @@
+ s->is_jmp = DISAS_JUMP;
+ }
+
++
+ /* generate intermediate code in gen_opc_buf and gen_opparam_buf for
+ basic block 'tb'. If search_pc is TRUE, also generate PC
+ information for each intermediate instruction. */
+@@ -2316,6 +2317,15 @@
+ nb_gen_labels = 0;
+ lj = -1;
+ do {
++#ifdef CONFIG_USER_ONLY
++ /* Intercept jump to the magic kernel page. */
++ if (dc->pc > 0xffff0000) {
++ gen_op_kernel_trap();
++ dc->is_jmp = DISAS_UPDATE;
++ break;
++ }
++#endif
++
+ if (env->nb_breakpoints > 0) {
+ for(j = 0; j < env->nb_breakpoints; j++) {
+ if (env->breakpoints[j] == dc->pc) {
+diff -urN qemu-0.8.1.orig/qemu_spinlock.h qemu-0.8.1/qemu_spinlock.h
+--- qemu-0.8.1.orig/qemu_spinlock.h 1970-01-01 02:00:00.000000000 +0200
++++ qemu-0.8.1/qemu_spinlock.h 2006-06-04 00:59:23.000000000 +0300
+@@ -0,0 +1,182 @@
++/*
++ * internal execution defines for qemu
++ *
++ * Copyright (c) 2003 Fabrice Bellard
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#ifndef _QEMU_SPINLOCK_H
++#define _QEMU_SPINLOCK_H
++
++#ifdef __powerpc__
++static inline int testandset (int *p)
++{
++ int ret;
++ __asm__ __volatile__ (
++ "0: lwarx %0,0,%1\n"
++ " xor. %0,%3,%0\n"
++ " bne 1f\n"
++ " stwcx. %2,0,%1\n"
++ " bne- 0b\n"
++ "1: "
++ : "=&r" (ret)
++ : "r" (p), "r" (1), "r" (0)
++ : "cr0", "memory");
++ return ret;
++}
++#endif
++
++#ifdef __i386__
++static inline int testandset (int *p)
++{
++ long int readval = 0;
++
++ __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
++ : "+m" (*p), "+a" (readval)
++ : "r" (1)
++ : "cc");
++ return readval;
++}
++#endif
++
++#ifdef __x86_64__
++static inline int testandset (int *p)
++{
++ long int readval = 0;
++
++ __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
++ : "+m" (*p), "+a" (readval)
++ : "r" (1)
++ : "cc");
++ return readval;
++}
++#endif
++
++#ifdef __s390__
++static inline int testandset (int *p)
++{
++ int ret;
++
++ __asm__ __volatile__ ("0: cs %0,%1,0(%2)\n"
++ " jl 0b"
++ : "=&d" (ret)
++ : "r" (1), "a" (p), "0" (*p)
++ : "cc", "memory" );
++ return ret;
++}
++#endif
++
++#ifdef __alpha__
++static inline int testandset (int *p)
++{
++ int ret;
++ unsigned long one;
++
++ __asm__ __volatile__ ("0: mov 1,%2\n"
++ " ldl_l %0,%1\n"
++ " stl_c %2,%1\n"
++ " beq %2,1f\n"
++ ".subsection 2\n"
++ "1: br 0b\n"
++ ".previous"
++ : "=r" (ret), "=m" (*p), "=r" (one)
++ : "m" (*p));
++ return ret;
++}
++#endif
++
++#ifdef __sparc__
++static inline int testandset (int *p)
++{
++ int ret;
++
++ __asm__ __volatile__("ldstub [%1], %0"
++ : "=r" (ret)
++ : "r" (p)
++ : "memory");
++
++ return (ret ? 1 : 0);
++}
++#endif
++
++#ifdef __arm__
++static inline int testandset (int *spinlock)
++{
++ register unsigned int ret;
++ __asm__ __volatile__("swp %0, %1, [%2]"
++ : "=r"(ret)
++ : "0"(1), "r"(spinlock));
++
++ return ret;
++}
++#endif
++
++#ifdef __mc68000
++static inline int testandset (int *p)
++{
++ char ret;
++ __asm__ __volatile__("tas %1; sne %0"
++ : "=r" (ret)
++ : "m" (p)
++ : "cc","memory");
++ return ret;
++}
++#endif
++
++#ifdef __ia64
++#include <ia64intrin.h>
++
++static inline int testandset (int *p)
++{
++ return __sync_lock_test_and_set (p, 1);
++}
++#endif
++
++typedef int spinlock_t;
++
++#define SPIN_LOCK_UNLOCKED 0
++
++#if defined(CONFIG_USER_ONLY)
++static inline void spin_lock(spinlock_t *lock)
++{
++ while (testandset(lock));
++}
++
++static inline void spin_unlock(spinlock_t *lock)
++{
++ *lock = 0;
++}
++
++static inline int spin_trylock(spinlock_t *lock)
++{
++ return !testandset(lock);
++}
++#else
++static inline void spin_lock(spinlock_t *lock)
++{
++}
++
++static inline void spin_unlock(spinlock_t *lock)
++{
++}
++
++static inline int spin_trylock(spinlock_t *lock)
++{
++ return 1;
++}
++#endif
++
++#endif /* ! _QEMU_SPINLOCK_H */
+
diff --git a/packages/qemu/qemu-0.8.2/.mtn2git_empty b/packages/qemu/qemu-0.8.2/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/qemu/qemu-0.8.2/.mtn2git_empty
diff --git a/packages/qemu/qemu-0.8.2/arm_nptl.patch b/packages/qemu/qemu-0.8.2/arm_nptl.patch
new file mode 100644
index 0000000000..f9b10aebc5
--- /dev/null
+++ b/packages/qemu/qemu-0.8.2/arm_nptl.patch
@@ -0,0 +1,857 @@
+Index: qemu/configure
+===================================================================
+--- qemu.orig/configure 2006-08-26 16:31:53.000000000 +0100
++++ qemu/configure 2006-08-26 16:31:53.000000000 +0100
+@@ -97,6 +97,7 @@
+ build_docs="no"
+ build_acpi_tables="no"
+ uname_release=""
++nptl="yes"
+
+ # OS specific
+ targetos=`uname -s`
+@@ -243,6 +244,8 @@
+ ;;
+ --enable-iasl) build_acpi_tables="yes"
+ ;;
++ --disable-nptl) nptl="no"
++ ;;
+ esac
+ done
+
+@@ -441,6 +444,23 @@
+ fi
+ fi
+
++# check NPTL support
++cat > $TMPC <<EOF
++#include <sched.h>
++void foo()
++{
++#ifndef CLONE_SETTLS
++#error bork
++#endif
++}
++EOF
++
++if $cc -c -o $TMPO $TMPC 2> /dev/null ; then
++ :
++else
++ nptl="no"
++fi
++
+ ##########################################
+ # SDL probe
+
+@@ -559,6 +579,7 @@
+ fi
+ echo "FMOD support $fmod $fmod_support"
+ echo "kqemu support $kqemu"
++echo "NPTL support $nptl"
+ echo "Documentation $build_docs"
+ [ ! -z "$uname_release" ] && \
+ echo "uname -r $uname_release"
+@@ -880,6 +901,14 @@
+ echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
+ fi
+ fi
++else
++ if test "$nptl" = "yes" ; then
++ case "$target_cpu" in
++ arm | armeb)
++ echo "#define USE_NPTL 1" >> $config_h
++ ;;
++ esac
++ fi
+ fi
+
+ if test "$cocoa" = "yes" ; then
+Index: qemu/exec-all.h
+===================================================================
+--- qemu.orig/exec-all.h 2006-08-26 16:28:32.000000000 +0100
++++ qemu/exec-all.h 2006-08-26 16:31:53.000000000 +0100
+@@ -347,163 +347,7 @@
+ extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
+ extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
+
+-#ifdef __powerpc__
+-static inline int testandset (int *p)
+-{
+- int ret;
+- __asm__ __volatile__ (
+- "0: lwarx %0,0,%1\n"
+- " xor. %0,%3,%0\n"
+- " bne 1f\n"
+- " stwcx. %2,0,%1\n"
+- " bne- 0b\n"
+- "1: "
+- : "=&r" (ret)
+- : "r" (p), "r" (1), "r" (0)
+- : "cr0", "memory");
+- return ret;
+-}
+-#endif
+-
+-#ifdef __i386__
+-static inline int testandset (int *p)
+-{
+- long int readval = 0;
+-
+- __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
+- : "+m" (*p), "+a" (readval)
+- : "r" (1)
+- : "cc");
+- return readval;
+-}
+-#endif
+-
+-#ifdef __x86_64__
+-static inline int testandset (int *p)
+-{
+- long int readval = 0;
+-
+- __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
+- : "+m" (*p), "+a" (readval)
+- : "r" (1)
+- : "cc");
+- return readval;
+-}
+-#endif
+-
+-#ifdef __s390__
+-static inline int testandset (int *p)
+-{
+- int ret;
+-
+- __asm__ __volatile__ ("0: cs %0,%1,0(%2)\n"
+- " jl 0b"
+- : "=&d" (ret)
+- : "r" (1), "a" (p), "0" (*p)
+- : "cc", "memory" );
+- return ret;
+-}
+-#endif
+-
+-#ifdef __alpha__
+-static inline int testandset (int *p)
+-{
+- int ret;
+- unsigned long one;
+-
+- __asm__ __volatile__ ("0: mov 1,%2\n"
+- " ldl_l %0,%1\n"
+- " stl_c %2,%1\n"
+- " beq %2,1f\n"
+- ".subsection 2\n"
+- "1: br 0b\n"
+- ".previous"
+- : "=r" (ret), "=m" (*p), "=r" (one)
+- : "m" (*p));
+- return ret;
+-}
+-#endif
+-
+-#ifdef __sparc__
+-static inline int testandset (int *p)
+-{
+- int ret;
+-
+- __asm__ __volatile__("ldstub [%1], %0"
+- : "=r" (ret)
+- : "r" (p)
+- : "memory");
+-
+- return (ret ? 1 : 0);
+-}
+-#endif
+-
+-#ifdef __arm__
+-static inline int testandset (int *spinlock)
+-{
+- register unsigned int ret;
+- __asm__ __volatile__("swp %0, %1, [%2]"
+- : "=r"(ret)
+- : "0"(1), "r"(spinlock));
+-
+- return ret;
+-}
+-#endif
+-
+-#ifdef __mc68000
+-static inline int testandset (int *p)
+-{
+- char ret;
+- __asm__ __volatile__("tas %1; sne %0"
+- : "=r" (ret)
+- : "m" (p)
+- : "cc","memory");
+- return ret;
+-}
+-#endif
+-
+-#ifdef __ia64
+-#include <ia64intrin.h>
+-
+-static inline int testandset (int *p)
+-{
+- return __sync_lock_test_and_set (p, 1);
+-}
+-#endif
+-
+-typedef int spinlock_t;
+-
+-#define SPIN_LOCK_UNLOCKED 0
+-
+-#if defined(CONFIG_USER_ONLY)
+-static inline void spin_lock(spinlock_t *lock)
+-{
+- while (testandset(lock));
+-}
+-
+-static inline void spin_unlock(spinlock_t *lock)
+-{
+- *lock = 0;
+-}
+-
+-static inline int spin_trylock(spinlock_t *lock)
+-{
+- return !testandset(lock);
+-}
+-#else
+-static inline void spin_lock(spinlock_t *lock)
+-{
+-}
+-
+-static inline void spin_unlock(spinlock_t *lock)
+-{
+-}
+-
+-static inline int spin_trylock(spinlock_t *lock)
+-{
+- return 1;
+-}
+-#endif
++#include "qemu_spinlock.h"
+
+ extern spinlock_t tb_lock;
+
+Index: qemu/linux-user/arm/syscall.h
+===================================================================
+--- qemu.orig/linux-user/arm/syscall.h 2006-03-09 19:18:11.000000000 +0000
++++ qemu/linux-user/arm/syscall.h 2006-08-26 16:31:53.000000000 +0100
+@@ -28,7 +28,9 @@
+ #define ARM_SYSCALL_BASE 0x900000
+ #define ARM_THUMB_SYSCALL 0
+
+-#define ARM_NR_cacheflush (ARM_SYSCALL_BASE + 0xf0000 + 2)
++#define ARM_NR_BASE 0xf0000
++#define ARM_NR_cacheflush (ARM_NR_BASE + 2)
++#define ARM_NR_set_tls (ARM_NR_BASE + 5)
+
+ #define ARM_NR_semihosting 0x123456
+ #define ARM_NR_thumb_semihosting 0xAB
+Index: qemu/linux-user/main.c
+===================================================================
+--- qemu.orig/linux-user/main.c 2006-08-26 16:28:40.000000000 +0100
++++ qemu/linux-user/main.c 2006-08-26 16:31:53.000000000 +0100
+@@ -309,6 +309,50 @@
+ }
+ }
+
++/* Handle a jump to the kernel code page. */
++static int
++do_kernel_trap(CPUARMState *env)
++{
++ uint32_t addr;
++ uint32_t *ptr;
++ uint32_t cpsr;
++
++ switch (env->regs[15]) {
++ case 0xffff0fc0: /* __kernel_cmpxchg */
++ /* XXX: This only works between threads, not between processes.
++ Use native atomic operations. */
++ /* ??? This probably breaks horribly if the access segfaults. */
++ cpu_lock();
++ ptr = (uint32_t *)env->regs[2];
++ cpsr = cpsr_read(env);
++ if (*ptr == env->regs[0]) {
++ *ptr = env->regs[1];
++ env->regs[0] = 0;
++ cpsr |= CPSR_C;
++ } else {
++ env->regs[0] = -1;
++ cpsr &= ~CPSR_C;
++ }
++ cpsr_write(env, cpsr, CPSR_C);
++ cpu_unlock();
++ break;
++ case 0xffff0fe0: /* __kernel_get_tls */
++ env->regs[0] = env->cp15.c13_tls;
++ break;
++ default:
++ return 1;
++ }
++ /* Jump back to the caller. */
++ addr = env->regs[14];
++ if (addr & 1) {
++ env->thumb = 1;
++ addr &= ~1;
++ }
++ env->regs[15] = addr;
++
++ return 0;
++}
++
+ void cpu_loop(CPUARMState *env)
+ {
+ int trapnr;
+@@ -365,10 +409,8 @@
+ }
+ }
+
+- if (n == ARM_NR_cacheflush) {
+- arm_cache_flush(env->regs[0], env->regs[1]);
+- } else if (n == ARM_NR_semihosting
+- || n == ARM_NR_thumb_semihosting) {
++ if (n == ARM_NR_semihosting
++ || n == ARM_NR_thumb_semihosting) {
+ env->regs[0] = do_arm_semihosting (env);
+ } else if (n == 0 || n >= ARM_SYSCALL_BASE
+ || (env->thumb && n == ARM_THUMB_SYSCALL)) {
+@@ -379,14 +421,34 @@
+ n -= ARM_SYSCALL_BASE;
+ env->eabi = 0;
+ }
+- env->regs[0] = do_syscall(env,
+- n,
+- env->regs[0],
+- env->regs[1],
+- env->regs[2],
+- env->regs[3],
+- env->regs[4],
+- env->regs[5]);
++ if ( n > ARM_NR_BASE) {
++ switch (n)
++ {
++ case ARM_NR_cacheflush:
++ arm_cache_flush(env->regs[0], env->regs[1]);
++ break;
++#ifdef USE_NPTL
++ case ARM_NR_set_tls:
++ cpu_set_tls(env, env->regs[0]);
++ env->regs[0] = 0;
++ break;
++#endif
++ default:
++ printf ("Error: Bad syscall: %x\n", n);
++ goto error;
++ }
++ }
++ else
++ {
++ env->regs[0] = do_syscall(env,
++ n,
++ env->regs[0],
++ env->regs[1],
++ env->regs[2],
++ env->regs[3],
++ env->regs[4],
++ env->regs[5]);
++ }
+ } else {
+ goto error;
+ }
+@@ -425,6 +487,10 @@
+ }
+ }
+ break;
++ case EXCP_KERNEL_TRAP:
++ if (do_kernel_trap(env))
++ goto error;
++ break;
+ default:
+ error:
+ fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
+@@ -1639,6 +1705,10 @@
+ ts->heap_base = info->brk;
+ /* This will be filled in on the first SYS_HEAPINFO call. */
+ ts->heap_limit = 0;
++ /* Register the magic kernel code page. The cpu will generate a
++ special exception when it tries to execute code here. We can't
++ put real code here because it may be in use by the host kernel. */
++ page_set_flags(0xffff0000, 0xffff0fff, 0);
+ }
+ #elif defined(TARGET_SPARC)
+ {
+Index: qemu/linux-user/qemu.h
+===================================================================
+--- qemu.orig/linux-user/qemu.h 2006-08-26 16:28:40.000000000 +0100
++++ qemu/linux-user/qemu.h 2006-08-26 16:33:50.000000000 +0100
+@@ -75,6 +75,9 @@
+ uint32_t v86mask;
+ #endif
+ int used; /* non zero if used */
++#ifdef USE_NPTL
++ uint32_t *child_tidptr;
++#endif
+ struct image_info *info;
+ uint8_t stack[0];
+ } __attribute__((aligned(16))) TaskState;
+Index: qemu/linux-user/syscall.c
+===================================================================
+--- qemu.orig/linux-user/syscall.c 2006-08-26 16:28:40.000000000 +0100
++++ qemu/linux-user/syscall.c 2006-08-26 16:31:53.000000000 +0100
+@@ -66,9 +66,18 @@
+ #include <linux/kd.h>
+
+ #include "qemu.h"
++#include "qemu_spinlock.h"
+
+ //#define DEBUG
+
++#ifdef USE_NPTL
++#define CLONE_NPTL_FLAGS2 (CLONE_SETTLS | \
++ CLONE_PARENT_SETTID | CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)
++#else
++/* XXX: Hardcode the above values. */
++#define CLONE_NPTL_FLAGS2 0
++#endif
++
+ #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC)
+ /* 16 bit uid wrappers emulation */
+ #define USE_UID16
+@@ -1602,20 +1611,38 @@
+ thread/process */
+ #define NEW_STACK_SIZE 8192
+
++#ifdef USE_NPTL
++static spinlock_t nptl_lock = SPIN_LOCK_UNLOCKED;
++#endif
++
+ static int clone_func(void *arg)
+ {
+ CPUState *env = arg;
++#ifdef HAVE_NPTL
++ /* Wait until the parent has finshed initializing the tls state. */
++ while (!spin_trylock(&nptl_lock))
++ usleep(1);
++ spin_unlock(&nptl_lock);
++#endif
+ cpu_loop(env);
+ /* never exits */
+ return 0;
+ }
+
+-int do_fork(CPUState *env, unsigned int flags, unsigned long newsp)
++int do_fork(CPUState *env, unsigned int flags, unsigned long newsp,
++ uint32_t *parent_tidptr, void *newtls,
++ uint32_t *child_tidptr)
+ {
+ int ret;
+ TaskState *ts;
+ uint8_t *new_stack;
+ CPUState *new_env;
++#ifdef USE_NPTL
++ unsigned int nptl_flags;
++
++ if (flags & CLONE_PARENT_SETTID)
++ *parent_tidptr = gettid();
++#endif
+
+ if (flags & CLONE_VM) {
+ ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE);
+@@ -1665,16 +1692,60 @@
+ #error unsupported target CPU
+ #endif
+ new_env->opaque = ts;
++#ifdef USE_NPTL
++ nptl_flags = flags;
++ flags &= ~CLONE_NPTL_FLAGS2;
++ if (nptl_flags & CLONE_CHILD_CLEARTID) {
++ ts->child_tidptr = child_tidptr;
++ }
++ if (nptl_flags & CLONE_SETTLS)
++ cpu_set_tls (new_env, newtls);
++ /* Grab the global cpu lock so that the thread setup appears
++ atomic. */
++ if (nptl_flags & CLONE_CHILD_SETTID)
++ spin_lock(&nptl_lock);
++#else
++ if (flags & CLONE_NPTL_FLAGS2)
++ return -EINVAL;
++#endif
++
+ #ifdef __ia64__
+ ret = __clone2(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env);
+ #else
+ ret = clone(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env);
+ #endif
++#ifdef USE_NPTL
++ if (ret != -1) {
++ if (nptl_flags & CLONE_CHILD_SETTID)
++ *child_tidptr = ret;
++ }
++ /* Allow the child to continue. */
++ if (nptl_flags & CLONE_CHILD_SETTID)
++ spin_unlock(&nptl_lock);
++#endif
+ } else {
+- /* if no CLONE_VM, we consider it is a fork */
+- if ((flags & ~CSIGNAL) != 0)
+- return -EINVAL;
+- ret = fork();
++ /* if no CLONE_VM, we consider it is a fork */
++ if ((flags & ~(CSIGNAL | CLONE_NPTL_FLAGS2)) != 0)
++ return -EINVAL;
++ ret = fork();
++#ifdef USE_NPTL
++ /* There is a race condition here. The parent process could
++ theoretically read the TID in the child process before the child
++ tid is set. This would require using either ptrace
++ (not implemented) or having *_tidptr to point at a shared memory
++ mapping. We can't repeat the spinlock hack used above because
++ the child process gets its own copy of the lock. */
++ if (ret == 0) {
++ /* Child Process. */
++ if (flags & CLONE_CHILD_SETTID)
++ *child_tidptr = gettid();
++ ts = (TaskState *)env->opaque;
++ if (flags & CLONE_CHILD_CLEARTID)
++ ts->child_tidptr = child_tidptr;
++ if (flags & CLONE_SETTLS)
++ cpu_set_tls (env, newtls);
++ }
++#endif
+ }
+ return ret;
+ }
+@@ -1918,7 +1989,7 @@
+ ret = do_brk(arg1);
+ break;
+ case TARGET_NR_fork:
+- ret = get_errno(do_fork(cpu_env, SIGCHLD, 0));
++ ret = get_errno(do_fork(cpu_env, SIGCHLD, 0, NULL, NULL, NULL));
+ break;
+ case TARGET_NR_waitpid:
+ {
+@@ -2989,7 +3060,8 @@
+ ret = get_errno(fsync(arg1));
+ break;
+ case TARGET_NR_clone:
+- ret = get_errno(do_fork(cpu_env, arg1, arg2));
++ ret = get_errno(do_fork(cpu_env, arg1, arg2, (uint32_t *)arg3,
++ (void *)arg4, (uint32_t *)arg5));
+ break;
+ #ifdef __NR_exit_group
+ /* new thread calls */
+@@ -3339,7 +3411,8 @@
+ #endif
+ #ifdef TARGET_NR_vfork
+ case TARGET_NR_vfork:
+- ret = get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHLD, 0));
++ ret = get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
++ NULL, NULL, NULL));
+ break;
+ #endif
+ #ifdef TARGET_NR_ugetrlimit
+@@ -3838,4 +3911,3 @@
+ #endif
+ return ret;
+ }
+-
+Index: qemu/target-arm/cpu.h
+===================================================================
+--- qemu.orig/target-arm/cpu.h 2006-03-09 19:18:27.000000000 +0000
++++ qemu/target-arm/cpu.h 2006-08-26 16:31:53.000000000 +0100
+@@ -35,6 +35,9 @@
+ #define EXCP_IRQ 5
+ #define EXCP_FIQ 6
+ #define EXCP_BKPT 7
++#define EXCP_KERNEL_TRAP 8 /* Jumped to kernel code page. */
++
++
+
+ /* We currently assume float and double are IEEE single and double
+ precision respectively.
+@@ -85,6 +88,7 @@
+ uint32_t c9_data;
+ uint32_t c13_fcse; /* FCSE PID. */
+ uint32_t c13_context; /* Context ID. */
++ uint32_t c13_tls; /* Paul Brook told me to just add this ;) */
+ } cp15;
+
+ /* Internal CPU feature flags. */
+@@ -135,6 +139,15 @@
+ int cpu_arm_signal_handler(int host_signum, struct siginfo *info,
+ void *puc);
+
++void cpu_lock(void);
++void cpu_unlock(void);
++#if defined(USE_NPTL)
++static inline void cpu_set_tls(CPUARMState *env, void *newtls)
++{
++ env->cp15.c13_tls = (uint32_t)newtls;
++}
++#endif
++
+ #define CPSR_M (0x1f)
+ #define CPSR_T (1 << 5)
+ #define CPSR_F (1 << 6)
+@@ -146,7 +159,11 @@
+ #define CPSR_J (1 << 24)
+ #define CPSR_IT_0_1 (3 << 25)
+ #define CPSR_Q (1 << 27)
+-#define CPSR_NZCV (0xf << 28)
++#define CPSR_V (1 << 28)
++#define CPSR_C (1 << 29)
++#define CPSR_Z (1 << 30)
++#define CPSR_N (1 << 31)
++#define CPSR_NZCV (CPSR_N | CPSR_Z | CPSR_C | CPSR_V)
+
+ #define CACHED_CPSR_BITS (CPSR_T | CPSR_Q | CPSR_NZCV)
+ /* Return the current CPSR value. */
+Index: qemu/target-arm/exec.h
+===================================================================
+--- qemu.orig/target-arm/exec.h 2006-03-09 19:18:27.000000000 +0000
++++ qemu/target-arm/exec.h 2006-08-26 16:31:53.000000000 +0100
+@@ -51,8 +51,6 @@
+
+ /* In op_helper.c */
+
+-void cpu_lock(void);
+-void cpu_unlock(void);
+ void helper_set_cp15(CPUState *, uint32_t, uint32_t);
+ uint32_t helper_get_cp15(CPUState *, uint32_t);
+
+Index: qemu/target-arm/op.c
+===================================================================
+--- qemu.orig/target-arm/op.c 2006-08-26 16:28:48.000000000 +0100
++++ qemu/target-arm/op.c 2006-08-26 16:31:53.000000000 +0100
+@@ -891,6 +891,12 @@
+ cpu_loop_exit();
+ }
+
++void OPPROTO op_kernel_trap(void)
++{
++ env->exception_index = EXCP_KERNEL_TRAP;
++ cpu_loop_exit();
++}
++
+ /* VFP support. We follow the convention used for VFP instrunctions:
+ Single precition routines have a "s" suffix, double precision a
+ "d" suffix. */
+Index: qemu/target-arm/translate.c
+===================================================================
+--- qemu.orig/target-arm/translate.c 2006-08-26 16:28:48.000000000 +0100
++++ qemu/target-arm/translate.c 2006-08-26 16:31:53.000000000 +0100
+@@ -2382,6 +2382,7 @@
+ s->is_jmp = DISAS_JUMP;
+ }
+
++
+ /* generate intermediate code in gen_opc_buf and gen_opparam_buf for
+ basic block 'tb'. If search_pc is TRUE, also generate PC
+ information for each intermediate instruction. */
+@@ -2416,6 +2417,15 @@
+ nb_gen_labels = 0;
+ lj = -1;
+ do {
++#ifdef CONFIG_USER_ONLY
++ /* Intercept jump to the magic kernel page. */
++ if (dc->pc > 0xffff0000) {
++ gen_op_kernel_trap();
++ dc->is_jmp = DISAS_UPDATE;
++ break;
++ }
++#endif
++
+ if (env->nb_breakpoints > 0) {
+ for(j = 0; j < env->nb_breakpoints; j++) {
+ if (env->breakpoints[j] == dc->pc) {
+Index: qemu/qemu_spinlock.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ qemu/qemu_spinlock.h 2006-08-26 16:31:53.000000000 +0100
+@@ -0,0 +1,182 @@
++/*
++ * internal execution defines for qemu
++ *
++ * Copyright (c) 2003 Fabrice Bellard
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#ifndef _QEMU_SPINLOCK_H
++#define _QEMU_SPINLOCK_H
++
++#ifdef __powerpc__
++static inline int testandset (int *p)
++{
++ int ret;
++ __asm__ __volatile__ (
++ "0: lwarx %0,0,%1\n"
++ " xor. %0,%3,%0\n"
++ " bne 1f\n"
++ " stwcx. %2,0,%1\n"
++ " bne- 0b\n"
++ "1: "
++ : "=&r" (ret)
++ : "r" (p), "r" (1), "r" (0)
++ : "cr0", "memory");
++ return ret;
++}
++#endif
++
++#ifdef __i386__
++static inline int testandset (int *p)
++{
++ long int readval = 0;
++
++ __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
++ : "+m" (*p), "+a" (readval)
++ : "r" (1)
++ : "cc");
++ return readval;
++}
++#endif
++
++#ifdef __x86_64__
++static inline int testandset (int *p)
++{
++ long int readval = 0;
++
++ __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
++ : "+m" (*p), "+a" (readval)
++ : "r" (1)
++ : "cc");
++ return readval;
++}
++#endif
++
++#ifdef __s390__
++static inline int testandset (int *p)
++{
++ int ret;
++
++ __asm__ __volatile__ ("0: cs %0,%1,0(%2)\n"
++ " jl 0b"
++ : "=&d" (ret)
++ : "r" (1), "a" (p), "0" (*p)
++ : "cc", "memory" );
++ return ret;
++}
++#endif
++
++#ifdef __alpha__
++static inline int testandset (int *p)
++{
++ int ret;
++ unsigned long one;
++
++ __asm__ __volatile__ ("0: mov 1,%2\n"
++ " ldl_l %0,%1\n"
++ " stl_c %2,%1\n"
++ " beq %2,1f\n"
++ ".subsection 2\n"
++ "1: br 0b\n"
++ ".previous"
++ : "=r" (ret), "=m" (*p), "=r" (one)
++ : "m" (*p));
++ return ret;
++}
++#endif
++
++#ifdef __sparc__
++static inline int testandset (int *p)
++{
++ int ret;
++
++ __asm__ __volatile__("ldstub [%1], %0"
++ : "=r" (ret)
++ : "r" (p)
++ : "memory");
++
++ return (ret ? 1 : 0);
++}
++#endif
++
++#ifdef __arm__
++static inline int testandset (int *spinlock)
++{
++ register unsigned int ret;
++ __asm__ __volatile__("swp %0, %1, [%2]"
++ : "=r"(ret)
++ : "0"(1), "r"(spinlock));
++
++ return ret;
++}
++#endif
++
++#ifdef __mc68000
++static inline int testandset (int *p)
++{
++ char ret;
++ __asm__ __volatile__("tas %1; sne %0"
++ : "=r" (ret)
++ : "m" (p)
++ : "cc","memory");
++ return ret;
++}
++#endif
++
++#ifdef __ia64
++#include <ia64intrin.h>
++
++static inline int testandset (int *p)
++{
++ return __sync_lock_test_and_set (p, 1);
++}
++#endif
++
++typedef int spinlock_t;
++
++#define SPIN_LOCK_UNLOCKED 0
++
++#if defined(CONFIG_USER_ONLY)
++static inline void spin_lock(spinlock_t *lock)
++{
++ while (testandset(lock));
++}
++
++static inline void spin_unlock(spinlock_t *lock)
++{
++ *lock = 0;
++}
++
++static inline int spin_trylock(spinlock_t *lock)
++{
++ return !testandset(lock);
++}
++#else
++static inline void spin_lock(spinlock_t *lock)
++{
++}
++
++static inline void spin_unlock(spinlock_t *lock)
++{
++}
++
++static inline int spin_trylock(spinlock_t *lock)
++{
++ return 1;
++}
++#endif
++
++#endif /* ! _QEMU_SPINLOCK_H */
diff --git a/packages/qemu/qemu-native_0.8.0.bb b/packages/qemu/qemu-native_0.8.0.bb
index acb5543a90..2b143bdc0f 100644
--- a/packages/qemu/qemu-native_0.8.0.bb
+++ b/packages/qemu/qemu-native_0.8.0.bb
@@ -1,5 +1,6 @@
require qemu_${PV}.bb
inherit native
+FILESPATH =. "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qemu-${PV}:"
S = "${WORKDIR}/qemu-${PV}"
prefix = "${STAGING_DIR}/${BUILD_SYS}"
diff --git a/packages/qemu/qemu-native_0.8.2.bb b/packages/qemu/qemu-native_0.8.2.bb
new file mode 100644
index 0000000000..e064723e4e
--- /dev/null
+++ b/packages/qemu/qemu-native_0.8.2.bb
@@ -0,0 +1,7 @@
+require qemu_${PV}.bb
+EXTRA_OECONF = ""
+inherit native
+FILESPATH =. "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qemu-${PV}:"
+S = "${WORKDIR}/qemu-${PV}"
+prefix = "${STAGING_DIR}/${BUILD_SYS}"
+
diff --git a/packages/qemu/qemu_0.8.0.bb b/packages/qemu/qemu_0.8.0.bb
index fd7a892347..38bbcbacad 100644
--- a/packages/qemu/qemu_0.8.0.bb
+++ b/packages/qemu/qemu_0.8.0.bb
@@ -1,6 +1,9 @@
LICENSE = "GPL"
-SRC_URI = "http://fabrice.bellard.free.fr/qemu/qemu-${PV}.tar.gz"
+SRC_URI = "http://fabrice.bellard.free.fr/qemu/qemu-${PV}.tar.gz \
+ file://configure.patch;patch=1 \
+ file://arm_nptl.patch;patch=1"
+PR = "r1"
inherit autotools
diff --git a/packages/qemu/qemu_0.8.2.bb b/packages/qemu/qemu_0.8.2.bb
new file mode 100644
index 0000000000..49032fa59d
--- /dev/null
+++ b/packages/qemu/qemu_0.8.2.bb
@@ -0,0 +1,11 @@
+LICENSE = "GPL"
+
+SRC_URI = "http://fabrice.bellard.free.fr/qemu/qemu-${PV}.tar.gz \
+ file://configure.patch;patch=1 \
+ file://pl110_rgb-r0.patch;patch=1 \
+ file://arm_nptl.patch;patch=1"
+
+inherit autotools
+
+EXTRA_OECONF = "--cc=${CC}"
+
diff --git a/packages/qemu/qemu_cvs.bb b/packages/qemu/qemu_cvs.bb
index 5697e69578..0dfe01aa11 100644
--- a/packages/qemu/qemu_cvs.bb
+++ b/packages/qemu/qemu_cvs.bb
@@ -1,11 +1,10 @@
LICENSE = "GPL"
-PV = "0.8.0+cvs${SRCDATE}"
-PR = "r1"
+PV = "0.8.2+cvs${SRCDATE}"
SRC_URI = "cvs://anonymous@cvs.savannah.nongnu.org/sources/qemu;method=pserver;rsh=ssh;module=qemu \
file://configure.patch;patch=1 \
- file://mouse_fix-r0.patch;patch=1 \
- file://pl110_rgb-r0.patch;patch=1"
+ file://pl110_rgb-r0.patch;patch=1 \
+ file://arm_nptl.patch;patch=1"
S = "${WORKDIR}/qemu"
diff --git a/packages/subversion/subversion_1.3.2.bb b/packages/subversion/subversion_1.3.2.bb
new file mode 100644
index 0000000000..f508381d15
--- /dev/null
+++ b/packages/subversion/subversion_1.3.2.bb
@@ -0,0 +1,23 @@
+DESCRIPTION = "The Subversion (svn) client"
+SECTION = "console/network"
+DEPENDS = "apr-util-0.9.12 neon"
+MAINTAINER = "Mustafa Yuecel <yuecelm@ee.ethz.ch>"
+LICENSE = "Apache/BSD"
+HOMEPAGE = "http://subversion.tigris.org"
+PR = "r0"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "http://subversion.tigris.org/downloads/${P}.tar.bz2 \
+ file://disable-revision-install.patch;patch=1"
+
+EXTRA_OECONF = "--with-neon=${STAGING_DIR}/${BUILD_SYS} \
+ --without-berkeley-db --without-apxs --without-apache \
+ --without-swig --with-apr=${STAGING_BINDIR} \
+ --with-apr-util=${STAGING_BINDIR}"
+
+inherit autotools
+
+do_configure() {
+ oe_runconf
+}
diff --git a/packages/syslog-ng/files/syslog-ng.conf b/packages/syslog-ng/files/syslog-ng.conf
new file mode 100644
index 0000000000..4d1e9f8b22
--- /dev/null
+++ b/packages/syslog-ng/files/syslog-ng.conf
@@ -0,0 +1,89 @@
+#
+# Syslog-ng example configuration for for Debian GNU/Linux
+#
+# Copyright (c) 1999 anonymous
+# Copyright (c) 1999 Balazs Scheidler
+# $Id: syslog-ng.conf.sample,v 1.3 2003/05/20 08:57:27 asd Exp $
+#
+# Syslog-ng configuration file, compatible with default Debian syslogd
+# installation.
+#
+
+options { long_hostnames(off); sync(0); };
+
+source src { file("/proc/kmsg"); unix-stream("/dev/log"); internal(); };
+source net { udp(); };
+
+destination authlog { file("/var/log/auth.log"); };
+destination syslog { file("/var/log/syslog"); };
+destination cron { file("/var/log/cron.log"); };
+destination daemon { file("/var/log/daemon.log"); };
+destination kern { file("/var/log/kern.log"); };
+destination lpr { file("/var/log/lpr.log"); };
+destination user { file("/var/log/user.log"); };
+destination uucp { file("/var/log/uucp.log"); };
+destination ppp { file("/var/log/ppp.log"); };
+destination mail { file("/var/log/mail.log"); };
+
+destination mailinfo { file("/var/log/mail.info"); };
+destination mailwarn { file("/var/log/mail.warn"); };
+destination mailerr { file("/var/log/mail.err"); };
+
+destination newscrit { file("/var/log/news/news.crit"); };
+destination newserr { file("/var/log/news/news.err"); };
+destination newsnotice { file("/var/log/news/news.notice"); };
+
+destination debug { file("/var/log/debug"); };
+destination messages { file("/var/log/messages"); };
+destination console { usertty("root"); };
+destination console_all { file("/dev/tty12"); };
+#destination loghost { udp("loghost" port(999)); };
+
+
+destination xconsole { pipe("/dev/xconsole"); };
+
+filter f_auth { facility(auth); };
+filter f_authpriv { facility(auth, authpriv); };
+filter f_syslog { not facility(authpriv, mail); };
+filter f_cron { facility(cron); };
+filter f_daemon { facility(daemon); };
+filter f_kern { facility(kern); };
+filter f_lpr { facility(lpr); };
+filter f_mail { facility(mail); };
+filter f_user { facility(user); };
+filter f_uucp { facility(cron); };
+filter f_ppp { facility(local2); };
+filter f_news { facility(news); };
+filter f_debug { not facility(auth, authpriv, news, mail); };
+filter f_messages { level(info..warn)
+ and not facility(auth, authpriv, mail, news); };
+filter f_emergency { level(emerg); };
+
+filter f_info { level(info); };
+filter f_notice { level(notice); };
+filter f_warn { level(warn); };
+filter f_crit { level(crit); };
+filter f_err { level(err); };
+
+log { source(src); filter(f_authpriv); destination(authlog); };
+log { source(src); filter(f_syslog); destination(syslog); };
+log { source(src); filter(f_cron); destination(cron); };
+log { source(src); filter(f_daemon); destination(daemon); };
+log { source(src); filter(f_kern); destination(kern); };
+log { source(src); filter(f_lpr); destination(lpr); };
+log { source(src); filter(f_mail); destination(mail); };
+log { source(src); filter(f_user); destination(user); };
+log { source(src); filter(f_uucp); destination(uucp); };
+log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
+log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
+log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
+log { source(src); filter(f_news); filter(f_crit); destination(newscrit); };
+log { source(src); filter(f_news); filter(f_err); destination(newserr); };
+log { source(src); filter(f_news); filter(f_notice); destination(newsnotice); };
+log { source(src); filter(f_debug); destination(debug); };
+log { source(src); filter(f_messages); destination(messages); };
+log { source(src); filter(f_emergency); destination(console); };
+log { source(src); filter(f_ppp); destination(ppp); };
+log { source(src); destination(console_all); };
+
+
diff --git a/packages/syslog-ng/syslog-ng_1.6.8.bb b/packages/syslog-ng/syslog-ng_1.6.8.bb
index 734dc310fb..ce1f77813c 100644
--- a/packages/syslog-ng/syslog-ng_1.6.8.bb
+++ b/packages/syslog-ng/syslog-ng_1.6.8.bb
@@ -1,9 +1,10 @@
-PR = "r8"
+PR = "r9"
MAINTAINER = "Oyvind Repvik <nail@nslu2-linux.org"
DESCRIPTION = "Alternative system logger daemon"
DEPENDS = "libol flex"
SRC_URI = "http://www.balabit.com/downloads/syslog-ng/1.6/src/${PN}-${PV}.tar.gz \
+ file://syslog-ng.conf \
file://initscript"
S = "${WORKDIR}/${PN}-${PV}"
@@ -16,7 +17,7 @@ INITSCRIPT_PARAMS = "defaults 05"
do_install_append() {
install -d ${D}/${sysconfdir}/${PN}
- install ${S}/doc/syslog-ng.conf.sample ${D}${sysconfdir}/${PN}/syslog-ng.conf
+ install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${PN}/syslog-ng.conf
install -d ${D}/${sysconfdir}/init.d
install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog-ng
}
diff --git a/packages/udev/udev-097/links.conf b/packages/udev/udev-097/links.conf
new file mode 100644
index 0000000000..ee26012039
--- /dev/null
+++ b/packages/udev/udev-097/links.conf
@@ -0,0 +1,20 @@
+# This file does not exist. Please do not ask the debian maintainer about it.
+# You may use it to do strange and wonderful things, at your risk.
+
+L fd /proc/self/fd
+L stdin /proc/self/fd/0
+L stdout /proc/self/fd/1
+L stderr /proc/self/fd/2
+L core /proc/kcore
+L sndstat /proc/asound/oss/sndstat
+
+D pts
+D shm
+
+# Hic sunt leones.
+M ppp c 108 0
+D loop
+M loop/0 b 7 0
+D net
+M net/tun c 10 200
+
diff --git a/packages/udev/udev_097.bb b/packages/udev/udev_097.bb
index 2e9e8d500f..fe24573b8d 100644
--- a/packages/udev/udev_097.bb
+++ b/packages/udev/udev_097.bb
@@ -8,7 +8,7 @@ used to detect the type of a file system and read its metadata."
DESCRIPTION_libvolume-id-dev = "libvolume_id development headers, \
needed to link programs with libvolume_id."
-PR = "r0"
+PR = "r1"
SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
file://noasmlinkage.patch;patch=1 \
diff --git a/packages/xorg-xserver/xserver-kdrive_git.bb b/packages/xorg-xserver/xserver-kdrive_git.bb
index 90fa12aebb..aa5784e1c7 100644
--- a/packages/xorg-xserver/xserver-kdrive_git.bb
+++ b/packages/xorg-xserver/xserver-kdrive_git.bb
@@ -1,22 +1,30 @@
PV = "1.1.0+git${SRCDATE}"
DEFAULT_PREFERENCE = "-2"
+PR = "r1"
+
LICENSE = "MIT"
DEPENDS = "tslib libxkbfile xf86dgaproto xf86vidmodeproto xf86miscproto xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto xcalibrateext recordproto videoproto scrnsaverproto"
PROVIDES = "virtual/xserver"
RPROVIDES = "virtual/xserver"
-PACKAGES = "xserver-kdrive-fbdev xserver-kdrive-fake xserver-kdrive-xephyr ${PN}-doc ${PN}-dev ${PN}-locale"
+PACKAGES =+ "xserver-kdrive-fbdev xserver-kdrive-fake xserver-kdrive-xephyr ${PN}-doc ${PN}-dev ${PN}-locale"
SECTION = "x11/base"
DESCRIPTION = "X server from freedesktop.org"
DESCRIPTION_xserver-kdrive-fbdev = "X server from freedesktop.org, supporting generic framebuffer devices"
DESCRIPTION_xserver-kdrive-fake = "Fake X server"
DESCRIPTION_xserver-kdrive-xephyr = "X server in an X window"
+FILES_${PN} += "${libdir}/xserver/SecurityPolicy"
+
FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev"
FILES_xserver-kdrive-fake = "${bindir}/Xfake"
FILES_xserver-kdrive-xephyr = "${bindir}/Xephyr"
+RDEPENDS_xserver-kdrive-fbdev = "${PN}"
+RDEPENDS_xserver-kdrive-fake = "${PN}"
+RDEPENDS_xserver-kdrive-xephyr = "${PN}"
+
SRC_URI = "git://anongit.freedesktop.org/xorg/xserver;protocol=git \
file://kmode.patch;patch=1 \
file://disable-apm.patch;patch=1 \