From 872be713be0ade5670e009195d8a08c1ea05a00b Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Thu, 11 Jun 2009 20:58:19 +0200
Subject: fix tcp_wrapper package

---
 package/tcp_wrappers/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'package')

diff --git a/package/tcp_wrappers/Makefile b/package/tcp_wrappers/Makefile
index 321c1331c..0e3b14bd1 100644
--- a/package/tcp_wrappers/Makefile
+++ b/package/tcp_wrappers/Makefile
@@ -35,5 +35,9 @@ MAKE_FLAGS+=		OPT_CFLAGS="${TARGET_CFLAGS}" \
 do-install:
 	${INSTALL_DIR} ${IDIR_LIBWRAP}/usr/lib
 	${CP} ${WRKBUILD}/shared/libwrap.so.* ${IDIR_LIBWRAP}/usr/lib/
+	${INSTALL_DIR} ${WRKINST}/usr/lib ${WRKINST}/usr/include
+	${CP} ${WRKBUILD}/tcpd.h ${WRKINST}/usr/include
+	${CP} ${WRKBUILD}/shared/libwrap.so* ${WRKINST}/usr/lib
+
 
 include ${TOPDIR}/mk/pkg-bottom.mk
-- 
cgit v1.2.3


From 80cf876adbd1a04a182e78c1741384e8bb644649 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Fri, 12 Jun 2009 16:58:22 +0200
Subject: default for size is bytes, set to kilobyte

---
 package/base-files/extra/init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'package')

diff --git a/package/base-files/extra/init b/package/base-files/extra/init
index 0d4f3d623..65f33e3d6 100755
--- a/package/base-files/extra/init
+++ b/package/base-files/extra/init
@@ -3,7 +3,7 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 mount -nt proc proc /proc
 size=$(awk '/MemTotal:/ { if ($2 > 16000) { print 4096 } else { print 2048 }}' /proc/meminfo)
 mount -o nosuid,nodev,noexec -t sysfs sysfs /sys
-mount none /tmp -t tmpfs -o size=$size
+mount none /tmp -t tmpfs -o size=${size}k
 mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
 mount -o nosuid,size=64k,mode=0755 -t tmpfs mdev /dev
 mkdir /dev/pts /dev/shm
-- 
cgit v1.2.3


From 6d7a7f4776711758cf5b59028378f01cd8eba493 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Sat, 13 Jun 2009 14:56:04 +0200
Subject: FreeBSD compatibility patches

- update ipset and libpri to latest upstream
---
 package/avahi/patches/patch-configure              |   519 +
 package/dhcp/patches/patch-common_discover_c       |    13 +
 package/digitemp/patches/patch-src_digitemp_c      |   118 +
 package/dovecot/patches/patch-configure            |     8 +-
 .../patch-src_lib-sql_sql-drivers-register_c       |    13 +
 .../patches/patch-src_plugins_quota_Makefile_in    |    63 +-
 package/fetchmail/patches/patch-configure          |    12 +
 package/fetchmail/patches/patch-mxget_c            |     6 +-
 package/ffmpeg/Makefile                            |     3 +-
 package/ffmpeg/patches/patch-configure             |    54 +
 package/gpsd/Config.in                             |    18 +
 package/gpsd/Makefile                              |    18 +-
 package/gpsd/patches/patch-contrib_binlog_c        |    11 +
 package/gpsd/patches/patch-contrib_motosend_c      |    29 +
 package/gpsd/patches/patch-driver_garmin_txt_c     |    20 +
 package/gpsd/patches/patch-driver_sirf_c           |    11 +
 package/gpsd/patches/patch-gpspipe_c               |    11 +
 package/gpsd/patches/patch-hex_c                   |    11 +
 package/ipset/Makefile                             |     8 +-
 package/ipset/patches/patch-kernel_ip_set_c        |    12 -
 package/iw/patches/patch-Makefile                  |    15 +
 package/jpeg/patches/jpeg-6b-fix-makefile.patch    |     6 +-
 package/jpeg/patches/patch-configure               |     8 +
 package/jpeg/patches/patch-ltconfig                |    12 +
 package/knock/patches/patch-Makefile_in            |    24 +
 package/l2tpns/patches/patch-Makefile              |    16 +-
 package/libX11/Makefile                            |     1 +
 package/libX11/patches/patch-src_util_Makefile_in  |    43 +-
 package/libXt/Makefile                             |     1 +
 package/libXt/patches/patch-util_Makefile_in       |    43 +-
 package/libnet/Makefile                            |     4 +-
 package/libnet/patches/500-debian-subset.patch     | 28584 -------------------
 package/libnet/patches/patch-Makefile              |   623 +
 package/libnet/patches/patch-Makefile_am           |    13 +
 package/libnet/patches/patch-Makefile_am_common    |     6 +
 package/libnet/patches/patch-Makefile_in           |   753 +
 package/libnet/patches/patch-acconfig_h            |    34 +
 package/libnet/patches/patch-acinclude_m4          |   131 +
 package/libnet/patches/patch-aclocal_m4            |  4831 ++++
 package/libnet/patches/patch-configure             | 12342 ++++++++
 package/libnet/patches/patch-configure_in          |    81 +
 package/libnet/patches/patch-include_Makefile      |   512 +
 package/libnet/patches/patch-include_Makefile_am   |     8 +
 package/libnet/patches/patch-include_Makefile_in   |   512 +
 package/libnet/patches/patch-include_config_h      |   110 +
 package/libnet/patches/patch-include_config_h_in   |   119 +
 .../libnet/patches/patch-include_libnet_Makefile   |   401 +
 .../patches/patch-include_libnet_Makefile_am       |    12 +
 .../patches/patch-include_libnet_Makefile_in       |   401 +
 package/libnet/patches/patch-include_libnet_h      |    15 +
 package/libnet/patches/patch-include_stamp-h1      |     4 +
 package/libnet/patches/patch-install-sh            |    11 +
 package/libnet/patches/patch-libnet-config         |    65 +
 package/libnet/patches/patch-libtool               |  5416 ++++
 package/libnet/patches/patch-ltmain_sh             |  5127 ++++
 package/libnet/patches/patch-missing               |   339 +
 package/libnet/patches/patch-mkinstalldirs         |   114 +
 package/libnet/patches/patch-src_Makefile          |   505 +
 package/libnet/patches/patch-src_Makefile_am       |    59 +
 package/libnet/patches/patch-src_Makefile_in       |   505 +
 package/libnet/patches/patch-src_libnet_prand_c    |    11 +
 .../libnet/patches/patch-test_Ethernet_Makefile_am |     8 +
 package/libnet/patches/patch-test_ICMP_Makefile_am |     8 +
 package/libnet/patches/patch-test_IP_Makefile_am   |     4 +
 package/libnet/patches/patch-test_Makefile_am      |     6 +
 package/libnet/patches/patch-test_OSPF_Makefile_am |     8 +
 .../libnet/patches/patch-test_Random_Makefile_am   |     8 +
 package/libnet/patches/patch-test_TCP_Makefile_am  |     8 +
 package/libnet/patches/patch-test_UDP_Makefile_am  |     8 +
 package/libnet/patches/patch-version_h             |     4 +
 package/libnids/Makefile                           |     3 +-
 package/libnids/patches/patch-configure_in         |    11 +
 package/libpri/Makefile                            |     9 +-
 package/libpri/patches/patch-Makefile              |    12 -
 package/lvm/patches/patch-Makefile_in              |    20 +
 package/lvm/patches/patch-doc_Makefile_in          |    12 +
 package/lvm/patches/patch-libdm_Makefile_in        |    33 +
 package/lvm/patches/patch-tools_Makefile_in        |    30 +-
 .../patch-WWW_Library_Implementation_www_tcp_h     |    17 +
 package/lynx/patches/patch-config_hin              |    12 +-
 package/lynx/patches/patch-lynx_cfg                |     8 +-
 package/lynx/patches/patch-makefile_in             |     4 +-
 package/lynx/patches/patch-samples_lynx_lss        |     4 +-
 package/lynx/patches/patch-src_LYUtils_c           |     4 +-
 .../lynx/patches/patch-src_chrtrans_makefile_in    |    11 +
 package/lynx/patches/patch-src_chrtrans_makeuctb_c |    12 +
 package/lynx/patches/patch-userdefs_h              |     4 +-
 package/monit/patches/patch-configure              |    86 +
 package/motion/patches/patch-configure             |   129 +
 package/mplayer/Makefile                           |     1 +
 package/mrd6/patches/patch-src_Makefile            |    20 +-
 package/olsrd/Makefile                             |     2 +-
 package/olsrd/patches/patch-Makefile               |    11 +
 package/olsrd/patches/patch-make_Makefile_linux    |    13 +-
 package/opensips/Makefile                          |     1 +
 package/openswan/Makefile                          |     4 +
 package/openswan/patches/patch-Makefile_inc        |    11 +
 package/openswan/patches/patch-doc_Makefile        |    11 +
 .../patches/patch-programs_Makefile_program        |    88 +-
 package/xproto/Makefile                            |     7 +-
 100 files changed, 34754 insertions(+), 28673 deletions(-)
 create mode 100644 package/avahi/patches/patch-configure
 create mode 100644 package/dhcp/patches/patch-common_discover_c
 create mode 100644 package/digitemp/patches/patch-src_digitemp_c
 create mode 100644 package/dovecot/patches/patch-src_lib-sql_sql-drivers-register_c
 create mode 100644 package/fetchmail/patches/patch-configure
 create mode 100644 package/ffmpeg/patches/patch-configure
 create mode 100644 package/gpsd/patches/patch-contrib_binlog_c
 create mode 100644 package/gpsd/patches/patch-contrib_motosend_c
 create mode 100644 package/gpsd/patches/patch-driver_garmin_txt_c
 create mode 100644 package/gpsd/patches/patch-driver_sirf_c
 create mode 100644 package/gpsd/patches/patch-gpspipe_c
 create mode 100644 package/gpsd/patches/patch-hex_c
 delete mode 100644 package/ipset/patches/patch-kernel_ip_set_c
 create mode 100644 package/iw/patches/patch-Makefile
 create mode 100644 package/jpeg/patches/patch-configure
 create mode 100644 package/jpeg/patches/patch-ltconfig
 create mode 100644 package/knock/patches/patch-Makefile_in
 delete mode 100644 package/libnet/patches/500-debian-subset.patch
 create mode 100644 package/libnet/patches/patch-Makefile
 create mode 100644 package/libnet/patches/patch-Makefile_am
 create mode 100644 package/libnet/patches/patch-Makefile_am_common
 create mode 100644 package/libnet/patches/patch-Makefile_in
 create mode 100644 package/libnet/patches/patch-acconfig_h
 create mode 100644 package/libnet/patches/patch-acinclude_m4
 create mode 100644 package/libnet/patches/patch-aclocal_m4
 create mode 100644 package/libnet/patches/patch-configure
 create mode 100644 package/libnet/patches/patch-configure_in
 create mode 100644 package/libnet/patches/patch-include_Makefile
 create mode 100644 package/libnet/patches/patch-include_Makefile_am
 create mode 100644 package/libnet/patches/patch-include_Makefile_in
 create mode 100644 package/libnet/patches/patch-include_config_h
 create mode 100644 package/libnet/patches/patch-include_config_h_in
 create mode 100644 package/libnet/patches/patch-include_libnet_Makefile
 create mode 100644 package/libnet/patches/patch-include_libnet_Makefile_am
 create mode 100644 package/libnet/patches/patch-include_libnet_Makefile_in
 create mode 100644 package/libnet/patches/patch-include_libnet_h
 create mode 100644 package/libnet/patches/patch-include_stamp-h1
 create mode 100644 package/libnet/patches/patch-install-sh
 create mode 100644 package/libnet/patches/patch-libnet-config
 create mode 100644 package/libnet/patches/patch-libtool
 create mode 100644 package/libnet/patches/patch-ltmain_sh
 create mode 100644 package/libnet/patches/patch-missing
 create mode 100644 package/libnet/patches/patch-mkinstalldirs
 create mode 100644 package/libnet/patches/patch-src_Makefile
 create mode 100644 package/libnet/patches/patch-src_Makefile_am
 create mode 100644 package/libnet/patches/patch-src_Makefile_in
 create mode 100644 package/libnet/patches/patch-src_libnet_prand_c
 create mode 100644 package/libnet/patches/patch-test_Ethernet_Makefile_am
 create mode 100644 package/libnet/patches/patch-test_ICMP_Makefile_am
 create mode 100644 package/libnet/patches/patch-test_IP_Makefile_am
 create mode 100644 package/libnet/patches/patch-test_Makefile_am
 create mode 100644 package/libnet/patches/patch-test_OSPF_Makefile_am
 create mode 100644 package/libnet/patches/patch-test_Random_Makefile_am
 create mode 100644 package/libnet/patches/patch-test_TCP_Makefile_am
 create mode 100644 package/libnet/patches/patch-test_UDP_Makefile_am
 create mode 100644 package/libnet/patches/patch-version_h
 create mode 100644 package/libnids/patches/patch-configure_in
 delete mode 100644 package/libpri/patches/patch-Makefile
 create mode 100644 package/lvm/patches/patch-Makefile_in
 create mode 100644 package/lvm/patches/patch-doc_Makefile_in
 create mode 100644 package/lvm/patches/patch-libdm_Makefile_in
 create mode 100644 package/lynx/patches/patch-WWW_Library_Implementation_www_tcp_h
 create mode 100644 package/lynx/patches/patch-src_chrtrans_makefile_in
 create mode 100644 package/lynx/patches/patch-src_chrtrans_makeuctb_c
 create mode 100644 package/monit/patches/patch-configure
 create mode 100644 package/motion/patches/patch-configure
 create mode 100644 package/olsrd/patches/patch-Makefile
 create mode 100644 package/openswan/patches/patch-Makefile_inc
 create mode 100644 package/openswan/patches/patch-doc_Makefile

(limited to 'package')

diff --git a/package/avahi/patches/patch-configure b/package/avahi/patches/patch-configure
new file mode 100644
index 000000000..b973749db
--- /dev/null
+++ b/package/avahi/patches/patch-configure
@@ -0,0 +1,519 @@
+--- avahi-0.6.25.orig/configure	2009-04-14 03:57:18.000000000 +0200
++++ avahi-0.6.25/configure	2009-06-12 20:47:01.000000000 +0200
+@@ -21663,272 +21663,6 @@ $as_echo "$USE_NLS" >&6; }
+ 
+ 
+ 
+-case "$am__api_version" in
+-    1.01234)
+-	{ { $as_echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5
+-$as_echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
+-   { (exit 1); exit 1; }; }
+-    ;;
+-    *)
+-    ;;
+-esac
+-
+-if test -n "0.35.0"; then
+-    { $as_echo "$as_me:$LINENO: checking for intltool >= 0.35.0" >&5
+-$as_echo_n "checking for intltool >= 0.35.0... " >&6; }
+-
+-    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+-    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+-    INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+-
+-    { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
+-$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
+-    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+-	{ { $as_echo "$as_me:$LINENO: error: Your intltool is too old.  You need intltool 0.35.0 or later." >&5
+-$as_echo "$as_me: error: Your intltool is too old.  You need intltool 0.35.0 or later." >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-# Extract the first word of "intltool-update", so it can be a program name with args.
+-set dummy intltool-update; ac_word=$2
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $INTLTOOL_UPDATE in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+-    break 2
+-  fi
+-done
+-done
+-IFS=$as_save_IFS
+-
+-  ;;
+-esac
+-fi
+-INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
+-if test -n "$INTLTOOL_UPDATE"; then
+-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_UPDATE" >&5
+-$as_echo "$INTLTOOL_UPDATE" >&6; }
+-else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-# Extract the first word of "intltool-merge", so it can be a program name with args.
+-set dummy intltool-merge; ac_word=$2
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $INTLTOOL_MERGE in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+-    break 2
+-  fi
+-done
+-done
+-IFS=$as_save_IFS
+-
+-  ;;
+-esac
+-fi
+-INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
+-if test -n "$INTLTOOL_MERGE"; then
+-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_MERGE" >&5
+-$as_echo "$INTLTOOL_MERGE" >&6; }
+-else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-# Extract the first word of "intltool-extract", so it can be a program name with args.
+-set dummy intltool-extract; ac_word=$2
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $INTLTOOL_EXTRACT in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+-    break 2
+-  fi
+-done
+-done
+-IFS=$as_save_IFS
+-
+-  ;;
+-esac
+-fi
+-INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
+-if test -n "$INTLTOOL_EXTRACT"; then
+-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_EXTRACT" >&5
+-$as_echo "$INTLTOOL_EXTRACT" >&6; }
+-else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+-    { { $as_echo "$as_me:$LINENO: error: The intltool scripts were not found. Please install intltool." >&5
+-$as_echo "$as_me: error: The intltool scripts were not found. Please install intltool." >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@'
+-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@'
+-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+ 
+ 
+ # Check the gettext tools to make sure they are GNU
+@@ -22093,243 +21827,6 @@ $as_echo "no" >&6; }
+ fi
+ 
+ 
+-if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+-    { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+-$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+-mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+-mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+-if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+-    { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+-$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-# Extract the first word of "perl", so it can be a program name with args.
+-set dummy perl; ac_word=$2
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $INTLTOOL_PERL in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+-    break 2
+-  fi
+-done
+-done
+-IFS=$as_save_IFS
+-
+-  ;;
+-esac
+-fi
+-INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
+-if test -n "$INTLTOOL_PERL"; then
+-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
+-$as_echo "$INTLTOOL_PERL" >&6; }
+-else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-if test -z "$INTLTOOL_PERL"; then
+-   { { $as_echo "$as_me:$LINENO: error: perl not found" >&5
+-$as_echo "$as_me: error: perl not found" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-{ $as_echo "$as_me:$LINENO: checking for perl >= 5.8.1" >&5
+-$as_echo_n "checking for perl >= 5.8.1... " >&6; }
+-$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
+-if test $? -ne 0; then
+-   { { $as_echo "$as_me:$LINENO: error: perl 5.8.1 is required for intltool" >&5
+-$as_echo "$as_me: error: perl 5.8.1 is required for intltool" >&2;}
+-   { (exit 1); exit 1; }; }
+-else
+-   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
+-   { $as_echo "$as_me:$LINENO: result: $IT_PERL_VERSION" >&5
+-$as_echo "$IT_PERL_VERSION" >&6; }
+-fi
+-if test "x" != "xno-xml"; then
+-   { $as_echo "$as_me:$LINENO: checking for XML::Parser" >&5
+-$as_echo_n "checking for XML::Parser... " >&6; }
+-   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+-       { $as_echo "$as_me:$LINENO: result: ok" >&5
+-$as_echo "ok" >&6; }
+-   else
+-       { { $as_echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5
+-$as_echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
+-   { (exit 1); exit 1; }; }
+-   fi
+-fi
+-
+-# Substitute ALL_LINGUAS so we can use it in po/Makefile
+-
+-
+-# Set DATADIRNAME correctly if it is not set yet
+-# (copied from glib-gettext.m4)
+-if test -z "$DATADIRNAME"; then
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-extern int _nl_msg_cat_cntr;
+-                       return _nl_msg_cat_cntr
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  DATADIRNAME=share
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	case $host in
+-    *-*-solaris*)
+-                        { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+-$as_echo_n "checking for bind_textdomain_codeset... " >&6; }
+-if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char bind_textdomain_codeset (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef bind_textdomain_codeset
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char bind_textdomain_codeset ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return bind_textdomain_codeset ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  ac_cv_func_bind_textdomain_codeset=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_bind_textdomain_codeset=no
+-fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+-$as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }
+-if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then
+-  DATADIRNAME=share
+-else
+-  DATADIRNAME=lib
+-fi
+-
+-    ;;
+-    *)
+-    DATADIRNAME=lib
+-    ;;
+-    esac
+-fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-
+ 
+ 
+ 
diff --git a/package/dhcp/patches/patch-common_discover_c b/package/dhcp/patches/patch-common_discover_c
new file mode 100644
index 000000000..8f74086ff
--- /dev/null
+++ b/package/dhcp/patches/patch-common_discover_c
@@ -0,0 +1,13 @@
+--- dhcp-4.1.0.orig/common/discover.c	2008-08-29 19:48:57.000000000 +0200
++++ dhcp-4.1.0/common/discover.c	2009-06-12 21:18:42.000000000 +0200
+@@ -684,8 +684,8 @@ next_iface6(struct iface_info *info, int
+ 	for (i=0; i<16; i++) {
+ 		unsigned char byte;
+                 static const char hex[] = "0123456789abcdef";
+-                byte = ((index(hex, buf[i * 2]) - hex) << 4) |
+-			(index(hex, buf[i * 2 + 1]) - hex);
++                byte = ((strchr(hex, buf[i * 2]) - hex) << 4) |
++			(strchr(hex, buf[i * 2 + 1]) - hex);
+ 		addr.sin6_addr.s6_addr[i] = byte;
+ 	}
+ 	memcpy(&info->addr, &addr, sizeof(addr));
diff --git a/package/digitemp/patches/patch-src_digitemp_c b/package/digitemp/patches/patch-src_digitemp_c
new file mode 100644
index 000000000..92b5bcca0
--- /dev/null
+++ b/package/digitemp/patches/patch-src_digitemp_c
@@ -0,0 +1,118 @@
+--- digitemp-3.6.0.orig/src/digitemp.c	2008-08-28 06:42:48.000000000 +0200
++++ digitemp-3.6.0/src/digitemp.c	2009-06-12 21:29:17.000000000 +0200
+@@ -62,9 +62,7 @@
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <unistd.h>
+-#if !defined(AIX) && !defined(SOLARIS) && !defined(FREEBSD) && !defined(DARWIN)
+ #include <getopt.h>
+-#endif /* !AIX and !SOLARIS and !FREEBSD and !DARWIN */
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
+@@ -75,24 +73,11 @@
+ #include <stdint.h>
+ #include "ad26.h"
+ 
+-// Include endian.h
+-#if DARWIN
+-#include <machine/endian.h>
+-#endif
+-#if FREEBSD
+-#include <sys/endian.h>
+-#endif
+-#if !defined(DARWIN) && !defined(FREEBSD)
+-#include <endian.h>
+-#endif
+-
+-#ifdef LINUX
+ #ifndef OWUSB
+ #ifdef LOCKDEV
+ #include <lockdev.h>
+ #endif
+ #endif
+-#endif
+ 
+ #include "digitemp.h"
+ #include "device_name.h"
+@@ -101,51 +86,8 @@
+ 
+ 
+ /* Setup the correct getopt starting point */
+-#ifdef LINUX
+ #define GETOPTEOF -1
+ #define OPTINDSTART 0
+-#endif
+-
+-#ifdef CYGWIN
+-#define GETOPTEOF -1
+-#define OPTINDSTART 0
+-#endif
+-
+-#ifdef AIX
+-#define OPTINDSTART 0
+-#define GETOPTEOF 255
+-#endif
+- 
+-#ifdef SOLARIS
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+-
+-#ifdef FREEBSD
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+-
+-#ifdef OPENBSD
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+-
+-#ifdef NETBSD
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+-
+-#ifdef DARWIN
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+- 
+-#ifdef OTHER
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif 
+-
+ 
+ /* For tracking down strange errors */
+ #undef BCL_DEBUG
+@@ -153,10 +95,6 @@
+ extern char 	*optarg;              
+ extern int	optind, opterr, optopt;
+ 
+-#if defined(FREEBSD) || defined(DARWIN)
+-extern int optreset;
+-#endif /* FREEBSD or DARWIN */
+-
+ extern const char dtlib[];			/* Library Used            */
+  
+ char serial_port[40],                        /* Path to the serial port */
+@@ -1928,7 +1866,7 @@ int Walk1Wire()
+   struct _roms  coupler_list;           /* Attached Roms                */
+   int   x;
+ 
+-  bzero( &coupler_list, sizeof( struct _roms ) );
++  memset( &coupler_list, 0, sizeof( struct _roms ) );
+     
+   /* Find any DS2409 Couplers and turn them all off.
+      This WILL NOT WORK if there is a coupler attached to the
+@@ -2427,7 +2365,7 @@ int main( int argc, char *argv[] )
+ 
+ 
+   /* Make sure the structure is erased */
+-  bzero( &sensor_list, sizeof( struct _roms ) );
++  memset( &sensor_list, 0, sizeof( struct _roms ) );
+  
+ 
+   if( argc <= 1 )
diff --git a/package/dovecot/patches/patch-configure b/package/dovecot/patches/patch-configure
index 1db57dc0c..5ccf6bfba 100644
--- a/package/dovecot/patches/patch-configure
+++ b/package/dovecot/patches/patch-configure
@@ -1,7 +1,7 @@
 $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- dovecot-1.1.7.orig/configure	2008-11-23 23:16:38.000000000 +0100
-+++ dovecot-1.1.7/configure	2008-12-22 14:15:16.000000000 +0100
-@@ -34792,23 +34792,6 @@ if ! $RPCGEN -c /dev/null > /dev/null; t
+--- dovecot-1.1.14.orig/configure	2009-04-17 04:38:09.000000000 +0200
++++ dovecot-1.1.14/configure	2009-05-14 00:37:04.000000000 +0200
+@@ -30129,23 +30129,6 @@ if ! $RPCGEN -c /dev/null > /dev/null; t
  fi
  
  
@@ -25,7 +25,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  
  if test "$want_solr" != "no"; then
    # Extract the first word of "curl-config", so it can be a program name with args.
-@@ -35340,13 +35323,6 @@ echo "$as_me: error: conditional \"BUILD
+@@ -30684,13 +30667,6 @@ echo "$as_me: error: conditional \"BUILD
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
diff --git a/package/dovecot/patches/patch-src_lib-sql_sql-drivers-register_c b/package/dovecot/patches/patch-src_lib-sql_sql-drivers-register_c
new file mode 100644
index 000000000..6c0403839
--- /dev/null
+++ b/package/dovecot/patches/patch-src_lib-sql_sql-drivers-register_c
@@ -0,0 +1,13 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- dovecot-1.1.14.orig/src/lib-sql/sql-drivers-register.c	2009-04-17 04:40:53.000000000 +0200
++++ dovecot-1.1.14/src/lib-sql/sql-drivers-register.c	2009-05-14 00:37:59.000000000 +0200
+@@ -1,9 +1,5 @@
+ /* this file automatically generated by Makefile */
+ #include "lib.h"
+ #include "sql-api.h"
+-extern struct sql_db driver_pgsql_db;
+-extern struct sql_db driver_mysql_db;
+ void sql_drivers_register_all(void) {
+-sql_driver_register(&driver_pgsql_db);
+-sql_driver_register(&driver_mysql_db);
+ }
diff --git a/package/dovecot/patches/patch-src_plugins_quota_Makefile_in b/package/dovecot/patches/patch-src_plugins_quota_Makefile_in
index c6349ddbd..ff405c296 100644
--- a/package/dovecot/patches/patch-src_plugins_quota_Makefile_in
+++ b/package/dovecot/patches/patch-src_plugins_quota_Makefile_in
@@ -1,7 +1,22 @@
 $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- dovecot-1.1.7.orig/src/plugins/quota/Makefile.in	2008-11-23 23:16:42.000000000 +0100
-+++ dovecot-1.1.7/src/plugins/quota/Makefile.in	2008-12-22 14:17:55.000000000 +0100
-@@ -239,9 +239,6 @@ lib10_quota_plugin_la_LDFLAGS = -module 
+--- dovecot-1.1.14.orig/src/plugins/quota/Makefile.in	2009-04-17 04:38:14.000000000 +0200
++++ dovecot-1.1.14/src/plugins/quota/Makefile.in	2009-05-14 00:44:46.000000000 +0200
+@@ -55,12 +55,11 @@ LTLIBRARIES = $(module_LTLIBRARIES)
+ lib10_quota_plugin_la_DEPENDENCIES =
+ am__lib10_quota_plugin_la_SOURCES_DIST = quota.c quota-count.c \
+ 	quota-fs.c quota-dict.c quota-dirsize.c quota-maildir.c \
+-	quota-plugin.c quota-storage.c rquota_xdr.c
++	quota-plugin.c quota-storage.c
+ am__objects_1 = quota.lo quota-count.lo quota-fs.lo quota-dict.lo \
+ 	quota-dirsize.lo quota-maildir.lo quota-plugin.lo \
+ 	quota-storage.lo
+-@HAVE_RQUOTA_TRUE@am__objects_2 = rquota_xdr.lo
+-am_lib10_quota_plugin_la_OBJECTS = $(am__objects_1) $(am__objects_2)
++am_lib10_quota_plugin_la_OBJECTS = $(am__objects_1)
+ lib10_quota_plugin_la_OBJECTS = $(am_lib10_quota_plugin_la_OBJECTS)
+ lib10_quota_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+@@ -244,9 +243,6 @@ lib10_quota_plugin_la_LDFLAGS = -module 
  module_LTLIBRARIES = \
  	lib10_quota_plugin.la
  
@@ -11,3 +26,45 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  quota_dist_sources = \
  	quota.c \
  	quota-count.c \
+@@ -258,11 +254,8 @@ quota_dist_sources = \
+ 	quota-storage.c
+ 
+ lib10_quota_plugin_la_SOURCES = \
+-	$(quota_dist_sources) \
+-	$(RQUOTA_XDR)
++	$(quota_dist_sources) 
+ 
+-@HAVE_RQUOTA_TRUE@RQUOTA_XDR = rquota_xdr.c
+-@HAVE_RQUOTA_TRUE@RQUOTA_X = /usr/include/rpcsvc/rquota.x
+ noinst_HEADERS = \
+ 	quota.h \
+ 	quota-fs.h \
+@@ -347,7 +340,6 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quota-plugin.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quota-storage.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quota.Plo@am__quote@
+-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rquota_xdr.Plo@am__quote@
+ 
+ .c.o:
+ @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@@ -553,20 +545,6 @@ uninstall-am: uninstall-moduleLTLIBRARIE
+ 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ 	tags uninstall uninstall-am uninstall-moduleLTLIBRARIES
+ 
+-@HAVE_RQUOTA_TRUE@rquota_xdr.c: Makefile $(RQUOTA_X)
+-@HAVE_RQUOTA_TRUE@	(echo '#include "lib.h"'; \
+-@HAVE_RQUOTA_TRUE@	 echo '#include <rpc/rpc.h>'; \
+-@HAVE_RQUOTA_TRUE@	 $(RPCGEN) -c $(RQUOTA_X) | \
+-@HAVE_RQUOTA_TRUE@	  sed -e 's/IXDR_PUT/(void)IXDR_PUT/g' \
+-@HAVE_RQUOTA_TRUE@	    -e 's,/usr/include/rpcsvc/rquota.h,rquota.h,' \
+-@HAVE_RQUOTA_TRUE@	    -e 's/int32_t \*buf/int32_t *buf ATTR_UNUSED/' \
+-@HAVE_RQUOTA_TRUE@	    -e 's/^static char rcsid.*//' ) > rquota_xdr.c
+-
+-@HAVE_RQUOTA_TRUE@rquota.h: Makefile $(RQUOTA_X)
+-@HAVE_RQUOTA_TRUE@	$(RPCGEN) -h $(RQUOTA_X) > rquota.h
+-
+-@HAVE_RQUOTA_TRUE@quota-fs.lo: rquota.h
+-
+ install-exec-local:
+ 	for d in imap pop3 lda; do \
+ 	  $(mkdir_p) $(DESTDIR)$(moduledir)/$$d; \
diff --git a/package/fetchmail/patches/patch-configure b/package/fetchmail/patches/patch-configure
new file mode 100644
index 000000000..e5dc5ce44
--- /dev/null
+++ b/package/fetchmail/patches/patch-configure
@@ -0,0 +1,12 @@
+--- fetchmail-6.3.9.orig/configure	2008-11-16 15:18:49.000000000 +0100
++++ fetchmail-6.3.9/configure	2009-06-12 22:27:25.000000000 +0200
+@@ -13176,9 +13176,6 @@ then
+     { echo "$as_me:$LINENO: Enabling OpenSSL support in $with_ssl." >&5
+ echo "$as_me: Enabling OpenSSL support in $with_ssl." >&6;}
+     test "$with_ssl" != "/usr" && CFLAGS="$CFLAGS -I$with_ssl/include"
+-    ### In Red Hat 9, this file includes a reference to <krb5.h>, so we
+-    ### force the Kerberos direcory onto the include path so it will build.
+-    CFLAGS="$CFLAGS -I/usr/kerberos/include"
+     ###	OpenBSD comes with ssl headers
+   else
+     { { echo "$as_me:$LINENO: error: SSL support enabled, but OpenSSL not found" >&5
diff --git a/package/fetchmail/patches/patch-mxget_c b/package/fetchmail/patches/patch-mxget_c
index ee6d61576..2dd74e8a3 100644
--- a/package/fetchmail/patches/patch-mxget_c
+++ b/package/fetchmail/patches/patch-mxget_c
@@ -1,7 +1,7 @@
 $Id$
---- fetchmail-6.3.8.orig/mxget.c	2006-03-14 11:00:02.000000000 +0100
-+++ fetchmail-6.3.8/mxget.c	2008-04-07 23:56:13.000000000 +0200
-@@ -54,6 +54,123 @@
+--- fetchmail-6.3.9.orig/mxget.c	2007-06-10 10:32:47.000000000 +0200
++++ fetchmail-6.3.9/mxget.c	2009-06-12 22:24:29.000000000 +0200
+@@ -56,6 +56,123 @@
  /* minimum possible size of MX record in packet */
  #define MIN_MX_SIZE	8	/* corresp to "a.com 0" w/ terminating space */
  
diff --git a/package/ffmpeg/Makefile b/package/ffmpeg/Makefile
index 267fd6b10..1f920ec4a 100644
--- a/package/ffmpeg/Makefile
+++ b/package/ffmpeg/Makefile
@@ -7,7 +7,7 @@ PKG_NAME:=		ffmpeg
 PKG_VERSION:=		0.5
 PKG_RELEASE:=		2
 PKG_MD5SUM:=		be8503f15c3b81ba00eb8379ca8dcf33
-PKG_DESCR:=		cross-platform solution to record, convert and stream audio and video
+PKG_DESCR:=		solution to record, convert and stream audio and video
 PKG_SECTION:=		sound
 PKG_URL:=		http://www.ffmpeg.org
 PKG_SITES:=		http://www.ffmpeg.org/releases/
@@ -31,6 +31,7 @@ do-configure:
 		--prefix=/usr \
 		--arch=${CPU_ARCH} \
 		--enable-cross-compile \
+		--source-path=${WRKSRC} \
 		--cross-prefix=${TARGET_CROSS} \
 		--cc=$(TARGET_CC) \
 		--host-cc=$(HOSTCC) \
diff --git a/package/ffmpeg/patches/patch-configure b/package/ffmpeg/patches/patch-configure
new file mode 100644
index 000000000..d23a61e52
--- /dev/null
+++ b/package/ffmpeg/patches/patch-configure
@@ -0,0 +1,54 @@
+--- ffmpeg-0.5.orig/configure	2009-03-01 18:57:14.000000000 +0100
++++ ffmpeg-0.5/configure	2009-06-12 23:27:05.000000000 +0200
+@@ -2486,51 +2486,6 @@ cmp -s $TMPH config.h &&
+ 
+ rm -f $TMPC $TMPE $TMPH $TMPO $TMPS $TMPSH
+ 
+-# build tree in object directory if source path is different from current one
+-if enabled source_path_used; then
+-    DIRS="\
+-        doc               \
+-        libavcodec        \
+-        libavcodec/alpha  \
+-        libavcodec/arm    \
+-        libavcodec/bfin   \
+-        libavcodec/mlib   \
+-        libavcodec/ppc    \
+-        libavcodec/sh4    \
+-        libavcodec/sparc  \
+-        libavcodec/x86    \
+-        libavdevice       \
+-        libavfilter       \
+-        libavformat       \
+-        libavutil         \
+-        libpostproc       \
+-        libswscale        \
+-        tests             \
+-        tools             \
+-        vhook             \
+-        "
+-    FILES="\
+-        Makefile             \
+-        common.mak           \
+-        subdir.mak           \
+-        doc/texi2pod.pl      \
+-        libavcodec/Makefile  \
+-        libavdevice/Makefile \
+-        libavfilter/Makefile \
+-        libavformat/Makefile \
+-        libavutil/Makefile   \
+-        libpostproc/Makefile \
+-        libswscale/Makefile  \
+-        "
+-    for dir in $DIRS ; do
+-        mkdir -p $dir
+-    done
+-    for f in $FILES ; do
+-        $ln_s "$source_path/$f" $f
+-    done
+-fi
+-
+-
+ # build pkg-config files
+ 
+ pkgconfig_generate(){
diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in
index f8c3614df..f0c274449 100644
--- a/package/gpsd/Config.in
+++ b/package/gpsd/Config.in
@@ -24,3 +24,21 @@ config ADK_PACKAGE_GPSD_CLIENTS
 	help
 	  This enables the command-line GPS client "cgps" and
 	  the "gpxlogger" tool for outputting standard GPX files.
+
+choice
+prompt "C++ library to use"
+depends on ADK_PACKAGE_GPSD
+default ADK_COMPILE_GPSD_WITH_STDCXX if ADK_TARGET_LIB_GLIBC
+default ADK_COMPILE_GPSD_WITH_UCLIBCXX if ADK_TARGET_LIB_UCLIBC
+
+config ADK_COMPILE_GPSD_WITH_STDCXX
+	bool "Standard C++ library"
+	select ADK_PACKAGE_LIBSTDCXX
+	help
+
+config ADK_COMPILE_GPSD_WITH_UCLIBCXX
+	bool "Embedded uClibc++ library"
+	select ADK_PACKAGE_UCLIBCXX
+	help
+
+endchoice
diff --git a/package/gpsd/Makefile b/package/gpsd/Makefile
index 61555098e..ced495739 100644
--- a/package/gpsd/Makefile
+++ b/package/gpsd/Makefile
@@ -16,6 +16,12 @@ PKG_DESCR_1:=		GPS client utilities
 
 include ${TOPDIR}/mk/package.mk
 
+ifeq ($(ADK_COMPILE_GPSD_WITH_UCLIBCXX),y)
+PKG_DEPENDS+=		uclibc++
+else
+PKG_DEPENDS+=		libstdcxx
+endif
+
 $(eval $(call PKG_template,GPSD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 $(eval $(call PKG_template,GPSD_CLIENTS,gpsd-clients,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_1},${PKG_SECTION}))
 
@@ -31,8 +37,9 @@ CONFIGURE_ARGS+=	--without-x \
 BUILD_STYLE=		auto
 INSTALL_STYLE=		auto
 
-ifeq ($(ADK_TARGET_LIB_UCLIBCXX),y)
-TCXXFLAGS+=		-fno-builtin -fno-rtti -nostdinc++
+ifeq ($(ADK_COMPILE_GPSD_WITH_UCLIBCXX),y)
+TCXXFLAGS+=		-fno-builtin -fno-rtti -nostdinc++ \
+			-I${STAGING_DIR}/usr/include/uClibc++
 TLDFLAGS+=		-luClibc++ -lc -lm -nodefaultlibs
 else
 TLDFLAGS+=		-shared
@@ -41,6 +48,13 @@ endif
 post-extract:
 	@find ${WRKBUILD} -name *.rej -delete
 
+ifeq (${ADK_COMPILE_GPSD_WITH_UCLIBCXX},y)
+# add workaround because libtool tries to link libstdc++
+post-configure:
+	${SED} 's#postdeps="-lstdc.*#postdeps=""#' \
+		${WRKBUILD}/libtool
+endif
+
 post-install:
 	${INSTALL_DIR} ${IDIR_GPSD}/usr/lib ${IDIR_GPSD}/usr/sbin
 	${CP} ${WRKINST}/usr/lib/libgps.so.* ${IDIR_GPSD}/usr/lib
diff --git a/package/gpsd/patches/patch-contrib_binlog_c b/package/gpsd/patches/patch-contrib_binlog_c
new file mode 100644
index 000000000..99b20bf47
--- /dev/null
+++ b/package/gpsd/patches/patch-contrib_binlog_c
@@ -0,0 +1,11 @@
+--- gpsd-2.39.orig/contrib/binlog.c	2009-01-28 21:53:46.000000000 +0100
++++ gpsd-2.39/contrib/binlog.c	2009-06-13 09:13:00.000000000 +0200
+@@ -58,7 +58,7 @@ int main(int argc, char **argv) {
+ 		if (l > 0)
+ 			write(ofd, buf, l);
+ 		usleep(1000);
+-		bzero(buf, BUFSIZ);
++		memset(buf, 0, BUFSIZ);
+ 		spinner( n++ );
+ 	}
+ 	return 0;
diff --git a/package/gpsd/patches/patch-contrib_motosend_c b/package/gpsd/patches/patch-contrib_motosend_c
new file mode 100644
index 000000000..c5f1b0162
--- /dev/null
+++ b/package/gpsd/patches/patch-contrib_motosend_c
@@ -0,0 +1,29 @@
+--- gpsd-2.39.orig/contrib/motosend.c	2008-06-26 21:08:36.000000000 +0200
++++ gpsd-2.39/contrib/motosend.c	2009-06-13 09:12:46.000000000 +0200
+@@ -81,7 +81,7 @@ int main(int argc, char **argv) {
+ 	t = 0; n = 0;
+ 	while (1){
+ 		usleep(1000);
+-		bzero(buf, BSIZ);
++		memset(buf, 0, BSIZ);
+ 		if ((l = read(fd, buf, BSIZ)) == -1)
+ 			if (!(EINTR == errno || EAGAIN == errno))
+ 				err(1, "read");
+@@ -119,7 +119,7 @@ static int moto_send(int fd, char *type,
+ 	if ((buf = malloc(l+7)) == NULL)
+ 		return -1;
+ 
+-	bzero(buf, l+7);
++	memset(buf, 0, l+7);
+ 	buf[0] = '@'; buf[1] = '@';
+ 	buf[2] = type[0]; buf[3] = type[1];
+ 
+@@ -171,7 +171,7 @@ int gpsd_hexpack(char *src, char *dst, i
+ 	if ((l < 1) || (l > len))
+ 		return -1;
+ 
+-	bzero(dst, len);
++	memset(dst, 0, len);
+ 	for (i = 0; i < l; i++)
+ 		if ((k = hex2bin(src+i*2)) != -1)
+ 			dst[i] = (char)(k & 0xff);
diff --git a/package/gpsd/patches/patch-driver_garmin_txt_c b/package/gpsd/patches/patch-driver_garmin_txt_c
new file mode 100644
index 000000000..604e103b0
--- /dev/null
+++ b/package/gpsd/patches/patch-driver_garmin_txt_c
@@ -0,0 +1,20 @@
+--- gpsd-2.39.orig/driver_garmin_txt.c	2009-03-03 12:39:57.000000000 +0100
++++ gpsd-2.39/driver_garmin_txt.c	2009-06-13 09:13:23.000000000 +0200
+@@ -167,7 +167,7 @@ static int gar_decode(const char *data, 
+         return -1;
+     }
+ 
+-    bzero(buf, (int)sizeof(buf));
++    memset(buf, 0, (int)sizeof(buf));
+     (void) strncpy(buf, data, length);
+     gpsd_report(LOG_RAW, "Decoded string: %s\n", buf);
+ 
+@@ -230,7 +230,7 @@ static int gar_int_decode(const char *da
+         return -1;
+     }
+ 
+-    bzero(buf, (int)sizeof(buf));
++    memset(buf, 0, (int)sizeof(buf));
+     (void) strncpy(buf, data, length);
+     gpsd_report(LOG_RAW, "Decoded string: %s\n", buf);
+ 
diff --git a/package/gpsd/patches/patch-driver_sirf_c b/package/gpsd/patches/patch-driver_sirf_c
new file mode 100644
index 000000000..1e44cee91
--- /dev/null
+++ b/package/gpsd/patches/patch-driver_sirf_c
@@ -0,0 +1,11 @@
+--- gpsd-2.39.orig/driver_sirf.c	2009-03-07 16:30:58.000000000 +0100
++++ gpsd-2.39/driver_sirf.c	2009-06-13 09:13:42.000000000 +0200
+@@ -238,7 +238,7 @@ static gps_mask_t sirf_msg_debug(unsigne
+     char msgbuf[MAX_PACKET_LENGTH*3 + 2];
+     int i;
+ 
+-    bzero(msgbuf, (int)sizeof(msgbuf));
++    memset(msgbuf, 0, (int)sizeof(msgbuf));
+ 
+     /*@ +charint @*/
+     if (0xe1 == buf[0]) {		/* Development statistics messages */
diff --git a/package/gpsd/patches/patch-gpspipe_c b/package/gpsd/patches/patch-gpspipe_c
new file mode 100644
index 000000000..d840a2a36
--- /dev/null
+++ b/package/gpsd/patches/patch-gpspipe_c
@@ -0,0 +1,11 @@
+--- gpsd-2.39.orig/gpspipe.c	2009-03-03 00:22:49.000000000 +0100
++++ gpsd-2.39/gpspipe.c	2009-06-13 09:14:14.000000000 +0200
+@@ -108,7 +108,7 @@ static void open_serial(char* device)
+     }
+ 
+     /* Clear struct for new port settings. */
+-    /*@i@*/bzero(&newtio, sizeof(newtio));
++    /*@i@*/memset(&newtio, 0, sizeof(newtio));
+ 
+     /* make it raw */
+     (void)cfmakeraw(&newtio);
diff --git a/package/gpsd/patches/patch-hex_c b/package/gpsd/patches/patch-hex_c
new file mode 100644
index 000000000..ebb2e1697
--- /dev/null
+++ b/package/gpsd/patches/patch-hex_c
@@ -0,0 +1,11 @@
+--- gpsd-2.39.orig/hex.c	2009-03-18 18:37:56.000000000 +0100
++++ gpsd-2.39/hex.c	2009-06-13 09:13:58.000000000 +0200
+@@ -61,7 +61,7 @@ int gpsd_hexpack(char *src, char *dst, s
+     if ((l < 1) || ((size_t)l > len))
+ 	return -2;
+ 
+-    bzero(dst, (int)len);
++    memset(dst, 0, (int)len);
+     for (i = 0; i < l; i++)
+ 	if ((k = hex2bin(src+i*2)) != -1)
+ 	    dst[i] = (char)(k & 0xff);
diff --git a/package/ipset/Makefile b/package/ipset/Makefile
index 504f7be09..66b2c2014 100644
--- a/package/ipset/Makefile
+++ b/package/ipset/Makefile
@@ -4,9 +4,9 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		ipset
-PKG_VERSION:=		2.3.3a
+PKG_VERSION:=		3.0
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		c7d2f165242edaef5581db0f7d5af520
+PKG_MD5SUM:=		92bb09883dd8a77ec5cfbff1c8932b15
 PKG_DESCR:=		Netfilter ip sets administration utility
 PKG_SECTION:=		net
 PKG_URL:=		http://ipset.netfilter.org
@@ -18,7 +18,9 @@ include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,IPSET,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
-XAKE_FLAGS+=		KERNEL_DIR=${LINUX_DIR} PREFIX=/usr LD=$(TARGET_CROSS)ld
+XAKE_FLAGS+=		V=1 ARCH=${ARCH} KERNEL_DIR=${LINUX_DIR} \
+			PREFIX=/usr LD=$(TARGET_CROSS)ld \
+			CROSS_COMPILE="${TARGET_CROSS}"
 BUILD_STYLE=		auto
 INSTALL_STYLE=		auto
 INSTALL_TARGET=		binaries_install
diff --git a/package/ipset/patches/patch-kernel_ip_set_c b/package/ipset/patches/patch-kernel_ip_set_c
deleted file mode 100644
index bf931398f..000000000
--- a/package/ipset/patches/patch-kernel_ip_set_c
+++ /dev/null
@@ -1,12 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- ipset-2.3.3a.orig/kernel/ip_set.c	2008-07-16 19:17:55.000000000 +0200
-+++ ipset-2.3.3a/kernel/ip_set.c	2008-10-20 16:38:11.000000000 +0200
-@@ -24,7 +24,7 @@
- #include <linux/errno.h>
- #include <asm/uaccess.h>
- #include <asm/bitops.h>
--#include <asm/semaphore.h>
-+#include <linux/semaphore.h>
- #include <linux/spinlock.h>
- #include <linux/vmalloc.h>
- 
diff --git a/package/iw/patches/patch-Makefile b/package/iw/patches/patch-Makefile
new file mode 100644
index 000000000..32ef25f93
--- /dev/null
+++ b/package/iw/patches/patch-Makefile
@@ -0,0 +1,15 @@
+--- iw-0.9.14.orig/Makefile	2009-05-13 00:10:08.000000000 +0200
++++ iw-0.9.14/Makefile	2009-06-13 09:45:08.000000000 +0200
+@@ -81,10 +81,10 @@ check:
+ install: iw iw.8.gz
+ 	@$(NQ) ' INST iw'
+ 	$(Q)$(MKDIR) $(DESTDIR)$(BINDIR)
+-	$(Q)$(INSTALL) -m 755 -t $(DESTDIR)$(BINDIR) iw
++	$(Q)$(INSTALL) -m 755 iw $(DESTDIR)$(BINDIR)
+ 	@$(NQ) ' INST iw.8'
+ 	$(Q)$(MKDIR) $(DESTDIR)$(MANDIR)/man8/
+-	$(Q)$(INSTALL) -m 644 -t $(DESTDIR)$(MANDIR)/man8/ iw.8.gz
++	$(Q)$(INSTALL) -m 644 iw.8.gz $(DESTDIR)$(MANDIR)/man8/
+ 
+ clean:
+ 	$(Q)rm -f iw *.o *~ *.gz version.c *-stamp
diff --git a/package/jpeg/patches/jpeg-6b-fix-makefile.patch b/package/jpeg/patches/jpeg-6b-fix-makefile.patch
index 7e4c8d3ed..057e576c4 100644
--- a/package/jpeg/patches/jpeg-6b-fix-makefile.patch
+++ b/package/jpeg/patches/jpeg-6b-fix-makefile.patch
@@ -1,7 +1,7 @@
 diff -ruN jpeg-6b-old/makefile.cfg jpeg-6b/makefile.cfg
---- jpeg-6b-old/makefile.cfg	2006-11-02 12:36:36.000000000 +0100
-+++ jpeg-6b/makefile.cfg	2006-11-02 12:37:09.000000000 +0100
-@@ -168,7 +168,7 @@
+--- jpeg-6b.orig/makefile.cfg	1998-03-21 20:08:57.000000000 +0100
++++ jpeg-6b/makefile.cfg	2009-06-12 17:58:24.000000000 +0200
+@@ -168,7 +168,7 @@ libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS)
  
  # with libtool:
  libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
diff --git a/package/jpeg/patches/patch-configure b/package/jpeg/patches/patch-configure
new file mode 100644
index 000000000..3a624b34d
--- /dev/null
+++ b/package/jpeg/patches/patch-configure
@@ -0,0 +1,8 @@
+--- jpeg-6b.orig/configure	1998-03-21 20:08:57.000000000 +0100
++++ jpeg-6b/configure	2009-06-12 18:04:41.000000000 +0200
+@@ -1,4 +1,4 @@
+-#! /bin/sh
++#! /bin/sh -x
+ 
+ # Guess values for system-dependent variables and create Makefiles.
+ # Generated automatically using autoconf version 2.12 
diff --git a/package/jpeg/patches/patch-ltconfig b/package/jpeg/patches/patch-ltconfig
new file mode 100644
index 000000000..dd6127a63
--- /dev/null
+++ b/package/jpeg/patches/patch-ltconfig
@@ -0,0 +1,12 @@
+--- jpeg-6b.orig/ltconfig	1998-03-25 16:25:39.000000000 +0100
++++ jpeg-6b/ltconfig	2009-06-12 18:17:05.000000000 +0200
+@@ -1104,7 +1104,8 @@ finish_cmds=
+ finish_eval=
+ shlibpath_var=
+ version_type=none
+-dynamic_linker="$host_os ld.so"
++dynamic_linker="Linux ld.so"
++host_os=linux-gnu
+ 
+ echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
+ case "$host_os" in
diff --git a/package/knock/patches/patch-Makefile_in b/package/knock/patches/patch-Makefile_in
new file mode 100644
index 000000000..ec90372ec
--- /dev/null
+++ b/package/knock/patches/patch-Makefile_in
@@ -0,0 +1,24 @@
+--- knock-0.5.orig/Makefile.in	2005-06-27 07:11:34.000000000 +0200
++++ knock-0.5/Makefile.in	2009-06-13 09:49:14.000000000 +0200
+@@ -68,11 +68,16 @@ dist: distclean
+ 	(cd ..; tar czvf knock-$(VERSION).tar.gz knock-$(VERSION))
+ 
+ install: all
+-	$(INSTALL) -D -m0755 knockd $(DESTDIR)$(SBINDIR)/knockd
+-	$(INSTALL) -D -m0755 knock $(DESTDIR)$(BINDIR)/knock
+-	$(INSTALL) -D -m0644 $(MANSRC)knockd.1 $(DESTDIR)$(MANDIR)/man1/knockd.1
+-	$(INSTALL) -D -m0644 $(MANSRC)knock.1 $(DESTDIR)$(MANDIR)/man1/knock.1
+-	$(INSTALL) -D -m0644 knockd.conf $(DESTDIR)/etc/knockd.conf
++	$(INSTALL) -d -m0755 $(DESTDIR)$(SBINDIR)
++	$(INSTALL) -d -m0755 $(DESTDIR)$(BINDIR)
++	$(INSTALL) -d -m0755 $(DESTDIR)$(MANDIR)/man1
++	$(INSTALL) -d -m0755 $(DESTDIR)/etc
++	$(INSTALL) -m0755 knock $(DESTDIR)$(BINDIR)/knock
++	$(INSTALL) -m0755 knockd $(DESTDIR)$(SBINDIR)/knockd
++	$(INSTALL) -m0755 knock $(DESTDIR)$(BINDIR)/knock
++	$(INSTALL) -m0644 $(MANSRC)knockd.1 $(DESTDIR)$(MANDIR)/man1/knockd.1
++	$(INSTALL) -m0644 $(MANSRC)knock.1 $(DESTDIR)$(MANDIR)/man1/knock.1
++	$(INSTALL) -m0644 knockd.conf $(DESTDIR)/etc/knockd.conf
+ 
+ clean:
+ 	rm -f *~ $(OBJDIR)*.o $(MANSRC)*.1
diff --git a/package/l2tpns/patches/patch-Makefile b/package/l2tpns/patches/patch-Makefile
index 4065c2981..4d7ca7540 100644
--- a/package/l2tpns/patches/patch-Makefile
+++ b/package/l2tpns/patches/patch-Makefile
@@ -1,6 +1,6 @@
 $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
 --- l2tpns-2.1.21.orig/Makefile	2005-12-07 06:21:37.000000000 +0100
-+++ l2tpns-2.1.21/Makefile	2009-05-29 17:48:31.886728540 +0200
++++ l2tpns-2.1.21/Makefile	2009-06-13 09:54:41.000000000 +0200
 @@ -10,18 +10,11 @@ DEFINES =
  DEFINES += -DLIBDIR='"$(libdir)"'
  DEFINES += -DETCDIR='"$(etcdir)"'
@@ -18,7 +18,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
 +CFLAGS ?= -Wall -Wformat-security -Wno-format-zero-length
  LDLIBS =
 -INSTALL = install -c -D -o root -g root
-+INSTALL = install -c -D
++INSTALL = install
  
  l2tpns.LIBS = -lm -lcli -ldl
  
@@ -35,3 +35,15 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  
  %.o: %.c
  	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+@@ -70,6 +63,11 @@ nsctl: nsctl.o control.o
+ 	$(CC) -fPIC -shared $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $<
+ 
+ install: all
++	$(INSTALL) -m 0755 -d $(DESTDIR)$(libdir)
++	$(INSTALL) -m 0755 -d $(DESTDIR)$(bindir)
++	$(INSTALL) -m 0755 -d $(DESTDIR)$(etcdir)
++	$(INSTALL) -m 0755 -d $(DESTDIR)$(man5dir)
++	$(INSTALL) -m 0755 -d $(DESTDIR)$(man8dir)
+ 	$(INSTALL) -m 0755 l2tpns $(DESTDIR)$(bindir)/l2tpns
+ 	$(INSTALL) -m 0755 nsctl $(DESTDIR)$(bindir)/nsctl
+ 
diff --git a/package/libX11/Makefile b/package/libX11/Makefile
index 4c6debf0c..34278be6c 100644
--- a/package/libX11/Makefile
+++ b/package/libX11/Makefile
@@ -15,6 +15,7 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,LIBX11,libx11,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+XAKE_FLAGS+=		HOSTCPPFLAGS=-I${STAGING_DIR}/usr/include/xproto
 CONFIGURE_STYLE=	gnu
 CONFIGURE_ARGS+=	--enable-xlocale \
 			--disable-xf86bigfont \
diff --git a/package/libX11/patches/patch-src_util_Makefile_in b/package/libX11/patches/patch-src_util_Makefile_in
index 9d27c162e..3478fa640 100644
--- a/package/libX11/patches/patch-src_util_Makefile_in
+++ b/package/libX11/patches/patch-src_util_Makefile_in
@@ -1,6 +1,5 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
 --- libX11-1.1.5.orig/src/util/Makefile.in	2008-09-04 23:48:56.000000000 +0200
-+++ libX11-1.1.5/src/util/Makefile.in	2009-05-30 21:53:42.350425696 +0200
++++ libX11-1.1.5/src/util/Makefile.in	2009-06-13 11:20:48.000000000 +0200
 @@ -52,7 +52,7 @@ makekeys_OBJECTS = makekeys-makekeys.$(O
  makekeys_LDADD = $(LDADD)
  makekeys_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@ -15,19 +14,55 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
 -CFLAGS = @CFLAGS@
-+CFLAGS = -O2
++CFLAGS = 
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
  CXX = @CXX@
-@@ -227,9 +227,9 @@ sysconfdir = @sysconfdir@
+@@ -114,9 +114,9 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ KEYSYMDEF = @KEYSYMDEF@
+ LAUNCHD = @LAUNCHD@
+-LDFLAGS = @LDFLAGS@
++LDFLAGS = 
+ LIBOBJS = @LIBOBJS@
+-LIBS = @LIBS@
++LIBS = 
+ LIBTOOL = @LIBTOOL@
+ LIB_MAN_DIR = @LIB_MAN_DIR@
+ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
+@@ -227,9 +227,10 @@ sysconfdir = @sysconfdir@
  target_alias = @target_alias@
  top_builddir = @top_builddir@
  top_srcdir = @top_srcdir@
 -makekeys_CFLAGS = $(X11_CFLAGS)
 +makekeys_CFLAGS = $(HOSTCFLAGS)
++makekeys_CPPFLAGS = $(HOSTCPPFLAGS)
  
 -#override CC = gcc
 +override CC = gcc
  LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  EXTRA_DIST = mkks.sh
  
+@@ -311,18 +312,18 @@ distclean-compile:
+ @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+ 
+ makekeys-makekeys.o: makekeys.c
+-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -MT makekeys-makekeys.o -MD -MP -MF $(DEPDIR)/makekeys-makekeys.Tpo -c -o makekeys-makekeys.o `test -f 'makekeys.c' || echo '$(srcdir)/'`makekeys.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(makekeys_CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -MT makekeys-makekeys.o -MD -MP -MF $(DEPDIR)/makekeys-makekeys.Tpo -c -o makekeys-makekeys.o `test -f 'makekeys.c' || echo '$(srcdir)/'`makekeys.c
+ @am__fastdepCC_TRUE@	mv -f $(DEPDIR)/makekeys-makekeys.Tpo $(DEPDIR)/makekeys-makekeys.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='makekeys.c' object='makekeys-makekeys.o' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -c -o makekeys-makekeys.o `test -f 'makekeys.c' || echo '$(srcdir)/'`makekeys.c
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(makekeys_CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -c -o makekeys-makekeys.o `test -f 'makekeys.c' || echo '$(srcdir)/'`makekeys.c
+ 
+ makekeys-makekeys.obj: makekeys.c
+-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -MT makekeys-makekeys.obj -MD -MP -MF $(DEPDIR)/makekeys-makekeys.Tpo -c -o makekeys-makekeys.obj `if test -f 'makekeys.c'; then $(CYGPATH_W) 'makekeys.c'; else $(CYGPATH_W) '$(srcdir)/makekeys.c'; fi`
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(makekeys_CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -MT makekeys-makekeys.obj -MD -MP -MF $(DEPDIR)/makekeys-makekeys.Tpo -c -o makekeys-makekeys.obj `if test -f 'makekeys.c'; then $(CYGPATH_W) 'makekeys.c'; else $(CYGPATH_W) '$(srcdir)/makekeys.c'; fi`
+ @am__fastdepCC_TRUE@	mv -f $(DEPDIR)/makekeys-makekeys.Tpo $(DEPDIR)/makekeys-makekeys.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='makekeys.c' object='makekeys-makekeys.obj' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -c -o makekeys-makekeys.obj `if test -f 'makekeys.c'; then $(CYGPATH_W) 'makekeys.c'; else $(CYGPATH_W) '$(srcdir)/makekeys.c'; fi`
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(makekeys_CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -c -o makekeys-makekeys.obj `if test -f 'makekeys.c'; then $(CYGPATH_W) 'makekeys.c'; else $(CYGPATH_W) '$(srcdir)/makekeys.c'; fi`
+ 
+ mostlyclean-libtool:
+ 	-rm -f *.lo
diff --git a/package/libXt/Makefile b/package/libXt/Makefile
index a2eeb5aa3..7d953056a 100644
--- a/package/libXt/Makefile
+++ b/package/libXt/Makefile
@@ -15,6 +15,7 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,LIBXT,libxt,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+XAKE_FLAGS+=		HOSTCPPFLAGS=-I${STAGING_DIR}/usr/include/xproto
 CONFIGURE_STYLE=	gnu
 CONFIGURE_ARGS+=	--disable-malloc0returnsnull \
 			--disable-install-makestrs
diff --git a/package/libXt/patches/patch-util_Makefile_in b/package/libXt/patches/patch-util_Makefile_in
index b408db791..b8340c2fe 100644
--- a/package/libXt/patches/patch-util_Makefile_in
+++ b/package/libXt/patches/patch-util_Makefile_in
@@ -1,7 +1,7 @@
 $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
 --- libXt-1.0.5.orig/util/Makefile.in	2007-01-28 07:31:13.000000000 +0100
-+++ libXt-1.0.5/util/Makefile.in	2009-05-15 16:39:05.000000000 +0200
-@@ -92,9 +92,9 @@ AUTOCONF = @AUTOCONF@
++++ libXt-1.0.5/util/Makefile.in	2009-06-13 11:34:25.000000000 +0200
+@@ -92,11 +92,11 @@ AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
@@ -11,8 +11,11 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
 -CFLAGS = @CFLAGS@
 +CFLAGS = $(HOSTCFLAGS)
  CPP = @CPP@
- CPPFLAGS = @CPPFLAGS@
+-CPPFLAGS = @CPPFLAGS@
++CPPFLAGS = $(HOSTCPPFLAGS)
  CXX = @CXX@
+ CXXCPP = @CXXCPP@
+ CXXDEPMODE = @CXXDEPMODE@
 @@ -123,7 +123,7 @@ INSTALL_MAKESTRS_TRUE = @INSTALL_MAKESTR
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -22,3 +25,37 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  LIBOBJS = @LIBOBJS@
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
+@@ -209,8 +209,9 @@ sharedstatedir = @sharedstatedir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ EXTRA_DIST = Shell.ht StrDefs.ct StrDefs.ht string.list $(appman_PRE)
+-makestrs_CFLAGS = $(XT_CFLAGS)
++makestrs_CFLAGS = $(CFLAGS)
+ makestrs_SOURCES = makestrs.c
++makestrs_CPPFLAGS = $(HOSTCPPFLAGS)
+ 
+ # Man page
+ appmandir = $(APP_MAN_DIR)
+@@ -329,18 +330,18 @@ distclean-compile:
+ @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+ 
+ makestrs-makestrs.o: makestrs.c
+-@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $