libsndfile: moved to github
libsndfile: moved to github

git-svn-id: svn://svn.openwrt.org/openwrt/packages@41417 3c298f89-4303-0410-b956-a3cf2f4a3e73

file:a/devel/patch/Makefile (deleted)
--- a/devel/patch/Makefile
+++ /dev/null
@@ -1,44 +1,1 @@
-#
-# Copyright (C) 2008-2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=patch
-PKG_VERSION:=2.5.9
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@GNU/patch
-PKG_MD5SUM:=dacfb618082f8d3a2194601193cf8716
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/patch
-  SECTION:=devel
-  CATEGORY:=Development
-  TITLE:=patch
-  URL:=http://www.gnu.org/
-endef
-
-define Package/patch/description
-  The Patch package contains a program for modifying or creating files
-  by applying a "patch" file typically created by the diff program.
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		exec_prefix="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/patch/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(CP) $(PKG_INSTALL_DIR)/bin/patch $(1)/usr/bin/
-endef
-
-$(eval $(call BuildPackage,patch))
-

--- a/devel/patch/patches/100-install.patch
+++ /dev/null
@@ -1,19 +1,1 @@
-diff -urN patch-2.5.4.orig/Makefile.in patch-2.5.4/Makefile.in
---- patch-2.5.4.orig/Makefile.in	2008-06-11 10:08:08.000000000 +0200
-+++ patch-2.5.4/Makefile.in	2008-06-11 10:08:26.000000000 +0200
-@@ -42,12 +42,12 @@
- VERSION = @VERSION@
- 
- prefix = @prefix@
--exec_prefix = @exec_prefix@
-+exec_prefix += @exec_prefix@
- 
- bindir = $(exec_prefix)/bin
- 
- # Where to put the manual pages.
--mandir = @mandir@
-+mandir = $(exec_prefix)/@mandir@
- man1dir = $(mandir)/man1
- # Extension (including `.') for the manual page filenames.
- man1ext = .1
 

file:a/ipv6/aiccu/Makefile (deleted)
--- a/ipv6/aiccu/Makefile
+++ /dev/null
@@ -1,52 +1,1 @@
-#
-# Copyright (C) 2006-2012 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=aiccu
-PKG_VERSION:=20070115
-PKG_RELEASE:=10
-
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.sixxs.net/archive/sixxs/aiccu/unix
-PKG_MD5SUM:=c9bcc83644ed788e22a7c3f3d4021350
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/aiccu
-  SECTION:=net
-  CATEGORY:=Network
-  DEPENDS:=+libpthread +ip +kmod-sit +kmod-tun
-  TITLE:=SixXS Automatic IPv6 Connectivity Client Utility
-  URL:=http://www.sixxs.net/tools/aiccu/
-endef
-
-define Build/Configure
-	$(SED) "s,strip,/bin/true," $(PKG_BUILD_DIR)/unix-console/Makefile
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CC="$(TARGET_CC)" OS_NAME="Linux" OS_VERSION="$(LINUX_VERSION)" \
-		EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
-		EXTRA_LDFLAGS="$(TARGET_LDFLAGS) -pthread" \
-		DEBUG=0
-endef
-
-define Package/aiccu/conffiles
-/etc/config/aiccu
-endef
-
-define Package/aiccu/install
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/unix-console/$(PKG_NAME) $(1)/usr/sbin/
-endef
-
-$(eval $(call BuildPackage,aiccu))
-

--- a/ipv6/aiccu/patches/100-cross_compile.patch
+++ /dev/null
@@ -1,102 +1,1 @@
---- aiccu/unix-console/Makefile.orig	2007-09-02 23:19:39.000000000 +0200
-+++ aiccu/unix-console/Makefile	2007-09-02 23:20:11.000000000 +0200
-@@ -25,7 +25,8 @@
- # CWARNS += -Wpacked
- 
- #CFLAGS	+= $(CWARNS) -D_GNU_SOURCE -D_DEBUG -g3 -O0
--CFLAGS	+= $(CWARNS) -D_GNU_SOURCE
-+CFLAGS	+= $(CWARNS) $(EXTRA_CFLAGS) -D_GNU_SOURCE
-+LDFLAGS += $(EXTRA_LDFLAGS)
- CC      = @gcc
- RM      = rm
- 
-@@ -40,25 +41,25 @@
- # GnuTLS Support ?
- # Used by TIC to secure that communication
- # Currently defaultly builds only on Linux, but other platforms might easily also support it
--ifeq ($(shell uname | grep -c "Linux"),1)
-+ifneq ($(HAVE_GNUTLS),)
- CFLAGS	+= -D AICCU_GNUTLS
- LDFLAGS += -lgnutls
- endif
- 
- # Linux
--ifeq ($(shell uname | grep -c "Linux"),1)
-+ifeq ($(OS_NAME),Linux)
- CFLAGS  += -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\""
- SRCS	+= ../common/aiccu_linux.c
- OBJS	+= ../common/aiccu_linux.o
--LDFLAGS	+= -lpthread -lresolv
-+LDFLAGS	+= -pthread -lresolv
- endif
- 
- # FreeBSD
--ifeq ($(shell uname | grep -c "FreeBSD"),1)
-+ifeq ($(OS_NAME),FreeBSD)
- CFLAGS	+= -D_FREEBSD
- 
- # FreeBSD 4.x
--ifeq ($(shell uname -r | cut -c 1),4)
-+ifeq ($(shell echo $(OS_VERSION) | cut -c 1),4)
- CFLAGS	+= -D AICCU_TYPE="\"freebsd4\""
- SRCS	+= ../common/aiccu_freebsd4.c
- OBJS	+= ../common/aiccu_freebsd4.o
-@@ -71,7 +72,7 @@
- endif
- 
- # DragonFlyBSD
--ifeq ($(shell uname | grep -c "DragonFly"),1)
-+ifeq ($(OS_NAME),DragonFly)
- CFLAGS	+= -D_DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\""
- SRCS	+= ../common/aiccu_freebsd4.c
- OBJS	+= ../common/aiccu_freebsd4.o
-@@ -79,7 +80,7 @@
- endif
- 
- # NetBSD
--ifeq ($(shell uname | grep -c "NetBSD"),1)
-+ifeq ($(OS_NAME),NetBSD)
- CFLAGS	+= -D_NETBSD -D AICCU_TYPE="\"kame\""
- 
- # Check if net/if_tun.h has TUNSIFHEAD and enable support for it
-@@ -97,10 +98,10 @@
- endif
- 
- # OpenBSD
--ifeq ($(shell uname | grep -c "OpenBSD"),1)
-+ifeq ($(OS_NAME),OpenBSD)
- CFLAGS	+= -D_OPENBSD -D HAS_IFHEAD
- # 2.7-2.9
--ifeq ($(shell uname -r | cut -c 1),2)
-+ifeq ($(shell echo $(OS_VERSION) | cut -c 1),2)
- CFLAGS	+= -D AICCU_TYPE="\"openbsd2\""
- SRCS	+= ../common/aiccu_openbsd2.c
- OBJS	+= ../common/aiccu_openbsd2.o
-@@ -114,7 +115,7 @@
- endif
- 
- # Darwin
--ifeq ($(shell uname | grep -c "Darwin"),1)
-+ifeq ($(OS_NAME),Darwin)
- CFLAGS	+= -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\""
- SRCS	+= ../common/aiccu_darwin.c
- OBJS	+= ../common/aiccu_darwin.o
-@@ -122,7 +123,7 @@
- endif
- 
- # SunOS / Solaris
--ifeq ($(shell uname | grep -c "SunOS"),1)
-+ifeq ($(OS_NAME),SunOS)
- CFLAGS	+= -D_SUNOS -D AICCU_TYPE="\"sunos\""
- SRCS	+= ../common/aiccu_sunos.c
- OBJS	+= ../common/aiccu_sunos.o
-@@ -130,7 +131,7 @@
- endif
- 
- # AIX
--ifeq ($(shell uname | grep -c "AIX"),1)
-+ifeq ($(OS_NAME),AIX)
- CC	= @/usr/vac/bin/xlc_r
- CFLAGS	= -qthreaded -q64 -qlanglvl=stdc99 -bmaxdata:0xD0000000 -D_64BIT -g -qdbxextra -qfullpath -qheapdebug -qformat=all -qcheck=all
- CFLAGS	+= -D AICCU_CONSOLE
 

--- a/ipv6/aiccu/patches/200-add_dn_skipname.patch
+++ /dev/null
@@ -1,71 +1,1 @@
-diff -Nru aiccu.old/common/dn_skipname.c aiccu/common/dn_skipname.c
---- aiccu.old/common/dn_skipname.c	1970-01-01 02:00:00.000000000 +0200
-+++ aiccu/common/dn_skipname.c	2006-11-04 00:50:23.000000000 +0200
-@@ -0,0 +1,51 @@
-+#include <errno.h>
-+#include <resolv.h>
-+
-+/* Ripped from glibc 2.4 sources. */
-+
-+/*
-+ * ns_name_skip(ptrptr, eom)
-+ *      Advance *ptrptr to skip over the compressed name it points at.
-+ * return:
-+ *      0 on success, -1 (with errno set) on failure.
-+ */
-+int ns_name_skip(const u_char **ptrptr, const u_char *eom)
-+{
-+	const u_char *cp;
-+	u_int n;
-+
-+	cp = *ptrptr;
-+	while (cp < eom && (n = *cp++) != 0)
-+	{
-+		/* Check for indirection. */
-+		switch (n & NS_CMPRSFLGS) {
-+		case 0:                 /* normal case, n == len */
-+			cp += n;
-+			continue;
-+		case NS_CMPRSFLGS:      /* indirection */
-+			cp++;
-+			break;
-+		default:                /* illegal type */
-+			errno = EMSGSIZE;
-+			return (-1);
-+		}
-+		break;
-+	}
-+	if (cp > eom)
-+	{
-+		errno = EMSGSIZE;
-+		return (-1);
-+	}
-+	*ptrptr = cp;
-+	return (0);
-+}
-+
-+int dn_skipname(const u_char *ptr, const u_char *eom)
-+{
-+	const u_char *saveptr = ptr;
-+
-+	if(ns_name_skip(&ptr, eom) == -1)
-+		return (-1);
-+	return (ptr - saveptr);
-+}
-+
-diff -Nru aiccu.old/unix-console/Makefile aiccu/unix-console/Makefile
---- aiccu.old/unix-console/Makefile	2006-11-04 00:51:20.000000000 +0200
-+++ aiccu/unix-console/Makefile	2006-11-04 00:48:51.000000000 +0200
-@@ -10,9 +10,9 @@
- #  $Date: 2006-07-25 09:20:48 $
- # **********************************************************/
- 
--SRCS	= main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c
-+SRCS	= main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c ../common/dn_skipname.c
- INCS	= ../common/tun.h ../common/aiccu.h ../common/hash_md5.h ../common/hash_sha1.h ../common/common.h ../common/heartbeat.h ../common/tic.h ../common/ayiya.h ../common/resolver.h
--OBJS	= main.o ../common/tun.o ../common/aiccu.o ../common/hash_md5.o ../common/hash_sha1.o ../common/common.o ../common/heartbeat.o ../common/tic.o ../common/ayiya.o ../common/aiccu_test.o ../common/resolver.o
-+OBJS	= main.o ../common/tun.o ../common/aiccu.o ../common/hash_md5.o ../common/hash_sha1.o ../common/common.o ../common/heartbeat.o ../common/tic.o ../common/ayiya.o ../common/aiccu_test.o ../common/resolver.o ../common/dn_skipname.o
- 
- # New features not fully implemented and thus disabled for now
- #CFLAGS	+= -D NEWSTUFF_TSP -D NEWSTUFF_TEEPEE
 

--- a/ipv6/aiccu/patches/300-resolver-uclibc.patch
+++ /dev/null
@@ -1,30 +1,1 @@
---- aiccu/common/resolver.c.orig	2007-09-02 23:10:58.000000000 +0200
-+++ aiccu/common/resolver.c	2007-09-02 23:11:01.000000000 +0200
-@@ -26,7 +26,7 @@
- 
- int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record))
- {
--#ifdef _LINUX
-+#if defined(_LINUX) && !defined(__UCLIBC__)
- 	struct __res_state	res;
- #endif
- 	unsigned char		answer[8192];
-@@ -38,7 +38,7 @@
- 	uint16_t		type = 0, class = 0;
- 	uint32_t		ttl = 0;
- 
--#ifdef _LINUX
-+#if defined(_LINUX) && !defined(__UCLIBC__)
- 	memset(&res, 0, sizeof(res));
- 	res.options = RES_DEBUG;
- 	res_ninit(&res);
-@@ -47,7 +47,7 @@
- #endif
- 
- 	memset(answer, 0, sizeof(answer));
--#ifdef _LINUX
-+#if defined(_LINUX) && !defined(__UCLIBC__)
- 	ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer));
- #else
- 	ret = res_query(label, C_IN, rrtype, answer, sizeof(answer));
 

file:a/ipv6/tayga/Makefile (deleted)
--- a/ipv6/tayga/Makefile
+++ /dev/null
@@ -1,49 +1,1 @@
-# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=tayga
-PKG_VERSION:=0.9.2
-PKG_RELEASE:=1
-
-PKG_SOURCE:=tayga-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.litech.org/tayga/
-PKG_MD5SUM:=7a7b24165ce008df772f398d86fa280e
-PKG_CAT:=bzcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/tayga-$(PKG_VERSION)
-PKG_FIXUP:=autoreconf
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/tayga
-  SECTION:=net
-  CATEGORY:=Network
-  DEPENDS:=+ip +kmod-ipv6 +kmod-tun
-  TITLE:=Out-of-kernel stateless NAT64 implementation for Linux
-  URL:=http://www.litech.org/tayga/
-endef
-
-define Package/tayga/description
-  TAYGA is an out-of-kernel stateless NAT64 implementation for
-  Linux.  It uses the TUN driver to exchange packets with the
-  kernel, which is the same driver used by OpenVPN and QEMU/KVM.
-endef
-
-# TODO: port scripts to netifd
-ifdef CONFIG_PACAKGE_netifd
-  define Package/tayga/install
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tayga $(1)/usr/sbin/
-  endef
-else
-  define Package/tayga/install
-	$(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/network $(1)/etc/hotplug.d/iface
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tayga $(1)/usr/sbin/
-	$(INSTALL_DATA) ./files/tayga.sh $(1)/lib/network/tayga.sh
-	$(INSTALL_DATA) ./files/tayga.hotplug $(1)/etc/hotplug.d/iface/95-tayga
-  endef
-endif
-
-$(eval $(call BuildPackage,tayga))
-

--- a/ipv6/tayga/files/tayga.hotplug
+++ /dev/null
@@ -1,38 +1,1 @@
-#!/bin/sh
 
-if [ "$ACTION" = ifup ]; then
-	. /lib/functions.sh
-
-	include /lib/network
-	scan_interfaces
-
-	update_tunnel() {
-		local cfg="$1"
-
-		local proto
-		config_get proto "$cfg" proto
-		[ "$proto" = tayga ] || return 0
-
-		local wandev4
-		config_get wandev4 "$cfg" wan4_device "$(find_tayga_wanif4)"
-
-		local wandev6
-		config_get wandev6 "$cfg" wan6_device "$(find_tayga_wanif6)"
-
-		[ "$wandev4" = "$DEVICE" ] || [ "$wandev6" = "$DEVICE" ] || return 0
-
-		local wanip4=$(find_tayga_wanip4 "$wandev4")
-		local wanip6=$(find_tayga_wanip6 "$wandev6")
-
-		[ -n "$wanip4" ] && [ -n "$wanip6" ] && {
-			uci_set_state network "$cfg" ipv4addr "$wanip4"
-			uci_set_state network "$cfg" ipv6addr "$wanip6"
-
-			logger -t tayga-update "Re-establishing tayga NAT64 due to change on $INTERFACE ($DEVICE)"
-			ifup "$cfg" &
-		}
-	}
-
-	config_foreach update_tunnel interface
-fi
-

--- a/ipv6/tayga/files/tayga.sh
+++ /dev/null
@@ -1,153 +1,1 @@
-# tayga.sh - NAT64 backend
 
-find_tayga_wanif4() {
-	local if=$(ip -4 r l e 0.0.0.0/0); if="${if#default* dev }"; if="${if%% *}"
-	[ -n "$if" ] && grep -qs "^ *$if:" /proc/net/dev && echo "$if"
-}
-
-find_tayga_wanip4() {
-	local ip=$(ip -4 a s dev "$1"); ip="${ip#*inet }"
-	echo "${ip%%[^0-9.]*}"
-}
-
-find_tayga_wanif6() {
-	local if=$(ip -6 r l e ::/0); if="${if#default* dev }"; if="${if%% *}"
-	[ -n "$if" ] && grep -qs "^ *$if:" /proc/net/dev && echo "$if"
-}
-
-find_tayga_wanip6() {
-	local ip=$(ip -6 a s dev "$1"); ip="${ip#*inet6 }"
-	echo "${ip%%[^0-9A-Fa-f:]*}"
-}
-
-# Hook into scan_interfaces() to synthesize a .device option
-# This is needed for /sbin/ifup to properly dispatch control
-# to setup_interface_tayga() even if no .ifname is set in
-# the configuration.
-scan_tayga() {
-	config_set "$1" device "tayga-$1"
-}
-
-coldplug_interface_tayga() {
-	setup_interface_tayga "tayga-$1" "$1"
-}
-
-tayga_add_static_mappings() {
-	local tmpconf="$1"
-
-	(
-		. /lib/functions.sh
-		config_load firewall
-
-		tayga_map_rule_add() {
-			local cfg="$1"
-			local tmpconf="$2"
-			local ipv4_addr ipv6_addr
-			config_get ipv4_addr "$cfg" ipv4_addr ""
-			config_get ipv6_addr "$cfg" ipv6_addr ""
-			[ -n "$ipv4_addr" ] && [ -n "$ipv6_addr" ] &&
-				echo "map $ipv4_addr $ipv6_addr" >>$tmpconf
-		}
-
-		config_foreach tayga_map_rule_add nat64 "$tmpconf"
-	)
-}
-
-setup_interface_tayga() {
-	local iface="$1"
-	local cfg="$2"
-	local link="tayga-$cfg"
-
-	local ipv4_addr ipv6_addr prefix dynamic_pool
-
-	config_get ipv4_addr "$cfg" ipv4_addr
-	config_get ipv6_addr "$cfg" ipv6_addr
-	config_get prefix "$cfg" prefix
-	config_get dynamic_pool "$cfg" dynamic_pool
-
-	local args
-
-	include /lib/network
-	scan_interfaces
-
-	local wanip4=$(uci_get network "$cfg" ipv4addr)
-	local wanip6=$(uci_get network "$cfg" ipv6addr)
-
-	local wanif4=$(find_tayga_wanif4)
-	local wanif6=$(find_tayga_wanif6)
-
-	[ -z "$wanip4" ] && {
-		[ -n "$wanif4" ] && {
-			wanip4=$(find_tayga_wanip4 "$wanif4")
-			uci_set_state network "$cfg" wan4_device "$wanif4"
-		}
-	}
-
-	[ -z "$wanip6" ] && {
-		[ -n "$wanif6" ] && {
-			wanip6=$(find_tayga_wanip6 "$wanif6")
-			uci_set_state network "$cfg" wan6_device "$wanif6"
-		}
-	}
-
-	[ -n "$wanip4" ] && [ -n "$wanip6" ] || {
-		echo "Cannot determine local IPv4 and IPv6 addressed for tayga NAT64 $cfg - skipping"
-		return 1
-	}
-
-	local tmpconf="/var/etc/tayga-$cfg.conf"
-	args="-c $tmpconf"
-	mkdir -p /var/etc
-	mkdir -p /var/run/tayga/$cfg
-
-	echo "tun-device $link" >$tmpconf
-	echo "ipv4-addr $ipv4_addr" >>$tmpconf
-	[ -n "$ipv6_addr" ] &&
-		echo "ipv6-addr $ipv6_addr" >>$tmpconf
-	[ -n "$prefix" ] &&
-		echo "prefix $prefix" >>$tmpconf
-
-	tayga_add_static_mappings "$tmpconf"
-
-	[ -n "$dynamic_pool" ] &&
-		echo "dynamic-pool $dynamic_pool" >>$tmpconf
-	echo "data-dir /var/run/tayga/$cfg" >>$tmpconf
-
-	# creating the tunnel below will trigger a net subsystem event
-	# prevent it from touching or iface by disabling .auto here
-	uci_set_state network "$cfg" ifname $link
-	uci_set_state network "$cfg" auto 0
-
-	# here we create TUN device and check configuration
-	tayga $args --mktun || return 1
-
-	ip link set "$link" up
-
-	ip addr add "$wanip4" dev "$link"
-	ip addr add "$wanip6" dev "$link"
-
-	[ -n "$dynamic_pool" ] &&
-		ip -4 route add "$dynamic_pool" dev "$link"
-	[ -n "$prefix" ] &&
-		ip -6 route add "$prefix" dev "$link"
-
-	start-stop-daemon -S -x tayga -- $args -p /var/run/$link.pid
-
-	env -i ACTION="ifup" DEVICE="$link" INTERFACE="$cfg" PROTO="tayga" \
-		/sbin/hotplug-call iface
-}
-
-stop_interface_tayga() {
-	local cfg="$1"
-	local link="tayga-$cfg"
-
-	env -i ACTION="ifdown" DEVICE="$link" INTERFACE="$cfg" PROTO="tayga" \
-		/sbin/hotplug-call iface
-
-	service_kill tayga "/var/run/$link.pid"
-
-	ip link set "$link" down
-	ip addr flush dev "$link"
-	ip route flush dev "$link"
-}
-

--- a/ipv6/tayga/patches/001-configure_unset_CFLAGS.patch
+++ /dev/null
@@ -1,12 +1,1 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -5,8 +5,6 @@ AC_CONFIG_HEADERS(config.h)
- 
- AC_PROG_CC
- 
--CFLAGS='-g -Wall'
--
- tayga_conf_path=${sysconfdir}/tayga.conf
- 
- AC_SUBST(tayga_conf_path)
 

file:a/libs/libevent/Makefile (deleted)
--- a/libs/libevent/Makefile
+++ /dev/null
@@ -1,67 +1,1 @@
-#
-# Copyright (C) 2006-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=libevent
-PKG_VERSION:=1.4.14b
-PKG_RELEASE:=2
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-stable
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-stable.tar.gz
-PKG_SOURCE_URL:=http://www.monkey.org/~provos/
-PKG_MD5SUM:=a00e037e4d3f9e4fe9893e8a2d27918c
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/libevent
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE:=Event notification library
-  DEPENDS:=+librt
-  URL:=http://www.monkey.org/~provos/libevent/
-endef
-
-define Package/libevent/description
-	The libevent API provides a mechanism to execute a callback function
-	when a specific event occurs on a file descriptor or after a timeout
-	has been reached. Furthermore, libevent also support callbacks due
-	to signals or regular timeouts.
-
-	libevent is meant to replace the event loop found in event driven
-	network servers. An application just needs to call event_dispatch()
-	and then add or remove events dynamically without having to change
-	the event loop.
-endef
-
-TARGET_CFLAGS += $(FPIC)
-
-CONFIGURE_ARGS += \
-	--enable-shared \
-	--enable-static \
-
-MAKE_FLAGS += \
-	CFLAGS="$(TARGET_CFLAGS)" \
-
-define Build/InstallDev
-	$(INSTALL_DIR) $(1)/usr/include/libevent
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/libevent/
-	$(INSTALL_DIR) $(1)/usr/lib/libevent
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so} $(1)/usr/lib/libevent/
-endef
-
-define Package/libevent/install
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,libevent))
-

file:a/libs/libpam/Makefile (deleted)
--- a/libs/libpam/Makefile
+++ /dev/null
@@ -1,71 +1,1 @@
-#
-# Copyright (C) 2006-2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=libpam
-PKG_VERSION:=1.1.8
-PKG_RELEASE:=3
-
-PKG_SOURCE:=Linux-PAM-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.linux-pam.org/library/
-PKG_MD5SUM:=35b6091af95981b1b2cd60d813b5e4ee
-PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/Linux-PAM-$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/libpam
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE:=free implementation of the following DCE-RFC from Sunsoft.
-  URL:=http://www.kernel.org/pub/linux/libs/pam
-endef
-
-define Package/libpam/description
-	Linux-PAM is a free implementation of the following DCE-RFC from Sunsoft.
-endef
-
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Configure
-	$(call Build/Configure/Default, \
-		--enable-shared \
-		--enable-static \
-		--enable-pamlocking \
-		--disable-prelude \
-		--disable-lckpwdf \
-		--disable-selinux \
-		--disable-nls \
-		--disable-rpath \
-		--enable-db=no \
-	)
-endef
-
-define Build/InstallDev
-	$(INSTALL_DIR) $(1)/lib
-	$(INSTALL_DIR) $(1)/usr/include
-	$(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/lib/
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
-endef
-
-define Package/libpam/install
-	$(INSTALL_DIR) $(1)/lib $(1)/lib/security $(1)/lib/security/pam_filter
-	$(INSTALL_DIR) $(1)/etc $(1)/etc/pam.d
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(1)/lib/
-	$(CP) $(PKG_INSTALL_DIR)/lib/security/*.so* $(1)/lib/security/
-	$(CP) $(PKG_INSTALL_DIR)/lib/security/pam_filter/* $(1)/lib/security/pam_filter/
-	$(CP) $(PKG_INSTALL_DIR)/etc/* $(1)/etc/
-	$(CP) ./files/* $(1)/etc/
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
-endef
-
-$(eval $(call BuildPackage,libpam))
-

--- a/libs/libpam/files/pam.conf
+++ /dev/null
@@ -1,16 +1,1 @@
-# ---------------------------------------------------------------------------#
-# /etc/pam.conf								     #
-# ---------------------------------------------------------------------------#
-#
-# NOTE
-# ----
-#
-# NOTE: Most program use a file under the /etc/pam.d/ directory to setup their
-# PAM service modules. This file is used only if that directory does not exist.
-# ---------------------------------------------------------------------------#
 
-# Format:
-# serv.	module	   ctrl	      module [path]	...[args..]		     #
-# name	type	   flag							     #
-
-

--- a/libs/libpam/files/pam.d/common-account
+++ /dev/null
@@ -1,21 +1,1 @@
-#
-# /etc/pam.d/common-account - authorization settings common to all services
-#
-# This file is included from other service-specific PAM config files,
-# and should contain a list of the authorization modules that define
-# the central access policy for use on the system.  The default is to
-# only deny service to users whose accounts are expired in /etc/shadow.
-#
 
-# here are the per-package modules (the "Primary" block)
-account	[success=1 new_authtok_reqd=done default=ignore]	pam_unix.so 
-# here's the fallback if no module succeeds
-account	requisite			pam_deny.so
-# prime the stack with a positive return value if there isn't one already;
-# this avoids us returning an error just because nothing sets a success code
-# since the modules above will each just jump around
-account	required			pam_permit.so
-# and here are more per-package modules (the "Additional" block)
-
-# end of pam-auth-update config
-

--- a/libs/libpam/files/pam.d/common-auth
+++ /dev/null
@@ -1,22 +1,1 @@
-#
-# /etc/pam.d/common-auth - authentication settings common to all services
-#
-# This file is included from other service-specific PAM config files,
-# and should contain a list of the authentication modules that define
-# the central authentication scheme for use on the system
-# (e.g., /etc/shadow, LDAP, Kerberos, etc.).  The default is to use the
-# traditional Unix authentication mechanisms.
-#
 
-# here are the per-package modules (the "Primary" block)
-auth	[success=1 default=ignore]	pam_unix.so nullok_secure
-# here's the fallback if no module succeeds
-auth	requisite			pam_deny.so
-# prime the stack with a positive return value if there isn't one already;
-# this avoids us returning an error just because nothing sets a success code
-# since the modules above will each just jump around
-auth	required			pam_permit.so
-# and here are more per-package modules (the "Additional" block)
-
-# end of pam-auth-update config
-

--- a/libs/libpam/files/pam.d/common-password
+++ /dev/null
@@ -1,29 +1,1 @@
-#
-# /etc/pam.d/common-password - password-related modules common to all services
-#
-# This file is included from other service-specific PAM config files,
-# and should contain a list of modules that define the services to be
-# used to change user passwords.  The default is pam_unix.
 
-# Explanation of pam_unix options:
-#
-# The "sha512" option enables salted SHA512 passwords.  Without this option,
-# the default is Unix crypt.  Prior releases used the option "md5".
-#
-# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
-# login.defs.
-#
-# See the pam_unix manpage for other options.
-
-# here are the per-package modules (the "Primary" block)
-password	[success=1 default=ignore]	pam_unix.so obscure sha512
-# here's the fallback if no module succeeds
-password	requisite			pam_deny.so
-# prime the stack with a positive return value if there isn't one already;
-# this avoids us returning an error just because nothing sets a success code
-# since the modules above will each just jump around
-password	required			pam_permit.so
-# and here are more per-package modules (the "Additional" block)
-
-# end of pam-auth-update config
-

--- a/libs/libpam/files/pam.d/common-session
+++ /dev/null
@@ -1,26 +1,1 @@
-#
-# /etc/pam.d/common-session - session-related modules common to all services
-#
-# This file is included from other service-specific PAM config files,
-# and should contain a list of modules that define tasks to be performed
-# at the start and end of sessions of *any* kind (both interactive and
-# non-interactive).
-#
 
-# here are the per-package modules (the "Primary" block)
-session	[default=1]			pam_permit.so
-# here's the fallback if no module succeeds
-session	requisite			pam_deny.so
-# prime the stack with a positive return value if there isn't one already;
-# this avoids us returning an error just because nothing sets a success code
-# since the modules above will each just jump around
-session	required			pam_permit.so
-# The pam_umask module will set the umask according to the system default in
-# /etc/login.defs and user settings, solving the problem of different
-# umask settings with different shells, display managers, remote sessions etc.
-# See "man pam_umask".
-session optional			pam_umask.so
-# and here are more per-package modules (the "Additional" block)
-session	required			pam_unix.so 
-# end of pam-auth-update config
-

--- a/libs/libpam/files/pam.d/common-session-noninteractive
+++ /dev/null
@@ -1,26 +1,1 @@
-#
-# /etc/pam.d/common-session-noninteractive - session-related modules
-# common to all non-interactive services
-#
-# This file is included from other service-specific PAM config files,
-# and should contain a list of modules that define tasks to be performed
-# at the start and end of all non-interactive sessions.
-#
 
-# here are the per-package modules (the "Primary" block)
-session	[default=1]			pam_permit.so
-# here's the fallback if no module succeeds
-session	requisite			pam_deny.so
-# prime the stack with a positive return value if there isn't one already;
-# this avoids us returning an error just because nothing sets a success code
-# since the modules above will each just jump around
-session	required			pam_permit.so
-# The pam_umask module will set the umask according to the system default in
-# /etc/login.defs and user settings, solving the problem of different
-# umask settings with different shells, display managers, remote sessions etc.
-# See "man pam_umask".
-session optional			pam_umask.so
-# and here are more per-package modules (the "Additional" block)
-session	required			pam_unix.so 
-# end of pam-auth-update config
-

--- a/libs/libpam/files/pam.d/other
+++ /dev/null
@@ -1,17 +1,1 @@
-#
-# /etc/pam.d/other - specify the PAM fallback behaviour
-#
-# Note that this file is used for any unspecified service; for example
-#if /etc/pam.d/cron  specifies no session modules but cron calls
-#pam_open_session, the session module out of /etc/pam.d/other is
-#used.  If you really want nothing to happen then use pam_permit.so or
-#pam_deny.so as appropriate.
 
-# We fall back to the system default in /etc/pam.d/common-*
-# 
-
-auth       include      common-auth
-account    include      common-account
-password   include      common-password
-session    include      common-session
-

--- a/libs/libpam/patches/000-OE-libpam-xtests.patch
+++ /dev/null
@@ -1,36 +1,1 @@
-This patch is used to create a new sub package libpam-xtests to do more checks.
 
-Upstream-Status: Pending
-
-Signed-off-by: Kang Kai <kai.kang@windriver.com>
---- a/xtests/Makefile.am
-+++ b/xtests/Makefile.am
-@@ -7,7 +7,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_src
- LDADD = $(top_builddir)/libpam/libpam.la \
- 	$(top_builddir)/libpam_misc/libpam_misc.la
- 
--CLEANFILES = *~ $(XTESTS)
-+CLEANFILES = *~
- 
- EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
- 	tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \
-@@ -51,3 +51,18 @@ EXTRA_PROGRAMS = $(XTESTS)
- 
- xtests: $(XTESTS) run-xtests.sh
- 	"$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS}
-+
-+all: $(XTESTS)
-+
-+install: install_xtests
-+
-+install_xtests:
-+	$(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests
-+	for file in $(EXTRA_DIST) ; do \
-+		$(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \
-+	done
-+	for file in $(XTESTS); do \
-+		$(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \
-+	done
-+
-+.PHONY: all install_xtests
-

--- a/libs/libpam/patches/000-OE-pam-no-innetgr.patch
+++ /dev/null
@@ -1,86 +1,1 @@
-innetgr may not be there so make sure that when innetgr is not present
-then we inform about it and not use it.
 
--Khem
---- a/modules/pam_group/pam_group.c
-+++ b/modules/pam_group/pam_group.c
-@@ -656,7 +656,11 @@ static int check_account(pam_handle_t *p
- 	}
- 	/* If buffer starts with @, we are using netgroups */
- 	if (buffer[0] == '@')
-+#ifdef HAVE_INNETGR
- 	  good &= innetgr (&buffer[1], NULL, user, NULL);
-+#else
-+	pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support");
-+#endif
- 	/* otherwise, if the buffer starts with %, it's a UNIX group */
- 	else if (buffer[0] == '%')
-           good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
---- a/modules/pam_time/pam_time.c
-+++ b/modules/pam_time/pam_time.c
-@@ -555,9 +555,13 @@ check_account(pam_handle_t *pamh, const
- 	  }
- 	  /* If buffer starts with @, we are using netgroups */
- 	  if (buffer[0] == '@')
--	    good &= innetgr (&buffer[1], NULL, user, NULL);
-+#ifdef HAVE_INNETGR
-+	       good &= innetgr (&buffer[1], NULL, user, NULL);
-+#else
-+	       pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support");
-+#endif
- 	  else
--	    good &= logic_field(pamh, user, buffer, count, is_same);
-+	       good &= logic_field(pamh, user, buffer, count, is_same);
- 	  D(("with user: %s", good ? "passes":"fails" ));
- 
- 	  /* here we get the time field */
---- a/modules/pam_succeed_if/pam_succeed_if.c
-+++ b/modules/pam_succeed_if/pam_succeed_if.c
-@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh,
- }
- /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */
- static int
--evaluate_innetgr(const char *host, const char *user, const char *group)
-+evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
- {
-+#ifdef HAVE_INNETGR
- 	if (innetgr(group, host, user, NULL) == 1)
- 		return PAM_SUCCESS;
-+#else
-+        pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
-+#endif
-+
- 	return PAM_AUTH_ERR;
- }
- /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
- static int
--evaluate_notinnetgr(const char *host, const char *user, const char *group)
-+evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
- {
-+#ifdef HAVE_INNETGR
- 	if (innetgr(group, host, user, NULL) == 0)
- 		return PAM_SUCCESS;
-+#else
-+	pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
-+#endif
- 	return PAM_AUTH_ERR;
- }
- 
-@@ -387,14 +396,14 @@ evaluate(pam_handle_t *pamh, int debug,
- 		const void *rhost;
- 		if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
- 			rhost = NULL;
--		return evaluate_innetgr(rhost, user, right);
-+		return evaluate_innetgr(pamh, rhost, user, right);
- 	}
- 	/* (Rhost, user) is not in this group. */
- 	if (strcasecmp(qual, "notinnetgr") == 0) {
- 		const void *rhost;
- 		if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
- 			rhost = NULL;
--		return evaluate_notinnetgr(rhost, user, right);
-+		return evaluate_notinnetgr(pamh, rhost, user, right);
- 	}
- 	/* Fail closed. */
- 	return PAM_SERVICE_ERR;
-

--- a/libs/libpam/patches/001-no_nis.patch
+++ /dev/null
@@ -1,69 +1,1 @@
---- a/modules/pam_access/pam_access.c
-+++ b/modules/pam_access/pam_access.c
-@@ -44,7 +44,7 @@
- #include <arpa/inet.h>
- #include <netdb.h>
- #include <sys/socket.h>
--#ifdef HAVE_RPCSVC_YPCLNT_H
-+#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
- #include <rpcsvc/ypclnt.h>
- #endif
- #ifdef HAVE_LIBAUDIT
---- a/modules/pam_unix/pam_unix_passwd.c
-+++ b/modules/pam_unix/pam_unix_passwd.c
-@@ -79,18 +79,18 @@
- #include "passverify.h"
- #include "bigcrypt.h"
- 
--#if (HAVE_YP_GET_DEFAULT_DOMAIN || HAVE_GETDOMAINNAME) && HAVE_YP_MASTER
-+#if (HAVE_YP_GET_DEFAULT_DOMAIN || HAVE_GETDOMAINNAME) && HAVE_YP_MASTER && USE_NIS
- # define HAVE_NIS
- #endif
- 
- #ifdef HAVE_NIS
- # include <rpc/rpc.h>
- 
--# if HAVE_RPCSVC_YP_PROT_H
-+# if HAVE_RPCSVC_YP_PROT_H && USE_NIS
- #  include <rpcsvc/yp_prot.h>
- # endif
- 
--# if HAVE_RPCSVC_YPCLNT_H
-+# if HAVE_RPCSVC_YPCLNT_H && USE_NIS
- #  include <rpcsvc/ypclnt.h>
- # endif
- 
---- a/modules/pam_unix/support.c
-+++ b/modules/pam_unix/support.c
-@@ -19,7 +19,7 @@
- #include <ctype.h>
- #include <syslog.h>
- #include <sys/resource.h>
--#ifdef HAVE_RPCSVC_YPCLNT_H
-+#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
- #include <rpcsvc/ypclnt.h>
- #endif
- 
-@@ -402,7 +402,7 @@ int _unix_getpwnam(pam_handle_t *pamh, c
- 		}
- 	}
- 
--#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND)
-+#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND) && (USE_NIS)
- 	if (!matched && nis) {
- 		char *userinfo = NULL, *domain = NULL;
- 		int len = 0, i;
---- a/modules/pam_unix/yppasswd_xdr.c
-+++ b/modules/pam_unix/yppasswd_xdr.c
-@@ -15,6 +15,10 @@
- #ifdef HAVE_RPC_RPC_H
- 
- #include <rpc/rpc.h>
-+#ifdef USE_NIS
-+#include <rpcsvc/yp_prot.h>
-+#include <rpcsvc/ypclnt.h>
-+#endif
- #include "yppasswd.h"
- 
- bool_t
 

--- a/libs/libpam/patches/002-no_yywrap.patch
+++ /dev/null
@@ -1,27 +1,1 @@
---- a/conf/pam_conv1/pam_conv_l.c
-+++ b/conf/pam_conv1/pam_conv_l.c
-@@ -534,7 +534,9 @@ void yyset_lineno (int line_number  );
- #ifdef __cplusplus
- extern "C" int yywrap (void );
- #else
--extern int yywrap (void );
-+int yywrap (void ) {
-+	return 1;
-+}
- #endif
- #endif
- 
---- a/doc/specs/parse_l.c
-+++ b/doc/specs/parse_l.c
-@@ -520,7 +520,9 @@ void yyset_lineno (int line_number  );
- #ifdef __cplusplus
- extern "C" int yywrap (void );
- #else
--extern int yywrap (void );
-+int yywrap (void ) {
-+	return 1;
-+}
- #endif
- #endif
- 
 

--- a/libs/libpam/patches/003-no_doc.patch
+++ /dev/null
@@ -1,23 +1,1 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4,7 +4,7 @@
- 
- AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
- 
--SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
-+SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests
- 
- CLEANFILES = *~
- 
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -288,7 +288,7 @@ top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
--SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
-+SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests
- CLEANFILES = *~
- EXTRA_DIST = pgp.keys.asc CHANGELOG ChangeLog-CVS Copyright Make.xml.rules
- ACLOCAL_AMFLAGS = -I m4
 

--- a/libs/libpam/patches/004-fix_lib64.patch
+++ /dev/null
@@ -1,17 +1,1 @@
---- a/configure.in
-+++ b/configure.in
-@@ -28,12 +28,7 @@ dnl If we use /usr as prefix, use /etc f
-         fi
- 	if test ${libdir} = '${exec_prefix}/lib'
- 	then
--		case "`uname -m`" in
--		    x86_64|ppc64|s390x|sparc64)
--			libdir="/lib64" ;;
--		    *)
--			libdir="/lib" ;;
--		esac
-+		libdir="/lib"
- 	fi
- 	if test ${sbindir} = '${exec_prefix}/sbin'
-         then
 

--- a/libs/libpam/patches/005-fix_ruserok.patch
+++ /dev/null
@@ -1,365 +1,1 @@
---- a/modules/pam_rhosts/pam_rhosts.c
-+++ b/modules/pam_rhosts/pam_rhosts.c
-@@ -43,6 +43,361 @@
- #include <security/pam_modutil.h>
- #include <security/pam_ext.h>
- 
-+#ifdef __UCLIBC__
-+
-+#include <stdio.h>
-+#include <sys/stat.h>
-+
-+
-+int  __check_rhosts_file = 1;
-+
-+/* Extremely paranoid file open function. */
-+static FILE *
-+iruserfopen (const char *file, uid_t okuser)
-+{
-+  struct stat st;
-+  char *cp = NULL;
-+  FILE *res = NULL;
-+
-+  /* If not a regular file, if owned by someone other than user or
-+     root, if writeable by anyone but the owner, or if hardlinked
-+     anywhere, quit.  */
-+  if (lstat (file, &st))
-+    cp = "lstat failed";
-+  else if (!S_ISREG (st.st_mode))
-+    cp = "not regular file";
-+  else
-+    {
-+      res = fopen (file, "r");
-+      if (!res)
-+	cp = "cannot open";
-+      else if (fstat (fileno (res), &st) < 0)
-+	cp = "fstat failed";
-+      else if (st.st_uid && st.st_uid != okuser)
-+	cp = "bad owner";
-+      else if (st.st_mode & (S_IWGRP|S_IWOTH))
-+	cp = "writeable by other than owner";
-+      else if (st.st_nlink > 1)
-+	cp = "hard linked somewhere";
-+    }
-+
-+  /* If there were any problems, quit.  */
-+  if (cp != NULL)
-+    {
-+      if (res)
-+	fclose (res);
-+      return NULL;
-+    }
-+
-+  return res;
-+}
-+
-+/*
-+ * Returns 1 for blank lines (or only comment lines) and 0 otherwise
-+ */
-+static int
-+__isempty(char *p)
-+{
-+    while (*p && isspace (*p)) {
-+	++p;
-+    }
-+
-+    return (*p == '\0' || *p == '#') ? 1 : 0 ;
-+}
-+
-+/* Returns 1 on positive match, 0 on no match, -1 on negative match.  */
-+static int
-+__icheckhost (u_int32_t raddr, char *lhost, const char *rhost)
-+{
-+	struct hostent *hp;
-+	u_int32_t laddr;
-+	int negate=1;    /* Multiply return with this to get -1 instead of 1 */
-+	char **pp;
-+
-+#ifdef __UCLIBC_HAS_REENTRANT_RPC__
-+	int save_errno;
-+	size_t buflen;
-+	char *buffer;
-+	struct hostent hostbuf;
-+	int herr;
-+#endif
-+
-+#ifdef HAVE_NETGROUP
-+	/* Check nis netgroup.  */
-+	if (strncmp ("+@", lhost, 2) == 0)
-+		return innetgr (&lhost[2], rhost, NULL, NULL);
-+
-+	if (strncmp ("-@", lhost, 2) == 0)
-+		return -innetgr (&lhost[2], rhost, NULL, NULL);
-+#endif /* HAVE_NETGROUP */
-+
-+	/* -host */
-+	if (strncmp ("-", lhost,1) == 0) {
-+		negate = -1;
-+		lhost++;
-+	} else if (strcmp ("+",lhost) == 0) {
-+		return 1;                    /* asking for trouble, but ok.. */
-+	}
-+
-+	/* Try for raw ip address first. */
-+	if (isdigit (*lhost) && (laddr = inet_addr (lhost)) != INADDR_NONE)
-+		return negate * (! (raddr ^ laddr));
-+
-+	/* Better be a hostname. */
-+#ifdef __UCLIBC_HAS_REENTRANT_RPC__
-+	buflen = 1024;
-+	buffer = malloc(buflen);
-+	save_errno = errno;
-+
-+	while (gethostbyname_r (lhost, &hostbuf, buffer, buflen, &hp, &herr)
-+	       != 0) {
-+	    free(buffer);
-+	    return (0);
-+	}
-+	free(buffer);
-+	__set_errno (save_errno);
-+#else
-+	hp = gethostbyname(lhost);
-+#endif /* __UCLIBC_HAS_REENTRANT_RPC__ */
-+
-+	if (hp == NULL)
-+		return 0;
-+
-+	/* Spin through ip addresses. */
-+	for (pp = hp->h_addr_list; *pp; ++pp)
-+		if (!memcmp (&raddr, *pp, sizeof (u_int32_t)))
-+			return negate;
-+
-+	/* No match. */
-+	return (0);
-+}
-+
-+/* Returns 1 on positive match, 0 on no match, -1 on negative match.  */
-+static int
-+__icheckuser (const char *luser, const char *ruser)
-+{
-+
-+    /*
-+      luser is user entry from .rhosts/hosts.equiv file
-+      ruser is user id on remote host
-+      */
-+
-+#ifdef HAVE_NETGROUP
-+    /* [-+]@netgroup */
-+    if (strncmp ("+@", luser, 2) == 0)
-+	return innetgr (&luser[2], NULL, ruser, NULL);
-+
-+    if (strncmp ("-@", luser,2) == 0)
-+	return -innetgr (&luser[2], NULL, ruser, NULL);
-+#endif /* HAVE_NETGROUP */
-+
-+    /* -user */
-+    if (strncmp ("-", luser, 1) == 0)
-+	return -(strcmp (&luser[1], ruser) == 0);
-+
-+    /* + */
-+    if (strcmp ("+", luser) == 0)
-+	return 1;
-+
-+    /* simple string match */
-+    return strcmp (ruser, luser) == 0;
-+}
-+
-+/*
-+ * Returns 0 if positive match, -1 if _not_ ok.
-+ */
-+static int
-+__ivaliduser2(FILE *hostf, u_int32_t raddr,	const char *luser,
-+			  const char *ruser, const char *rhost)
-+{
-+    register const char *user;
-+    register char *p;
-+    int hcheck, ucheck;
-+    char *buf = NULL;
-+    size_t bufsize = 0;
-+    int retval = -1;
-+
-+    while (getline (&buf, &bufsize, hostf) > 0) {
-+	buf[bufsize - 1] = '\0'; /* Make sure it's terminated.  */
-+        p = buf;
-+
-+	/* Skip empty or comment lines */
-+	if (__isempty (p)) {
-+	    continue;
-+	}
-+
-+	/* Skip lines that are too long. */
-+	if (strchr (p, '\n') == NULL) {
-+	    int ch = getc_unlocked (hostf);
-+
-+	    while (ch != '\n' && ch != EOF)
-+	      ch = getc_unlocked (hostf);
-+	    continue;
-+	}
-+
-+	for (;*p && !isspace(*p); ++p) {
-+	    *p = tolower (*p);
-+	}
-+
-+	/* Next we want to find the permitted name for the remote user.  */
-+	if (*p == ' ' || *p == '\t') {
-+	    /* <nul> terminate hostname and skip spaces */
-+	    for (*p++='\0'; *p && isspace (*p); ++p);
-+
-+	    user = p;                   /* this is the user's name */
-+	    while (*p && !isspace (*p))
-+		++p;                    /* find end of user's name */
-+	} else
-+	    user = p;
-+
-+	*p = '\0';              /* <nul> terminate username (+host?) */
-+
-+	/* buf -> host(?) ; user -> username(?) */
-+
-+	/* First check host part */
-+	hcheck = __icheckhost (raddr, buf, rhost);
-+
-+	if (hcheck < 0)
-+	    break;
-+
-+	if (hcheck) {
-+	    /* Then check user part */
-+	    if (! (*user))
-+		user = luser;
-+
-+	    ucheck = __icheckuser (user, ruser);
-+
-+	    /* Positive 'host user' match? */
-+	    if (ucheck > 0) {
-+		retval = 0;
-+		break;
-+	    }
-+
-+	    /* Negative 'host -user' match? */
-+	    if (ucheck < 0)
-+		break;
-+
-+	    /* Neither, go on looking for match */
-+	}
-+    }
-+
-+    free (buf);
-+
-+    return retval;
-+}
-+
-+static int
-+iruserok2 (u_int32_t raddr, int superuser, const char *ruser, const char *luser,
-+		   const char *rhost)
-+{
-+	FILE *hostf = NULL;
-+	int isbad = -1;
-+
-+	if (!superuser)
-+		hostf = iruserfopen (_PATH_HEQUIV, 0);
-+
-+	if (hostf) {
-+		isbad = __ivaliduser2 (hostf, raddr, luser, ruser, rhost);
-+		fclose (hostf);
-+
-+		if (!isbad)
-+			return 0;
-+	}
-+
-+	if (__check_rhosts_file || superuser) {
-+		char *pbuf;
-+		struct passwd *pwd;
-+		size_t dirlen;
-+		uid_t uid;
-+
-+#ifdef __UCLIBC_HAS_REENTRANT_RPC__
-+		size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
-+		struct passwd pwdbuf;
-+		char *buffer = stack_heap_alloc(buflen);
-+
-+		if (getpwnam_r (luser, &pwdbuf, buffer,
-+			    buflen, &pwd) != 0 || pwd == NULL)
-+		{
-+			stack_heap_free(buffer);
-+			return -1;
-+		}
-+		stack_heap_free(buffer);
-+#else
-+		if ((pwd = getpwnam(luser)) == NULL)
-+			return -1;
-+#endif
-+
-+		dirlen = strlen (pwd->pw_dir);
-+		pbuf = malloc (dirlen + sizeof "/.rhosts");
-+		strcpy (pbuf, pwd->pw_dir);
-+		strcat (pbuf, "/.rhosts");
-+
-+		/* Change effective uid while reading .rhosts.  If root and
-+		   reading an NFS mounted file system, can't read files that
-+		   are protected read/write owner only.  */
-+		uid = geteuid ();
-+		seteuid (pwd->pw_uid);
-+		hostf = iruserfopen (pbuf, pwd->pw_uid);
-+		free(pbuf);
-+
-+		if (hostf != NULL) {
-+			isbad = __ivaliduser2 (hostf, raddr, luser, ruser, rhost);
-+			fclose (hostf);
-+		}
-+
-+		seteuid (uid);
-+		return isbad;
-+	}
-+	return -1;
-+}
-+
-+int ruserok(const char *rhost, int superuser, const char *ruser,
-+			const char *luser)
-+{
-+        struct hostent *hp;
-+	u_int32_t addr;
-+	char **ap;
-+#ifdef __UCLIBC_HAS_REENTRANT_RPC__
-+	size_t buflen;
-+	char *buffer;
-+	int herr;
-+	struct hostent hostbuf;
-+#endif
-+
-+#ifdef __UCLIBC_HAS_REENTRANT_RPC__
-+	buflen = 1024;
-+	buffer = stack_heap_alloc(buflen);
-+
-+	while (gethostbyname_r (rhost, &hostbuf, buffer,
-+		    buflen, &hp, &herr) != 0 || hp == NULL)
-+	{
-+	    if (herr != NETDB_INTERNAL || errno != ERANGE) {
-+		stack_heap_free(buffer);
-+		return -1;
-+	    } else
-+	    {
-+		/* Enlarge the buffer.  */
-+		buflen *= 2;
-+		stack_heap_free(buffer);
-+		buffer = stack_heap_alloc(buflen);
-+	    }
-+	}
-+	stack_heap_free(buffer);
-+#else
-+	if ((hp = gethostbyname(rhost)) == NULL) {
-+		return -1;
-+	}
-+#endif
-+	for (ap = hp->h_addr_list; *ap; ++ap) {
-+		memmove(&addr, *ap, sizeof(addr));
-+		if (iruserok2(addr, superuser, ruser, luser, rhost) == 0)
-+			return 0;
-+	}
-+	return -1;
-+}
-+
-+#endif /* __UCLIBC__ */
-+
- PAM_EXTERN
- int pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc,
- 			 const char **argv)
 

--- a/libs/libpam/patches/006-fix_xdr.patch
+++ /dev/null
@@ -1,272 +1,1 @@
---- a/modules/pam_unix/yppasswd_xdr.c
-+++ b/modules/pam_unix/yppasswd_xdr.c
-@@ -21,6 +21,268 @@
- #endif
- #include "yppasswd.h"
- 
-+#ifdef __UCLIBC__
-+
-+static const char xdr_zero[BYTES_PER_XDR_UNIT] = {0, 0, 0, 0};
-+
-+/*
-+ * XDR integers
-+ */
-+bool_t
-+xdr_int (XDR *xdrs, int *ip)
-+{
-+
-+#if INT_MAX < LONG_MAX
-+  long l;
-+
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_ENCODE:
-+      l = (long) *ip;
-+      return XDR_PUTLONG (xdrs, &l);
-+
-+    case XDR_DECODE:
-+      if (!XDR_GETLONG (xdrs, &l))
-+	{
-+	  return FALSE;
-+	}
-+      *ip = (int) l;
-+    case XDR_FREE:
-+      return TRUE;
-+    }
-+  return FALSE;
-+#elif INT_MAX == LONG_MAX
-+  return xdr_long (xdrs, (long *) ip);
-+#elif INT_MAX == SHRT_MAX
-+  return xdr_short (xdrs, (short *) ip);
-+#else
-+#error unexpected integer sizes in xdr_int()
-+#endif
-+}
-+
-+/*
-+ * XDR null terminated ASCII strings
-+ * xdr_string deals with "C strings" - arrays of bytes that are
-+ * terminated by a NULL character.  The parameter cpp references a
-+ * pointer to storage; If the pointer is null, then the necessary
-+ * storage is allocated.  The last parameter is the max allowed length
-+ * of the string as specified by a protocol.
-+ */
-+bool_t
-+xdr_string (XDR *xdrs, char **cpp, u_int maxsize)
-+{
-+  char *sp = *cpp;	/* sp is the actual string pointer */
-+  u_int size;
-+  u_int nodesize;
-+
-+  /*
-+   * first deal with the length since xdr strings are counted-strings
-+   */
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_FREE:
-+      if (sp == NULL)
-+	{
-+	  return TRUE;		/* already free */
-+	}
-+      /* fall through... */
-+    case XDR_ENCODE:
-+      if (sp == NULL)
-+	return FALSE;
-+      size = strlen (sp);
-+      break;
-+    case XDR_DECODE:
-+      break;
-+    }
-+  if (!xdr_u_int (xdrs, &size))
-+    {
-+      return FALSE;
-+    }
-+  if (size > maxsize)
-+    {
-+      return FALSE;
-+    }
-+  nodesize = size + 1;
-+
-+  /*
-+   * now deal with the actual bytes
-+   */
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_DECODE:
-+      if (nodesize == 0)
-+	{
-+	  return TRUE;
-+	}
-+      if (sp == NULL)
-+	*cpp = sp = (char *) mem_alloc (nodesize);
-+      if (sp == NULL)
-+	{
-+#ifdef USE_IN_LIBIO
-+	  if (_IO_fwide (stderr, 0) > 0)
-+	    (void) fwprintf (stderr, L"%s",
-+			       _("xdr_string: out of memory\n"));
-+	  else
-+#endif
-+	    (void) fputs (_("xdr_string: out of memory\n"), stderr);
-+	  return FALSE;
-+	}
-+      sp[size] = 0;
-+      /* fall into ... */
-+
-+    case XDR_ENCODE:
-+      return xdr_opaque (xdrs, sp, size);
-+
-+    case XDR_FREE:
-+      mem_free (sp, nodesize);
-+      *cpp = NULL;
-+      return TRUE;
-+    }
-+  return FALSE;
-+}
-+
-+/*
-+ * XDR long integers
-+ * The definition of xdr_long() is kept for backward
-+ * compatibility. Instead xdr_int() should be used.
-+ */
-+bool_t
-+xdr_long (XDR *xdrs, long *lp)
-+{
-+  if (xdrs->x_op == XDR_ENCODE
-+      && (sizeof (int32_t) == sizeof (long)
-+	  || (int32_t) *lp == *lp))
-+    return XDR_PUTLONG (xdrs, lp);
-+
-+  if (xdrs->x_op == XDR_DECODE)
-+    return XDR_GETLONG (xdrs, lp);
-+
-+  if (xdrs->x_op == XDR_FREE)
-+    return TRUE;
-+
-+  return FALSE;
-+}
-+
-+/*
-+ * XDR unsigned integers
-+ */
-+bool_t
-+xdr_u_int (XDR *xdrs, u_int *up)
-+{
-+#if UINT_MAX < ULONG_MAX
-+  u_long l;
-+
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_ENCODE:
-+      l = (u_long) * up;
-+      return XDR_PUTLONG (xdrs, (long *) &l);
-+
-+    case XDR_DECODE:
-+      if (!XDR_GETLONG (xdrs, (long *) &l))
-+	{
-+	  return FALSE;
-+	}
-+      *up = (u_int) l;
-+    case XDR_FREE:
-+      return TRUE;
-+    }
-+  return FALSE;
-+#elif UINT_MAX == ULONG_MAX
-+  return xdr_u_long (xdrs, (u_long *) up);
-+#elif UINT_MAX == USHRT_MAX
-+  return xdr_short (xdrs, (short *) up);
-+#else
-+#error unexpected integer sizes in xdr_u_int()
-+#endif
-+}
-+
-+/*
-+ * XDR opaque data
-+ * Allows the specification of a fixed size sequence of opaque bytes.
-+ * cp points to the opaque object and cnt gives the byte length.
-+ */
-+bool_t
-+xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
-+{
-+  u_int rndup;
-+  static char crud[BYTES_PER_XDR_UNIT];
-+
-+  /*
-+   * if no data we are done
-+   */
-+  if (cnt == 0)
-+    return TRUE;
-+
-+  /*
-+   * round byte count to full xdr units
-+   */
-+  rndup = cnt % BYTES_PER_XDR_UNIT;
-+  if (rndup > 0)
-+    rndup = BYTES_PER_XDR_UNIT - rndup;
-+
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_DECODE:
-+      if (!XDR_GETBYTES (xdrs, cp, cnt))
-+	{
-+	  return FALSE;
-+	}
-+      if (rndup == 0)
-+	return TRUE;
-+      return XDR_GETBYTES (xdrs, (caddr_t)crud, rndup);
-+
-+    case XDR_ENCODE:
-+      if (!XDR_PUTBYTES (xdrs, cp, cnt))
-+	{
-+	  return FALSE;
-+	}
-+      if (rndup == 0)
-+	return TRUE;
-+      return XDR_PUTBYTES (xdrs, xdr_zero, rndup);
-+
-+    case XDR_FREE:
-+      return TRUE;
-+    }
-+  return FALSE;
-+}
-+
-+/*
-+ * XDR unsigned long integers
-+ * The definition of xdr_u_long() is kept for backward
-+ * compatibility. Instead xdr_u_int() should be used.
-+ */
-+bool_t
-+xdr_u_long (XDR *xdrs, u_long *ulp)
-+{
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_DECODE:
-+      {
-+	long int tmp;
-+
-+	if (XDR_GETLONG (xdrs, &tmp) == FALSE)
-+	  return FALSE;
-+
-+	*ulp = (uint32_t) tmp;
-+	return TRUE;
-+      }
-+
-+    case XDR_ENCODE:
-+      if (sizeof (uint32_t) != sizeof (u_long)
-+	  && (uint32_t) *ulp != *ulp)
-+	return FALSE;
-+
-+      return XDR_PUTLONG (xdrs, (long *) ulp);
-+
-+    case XDR_FREE:
-+      return TRUE;
-+    }
-+  return FALSE;
-+}
-+
-+#endif /* UCLIBC */
-+
- bool_t
- xdr_xpasswd(XDR * xdrs, xpasswd * objp)
- {
 

--- a/libs/libsndfile/Makefile
+++ /dev/null
@@ -1,65 +1,1 @@
-#
-# Copyright (C) 2007-2010 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=libsndfile
-PKG_VERSION:=1.0.25
-PKG_RELEASE:=2
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.mega-nerd.com/libsndfile/files/
-PKG_MD5SUM:=e2b7bb637e01022c7d20f95f9c3990a2
-
-PKG_LICENSE:=LGPLv2.1
-PKG_LICENSE_FILES:=COPYING
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/libsndfile
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE:=Library for reading/writing audio files
-  URL:=http://www.mega-nerd.com/libsndfile/
-  DEPENDS:=@!avr32
-endef
-
-define Package/libsndfile/description
- libsndfile is a library of C routines for reading and writing files
- containing sampled audio data.
-endef
-
-CONFIGURE_ARGS+= \
-	--disable-alsa \
-	--disable-external-libs \
-	--disable-sqlite
-
-CONFIGURE_VARS += \
-	ac_cv_sys_file_offset_bits=64 \
-	ac_cv_sys_large_files=yes \
-	ac_cv_sys_largefile_CFLAGS=-D_LARGFILE_SOURCE \
-	ac_cv_sys_largefile_LDFLAGS= \
-	ac_cv_sys_largefile_LIBS= \
-	ac_cv_sys_largefile_source=yes
-
-TARGET_CFLAGS += $(FPIC)
-
-define Build/InstallDev
-	$(INSTALL_DIR) $(1)
-	$(CP) $(PKG_INSTALL_DIR)/* $(1)/
-endef
-
-define Package/libsndfile/install
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsndfile.so.* $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,libsndfile))
-

--- a/libs/libsndfile/patches/001-automake-compat.patch
+++ /dev/null
@@ -1,11 +1,1 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,5 +1,7 @@
- ## Process this file with automake to produce Makefile.in
- 
-+ACLOCAL_AMFLAGS = -I M4
-+
- DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
- 
- if BUILD_OCTAVE_MOD
 

file:a/libs/liburcu/Makefile (deleted)
--- a/libs/liburcu/Makefile
+++ /dev/null
@@ -1,50 +1,1 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=liburcu
-PKG_VERSION:=0.7.6
-PKG_RELEASE:=1
-
-PKG_SOURCE:=userspace-rcu-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://lttng.org/files/urcu/
-PKG_MD5SUM:=4c1ecb4bdcd43e36dfdffdd297023c8b
-PKG_BUILD_DIR:=$(BUILD_DIR)/userspace-rcu-$(PKG_VERSION)
-
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-PKG_USE_MIPS16:=0
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/liburcu
-  SECTION:=libs
-  CATEGORY:=Libraries
-  DEPENDS:=+libpthread
-  TITLE:=User-space Read-Copy-Update library
-  URL:=https://lttng.org/
-endef
-
-define Package/liburcu/description
-   Userspace Read-Copy-Update library.
-endef
-
-define Build/InstallDev
-	$(INSTALL_DIR) $(1)/usr/include
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/urcu* $(1)/usr/include/
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/liburcu*.{a,so*} $(1)/usr/lib/
-endef
-
-define Package/liburcu/install
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/liburcu*.so.* $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,liburcu))
-

file:a/libs/protobuf/Makefile (deleted)
--- a/libs/protobuf/Makefile
+++ /dev/null
@@ -1,75 +1,1 @@
-#
-# Copyright (C) 2007 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=protobuf
-PKG_VERSION:=2.4.1
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://protobuf.googlecode.com/files
-PKG_MD5SUM:=ed436802019c9e1f40cc750eaf78f318
-
-PKG_BUILD_DEPENDS:=protobuf/host
-
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/host-build.mk
-
-define Package/protobuf
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE:=A structured data encoding library
-  URL:=http://code.google.com/p/protobuf/
-  DEPENDS:=+zlib +libpthread +libstdcpp
-  MAINTAINER:=Obinou <obconseil@gmail.com>
-endef
-
-define Package/protobuf/description
- Protocol Buffers are a way of encoding structured data in an efficient
- yet extensible format. Google uses Protocol Buffers for almost all
- of its internal RPC protocols and file formats.
-endef
-
-CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOST)/bin/protoc
-
-define Build/InstallDev
-	$(INSTALL_DIR) \
-		$(1)/usr/lib \
-		$(1)/usr/include
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/include/* \
-		$(1)/usr/include/
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/* \
-		$(1)/usr/lib/
-endef
-
-define Package/protobuf/install
-	$(INSTALL_DIR) \
-		$(1)/usr/lib
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/libprotoc.so*  \
-		$(1)/usr/lib/
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
-		$(1)/usr/lib/
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
-		$(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,protobuf))
-$(eval $(call HostBuild))
-

file:a/mail/dovecot/Makefile (deleted)
--- a/mail/dovecot/Makefile
+++ /dev/null
@@ -1,77 +1,1 @@
-#
-# Copyright (C) 2006-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=dovecot
-PKG_VERSION:=2.2.13
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2
-PKG_MD5SUM:=a3eb1c0b1822c4f2b0fe9247776baa71
-
-PKG_BUILD_DEPENDS:=libiconv
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/dovecot
-  SECTION:=mail
-  CATEGORY:=Mail
-  DEPENDS:=+libopenssl +librt +zlib +libbz2 +libcap
-  TITLE:=An IMAP and POP3 daemon
-  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
-  URL:=http://www.dovecot.org/
-endef
-
-define Package/dovecot/description
- Dovecot is a program which provides POP3 and IMAP services.
-endef
-
-CONFIGURE_ARGS += \
-	--without-gssapi \
-	--without-pam \
-	--with-moduledir=/usr/lib/dovecot/modules \
-	--with-notify=dnotify \
-	--without-lzma \
-	--without-lz4
-
-CONFIGURE_VARS += \
-	RPCGEN= \
-	i_cv_signed_size_t=no \
-	i_cv_signed_time_t=no \
-	i_cv_gmtime_max_time_t=32 \
-	i_cv_mmap_plays_with_write=yes \
-	i_cv_fd_passing=yes \
-	i_cv_c99_vsnprintf=yes \
-	lib_cv_va_copy=yes \
-	lib_cv_va_copy=yes \
-	lib_cv___va_copy=yes \
-	lib_cv_va_val_copy=yes
-
-define Package/dovecot/install
-	$(INSTALL_DIR)  $(1)/etc/init.d \
-			$(1)/etc/dovecot \
-			$(1)/usr/share/doc/dovecot/example-config \
-			$(1)/usr/lib/dovecot \
-			$(1)/usr/bin \
-			$(1)/usr/sbin
-	$(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
-	$(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/example-config
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
-	$(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
-	rm  $(1)/usr/lib/dovecot/dovecot-config
-	find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
-endef
-
-$(eval $(call BuildPackage,dovecot))
-

--- a/mail/dovecot/files/dovecot.init
+++ /dev/null
@@ -1,19 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2013 OpenWrt.org
 
-START=75
-STOP=75
-
-USE_PROCD=1
-
-start_service() {
-	user_exists dovecot 59 || user_add dovecot 59
-	group_exists dovecot 59 || group_add dovecot 59
-	mkdir -p -m 0755 /var/lib/dovecot
-	mkdir -p -m 0755 /var/run/dovecot
-	chmod 0750 /var/lib/dovecot
-	procd_open_instance
-	procd_set_param command /usr/sbin/dovecot -F
-	procd_close_instance
-}
-

--- a/mail/dovecot/patches/001-configure_in.patch
+++ /dev/null
@@ -1,32 +1,1 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -504,9 +504,9 @@ have_ioloop=no
- 
- if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
-   AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
--    AC_TRY_RUN([
-+    AC_TRY_LINK([
-       #include <sys/epoll.h>
--  
-+    ], [
-       int main()
-       {
- 	return epoll_create(5) < 1;
-@@ -675,7 +675,7 @@ fi
- dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
- dnl * It may also be broken in AIX.
- AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
--  AC_TRY_RUN([
-+  AC_TRY_LINK([
-     #define _XOPEN_SOURCE 600
-     #include <stdio.h>
-     #include <stdlib.h>
-@@ -684,6 +684,7 @@ AC_CACHE_CHECK([whether posix_fallocate(
-     #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
-       possibly broken posix_fallocate
-     #endif
-+  ], [
-     int main() {
-       int fd = creat("conftest.temp", 0600);
-       int ret;
 

--- a/multimedia/crtmpserver/Makefile
+++ /dev/null
@@ -1,86 +1,1 @@
-#
-# Copyright (C) 2010-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=crtmpserver
-PKG_REV:=726
-PKG_VERSION:=r$(PKG_REV)
-PKG_RELEASE:=2
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=--username=anonymous --password= https://svn.rtmpd.com/crtmpserver/trunk
-PKG_SOURCE_SUBDIR:=crtmpserver-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_PROTO:=svn
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/crtmpserver
-  SECTION:=multimedia
-  CATEGORY:=Multimedia
-  DEPENDS:=+libopenssl +libstdcpp +liblua
-  TITLE:=C++ RTMP Server
-  URL:=http://www.rtmpd.com/
-endef
-
-define Package/crtmpserver/description
-C++ RTMP Server it is a high performance streaming server able to
-stream (live or recorded) in the following technologies:
- * To and from Flash (RTMP,RTMPE, RTMPS, RTMPT, RTMPTE)
- * To and from embedded devices: iPhone, Android
- * From surveillance cameras
- * IP-TV using MPEG-TS and RTSP/RTCP/RTP protocols
-
-Also, crtmpserver can be used as a high performance rendes-vous
-server. For example, it enables you to do:
- * Audio/Video conferencing
- * Online gaming
- * Online collaboration
- * Simple/complex chat applications
-endef
-
-# XXX: this hack handles the usr/bin vs bin difference of backfire and trunk
-TS_BASE:=$(wildcard $(TOOLCHAIN_DIR)/bin/$(TARGET_CC))
-TS_BASE:=$(dir $(if $(TS_BASE),$(TS_BASE),$(wildcard $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CC))))
-
-define Build/Configure
-	(cd $(PKG_BUILD_DIR)/builders/make; \
-		cp linux.mk linux-openwrt-uclibc.mk; \
-		$(SED) 's,^TOOLCHAIN_BASE[[:space:]]*=.*,TOOLCHAIN_BASE=$(TS_BASE),' \
-			-e 's,^TOOLCHAIN_PREFIX[[:space:]]*=.*,TOOLCHAIN_PREFIX=$(TARGET_CROSS),' \
-			-e 's,^CCOMPILER[[:space:]]*=.*,CCOMPILER=$(TARGET_CC),' \
-			-e 's,^CXXCOMPILER[[:space:]]*=.*,CXXCOMPILER=$(TARGET_CXX),' \
-			-e 's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \
-			-e 's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \
-			linux-openwrt-uclibc.mk)
-endef
-
-define Build/Compile
-	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/builders/make \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		PLATFORM=linux-openwrt-uclibc
-endef
-
-define Package/crtmpserver/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver $(1)/usr/bin/
-	$(INSTALL_DIR) $(1)/usr/lib/crtmpserver
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/
-	$(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \
-		$(INSTALL_DIR) $(1)/usr/lib/crtmpserver/$(app); \
-		$(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \
-			$(1)/usr/lib/crtmpserver/$(app)/; \
-	)
-	$(INSTALL_DIR) $(1)/etc
-	$(INSTALL_DATA) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver.lua $(1)/etc/
-	$(INSTALL_DIR) $(1)/usr/share/crtmpserver/appselector
-	$(INSTALL_DIR) $(1)/usr/share/crtmpserver/media
-endef
-
-$(eval $(call BuildPackage,crtmpserver))
-

--- a/multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch
+++ /dev/null
@@ -1,12 +1,1 @@
---- a/builders/make/compile.mk
-+++ b/builders/make/compile.mk
-@@ -67,7 +67,7 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
- 
- #common
- COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include
--COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml
-+COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml -lcrypt
- COMMON_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/common/src -type f -name "*.cpp")
- COMMON_OBJS = $(COMMON_SRCS:.cpp=.common.o)
- 
 

--- a/multimedia/crtmpserver/patches/020-add-rpath.patch
+++ /dev/null
@@ -1,14 +1,1 @@
---- a/builders/make/linux.mk
-+++ b/builders/make/linux.mk
-@@ -31,8 +31,8 @@ OPTIMIZATIONS = -O3
- COMPILE_FLAGS = $(FPIC) $(OPTIMIZATIONS) $(CFLAGS)
- 
- #linking flags
--dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,"\$$ORIGIN"
--dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,"\$$ORIGIN"
-+dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,/usr/lib/crtmpserver
-+dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,/usr/lib/crtmpserver
- 
- #compile switches
- PLATFORM_DEFINES = \
 

--- a/multimedia/crtmpserver/patches/030-default-config.patch
+++ /dev/null
@@ -1,52 +1,1 @@
---- a/builders/cmake/crtmpserver/crtmpserver.lua
-+++ b/builders/cmake/crtmpserver/crtmpserver.lua
-@@ -44,7 +44,7 @@ configuration=
- 	{
- 		-- this is the root directory of all applications
- 		-- usually this is relative to the binary execuable
--		rootDirectory="applications",
-+		rootDirectory="/usr/lib/crtmpserver",
- 		
- 		
- 		--this is where the applications array starts
-@@ -68,7 +68,7 @@ configuration=
- 			-- this is the folder from where the current application gets it's content.
- 			-- It is optional. If not specified, it will be defaulted to:
- 			-- <rootDirectory>/<name>/mediaFolder
--			-- mediaFolder="/some/directory/where/media/files/are/stored"
-+			mediaFolder="/usr/share/crtmpserver/appselector",
- 			-- the application will also be known by that names. It is optional
- 			--aliases=
- 			--{
-@@ -89,13 +89,6 @@ configuration=
- 				},
- 				{
- 					ip="0.0.0.0",
--					port=8081,
--					protocol="inboundRtmps",
--					sslKey="server.key",
--					sslCert="server.crt"
--				},
--				{
--					ip="0.0.0.0",
- 					port=8080,
- 					protocol="inboundRtmpt"
-                 },
-@@ -105,7 +98,7 @@ configuration=
- 			description="FLV Playback Sample",
- 			name="flvplayback",
- 			protocol="dynamiclinklibrary",
--			mediaFolder="/Volumes/android/backup/media/",
-+			mediaFolder="/media/",
- 			aliases=
- 			{
- 				"simpleLive",
-@@ -183,6 +176,7 @@ configuration=
- 			name="samplefactory",
- 			description="asdsadasdsa",
- 			protocol="dynamiclinklibrary",
-+			mediaFolder="/usr/share/ctmpserver/media",
- 			aliases=
- 			{
- 				"httpOutboundTest"
 

--- a/multimedia/crtmpserver/patches/040-use-select.patch
+++ /dev/null
@@ -1,12 +1,1 @@
---- a/builders/make/linux.mk
-+++ b/builders/make/linux.mk
-@@ -38,7 +38,7 @@ dynamic_exec_flags = $(FPIC) $(OPTIMIZAT
- PLATFORM_DEFINES = \
- 	-DLINUX \
- 	-DLITTLE_ENDIAN_BYTE_ALIGNED \
--	-DNET_EPOLL
-+	-DNET_SELECT
- 
- SSL_BASE=/usr/local
- 
 

--- a/multimedia/crtmpserver/patches/050-add-missing-make-defines.patch
+++ /dev/null
@@ -1,21 +1,1 @@
---- a/builders/make/compile.mk
-+++ b/builders/make/compile.mk
-@@ -43,10 +43,16 @@ FEATURES_DEFINES = \
- 	-DHAS_PROTOCOL_RTP \
- 	-DHAS_PROTOCOL_TS \
- 	-DHAS_PROTOCOL_VAR \
-+	-DHAS_PROTOCOL_CLI \
-+	-DHAS_PROTOCOL_HLS \
-+	-DHAS_PROTOCOL_RAWHTTPSTREAM \
- 	-DHAS_LUA \
- 	-DHAS_MEDIA_MP3 \
- 	-DHAS_MEDIA_MP4 \
--	-DHAS_MEDIA_FLV
-+	-DHAS_MEDIA_FLV \
-+	-DHAS_MEDIA_NSV \
-+	-DHAS_SYSLOG
-+	
- 
- 
- DEFINES = $(PLATFORM_DEFINES) $(FEATURES_DEFINES)
 

--- a/multimedia/crtmpserver/patches/060-add-dl-for-crypto.patch
+++ /dev/null
@@ -1,12 +1,1 @@
---- a/builders/make/compile.mk
-+++ b/builders/make/compile.mk
-@@ -59,7 +59,7 @@ DEFINES = $(PLATFORM_DEFINES) $(FEATURES
- 
- #library paths
- SSL_INCLUDE=-I$(SSL_BASE)/include
--SSL_LIB=-L$(SSL_BASE)/lib -lssl -lcrypto
-+SSL_LIB=-L$(SSL_BASE)/lib -lssl -lcrypto -ldl
- 
- #lua
- LUA_INCLUDE=-I$(PROJECT_BASE_PATH)/3rdparty/lua-dev
 

--- a/multimedia/crtmpserver/patches/070-sysconf_unistd.patch
+++ /dev/null
@@ -1,11 +1,1 @@
---- a/sources/common/include/platform/linux/linuxplatform.h
-+++ b/sources/common/include/platform/linux/linuxplatform.h
-@@ -59,6 +59,7 @@
- #include <sys/socket.h>
- #include <string.h>
- #include <stdarg.h>
-+#include <unistd.h>
- using namespace std;
- 
- 
 

file:a/net/ctorrent/Makefile (deleted)
--- a/net/ctorrent/Makefile
+++ /dev/null
@@ -1,85 +1,1 @@
-#
-# Copyright (C) 2006-2008 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=ctorrent
-PKG_VERSION:=dnh3.3.2
-PKG_RELEASE:=6
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/dtorrent \
-	http://www.rahul.net/dholmes/ctorrent/
-PKG_MD5SUM:=59b23dd05ff70791cd6449effa7fc3b6
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/uclibc++.mk
-include $(INCLUDE_DIR)/package.mk
-
-define Package/ctorrent/Default
-  SUBMENU:=BitTorrent
-  SECTION:=net
-  CATEGORY:=Network
-  DEPENDS:=$(CXX_DEPENDS)
-  TITLE:=console-based BitTorrent client
-  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
-  URL:=http://www.rahul.net/dholmes/ctorrent/
-endef
-
-define Package/ctorrent/Default/description
-	CTorrent is a BitTorrent client written in the C programming language,
-	known to be a very robust and mature programming language, which produces
-	fast and optimized application.
-endef
-
-define Package/ctorrent
-$(call Package/ctorrent/Default)
-  TITLE+= (with OpenSSL support)
-  DEPENDS+=+libopenssl
-  VARIANT:=ssl
-endef
-
-define Package/ctorrent/description
-$(call Package/ctorrent/Default/description)
- This package is built with OpenSSL support.
-endef
-
-define Package/ctorrent-nossl
-$(call Package/ctorrent/Default)
-  TITLE+= (with builtin SHA-1)
-  VARIANT:=nossl
-endef
-
-define Package/ctorrent-nossl/description
-$(call Package/ctorrent/Default/description)
- This package is built with builtin (Steve Reid's public-domain) SHA-1 support
-endef
-
-CONFIGURE_VARS += \
-	CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
-
-ifeq ($(BUILD_VARIANT),ssl)
-	CONFIGURE_ARGS += \
-		--with-ssl="$(STAGING_DIR)/usr"
-endif
-
-ifeq ($(BUILD_VARIANT),nossl)
-	CONFIGURE_ARGS += \
-		--with-ssl=no
-endif
-
-define Package/ctorrent/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME)
-endef
-
-Package/ctorrent-nossl/install = $(Package/ctorrent/install)
-
-$(eval $(call BuildPackage,ctorrent))
-$(eval $(call BuildPackage,ctorrent-nossl))
-

--- a/net/ctorrent/patches/100-CVE-2009-1759.patch
+++ /dev/null
@@ -1,365 +1,1 @@
-Patch for CVE-2009-1759.
-Source: Upstream SVN, rev 302 from the dtorrent-3 branch.
 
-Index: a/bencode.h
-===================================================================
---- a/bencode.h	(revision 300)
-+++ b/bencode.h	(revision 302)
-@@ -25,7 +25,7 @@
- size_t decode_list(const char *b,size_t len,const char *keylist);
- size_t decode_rev(const char *b,size_t len,const char *keylist);
- size_t decode_query(const char *b,size_t len,const char *keylist,const char **ps,size_t *pi,int64_t *pl,int method);
--size_t decode_list2path(const char *b, size_t n, char *pathname);
-+size_t decode_list2path(const char *b, size_t n, char *pathname, size_t maxlen);
- size_t bencode_buf(const char *str,size_t len,FILE *fp);
- size_t bencode_str(const char *str, FILE *fp);
- size_t bencode_int(const uint64_t integer, FILE *fp);
-Index: a/bencode.cpp
-===================================================================
---- a/bencode.cpp	(revision 300)
-+++ b/bencode.cpp	(revision 302)
-@@ -233,22 +233,28 @@
-   return bencode_end_dict_list(fp);
- }
- 
--size_t decode_list2path(const char *b, size_t n, char *pathname)
-+size_t decode_list2path(const char *b, size_t n, char *pathname, size_t maxlen)
- {
-   const char *pb = b;
-   const char *s = (char *) 0;
-+  const char *endmax = pathname + maxlen - 1;
-   size_t r,q;
- 
-   if( 'l' != *pb ) return 0;
-   pb++;
-   n--;
-   if( !n ) return 0;
--  for(; n;){
-+  while( n && pathname < endmax ){
-     if(!(r = buf_str(pb, n, &s, &q)) ) return 0;
-+    if( q >= maxlen ) return 0;
-     memcpy(pathname, s, q);
-     pathname += q;
--    pb += r; n -= r; 
--    if( 'e' != *pb ){*pathname = PATH_SP, pathname++;} else break;
-+    maxlen -= q;
-+    pb += r;
-+    n -= r; 
-+    if( 'e' == *pb ) break;
-+    if( pathname >= endmax ) return 0;
-+    *pathname++ = PATH_SP;
-   }
-   *pathname = '\0';
-   return (pb - b + 1);
-Index: a/btfiles.cpp
-===================================================================
---- a/btfiles.cpp	(revision 300)
-+++ b/btfiles.cpp	(revision 302)
-@@ -449,7 +449,8 @@
-   return 0;
- }
- 
--int btFiles::BuildFromMI(const char *metabuf, const size_t metabuf_len, const char *saveas)
-+int btFiles::BuildFromMI(const char *metabuf, const size_t metabuf_len,
-+  const char *saveas, unsigned char exam_only)
- {
-   char path[MAXPATHLEN];
-   const char *s, *p;
-@@ -458,11 +459,19 @@
-   int f_warned = 0;
- 
-   if( !decode_query(metabuf, metabuf_len, "info|name", &s, &q, (int64_t*)0,
--      QUERY_STR) || MAXPATHLEN <= q )
-+        QUERY_STR) || MAXPATHLEN <= q ){
-+    errno = EINVAL;
-     return -1;
-+  }
- 
-   memcpy(path, s, q);
-   path[q] = '\0';
-+  if( !exam_only &&
-+      (PATH_SP == path[0] || '/' == path[0] || 0==strncmp("..", path, 2)) ){
-+    CONSOLE.Warning(1, "error, unsafe path \"%s\" in torrent data", path);
-+    errno = EINVAL;
-+    return -1;
-+  }
- 
-   r = decode_query(metabuf, metabuf_len, "info|files", (const char**)0, &q,
-                    (int64_t*)0, QUERY_POS);
-@@ -471,21 +480,31 @@
-     BTFILE *pbf_last = (BTFILE*) 0; 
-     BTFILE *pbf = (BTFILE*) 0;
-     size_t dl;
-+    unsigned long nfiles = 0;
-+
-     if( decode_query(metabuf,metabuf_len,"info|length",
--                    (const char**) 0,(size_t*) 0,(int64_t*) 0,QUERY_LONG) )
-+                    (const char**) 0,(size_t*) 0,(int64_t*) 0,QUERY_LONG) ){
-+      errno = EINVAL;
-       return -1;
-+    }
- 
-     if( saveas ){
-       m_directory = new char[strlen(saveas) + 1];
- #ifndef WINDOWS
--      if(!m_directory) return -1;
-+      if( !m_directory ){
-+        errno = ENOMEM;
-+        return -1;
-+      }
- #endif
-       strcpy(m_directory,saveas);
-     }else{
-       int f_conv;
-       char *tmpfn = new char[strlen(path)*2+5];
- #ifndef WINDOWS
--      if( !tmpfn ) return -1;
-+      if( !tmpfn ){
-+        errno = ENOMEM;
-+        return -1;
-+      }
- #endif
-       if( f_conv = ConvertFilename(tmpfn, path, strlen(path)*2+5) ){
-         if( arg_flg_convert_filenames ){
-@@ -493,6 +512,7 @@
- #ifndef WINDOWS
-           if( !m_directory ){
-             delete []tmpfn;
-+            errno = ENOMEM;
-             return -1;
-           }
- #endif
-@@ -507,7 +527,10 @@
-       if( !f_conv || !arg_flg_convert_filenames ){
-         m_directory = new char[strlen(path) + 1];
- #ifndef WINDOWS
--        if( !m_directory ) return -1;
-+        if( !m_directory ){
-+          errno = ENOMEM;
-+          return -1;
-+        }
- #endif
-         strcpy(m_directory,path);
-       }
-@@ -517,24 +540,50 @@
-     p = metabuf + r + 1; 
-     q--;
-     for(; q && 'e' != *p; p += dl, q -= dl){
--      if(!(dl = decode_dict(p, q, (const char*) 0)) ) return -1;
--      if( !decode_query(p, dl, "length", (const char**) 0,
--                       (size_t*) 0,&t,QUERY_LONG) ) return -1;
-+      if( !(dl = decode_dict(p, q, (const char*) 0)) ||
-+          !decode_query(p, dl, "length", (const char**) 0, (size_t*) 0, &t,
-+                        QUERY_LONG) ){
-+        errno = EINVAL;
-+        return -1;
-+      }
-       pbf = _new_bfnode();
- #ifndef WINDOWS
--      if( !pbf ) return -1;
-+      if( !pbf ){
-+        errno = ENOMEM;
-+        return -1;
-+      }
- #endif
-+      nfiles++;
-       pbf->bf_length = t;
-       m_total_files_length += t;
-       r = decode_query(p, dl, "path", (const char **)0, &n, (int64_t*)0,
-                        QUERY_POS);
--      if( !r ) return -1;
--      if(!decode_list2path(p + r, n, path)) return -1;
-+      if( !r || !decode_list2path(p + r, n, path, sizeof(path)) ){
-+        CONSOLE.Warning(1,
-+          "error, invalid path in torrent data for file %lu at offset %llu",
-+          nfiles, m_total_files_length - t);
-+        delete pbf;
-+        errno = EINVAL;
-+        return -1;
-+      }
-+      if( !exam_only &&
-+          (PATH_SP == path[0] || '/' == path[0] || 0==strncmp("..", path, 2)) ){
-+        CONSOLE.Warning(1,
-+          "error, unsafe path \"%s\" in torrent data for file %lu",
-+          path, nfiles);
-+        delete pbf;
-+        errno = EINVAL;
-+        return -1;
-+      }
- 
-+
-       int f_conv;
-       char *tmpfn = new char[strlen(path)*2+5];
- #ifndef WINDOWS
--      if( !tmpfn ) return -1;
-+      if( !tmpfn ){
-+        errno = ENOMEM;
-+        return -1;
-+      }
- #endif
-       if( f_conv = ConvertFilename(tmpfn, path, strlen(path)*2+5) ){
-         if( arg_flg_convert_filenames ){
-@@ -542,6 +591,7 @@
- #ifndef WINDOWS
-           if( !pbf->bf_filename ){
-             delete []tmpfn;
-+            errno = ENOMEM;
-             return -1;
-           }
- #endif
-@@ -556,7 +606,10 @@
-       if( !f_conv || !arg_flg_convert_filenames ){
-         pbf->bf_filename = new char[strlen(path) + 1];
- #ifndef WINDOWS
--        if( !pbf->bf_filename ) return -1;
-+        if( !pbf->bf_filename ){
-+          errno = ENOMEM;
-+          return -1;
-+        }
- #endif
-         strcpy(pbf->bf_filename, path);
-       }
-@@ -564,30 +617,42 @@
-       pbf_last = pbf;
-     }
-   }else{
--    if( !decode_query(metabuf,metabuf_len,"info|length",
--                     (const char**) 0,(size_t*) 0,&t,QUERY_LONG) )
-+    if( !decode_query(metabuf,metabuf_len, "info|length",
-+                      (const char**)0, (size_t*) 0, &t, QUERY_LONG) ){
-+      errno = EINVAL;
-       return -1;
-+    }
-     m_btfhead = _new_bfnode();
- #ifndef WINDOWS
--    if( !m_btfhead) return -1;
-+    if( !m_btfhead ){
-+      errno = ENOMEM;
-+      return -1;
-+    }
- #endif
-     m_btfhead->bf_length = m_total_files_length = t;
-     if( saveas ){
-       m_btfhead->bf_filename = new char[strlen(saveas) + 1];
- #ifndef WINDOWS
--      if(!m_btfhead->bf_filename ) return -1;
-+      if( !m_btfhead->bf_filename ){
-+        errno = ENOMEM;
-+        return -1;
-+      }
- #endif
-       strcpy(m_btfhead->bf_filename, saveas);
-     }else if( arg_flg_convert_filenames ){
-       char *tmpfn = new char[strlen(path)*2+5];
- #ifndef WINDOWS
--      if( !tmpfn ) return -1;
-+      if( !tmpfn ){
-+        errno = ENOMEM;
-+        return -1;
-+      }
- #endif
-       ConvertFilename(tmpfn, path, strlen(path)*2+5);
-       m_btfhead->bf_filename = new char[strlen(tmpfn) + 1];
- #ifndef WINDOWS
-       if( !m_btfhead->bf_filename ){
-         delete []tmpfn;
-+        errno = ENOMEM;
-         return -1;
-       }
- #endif
-@@ -596,7 +661,10 @@
-     }else{
-       m_btfhead->bf_filename = new char[strlen(path) + 1];
- #ifndef WINDOWS
--      if(!m_btfhead->bf_filename ) return -1;
-+      if( !m_btfhead->bf_filename ){
-+        errno = ENOMEM;
-+        return -1;
-+      }
- #endif
-       strcpy(m_btfhead->bf_filename, path);
-     }
-@@ -694,6 +762,32 @@
- size_t btFiles::FillMetaInfo(FILE* fp)
- {
-   BTFILE *p;
-+  const char *refname, *s;
-+  char path[MAXPATHLEN];
-+
-+  refname = m_directory ? m_directory : m_btfhead->bf_filename;
-+  while( (s = strchr(refname, PATH_SP)) && *(s + 1) ){
-+    refname = s + 1;
-+  }
-+  if( m_directory && '.' == *refname ){
-+    char dir[MAXPATHLEN];
-+    if( getcwd(dir, sizeof(dir)) && 0==chdir(m_directory) ){
-+      if( getcwd(path, sizeof(path)) ){
-+        refname = path;
-+        while( (s = strchr(refname, PATH_SP)) && *(s + 1) ){
-+          refname = s + 1;
-+        }
-+      }
-+      chdir(dir);
-+    }
-+  }
-+  if( '/' == *refname || '\0' == *refname || '.' == *refname ){
-+    CONSOLE.Warning(1, "error, inappropriate file or directory name \"%s\"",
-+      m_directory ? m_directory : m_btfhead->bf_filename);
-+    errno = EINVAL;
-+    return 0;
-+  }
-+
-   if( m_directory ){
-     // multi files
-     if( bencode_str("files", fp) != 1 ) return 0;
-@@ -715,16 +809,15 @@
-     if(bencode_end_dict_list(fp) != 1 ) return 0;
-     
-     if(bencode_str("name", fp) != 1) return 0;
--    return bencode_str(m_directory, fp);
--    
-+    return bencode_str(refname, fp);
-   }else{
-     if( bencode_str("length", fp) != 1 ) return 0;
-     if( bencode_int(m_btfhead->bf_length, fp) != 1) return 0;
-     
-     if( bencode_str("name", fp) != 1 ) return 0;
--    return bencode_str(m_btfhead->bf_filename, fp);
-+    return bencode_str(refname, fp);
-   }
--  return 1;
-+  return 0;
- }
- 
- 
-Index: a/btcontent.cpp
-===================================================================
---- a/btcontent.cpp	(revision 300)
-+++ b/btcontent.cpp	(revision 302)
-@@ -357,7 +357,11 @@
- 
-   cfg_req_queue_length = (m_piece_length / cfg_req_slice_size) * 2 - 1;
- 
--  if( m_btfiles.BuildFromMI(b, flen, saveas) < 0 ) ERR_RETURN();
-+  if( m_btfiles.BuildFromMI(b, flen, saveas, arg_flg_exam_only) < 0 ){
-+    if( EINVAL == errno )
-+      CONSOLE.Warning(1, "Torrent metainfo file data is invalid or unusable.");
-+    ERR_RETURN();
-+  }
- 
-   delete []b;
-   b = (char *)0;
-Index: a/btfiles.h
-===================================================================
---- a/btfiles.h	(revision 300)
-+++ b/btfiles.h	(revision 302)
-@@ -61,7 +61,7 @@
-   
-   int BuildFromFS(const char *pathname);
-   int BuildFromMI(const char *metabuf, const size_t metabuf_len,
--                  const char *saveas);
-+                  const char *saveas, unsigned char exam_only);
- 
-   char *GetDataName() const;
-   uint64_t GetTotalLength() const { return m_total_files_length; }
-

--- a/net/ctorrent/patches/100-negative-ints.patch
+++ /dev/null
@@ -1,14 +1,1 @@
---- a/bencode.cpp
-+++ b/bencode.cpp
-@@ -44,6 +44,10 @@ size_t buf_long(const char *b,size_t len
-     p++; len--;
-   }
- 
-+  if( *p == '-'){
-+    p++; len--;
-+  }
-+
-   for(psave = p; len && isdigit(*p); p++,len--) ;
- 
-   if(!len || MAX_INT_SIZ < (p - psave) || *p != endchar) return 0;
 

file:a/net/etherwake/Makefile (deleted)
--- a/net/etherwake/Makefile
+++ /dev/null
@@ -1,55 +1,1 @@
-#
-# Copyright (C) 2007-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=etherwake
-PKG_VERSION:=1.09
-PKG_RELEASE:=3
-
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
-PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/e/etherwake
-PKG_MD5SUM:=628e8b2a28d47f262e4c26c989402a59
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/etherwake
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=WoL client for magic packets via ethernet frames
-  URL:=http://ftp.debian.org/debian/pool/main/e/etherwake
-endef
-
-define Package/etherwake/description
-	You can wake up WOL compliant Computers which have been powered down to
-	sleep mode or start WOL compliant Computers with a BIOS feature.
-	WOL is an abbreviation for Wake-on-LAN. It is a standard that allows you
-	to turn on a computer from another location over a network connection.
-	ether-wake also supports WOL passwords.
-endef
-
-define Build/Compile
-	$(TARGET_CC) $(TARGET_CFLAGS) -D__UCLIBC__ $(PKG_BUILD_DIR)/ether-wake.c -o $(PKG_BUILD_DIR)/etherwake
-endef
-
-define Package/etherwake/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/etherwake $(1)/usr/bin/
-	$(INSTALL_DIR) $(1)/etc/config
-	$(INSTALL_DATA) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
-	$(INSTALL_DIR) $(1)/etc/init.d
-	$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
-endef
-
-define Package/etherwake/conffiles
-/etc/config/etherwake
-endef
-
-$(eval $(call BuildPackage,etherwake))
-

--- a/net/etherwake/files/etherwake.config
+++ /dev/null
@@ -1,29 +1,1 @@
-config 'etherwake' 'setup'
-	# possible program pathes
-	option 'pathes' '/usr/bin/etherwake /usr/bin/ether-wake'
-	# use sudo, defaults to off
-	option 'sudo' 'off'
-	# interface, defaults to 'eth0'
-	# -i <ifname>
-	option 'interface' ''
-	# send wake-up packet to the broadcast address, defaults to off
-	# -b
-	option 'broadcast' 'off'
 
-config 'target'
-	# name for the target
-	option 'name' 'example'
-	# mac address to wake up
-	option 'mac' '11:22:33:44:55:66'
-	# password in hex without any delimiters
-	option 'password' 'AABBCCDDEEFF'
-	# wake up on system start, defaults to off
-	option 'wakeonboot' 'off'
-
-# To add a new target use:
-#  uci add etherwake target
-#  uci set etherwake.@target[-1].name=example
-#  uci set etherwake.@target[-1].mac=11:22:33:44:55:66
-#  uci set etherwake.@target[-1].password=AABBCCDDEEFF
-#  uci set etherwake.@target[-1].wakeonboot=off
-

--- a/net/etherwake/files/etherwake.init
+++ /dev/null
@@ -1,133 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2009 OpenWrt.org
 
-NAME='etherwake'
-START=60
-PROGRAM=''
-
-start()
-{
-	local searchlist=''
-	local section=''
-	local value=''
-
-	config_load "${NAME}"
-
-	# check for available program
-	config_get searchlist 'setup' 'pathes'
-	PROGRAM=$(search_program "${searchlist}")
-	[ -z "${PROGRAM}" ] && {
-		echo "${initscript}: No ${NAME} program installed. Check: opkg list | grep ${NAME}"
-		exit 1
-	}
-
-	# sudo
-	config_get_bool value 'setup' 'sudo' '0'
-	[ "${value}" -ne 0 ] && PROGRAM="sudo ${PROGRAM}"
-
-	# interface
-	config_get value 'setup' 'interface'
-	[ -n "${value}" ] && append PROGRAM "-i ${value}"
-
-	# broadcast
-	config_get_bool value 'setup' 'broadcast' '0'
-	[ "${value}" -ne 0 ] && append PROGRAM '-b'
-
-	# wake up targets
-	config_foreach etherwake_start target $*
-}
-
-etherwake_start()
-{
-	local section="$1"
-	shift
-
-	local names="$*"
-
-	local value=''
-	local target=''
-
-	if [ -z "${names}" ]
-	 then
-		# check if boot target
-		config_get_bool value "${section}" 'wakeonboot' '0'
-		[ "${value}" -eq 0 ] && return 0
-
-		# wake up target
-		do_etherwake "${section}"
-		return $?
-	else
-		# name
-		config_get value "${section}" 'name'
-		[ -z "${value}" ] && return 0
-
-		for target in ${names}
-		 do
-			[ "${value}" != "${target}" ] && continue
-
-			# wake up target
-			do_etherwake "${section}"
-			return $?
-		done
-	fi
-}
-
-# execute etherwake command for target
-do_etherwake()
-{
-	local section="$1"
-	local value=''
-	local password=''
-	local args=''
-
-	# password
-	config_get value "${section}" 'password'
-	[ -n "${value}" ] && {
-		password=$(etherwake_password "${value}")
-		append args "-p ${password}"
-	}
-
-	# mac address
-	config_get value "${section}" 'mac'
-	[ -z "${value}" ] && { echo "${initscript}: Target ${section} has no MAC address"; return 1; }
-	append args "${value}"
-
-	# name
-	config_get value "${section}" 'name'
-	[ -z "${value}" ] && value="{section}"
-
-	# execute command
-	echo "${initscript}: Waking up ${value} via ${PROGRAM}${args:+ ${args}}"
-	${PROGRAM} ${args}
-	return $?
-}
-
-
-# find first available program from searchlist
-search_program()
-{
-	local searchlist="$1"
-	local test=''
-	local program=''
-
-	for test in ${searchlist} ; do
-		[ -x "${test}" ] && {
-			program="${test}"
-			break;
-		}
-	done
-
-	[ -n "${program}" ] && echo "${program}"
-
-	return
-}
-
-# prepare hex password
-etherwake_password()
-{
-	local delimiter=':'
-	local password=`echo "$1" | sed "s/../&${delimiter}/g"`
-	echo "${password%${delimiter}}"
-	return
-}
-

--- a/net/etherwake/patches/100-no_ether_hostton.patch
+++ /dev/null
@@ -1,38 +1,1 @@
---- etherwake-1.09.orig/ether-wake.c	2005-07-10 20:44:25.000000000 +0200
-+++ etherwake-1.09.orig.no_ether_hostton/ether-wake.c	2007-04-29 19:03:41.000000000 +0200
-@@ -15,7 +15,11 @@
- "	an optional password appended.\n"
- "\n"
- "	The single required parameter is the Ethernet MAC (station) address\n"
-+#if !defined(__UCLIBC__)
- "	of the machine to wake or a host ID with known NSS 'ethers' entry.\n"
-+#else
-+"	of the machine to wake.\n"
-+#endif
- "	The MAC address may be found with the 'arp' program while the target\n"
- "	machine is awake.\n"
- "\n"
-@@ -289,16 +293,22 @@
- 		if (debug)
- 			fprintf(stderr, "The target station address is %s.\n",
- 					ether_ntoa(eaddr));
-+#if !defined(__UCLIBC__)
- 	} else if (ether_hostton(hostid, eaddr) == 0) {
- 		if (debug)
- 			fprintf(stderr, "Station address for hostname %s is %s.\n",
- 					hostid, ether_ntoa(eaddr));
-+#endif
- 	} else {
- 		(void)fprintf(stderr,
- 					  "ether-wake: The Magic Packet host address must be "
- 					  "specified as\n"
-+#if !defined(__UCLIBC__)
- 					  "  - a station address, 00:11:22:33:44:55, or\n"
- 					  "  - a hostname with a known 'ethers' entry.\n");
-+#else
-+					  "  - a station address, 00:11:22:33:44:55\n");
-+#endif
- 		return -1;
- 	}
- 	return 0;
 

file:a/net/git/Makefile (deleted)
--- a/net/git/Makefile
+++ /dev/null
@@ -1,71 +1,1 @@
-#
-# Copyright (C) 2009-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=git
-PKG_VERSION:=2.0.0
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_MD5SUM:=0646202ae979e4339f3e47f2375b5773
-
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/git
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=Version Control Systems
-  DEPENDS:=+libopenssl +libpthread
-  TITLE:=The fast version control system
-  URL:=http://git-scm.com
-endef
-
-define Package/git/description
- Git is a free & open source, distributed version control system
- designed to handle everything from small to very large projects
- with speed and efficiency.
-endef
-
-MAKE_FLAGS := \
-	CC="$(TARGET_CC)" \
-	CFLAGS="$(TARGET_CFLAGS)" \
-	CPPFLAGS="$(TARGET_CPPFLAGS)" \
-	LDFLAGS="$(TARGET_LDFLAGS)" \
-	NO_CURL="YesPlease" \
-	NO_EXPAT="YesPlease" \
-	NO_MKSTEMPS="YesPlease" \
-	NO_GETTEXT="YesPlease" \
-	NO_UNIX_SOCKETS="YesPlease" \
-	NO_IPV6="YesPlease" \
-	NO_ICONV="YesPlease" \
-	NO_NSEC="YesPlease" \
-	NO_PERL="YesPlease" \
-	NO_PYTHON="YesPlease" \
-	NO_TCLTK="YesPlease"
-
-define Build/Configure
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		configure
-
-	( cd $(PKG_BUILD_DIR); \
-		./configure --prefix=/usr \
-	);
-endef
-
-define Package/git/install
-	$(INSTALL_DIR) $(1)
-	$(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
-	$(CP) $(PKG_INSTALL_DIR)/* $(1)/
-endef
-
-$(eval $(call BuildPackage,git))
-

--- a/net/git/patches/100-convert_builtin.patch
+++ /dev/null
@@ -1,234 +1,1 @@
---- a/Makefile
-+++ b/Makefile
-@@ -532,16 +532,7 @@ EXTRA_PROGRAMS =
- # ... and all the rest that could be moved out of bindir to gitexecdir
- PROGRAMS += $(EXTRA_PROGRAMS)
- 
--PROGRAM_OBJS += credential-store.o
--PROGRAM_OBJS += daemon.o
--PROGRAM_OBJS += fast-import.o
--PROGRAM_OBJS += http-backend.o
--PROGRAM_OBJS += imap-send.o
--PROGRAM_OBJS += sh-i18n--envsubst.o
--PROGRAM_OBJS += shell.o
--PROGRAM_OBJS += show-index.o
--PROGRAM_OBJS += upload-pack.o
--PROGRAM_OBJS += remote-testsvn.o
-+PROGRAM_OBJS =
- 
- # Binary suffix, set to .exe for Windows builds
- X =
-@@ -1002,6 +993,12 @@ BUILTIN_OBJS += builtin/var.o
- BUILTIN_OBJS += builtin/verify-pack.o
- BUILTIN_OBJS += builtin/verify-tag.o
- BUILTIN_OBJS += builtin/write-tree.o
-+BUILTIN_OBJS += builtin/daemon.o
-+BUILTIN_OBJS += builtin/fast-import.o
-+BUILTIN_OBJS += builtin/http-backend.o
-+BUILTIN_OBJS += builtin/imap-send.o
-+BUILTIN_OBJS += builtin/shell.o
-+BUILTIN_OBJS += builtin/upload-pack.o
- 
- GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
- EXTLIBS =
-@@ -1165,7 +1162,7 @@ endif
- EXTLIBS += -lz
- 
- ifndef NO_OPENSSL
--	OPENSSL_LIBSSL = -lssl
-+	EXTLIBS += -lssl
- 	ifdef OPENSSLDIR
- 		BASIC_CFLAGS += -I$(OPENSSLDIR)/include
- 		OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
-@@ -2049,10 +2046,6 @@ endif
- git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
- 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
- 
--git-imap-send$X: imap-send.o GIT-LDFLAGS $(GITLIBS)
--	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
--		$(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
--
- git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS)
- 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
- 		$(LIBS) $(CURL_LIBCURL)
-@@ -2364,24 +2357,22 @@ endif
- 	bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
- 	execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
- 	{ test "$$bindir/" = "$$execdir/" || \
--	  for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
-+	  for p in $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
- 		$(RM) "$$execdir/$$p" && \
- 		test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
--		ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
-+		ln -s git "$$execdir/$$p" 2>/dev/null || \
- 		cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
- 	  done; \
- 	} && \
- 	for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
- 		$(RM) "$$bindir/$$p" && \
- 		test -z "$(NO_INSTALL_HARDLINKS)" && \
--		ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
- 		ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
- 		cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
- 	done && \
- 	for p in $(BUILT_INS); do \
- 		$(RM) "$$execdir/$$p" && \
- 		test -z "$(NO_INSTALL_HARDLINKS)" && \
--		ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
- 		ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
- 		cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
- 	done && \
---- a/builtin.h
-+++ b/builtin.h
-@@ -136,5 +136,11 @@ extern int cmd_verify_pack(int argc, con
- extern int cmd_show_ref(int argc, const char **argv, const char *prefix);
- extern int cmd_pack_refs(int argc, const char **argv, const char *prefix);
- extern int cmd_replace(int argc, const char **argv, const char *prefix);
-+extern int cmd_daemon(int argc, char **argv, const char *prefix);
-+extern int cmd_fast_import(int argc, char **argv, const char *prefix);
-+extern int cmd_http_backend(int argc, char **argv, const char *prefix);
-+extern int cmd_imap_send(int argc, char **argv, const char *prefix);
-+extern int cmd_shell(int argc, char **argv, const char *prefix);
-+extern int cmd_upload_pack(int argc, char **argv, const char *prefix);
- 
- #endif
---- /dev/null
-+++ b/builtin/daemon.c
-@@ -0,0 +1 @@
-+#include "../daemon.c"
---- /dev/null
-+++ b/builtin/fast-import.c
-@@ -0,0 +1 @@
-+#include "../fast-import.c"
---- /dev/null
-+++ b/builtin/http-backend.c
-@@ -0,0 +1 @@
-+#include "../http-backend.c"
---- /dev/null
-+++ b/builtin/imap-send.c
-@@ -0,0 +1 @@
-+#include "../imap-send.c"
---- /dev/null
-+++ b/builtin/shell.c
-@@ -0,0 +1 @@
-+#include "../shell.c"
---- /dev/null
-+++ b/builtin/upload-pack.c
-@@ -0,0 +1 @@
-+#include "../upload-pack.c"
---- a/daemon.c
-+++ b/daemon.c
-@@ -1125,7 +1125,7 @@ static int serve(struct string_list *lis
- 	return service_loop(&socklist);
- }
- 
--int main(int argc, char **argv)
-+int cmd_daemon(int argc, char **argv, const char *prefix)
- {
- 	int listen_port = 0;
- 	struct string_list listen_addr = STRING_LIST_INIT_NODUP;
---- a/fast-import.c
-+++ b/fast-import.c
-@@ -3356,7 +3356,7 @@ static void parse_argv(void)
- 		read_marks();
- }
- 
--int main(int argc, char **argv)
-+int cmd_fast_import(int argc, char **argv, const char *prefix)
- {
- 	unsigned int i;
- 
---- a/git.c
-+++ b/git.c
-@@ -275,11 +275,11 @@ static int handle_alias(int *argcp, cons
- 
- struct cmd_struct {
- 	const char *cmd;
--	int (*fn)(int, const char **, const char *);
-+	int (*fn)(int, char **, const char *);
- 	int option;
- };
- 
--static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
-+static int run_builtin(struct cmd_struct *p, int argc, char **argv)
- {
- 	int status, help;
- 	struct stat st;
-@@ -359,6 +359,7 @@ static struct cmd_struct commands[] = {
- 	{ "config", cmd_config, RUN_SETUP_GENTLY },
- 	{ "count-objects", cmd_count_objects, RUN_SETUP },
- 	{ "credential", cmd_credential, RUN_SETUP_GENTLY },
-+	{ "daemon", cmd_daemon },
- 	{ "describe", cmd_describe, RUN_SETUP },
- 	{ "diff", cmd_diff },
- 	{ "diff-files", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE },
-@@ -377,6 +378,8 @@ static struct cmd_struct commands[] = {
- 	{ "grep", cmd_grep, RUN_SETUP_GENTLY },
- 	{ "hash-object", cmd_hash_object },
- 	{ "help", cmd_help },
-+	{ "http-backend", cmd_http_backend },
-+	{ "imap-send", cmd_imap_send },
- 	{ "index-pack", cmd_index_pack, RUN_SETUP_GENTLY },
- 	{ "init", cmd_init_db },
- 	{ "init-db", cmd_init_db },
-@@ -424,6 +427,7 @@ static struct cmd_struct commands[] = {
- 	{ "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE },
- 	{ "rm", cmd_rm, RUN_SETUP },
- 	{ "send-pack", cmd_send_pack, RUN_SETUP },
-+	{ "shell", cmd_shell },
- 	{ "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER },
- 	{ "show", cmd_show, RUN_SETUP },
- 	{ "show-branch", cmd_show_branch, RUN_SETUP },
-@@ -440,6 +444,7 @@ static struct cmd_struct commands[] = {
- 	{ "update-server-info", cmd_update_server_info, RUN_SETUP },
- 	{ "upload-archive", cmd_upload_archive },
- 	{ "upload-archive--writer", cmd_upload_archive_writer },
-+	{ "upload-pack", cmd_upload_pack },
- 	{ "var", cmd_var, RUN_SETUP_GENTLY },
- 	{ "verify-pack", cmd_verify_pack },
- 	{ "verify-tag", cmd_verify_tag, RUN_SETUP },
---- a/http-backend.c
-+++ b/http-backend.c
-@@ -563,7 +563,7 @@ static struct service_cmd {
- 	{"POST", "/git-receive-pack$", service_rpc}
- };
- 
--int main(int argc, char **argv)
-+int cmd_http_backend(int argc, char **argv, const char *prefix)
- {
- 	char *method = getenv("REQUEST_METHOD");
- 	char *dir;
---- a/imap-send.c
-+++ b/imap-send.c
-@@ -1362,7 +1362,7 @@ static int git_imap_config(const char *k
- 	return 0;
- }
- 
--int main(int argc, char **argv)
-+int cmd_imap_send(int argc, char **argv, const char *prefix)
- {
- 	struct strbuf all_msgs = STRBUF_INIT;
- 	struct strbuf msg = STRBUF_INIT;
---- a/shell.c
-+++ b/shell.c
-@@ -142,7 +142,7 @@ static struct commands {
- 	{ NULL },
- };
- 
--int main(int argc, char **argv)
-+int cmd_shell(int argc, char **argv, const char *prefix)
- {
- 	char *prog;
- 	const char **user_argv;
---- a/upload-pack.c
-+++ b/upload-pack.c
-@@ -790,7 +790,7 @@ static int upload_pack_config(const char
- 	return parse_hide_refs_config(var, value, "uploadpack");
- }
- 
--int main(int argc, char **argv)
-+int cmd_upload_pack(int argc, char **argv, const char *prefix)
- {
- 	char *dir;
- 	int i;
 

--- a/net/git/patches/200-disable_fasthash.patch
+++ /dev/null
@@ -1,13 +1,1 @@
---- a/config.mak.uname
-+++ b/config.mak.uname
-@@ -17,9 +17,6 @@ endif
- # because maintaining the nesting to match is a pain.  If
- # we had "elif" things would have been much nicer...
- 
--ifeq ($(uname_M),x86_64)
--	XDL_FAST_HASH = YesPlease
--endif
- ifeq ($(uname_S),OSF1)
- 	# Need this for u_short definitions et al
- 	BASIC_CFLAGS += -D_OSF_SOURCE
 

file:a/net/irssi/Makefile (deleted)
--- a/net/irssi/Makefile
+++ /dev/null
@@ -1,99 +1,1 @@
-#
-# Copyright (C) 2006-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=irssi
-PKG_VERSION:=0.8.15
-PKG_RELEASE:=2
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://irssi.org/files/
-PKG_MD5SUM:=1dcb3f511b88df94b0c996f36668c7da
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/nls.mk
-
-define Package/irssi/Default
-  SUBMENU:=Instant Messaging
-  SECTION:=net
-  CATEGORY:=Network
-  DEPENDS:=+glib2 +libncurses +libpthread
-  TITLE:=Console IRC client
-  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
-  URL:=http://irssi.org/
-endef
-
-define Package/irssi/Default/description
-	Irssi is a terminal based IRC client for UNIX systems.
-endef
-
-define Package/irssi
-$(call Package/irssi/Default)
-  TITLE+= (with OpenSSL support)
-  DEPENDS+= +libopenssl
-  VARIANT:=ssl
-endef
-
-define Package/irssi/description
-$(call Package/irssi/Default/description)
- This package is built with OpenSSL support.
-endef
-
-define Package/irssi-nossl
-$(call Package/irssi/Default)
-  TITLE+= (without OpenSSL support)
-  VARIANT:=nossl
-endef
-
-define Package/irssi-nossl/description
-$(call Package/irssi/Default/description)
- This package is built without OpenSSL support.
-endef
-
-CONFIGURE_ARGS += \
-	--with-perl=no \
-	--with-glib-prefix="$(STAGING_DIR)/usr" \
-	--with-textui \
-	--without-terminfo \
-	--without-bot \
-	--disable-proxy
-
-EXTRA_CFLAGS+=$(TARGET_CPPFLAGS)
-EXTRA_LDFLAGS+=-lncurses
-
-ifeq ($(BUILD_VARIANT),ssl)
-	CONFIGURE_ARGS += \
-		--with-ssl="$(STAGING_DIR)/usr"
-endif
-
-ifeq ($(BUILD_VARIANT),nossl)
-	CONFIGURE_ARGS += \
-		--without-ssl \
-		--disable-ssl
-endif
-
-define Build/InstallDev
-	$(INSTALL_DIR) $(1)/usr/include/irssi
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/irssi/* $(1)/usr/include/irssi/
-endef
-
-define Package/irssi/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME)
-endef
-
-Package/irssi-nossl/install = $(Package/irssi/install)
-
-$(eval $(call BuildPackage,irssi))
-$(eval $(call BuildPackage,irssi-nossl))
-

--- a/net/nfs-kernel-server/Makefile
+++ /dev/null
@@ -1,153 +1,1 @@
-# Copyright (C) 2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=nfs-kernel-server
-PKG_VERSION:=1.2.9
-PKG_RELEASE:=1
-PKG_MD5SUM:=18869d16db3f49c053f8c68eba3fe2e0
-
-PKG_SOURCE_URL:=@SF/nfs
-PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2
-
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/nfs-utils-$(PKG_VERSION)
-PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=$(PKG_NAME)/host
-
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/package.mk
-
-define Package/nfs-kernel-server/Default
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=Filesystem
-  DEPENDS:=+libwrap +libblkid +libuuid $(LIBRPC_DEPENDS)
-  URL:=http://nfs.sourceforge.net/
-endef
-
-define Package/nfs-kernel-server
-  $(call Package/nfs-kernel-server/Default)
-  TITLE:=Kernel NFS server support
-  DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +portmap
-endef
-
-define Package/nfs-kernel-server/description
-  Kernel NFS server support
-endef
-
-define Package/nfs-kernel-server-utils
-  $(call Package/nfs-kernel-server/Default)
-  TITLE:=NFS server utils
-  DEPENDS:=nfs-kernel-server
-endef
-
-define Package/nfs-kernel-server-utils/description
-  NFS server utils
-endef
-
-define Package/nfs-kernel-server/conffiles
-/etc/exports
-endef
-
-define Package/nfs-utils
-  $(call Package/nfs-kernel-server/Default)
-  SECTION:=utils
-  CATEGORY:=Utilities
-  DEPENDS+= +libevent +USE_UCLIBC:librpc
-  TITLE:=updated mount utility (includes nfs4)
-endef
-
-define Package/nfs-utils/description
-  Updated mount.nfs command - allows mounting nfs4 volumes
-endef
-
-TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib -I$(STAGING_DIR)/usr/include/libevent \
-		 -I$(STAGING_DIR)/usr/include/ -Drpc_uint=uint
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(LIBRPC) \
-		  -L$(STAGING_DIR)/usr/lib/libevent
-
-CONFIGURE_ARGS += \
-	--disable-gss \
-	--disable-nfsv4 \
-	--disable-nfsv41 \
-	--enable-static \
-	--enable-shared \
-	--disable-caps \
-	--disable-tirpc \
-	--disable-nfsdcld
-
-CONFIGURE_VARS += \
-	CONFIG_SQLITE3_TRUE="\#" \
-	CONFIG_NFSDCLD_TRUE="\#"
-
-MAKE_FLAGS += \
-	OPT="$(TARGET_CFLAGS)" \
-	INSTALLSUID="install -m 4755" \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-	RPCGEN_PATH=$(STAGING_DIR_HOST)/bin/rpcgen \
-	RPCGEN=$(STAGING_DIR_HOST)/bin/rpcgen
-
-HOST_CFLAGS += -Dlinux
-
-HOST_CONFIGURE_ARGS += \
-	--disable-gss \
-	--disable-nfsv4 \
-	--disable-nfsv41 \
-	--without-tcp-wrappers
-
-HOST_CONFIGURE_VARS += \
-	ac_cv_lib_event_event_dispatch=yes \
-	ac_cv_lib_nfsidmap_nfs4_init_name_mapping=yes \
-	ac_cv_lib_blkid_blkid_get_library_version=yes \
-	ac_cv_header_event_h=yes \
-	ac_cv_header_nfsidmap_h=yes \
-	ac_cv_header_blkid_blkid_h=yes \
-	GSSGLUE_CFLAGS=" " \
-	GSSGLUE_LIBS=" " \
-	RPCSECGSS_CFLAGS=" " \
-	RPCSECGSS_LIBS=" " \
-	CONFIG_SQLITE3_TRUE="\#" \
-	CONFIG_NFSDCLD_TRUE="\#"
-
-define Host/Compile
-	$(MAKE) -C $(HOST_BUILD_DIR)/tools/rpcgen all
-endef
-
-define Host/Install
-	$(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR_HOST)/bin/rpcgen
-endef
-
-define Package/nfs-kernel-server/install
-	$(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
-	$(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports
-	$(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/sm-notify $(1)/usr/sbin/
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/
-endef
-
-define Package/nfs-kernel-server-utils/install
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
-endef
-
-define Package/nfs-utils/install
-	$(INSTALL_DIR) $(1)/sbin
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/
-	(cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4)
-endef
-
-$(eval $(call HostBuild))
-$(eval $(call BuildPackage,nfs-kernel-server))
-$(eval $(call BuildPackage,nfs-kernel-server-utils))
-$(eval $(call BuildPackage,nfs-utils))
-

--- a/net/nfs-kernel-server/files/nfsd.exports
+++ /dev/null
@@ -1,2 +1,1 @@
-/mnt	*(ro,all_squash,insecure,sync)
 

--- a/net/nfs-kernel-server/files/nfsd.init
+++ /dev/null
@@ -1,39 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
 
-START=60
-STOP=60
-
-USE_PROCD=1
-
-NFS_D=/var/lib/nfs
-LOCK_D=/var/lib/nfs/sm
-
-start_service() {
-	grep -q /proc/fs/nfsd /proc/mounts || \
-		mount -t nfsd nfsd /proc/fs/nfsd
-	mkdir -p $NFS_D
-	mkdir -p $LOCK_D
-	touch $NFS_D/rmtab
-
-        sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null
-
-	procd_open_instance
-	procd_set_param command /usr/sbin/rpc.statd -p 32778 -o 32779 -F
-	procd_close_instance
-
-	/usr/sbin/exportfs -r
-	/usr/sbin/rpc.nfsd
-
-	procd_open_instance
-	procd_set_param command /usr/sbin/rpc.mountd -p 32780 -F
-	procd_close_instance
-}
-
-stop_service() {
-	rpc.nfsd 0 2> /dev/null
-	/usr/sbin/exportfs -au
-	grep -q /proc/fs/nfsd /proc/mounts && \
-		umount /proc/fs/nfsd
-}
-

--- a/net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch
+++ /dev/null
@@ -1,37 +1,1 @@
---- a/support/nfs/svc_socket.c
-+++ b/support/nfs/svc_socket.c
-@@ -40,10 +40,13 @@ int getservport(u_long number, const cha
- 	char rpcdata[1024], servdata[1024];
- 	struct rpcent rpcbuf, *rpcp;
- 	struct servent servbuf, *servp = NULL;
--	int ret;
--
-+	int ret=0;
-+#ifndef __UCLIBC__
- 	ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata,
- 				&rpcp);
-+#else
-+	rpcp = getrpcbynumber (number);
-+#endif
- 	if (ret == 0 && rpcp != NULL) {
- 		/* First try name.  */
- 		ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
---- a/utils/mountd/cache.c
-+++ b/utils/mountd/cache.c
-@@ -166,6 +166,7 @@ static void auth_unix_gid(FILE *f)
- 	pw = getpwuid(uid);
- 	if (!pw)
- 		rv = -1;
-+#ifndef __UCLIBC__
- 	else {
- 		rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
- 		if (rv == -1 && ngroups >= groups_len) {
-@@ -180,6 +181,7 @@ static void auth_unix_gid(FILE *f)
- 			}
- 		}
- 	}
-+#endif
- 	qword_printuint(f, uid);
- 	qword_printtimefrom(f, DEFAULT_TTL);
- 	if (rv >= 0) {
 

--- a/net/nfs-kernel-server/patches/101-no_malloc_h.patch
+++ /dev/null
@@ -1,11 +1,1 @@
---- a/tools/rpcgen/rpc_cout.c
-+++ b/tools/rpcgen/rpc_cout.c
-@@ -36,7 +36,6 @@ static char sccsid[] = "@(#)rpc_cout.c 1
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
--#include <malloc.h>
- #include <ctype.h>
- #include "rpc_parse.h"
- #include "rpc_util.h"
 

file:a/net/nginx/Config.in (deleted)
--- a/net/nginx/Config.in
+++ /dev/null
@@ -1,162 +1,1 @@
-#
-# Copyright (C) 2010-2012 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-menu "Configuration"
-        depends on PACKAGE_nginx
-
-config NGINX_STUB_STATUS
-	bool
-	prompt "Enable stub status module"
-	help
-		Enable the stub status module which gives some status from the server.
-
-config NGINX_FLV
-	bool
-	prompt "Enable FLV module"
-	help
-		Provides the ability to seek within FLV (Flash) files using time-based offsets.
-
-config NGINX_SSL
-	bool
-	prompt "Enable SSL module"
-	help
-		Enable HTTPS/SSL support.
-
-config NGINX_DAV
-	bool
-	prompt "Enable WebDAV module"
-	help
-		Enable the HTTP and WebDAV methods PUT, DELETE, MKCOL, COPY and MOVE.
-
-config NGINX_LUA
-	bool
-	prompt "Enable LUA module"
-	help
-		Enable support for LUA scripts.
-
-config NGINX_PCRE
-	bool
-	prompt "Enable PCRE library usage"
-	default y
-
-config NGINX_HTTP_CACHE
-	bool
-	prompt "Enable HTTP cache"
-
-config NGINX_HTTP_CHARSET
-	bool
-	prompt "Enable HTTP charset module"
-	default y
-
-config NGINX_HTTP_GZIP
-	bool
-	prompt "Enable HTTP gzip module"
-	default y
-
-config NGINX_HTTP_SSI
-	bool
-	prompt "Enable HTTP ssi module"
-	default y
-
-config NGINX_HTTP_USERID
-	bool
-	prompt "Enable HTTP userid module"
-	default y
-
-config NGINX_HTTP_ACCESS
-	bool
-	prompt "Enable HTTP access module"
-	default y
-
-config NGINX_HTTP_AUTH_BASIC
-	bool
-	prompt "Enable HTTP auth basic"
-	default y
-
-config NGINX_HTTP_AUTOINDEX
-	bool
-	prompt "Enable HTTP autoindex module"
-	default y
-
-config NGINX_HTTP_GEO
-	bool
-	prompt "Enable HTTP geo module"
-	default y
-
-config NGINX_HTTP_MAP
-	bool
-	prompt "Enable HTTP map module"
-	default y
-
-config NGINX_HTTP_SPLIT_CLIENTS
-	bool
-	prompt "Enable HTTP split clients"
-	default y
-
-config NGINX_HTTP_REFERER
-	bool
-	prompt "Enable HTTP referer module"
-	default y
-
-config NGINX_HTTP_REWRITE
-	bool
-	prompt "Enable HTTP rewrite module"
-	select NGINX_PCRE
-	default y
-
-config NGINX_HTTP_PROXY
-	bool
-	prompt "Enable HTTP proxy module"
-	default y
-
-config NGINX_HTTP_FASTCGI
-	bool
-	prompt "Enable HTTP fastcgi module"
-	default y
-
-config NGINX_HTTP_UWSGI
-	bool
-	prompt "Enable HTTP uwsgi module"
-	default y
-
-config NGINX_HTTP_SCGI
-	bool
-	prompt "Enable HTTP scgi module"
-	default y
-
-config NGINX_HTTP_MEMCACHED
-	bool
-	prompt "Enable HTTP memcached module"
-	default y
-
-config NGINX_HTTP_LIMIT_CONN
-	bool
-	prompt "Enable HTTP limit conn"
-	default y
-
-config NGINX_HTTP_LIMIT_REQ
-	bool
-	prompt "Enable HTTP limit req"
-	default y
-
-config NGINX_HTTP_EMPTY_GIF
-	bool
-	prompt "Enable HTTP empty gif"
-	default y
-
-config NGINX_HTTP_BROWSER
-	bool
-	prompt "Enable HTTP browser module"
-	default y
-
-config NGINX_HTTP_UPSTREAM_IP_HASH
-	bool
-	prompt "Enable HTTP IP hash module"
-	default y
-
-endmenu
-

file:a/net/nginx/Makefile (deleted)
--- a/net/nginx/Makefile
+++ /dev/null
@@ -1,222 +1,1 @@
-#
-# Copyright (C) 2009-2012 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=nginx
-PKG_VERSION:=1.4.4
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://nginx.org/download/
-PKG_MD5SUM:=5dfaba1cbeae9087f3949860a02caa9f
-
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-PKG_CONFIG_DEPENDS := \
-	CONFIG_NGINX_STUB_STATUS \
-	CONFIG_NGINX_FLV \
-	CONFIG_NGINX_SSL \
-	CONFIG_NGINX_DAV \
-	CONFIG_NGINX_LUA \
-	CONFIG_NGINX_PCRE \
-	CONFIG_NGINX_HTTP_CACHE \
-	CONFIG_NGINX_HTTP_CHARSET \
-	CONFIG_NGINX_HTTP_GZIP \
-	CONFIG_NGINX_HTTP_SSI \
-	CONFIG_NGINX_HTTP_USERID \
-	CONFIG_NGINX_HTTP_ACCESS \
-	CONFIG_NGINX_HTTP_AUTH_BASIC \
-	CONFIG_NGINX_HTTP_AUTOINDEX \
-	CONFIG_NGINX_HTTP_GEO \
-	CONFIG_NGINX_HTTP_MAP \
-	CONFIG_NGINX_HTTP_SPLIT_CLIENTS \
-	CONFIG_NGINX_HTTP_REFERER \
-	CONFIG_NGINX_HTTP_REWRITE \
-	CONFIG_NGINX_HTTP_PROXY \
-	CONFIG_NGINX_HTTP_FASTCGI \
-	CONFIG_NGINX_HTTP_UWSGI \
-	CONFIG_NGINX_HTTP_SCGI \
-	CONFIG_NGINX_HTTP_MEMCACHED \
-	CONFIG_NGINX_HTTP_LIMIT_CONN \
-	CONFIG_NGINX_HTTP_LIMIT_REQ \
-	CONFIG_NGINX_HTTP_EMPTY_GIF \
-	CONFIG_NGINX_HTTP_BROWSER \
-	CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/nginx
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=Web Servers/Proxies
-  TITLE:=Nginx web server
-  URL:=http://nginx.org/
-  DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +libpthread +NGINX_LUA:liblua
-  MENU:=1
-endef
-
-define Package/nginx/description
- nginx is an HTTP and reverse proxy server, as well as a mail proxy server,
- written by Igor Sysoev.
-endef
-
-define Package/nginx/config
-  source "$(SOURCE)/Config.in"
-endef
-
-config_files=nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf
-
-define Package/nginx/conffiles
-/etc/nginx/
-endef
-
-ADDITIONAL_MODULES:=
-
-ifeq ($(CONFIG_IPV6),y)
-  ADDITIONAL_MODULES += --with-ipv6
-endif
-ifeq ($(CONFIG_NGINX_STUB_STATUS),y)
-  ADDITIONAL_MODULES += --with-http_stub_status_module
-endif
-ifeq ($(CONFIG_NGINX_FLV),y)
-  ADDITIONAL_MODULES += --with-http_flv_module
-endif
-ifeq ($(CONFIG_NGINX_SSL),y)
-  ADDITIONAL_MODULES += --with-http_ssl_module
-endif
-ifeq ($(CONFIG_NGINX_DAV),y)
-  ADDITIONAL_MODULES += --with-http_dav_module
-endif
-ifeq ($(CONFIG_NGINX_LUA),y)
-  ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
-endif
-ifneq ($(CONFIG_NGINX_HTTP_CACHE),y)
-  ADDITIONAL_MODULES += --without-http-cache
-endif
-ifneq ($(CONFIG_NGINX_PCRE),y)
-  ADDITIONAL_MODULES += --without-pcre
-endif
-ifneq ($(CONFIG_NGINX_HTTP_CHARSET),y)
-  ADDITIONAL_MODULES += --without-http_charset_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_GZIP),y)
-  ADDITIONAL_MODULES += --without-http_gzip_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_SSI),y)
-  ADDITIONAL_MODULES += --without-http_ssi_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_USERID),y)
-  ADDITIONAL_MODULES += --without-http_userid_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_ACCESS),y)
-  ADDITIONAL_MODULES += --without-http_access_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_AUTH_BASIC),y)
-  ADDITIONAL_MODULES += --without-http_auth_basic_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_AUTOINDEX),y)
-  ADDITIONAL_MODULES += --without-http_autoindex_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_GEO),y)
-  ADDITIONAL_MODULES += --without-http_geo_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_MAP),y)
-  ADDITIONAL_MODULES += --without-http_map_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_SPLIT_CLIENTS),y)
-  ADDITIONAL_MODULES += --without-http_split_clients_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_REFERER),y)
-  ADDITIONAL_MODULES += --without-http_referer_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_REWRITE),y)
-  ADDITIONAL_MODULES += --without-http_rewrite_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_PROXY),y)
-  ADDITIONAL_MODULES += --without-http_proxy_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_FASTCGI),y)
-  ADDITIONAL_MODULES += --without-http_fastcgi_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_UWSGI),y)
-  ADDITIONAL_MODULES += --without-http_uwsgi_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_SCGI),y)
-  ADDITIONAL_MODULES += --without-http_scgi_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_MEMCACHED),y)
-  ADDITIONAL_MODULES += --without-http_memcached_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_LIMIT_CONN),y)
-  ADDITIONAL_MODULES += --without-http_limit_conn_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_LIMIT_REQ),y)
-  ADDITIONAL_MODULES += --without-http_limit_req_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_EMPTY_GIF),y)
-  ADDITIONAL_MODULES += --without-http_empty_gif_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_BROWSER),y)
-  ADDITIONAL_MODULES += --without-http_browser_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH),y)
-  ADDITIONAL_MODULES += --without-http_upstream_ip_hash_module
-endif
-
-define Build/Configure
-	# TODO: fix --crossbuild
-	(cd $(PKG_BUILD_DIR) ;\
-		$(if $(CONFIG_NGINX_LUA),LUA_INC=$(STAGING_DIR)/usr/include LUA_LIB=$(STAGING_DIR)/usr/lib) \
-		./configure \
-			--crossbuild=Linux::$(ARCH) \
-			--prefix=/usr \
-			--conf-path=/etc/nginx/nginx.conf \
-			--error-log-path=/var/log/nginx/error.log \
-			--pid-path=/var/run/nginx.pid \
-			--lock-path=/var/lock/nginx.lock \
-			--http-log-path=/var/log/nginx/access.log \
-			--http-client-body-temp-path=/var/lib/nginx/body \
-			--http-proxy-temp-path=/var/lib/nginx/proxy \
-			--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
-			--with-cc="$(TARGET_CC)" \
-			--with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
-			--with-ld-opt="$(TARGET_LDFLAGS)" \
-			$(ADDITIONAL_MODULES) )
-endef
-
-define Package/nginx/install
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nginx $(1)/usr/sbin/
-	$(INSTALL_DIR) $(1)/etc/nginx
-	$(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx/
-	$(INSTALL_DIR) $(1)/etc/init.d
-	$(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx
-endef
-
-define Build/Prepare
-	$(call Build/Prepare/Default)
-	$(if $(CONFIG_NGINX_LUA),$(call Prepare/lua-nginx))
-endef
-
-define Download/lua-nginx
-	VERSION:=7c0948a08e8449f7a9ffbc35244954e6aaddac5b
-	SUBDIR:=lua-nginx
-	FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
-	URL:=https://github.com/chaoslawful/lua-nginx-module.git
-	PROTO:=git
-endef
-
-define  Prepare/lua-nginx
-	$(eval $(call Download,lua-nginx))
-	gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
-	$(call PatchDir,$(PKG_BUILD_DIR),./patches-lua-nginx)
-endef
-
-$(eval $(call BuildPackage,nginx))
-

--- a/net/nginx/files/nginx.init
+++ /dev/null
@@ -1,25 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2009-2012 OpenWrt.org
 
-START=50
-NGINX_BIN=/usr/sbin/nginx
-
-start() {
-	mkdir -p /var/log/nginx
-	mkdir -p /var/lib/nginx
-	$NGINX_BIN
-}
-
-stop() {
-	$NGINX_BIN -s stop
-}
-
-reload() {
-	$NGINX_BIN -s reload
-}
-
-shutdown() {
-	$NGINX_BIN -s quit
-}
-
-

--- a/net/nginx/patches-lua-nginx/300-ldl.patch
+++ /dev/null
@@ -1,22 +1,1 @@
---- a/lua-nginx/config
-+++ b/lua-nginx/config
-@@ -1,5 +1,5 @@
- ngx_feature="Lua library"
--ngx_feature_libs="-llua -lm"
-+ngx_feature_libs="-llua -lm -ldl"
- ngx_feature_name=
- ngx_feature_run=no
- ngx_feature_incs="#include <lauxlib.h>"
-@@ -47,9 +47,9 @@ else
-         ngx_feature="Lua library in $LUA_LIB and $LUA_INC (specified by the LUA_LIB and LUA_INC env)"
-         ngx_feature_path="$LUA_INC"
-         if [ $NGX_RPATH = YES ]; then
--            ngx_feature_libs="-R$LUA_LIB -L$LUA_LIB -llua -lm"
-+            ngx_feature_libs="-R$LUA_LIB -L$LUA_LIB -llua -lm -ldl"
-         else
--            ngx_feature_libs="-L$LUA_LIB -llua -lm"
-+            ngx_feature_libs="-L$LUA_LIB -llua -lm -ldl"
-         fi
- 
-         . auto/feature
 

--- a/net/nginx/patches/101-feature_test_fix.patch
+++ /dev/null
@@ -1,108 +1,1 @@
---- a/auto/cc/name
-+++ b/auto/cc/name
-@@ -7,7 +7,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
- 
-     ngx_feature="C compiler"
-     ngx_feature_name=
--    ngx_feature_run=yes
-+    ngx_feature_run=
-     ngx_feature_incs=
-     ngx_feature_path=
-     ngx_feature_libs=
---- a/auto/cc/conf
-+++ b/auto/cc/conf
-@@ -155,7 +155,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
-     else
-         ngx_feature="C99 variadic macros"
-         ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS"
--        ngx_feature_run=yes
-+        ngx_feature_run=no
-         ngx_feature_incs="#include <stdio.h>
- #define var(dummy, ...)  sprintf(__VA_ARGS__)"
-         ngx_feature_path=
-@@ -169,7 +169,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
- 
-     ngx_feature="gcc variadic macros"
-     ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS"
--    ngx_feature_run=yes
-+    ngx_feature_run=no
-     ngx_feature_incs="#include <stdio.h>
- #define var(dummy, args...)  sprintf(args)"
-     ngx_feature_path=
---- a/auto/os/linux
-+++ b/auto/os/linux
-@@ -48,7 +48,7 @@ fi
- 
- ngx_feature="epoll"
- ngx_feature_name="NGX_HAVE_EPOLL"
--ngx_feature_run=yes
-+ngx_feature_run=no
- ngx_feature_incs="#include <sys/epoll.h>"
- ngx_feature_path=
- ngx_feature_libs=
-@@ -73,7 +73,7 @@ fi
- CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE"
- ngx_feature="sendfile()"
- ngx_feature_name="NGX_HAVE_SENDFILE"
--ngx_feature_run=yes
-+ngx_feature_run=no
- ngx_feature_incs="#include <sys/sendfile.h>
-                   #include <errno.h>"
- ngx_feature_path=
-@@ -94,7 +94,7 @@ fi
- CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
- ngx_feature="sendfile64()"
- ngx_feature_name="NGX_HAVE_SENDFILE64"
--ngx_feature_run=yes
-+ngx_feature_run=no
- ngx_feature_incs="#include <sys/sendfile.h>
-                   #include <errno.h>"
- ngx_feature_path=
-@@ -112,7 +112,7 @@ ngx_include="sys/prctl.h"; . auto/includ
- 
- ngx_feature="prctl(PR_SET_DUMPABLE)"
- ngx_feature_name="NGX_HAVE_PR_SET_DUMPABLE"
--ngx_feature_run=yes
-+ngx_feature_run=no
- ngx_feature_incs="#include <sys/prctl.h>"
- ngx_feature_path=
- ngx_feature_libs=
---- a/auto/unix
-+++ b/auto/unix
-@@ -618,7 +618,7 @@ ngx_feature_test="void *p; p = memalign(
- 
- ngx_feature="mmap(MAP_ANON|MAP_SHARED)"
- ngx_feature_name="NGX_HAVE_MAP_ANON"
--ngx_feature_run=yes
-+ngx_feature_run=no
- ngx_feature_incs="#include <sys/mman.h>"
- ngx_feature_path=
- ngx_feature_libs=
-@@ -631,7 +631,7 @@ ngx_feature_test="void *p;
- 
- ngx_feature='mmap("/dev/zero", MAP_SHARED)'
- ngx_feature_name="NGX_HAVE_MAP_DEVZERO"
--ngx_feature_run=yes
-+ngx_feature_run=no
- ngx_feature_incs="#include <sys/mman.h>
-                   #include <sys/stat.h>
-                   #include <fcntl.h>"
-@@ -646,7 +646,7 @@ ngx_feature_test='void *p; int  fd;
- 
- ngx_feature="System V shared memory"
- ngx_feature_name="NGX_HAVE_SYSVSHM"
--ngx_feature_run=yes
-+ngx_feature_run=no
- ngx_feature_incs="#include <sys/ipc.h>
-                   #include <sys/shm.h>"
- ngx_feature_path=
-@@ -660,7 +660,7 @@ ngx_feature_test="int  id;
- 
- ngx_feature="POSIX semaphores"
- ngx_feature_name="NGX_HAVE_POSIX_SEM"
--ngx_feature_run=yes
-+ngx_feature_run=no
- ngx_feature_incs="#include <semaphore.h>"
- ngx_feature_path=
- ngx_feature_libs=
 

--- a/net/nginx/patches/102-sizeof_test_fix.patch
+++ /dev/null
@@ -1,27 +1,1 @@
---- a/auto/types/sizeof
-+++ b/auto/types/sizeof
-@@ -25,8 +25,13 @@ $NGX_INCLUDE_UNISTD_H
- $NGX_INCLUDE_INTTYPES_H
- $NGX_INCLUDE_AUTO_CONFIG_H
- 
-+char object_code_block[] = {
-+	'\n', 'e', '4', 'V', 'A',
-+	'0', 'x', ('0' + sizeof($ngx_type)),
-+	'Y', '3', 'p', 'M', '\n'
-+};
-+
- int main() {
--    printf("%d", (int) sizeof($ngx_type));
-     return 0;
- }
- 
-@@ -40,7 +45,7 @@ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&
- 
- 
- if [ -x $NGX_AUTOTEST ]; then
--    ngx_size=`$NGX_AUTOTEST`
-+    ngx_size=`sed -ne 's/^e4VA0x\(.\)Y3pM$/\1/p' < $NGX_AUTOTEST`
-     echo " $ngx_size bytes"
- fi
- 
 

--- a/net/nginx/patches/103-sys_nerr.patch
+++ /dev/null
@@ -1,13 +1,1 @@
---- a/src/os/unix/ngx_errno.c
-+++ b/src/os/unix/ngx_errno.c
-@@ -8,6 +8,9 @@
- #include <ngx_config.h>
- #include <ngx_core.h>
- 
-+#ifndef NGX_SYS_NERR
-+#define NGX_SYS_NERR  128
-+#endif
- 
- /*
-  * The strerror() messages are copied because:
 

--- a/net/nginx/patches/200-config.patch
+++ /dev/null
@@ -1,19 +1,1 @@
---- a/conf/nginx.conf
-+++ b/conf/nginx.conf
-@@ -1,5 +1,5 @@
- 
--#user  nobody;
-+user nobody nogroup;
- worker_processes  1;
- 
- #error_log  logs/error.log;
-@@ -16,7 +16,7 @@ events {
- 
- http {
-     include       mime.types;
--    default_type  application/octet-stream;
-+    #default_type  application/octet-stream;
- 
-     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
-     #                  '$status $body_bytes_sent "$http_referer" '
 

--- a/net/nginx/patches/300-crosscompile_ccflags.patch
+++ /dev/null
@@ -1,34 +1,1 @@
---- a/auto/endianness
-+++ b/auto/endianness
-@@ -21,7 +21,7 @@ int main() {
- 
- END
- 
--ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
-+ngx_test="$CC $NGX_CC_OPT $CC_TEST_FLAGS $CC_AUX_FLAGS \
-           -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
- 
- eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
---- a/auto/feature
-+++ b/auto/feature
-@@ -39,7 +39,7 @@ int main() {
- END
- 
- 
--ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS $ngx_feature_inc_path \
-+ngx_test="$CC $NGX_CC_OPT $CC_TEST_FLAGS $CC_AUX_FLAGS $ngx_feature_inc_path \
-           -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_TEST_LD_OPT $ngx_feature_libs"
- 
- ngx_feature_inc_path=
---- a/auto/include
-+++ b/auto/include
-@@ -27,7 +27,7 @@ int main() {
- END
- 
- 
--ngx_test="$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c"
-+ngx_test="$CC $NGX_CC_OPT -o $NGX_AUTOTEST $NGX_AUTOTEST.c"
- 
- eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
- 
 

file:a/net/ntpd/Makefile (deleted)
--- a/net/ntpd/Makefile
+++ /dev/null
@@ -1,195 +1,1 @@
-#
-# Copyright (C) 2006-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=ntp
-PKG_VERSION:=4.2.6p5
-PKG_RELEASE:=2
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
-PKG_MD5SUM:=00df80a84ec9528fcfb09498075525bc
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-
-PKG_BUILD_DEPENDS:=libelf1
-PKG_FIXUP:=autoreconf
-PKG_LIBTOOL_PATHS:=. sntp
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/ntpd/Default
-  SUBMENU:=Time Synchronization
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=ISC ntp
-  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
-  URL:=http://www.ntp.org/
-  DEPENDS:=+libcap
-endef
-
-define Package/ntpd/Default/description
- The ISC ntp suite is a collection of tools used to synchronize the
- system clock with remote NTP time servers and run/montior local NTP
- servers.
-endef
-
-define Package/ntpd
-$(call Package/ntpd/Default)
-  TITLE+= server
-  VARIANT:=nossl
-endef
-
-define Package/ntpd/description
-$(call Package/ntpd/Default/description)
- .
- This package contains the ntpd server.
-endef
-
-define Package/ntpd-ssl
-$(call Package/ntpd/Default)
-  TITLE+= server (with OpenSSL support)
-  VARIANT:=ssl
-  DEPENDS+= +libopenssl
-endef
-
-define Package/ntpd-ssl/description
-$(call Package/ntpd/Default/description)
- .
- This package contains the ntpd server with OpenSSL support.
-endef
-
-define Package/ntpdate
-$(call Package/ntpd/Default)
-  TITLE+=date
-  VARIANT:=nossl
-endef
-
-define Package/ntpdate/description
-$(call Package/ntpd/Default/description)
- .
- This package contains ntpdate.
-endef
-
-define Package/ntp-utils
-$(call Package/ntpd/Default)
-  TITLE+= utilities
-  VARIANT:=nossl
-endef
-
-define Package/ntp-utils/description
-$(call Package/ntpd/Default/description)
- .
- This package contains ntpdc, ntpq and ntptime.
-endef
-
-define Package/ntp-keygen
-$(call Package/ntpd/Default)
-  TITLE+=keygen
-  VARIANT:=nossl
-endef
-
-define Package/ntp-keygen/description
-$(call Package/ntpd/Default/description)
- .
- This package contains the ntp-keygen.
-endef
-
-define Package/ntp-keygen-ssl
-$(call Package/ntpd/Default)
-  TITLE+=keygen (with OpenSSL support)
-  VARIANT:=ssl
-  DEPENDS+= +libopenssl
-endef
-
-define Package/ntp-keygen-ssl/description
-$(call Package/ntpd/Default/description)
- .
- This package contains the ntp-keygen with OpenSSL support.
-endef
-
-define Package/ntpd/conffiles
-/etc/ntp.conf
-endef
-
-CONFIGURE_VARS += \
-	ac_cv_header_md5_h=no \
-	ac_cv_lib_rt_sched_setscheduler=no \
-	ac_cv_header_dns_sd_h=no
-
-CONFIGURE_ARGS += \
-	--disable-all-clocks \
-	--disable-parse-clocks \
-	--without-ntpsnmpd \
-	--without-lineeditlibs \
-	--enable-NMEA \
-	--enable-LOCAL-CLOCK \
-	--enable-SHM \
-	--enable-linuxcaps
-
-ifeq ($(BUILD_VARIANT),ssl)
-  CONFIGURE_ARGS += \
-	--with-crypto \
-	--with-openssl-incdir="$(STAGING_DIR)/usr/include" \
-	--with-openssl-libdir="$(STAGING_DIR)/usr/lib"
-endif
-
-define Package/ntpd/install
-	$(INSTALL_DIR) $(1)/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/
-	$(INSTALL_DIR) $(1)/etc
-	$(INSTALL_CONF) ./files/ntp.conf $(1)/etc/
-	$(INSTALL_DIR) $(1)/etc/init.d
-	$(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
-	$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
-	$(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
-endef
-
-define Package/ntpd/postinst
-#!/bin/sh
-[ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd"
-exit 0
-endef
-
-define Package/ntpd/postrm
-#!/bin/sh
-/bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd
-exit 0
-endef
-
-Package/ntpd-ssl/conffiles = $(Package/ntpd/conffiles)
-Package/ntpd-ssl/install = $(Package/ntpd/install)
-
-define Package/ntpdate/install
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/
-	$(INSTALL_DIR) $(1)/etc/init.d
-	$(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate
-endef
-
-define Package/ntp-utils/install
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntptime $(1)/usr/sbin/
-endef
-
-define Package/ntp-keygen/install
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntp-keygen $(1)/usr/sbin/
-endef
-
-Package/ntp-keygen-ssl/install = $(Package/ntp-keygen/install)
-
-$(eval $(call BuildPackage,ntpd))
-$(eval $(call BuildPackage,ntpd-ssl))
-$(eval $(call BuildPackage,ntpdate))
-$(eval $(call BuildPackage,ntp-utils))
-$(eval $(call BuildPackage,ntp-keygen))
-$(eval $(call BuildPackage,ntp-keygen-ssl))
-

file:a/net/ntpd/files/ntp.conf (deleted)
--- a/net/ntpd/files/ntp.conf
+++ /dev/null
@@ -1,27 +1,1 @@
-# use a random selection of 4 public stratum 2 servers
-# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
 
-#restrict default nomodify notrap noquery
-#restrict default noquery
-
-restrict 127.0.0.1
-
-driftfile  /var/lib/ntp/ntp.drift
-
-server 0.openwrt.pool.ntp.org iburst
-server 1.openwrt.pool.ntp.org iburst
-server 2.openwrt.pool.ntp.org iburst
-server 3.openwrt.pool.ntp.org iburst
-
-
-# GPS(NMEA)+PPS
-#server 127.127.20.0 minpoll 4 prefer
-#fudge 127.127.20.0 flag3 1 flag2 0
-
-# SMA PPS
-#server 127.127.28.0 minpoll 4 prefer
-#fudge 127.127.28.0 refid PPS flag3 1
-
-#server 192.168.1.253
-
-

--- a/net/ntpd/files/ntpd.hotplug
+++ /dev/null
@@ -1,11 +1,1 @@
-NAME=ntpd
-CONFIG=/etc/ntp.conf
-COMMAND=/usr/sbin/$NAME
 
-[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
-        [ -x $COMMAND ] && [ -r $CONFIG ] && {
-		killall ntpd
-		/etc/init.d/ntpd start
-        } &
-}
-

--- a/net/ntpd/files/ntpd.init
+++ /dev/null
@@ -1,21 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
 
-START=65
-STOP=65
-
-USE_PROCD=1
-
-start_service() {
-#	ln -sf /dev/ttyS0 /dev/gps0
-#	/usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf
-	user_exists ntp 123 || user_add ntp 123 123 ntp /var/lib/ntp
-	group_exists ntp 123 || group_add ntp 123
-	mkdir -p /var/lib/ntp
-	chown -R ntp:ntp /var/lib/ntp
-
-	procd_open_instance
-	procd_set_param command /sbin/ntpd -g -u ntp:ntp -p /var/run/ntpd.pid -n
-	procd_close_instance
-}
-

--- a/net/ntpd/files/ntpdate.init
+++ /dev/null
@@ -1,14 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2008 OpenWrt.org
 
-START=60
-
-STEP_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org"
-TIMEOUT="2" # in seconds
-
-start() {
-	for s in $STEP_SERVERS ; do
-		/usr/sbin/ntpdate -s -b -u -t "$TIMEOUT" "$s" && break
-	done
-}
-

file:a/net/openssh/Makefile (deleted)
--- a/net/openssh/Makefile
+++ /dev/null
@@ -1,266 +1,1 @@
-#
-# Copyright (C) 2006-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=openssh
-PKG_VERSION:=6.6p1
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
-		ftp://openbsd.wiretapped.net/pub/OpenBSD/OpenSSH/portable/ \
-		ftp://ftp.belnet.be/packages/openbsd/OpenSSH/portable/ \
-		ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/
-PKG_MD5SUM:=3e9800e6bca1fbac0eea4d41baa7f239
-
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-
-PKG_BUILD_DEPENDS:=libopenssl
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/openssh/Default
-	SECTION:=net
-	CATEGORY:=Network
-	DEPENDS:=+libopenssl +zlib +SSP_SUPPORT:libssp
-	TITLE:=OpenSSH
-	MAINTAINER:=Peter Wagner <tripolar@gmx.at>
-	URL:=http://www.openssh.com/
-	SUBMENU:=SSH
-	VARIANT:=without-pam
-endef
-
-define Package/openssh-moduli
-	$(call Package/openssh/Default)
-	DEPENDS+= +openssh-keygen
-	TITLE+= moduli file
-endef
-
-define Package/openssh-moduli/description
-OpenSSH server moduli file.
-endef
-
-define Package/openssh-client
-	$(call Package/openssh/Default)
-	TITLE+= client
-endef
-
-define Package/openssh-client/description
-OpenSSH client.
-endef
-
-define Package/openssh-client/conffiles
-/etc/ssh/ssh_config
-endef
-
-define Package/openssh-client-utils
-	$(call Package/openssh/Default)
-	DEPENDS+= +openssh-client +openssh-keygen
-	TITLE+= client utilities
-endef
-
-define Package/openssh-client-utils/description
-OpenSSH client utilities.
-endef
-
-define Package/openssh-keygen
-	$(call Package/openssh/Default)
-	TITLE+= keygen
-endef
-
-define Package/openssh-keygen/description
-OpenSSH keygen.
-endef
-
-define Package/openssh-server
-	$(call Package/openssh/Default)
-	DEPENDS+= +openssh-keygen
-	TITLE+= server
-endef
-
-define Package/openssh-server/description
-OpenSSH server.
-endef
-
-define Package/openssh-server/conffiles
-/etc/ssh/sshd_config
-endef
-
-define Package/openssh-server-pam
-	$(call Package/openssh/Default)
-	DEPENDS+= +libpthread +openssh-keygen +libpam
-	TITLE+= server (with PAM support)
-	VARIANT:=with-pam
-endef
-
-define Package/openssh-server-pam/description
-OpenSSH server (with PAM support).
-endef
-
-define Package/openssh-server-pam/conffiles
-/etc/pam.d/sshd
-/etc/security/access-sshd-local.conf
-/etc/ssh/sshd_config
-endef
-
-define Package/openssh-sftp-client
-	$(call Package/openssh/Default)
-	TITLE+= SFTP client
-endef
-
-define Package/openssh-sftp-client/description
-OpenSSH SFTP client.
-endef
-
-define Package/openssh-sftp-server
-	$(call Package/openssh/Default)
-	TITLE+= SFTP server
-endef
-
-define Package/openssh-sftp-server/description
-OpenSSH SFTP server.
-endef
-
-CONFIGURE_ARGS+= \
-	$(DISABLE_NLS) \
-	--sysconfdir=/etc/ssh \
-	--with-privsep-user=sshd \
-	--with-privsep-path=/var/empty \
-	--enable-shared \
-	--disable-static \
-	--disable-debug \
-	--disable-strip \
-	--disable-etc-default-login \
-	--disable-lastlog \
-	--disable-utmp \
-	--disable-utmpx \
-	--disable-wtmp \
-	--disable-wtmpx \
-	--without-bsd-auth \
-	--without-kerberos5 \
-	--without-x
-
-ifeq ($(BUILD_VARIANT),with-pam)
-CONFIGURE_ARGS += \
-	--with-pam
-else
-CONFIGURE_ARGS += \
-	--without-pam
-endif
-
-ifeq ($(CONFIG_OPENSSL_ENGINE),y)
-CONFIGURE_ARGS+= \
-	--with-ssl-engine
-endif
-
-ifneq ($(CONFIG_SSP_SUPPORT),y)
-CONFIGURE_ARGS += \
-	--without-stackprotect
-endif
-
-CONFIGURE_VARS += LD="$(TARGET_CC)"
-
-ifeq ($(BUILD_VARIANT),with-pam)
-TARGET_LDFLAGS += -lpthread
-endif
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		LIBS="" \
-		sftp-server
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		STRIP_OPT="" \
-		all install
-endef
-
-define Package/openssh-client/preinst
-#!/bin/sh
-if [ -L $${IPKG_INSTROOT}/usr/bin/ssh ] && [ -L $${IPKG_INSTROOT}/usr/bin/scp ]; then
-	rm -f $${IPKG_INSTROOT}/usr/bin/ssh $${IPKG_INSTROOT}/usr/bin/scp;
-fi
-exit 0
-endef
-
-define Package/openssh-client/postrm
-#!/bin/sh
-rm -f $${IPKG_INSTROOT}/usr/bin/ssh $${IPKG_INSTROOT}/usr/bin/scp;
-if [ -x $${IPKG_INSTROOT}/usr/sbin/dropbear ] ; then
-	ln -s /usr/sbin/dropbear $${IPKG_INSTROOT}/usr/bin/ssh;
-	ln -s /usr/sbin/dropbear $${IPKG_INSTROOT}/usr/bin/scp;
-fi
-exit 0
-endef
-
-define Package/openssh-moduli/install
-	$(INSTALL_DIR) $(1)/etc/ssh
-	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/moduli $(1)/etc/ssh/
-endef
-
-define Package/openssh-client/install
-	$(INSTALL_DIR) $(1)/etc/ssh
-	chmod 0700 $(1)/etc/ssh
-	$(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(1)/etc/ssh/
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/bin/
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scp $(1)/usr/bin/
-endef
-
-define Package/openssh-client-utils/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(foreach bin,add agent keyscan keysign,$(PKG_BUILD_DIR)/ssh-$(bin)) $(1)/usr/bin/
-endef
-
-define Package/openssh-keygen/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(1)/usr/bin/
-endef
-
-define Package/openssh-server/install
-	$(INSTALL_DIR) $(1)/etc/ssh
-	chmod 0700 $(1)/etc/ssh
-	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/
-	$(INSTALL_DIR) $(1)/etc/init.d
-	$(INSTALL_BIN) ./files/sshd.init $(1)/etc/init.d/sshd
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sshd $(1)/usr/sbin/
-endef
-
-define Package/openssh-server-pam/install
-	$(call Package/openssh-server/install,$(1))
-	sed -i 's,#PasswordAuthentication yes,PasswordAuthentication no,g' $(1)/etc/ssh/sshd_config
-	sed -i 's,#UsePAM no,UsePAM yes,g' $(1)/etc/ssh/sshd_config
-	$(INSTALL_DIR) $(1)/etc/pam.d
-	$(INSTALL_DATA) ./files/sshd.pam $(1)/etc/pam.d/sshd
-	$(INSTALL_DIR) $(1)/etc/security
-	$(INSTALL_DATA) ./files/sshd.pam-access $(1)/etc/security/access-sshd-local.conf
-endef
-
-define Package/openssh-sftp-client/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sftp $(1)/usr/bin/
-endef
-
-define Package/openssh-sftp-server/install
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/sftp-server $(1)/usr/lib/
-	$(INSTALL_DIR) $(1)/usr/libexec
-	ln -sf ../lib/sftp-server $(1)/usr/libexec/sftp-server
-endef
-
-$(eval $(call BuildPackage,openssh-client))
-$(eval $(call BuildPackage,openssh-moduli))
-$(eval $(call BuildPackage,openssh-client-utils))
-$(eval $(call BuildPackage,openssh-keygen))
-$(eval $(call BuildPackage,openssh-server))
-$(eval $(call BuildPackage,openssh-server-pam))
-$(eval $(call BuildPackage,openssh-sftp-client))
-$(eval $(call BuildPackage,openssh-sftp-server))
-

--- a/net/openssh/files/sshd.init
+++ /dev/null
@@ -1,45 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
 
-START=50
-STOP=50
-
-USE_PROCD=1
-PROG=/usr/sbin/sshd
-
-start_service() {
-	for type in rsa dsa; do {
-		# check for keys
-		key=/etc/ssh/ssh_host_${type}_key
-		[ ! -f $key ] && {
-			# generate missing keys
-			[ -x /usr/bin/ssh-keygen ] && {
-				/usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&-
-			}
-		}
-	}; done
-	user_exists sshd 22 || user_add sshd 22 22 sshd /var/empty
-	group_exists sshd 22 || group_add sshd 22 
-	mkdir -m 0700 -p /var/empty
-
-	procd_open_instance
-	procd_set_param command $PROG -D
-	procd_close_instance
-}
-
-shutdown() {
-	local pid
-	local pids
-	local pid_mine
-
-	stop
-
-	# kill active clients
-	pid_mine="$$"
-	pids="$(pidof sshd)"
-	for pid in $pids; do
-		[ "$pid" = "$pid_mine" ] && continue
-		[ -e "/proc/$pid/stat" ] && kill $pid
-	done
-}
-

--- a/net/openssh/files/sshd.pam
+++ /dev/null
@@ -1,42 +1,1 @@
-# PAM configuration for the Secure Shell service
 
-# Read environment variables from /etc/environment and
-# /etc/security/pam_env.conf.
-auth       required     pam_env.so
-
-# Skip Google Authenticator if logging in from the local network.
-# auth [success=1 default=ignore] pam_access.so accessfile=/etc/security/access-sshd-local.conf
-# Google Authenticator 2-step verification.
-# auth       requisite    pam_google_authenticator.so
-
-# Standard Un*x authentication.
-auth       include      common-auth
-
-# Disallow non-root logins when /etc/nologin exists.
-account    required     pam_nologin.so
-
-# Uncomment and edit /etc/security/access.conf if you need to set complex
-# access limits that are hard to express in sshd_config.
-# account    required     pam_access.so
-
-# Standard Un*x authorization.
-account    include      common-account
-
-# Standard Un*x session setup and teardown.
-session    include      common-session
-
-# Print the message of the day upon successful login.
-session    optional     pam_motd.so
-
-# Print the status of the user's mailbox upon successful login.
-session    optional     pam_mail.so standard noenv
-
-# Set up user limits from /etc/security/limits.conf.
-session    required     pam_limits.so
-
-# Set up SELinux capabilities (need modified pam)
-# session    required     pam_selinux.so multiple
-
-# Standard Un*x password updating.
-password   include      common-password
-

--- a/net/openssh/files/sshd.pam-access
+++ /dev/null
@@ -1,5 +1,1 @@
-# Skip Google Authenticator for local network
-#+ : ALL : 192.168.1.0/24
-+ : ALL : LOCAL
-- : ALL : ALL
 

--- a/net/openssh/patches/100-no_cast_fix.patch
+++ /dev/null
@@ -1,14 +1,1 @@
---- a/cipher.c
-+++ b/cipher.c
-@@ -80,8 +80,10 @@ static const struct Cipher ciphers[] = {
- 	{ "3des-cbc",	SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc },
- 	{ "blowfish-cbc",
- 			SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc },
-+#ifndef OPENSSL_NO_CAST
- 	{ "cast128-cbc",
- 			SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_cast5_cbc },
-+#endif
- 	{ "arcfour",	SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 0, EVP_rc4 },
- 	{ "arcfour128",	SSH_CIPHER_SSH2, 8, 16, 0, 0, 1536, 0, EVP_rc4 },
- 	{ "arcfour256",	SSH_CIPHER_SSH2, 8, 32, 0, 0, 1536, 0, EVP_rc4 },
 

--- a/net/openssh/patches/130-implicit_memset_decl_fix.patch
+++ /dev/null
@@ -1,13 +1,1 @@
---- a/includes.h
-+++ b/includes.h
-@@ -59,6 +59,9 @@
- /*
-  *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
-  */
-+#ifdef HAVE_STRING_H
-+# include <string.h>
-+#endif
- #ifdef HAVE_STRINGS_H
- # include <strings.h>
- #endif
 

--- a/net/openssh/patches/140-pam_uclibc_pthreads_fix.patch
+++ /dev/null
@@ -1,85 +1,1 @@
---- a/auth-pam.c
-+++ b/auth-pam.c
-@@ -159,7 +159,7 @@ sshpam_sigchld_handler(int sig)
- 	}
- 	if (WIFSIGNALED(sshpam_thread_status) &&
- 	    WTERMSIG(sshpam_thread_status) == SIGTERM)
--		return;	/* terminated by pthread_cancel */
-+		return;	/* terminated by pthread2_cancel */
- 	if (!WIFEXITED(sshpam_thread_status))
- 		sigdie("PAM: authentication thread exited unexpectedly");
- 	if (WEXITSTATUS(sshpam_thread_status) != 0)
-@@ -168,14 +168,14 @@ sshpam_sigchld_handler(int sig)
- 
- /* ARGSUSED */
- static void
--pthread_exit(void *value)
-+pthread2_exit(void *value)
- {
- 	_exit(0);
- }
- 
- /* ARGSUSED */
- static int
--pthread_create(sp_pthread_t *thread, const void *attr,
-+pthread2_create(sp_pthread_t *thread, const void *attr,
-     void *(*thread_start)(void *), void *arg)
- {
- 	pid_t pid;
-@@ -201,7 +201,7 @@ pthread_create(sp_pthread_t *thread, con
- }
- 
- static int
--pthread_cancel(sp_pthread_t thread)
-+pthread2_cancel(sp_pthread_t thread)
- {
- 	signal(SIGCHLD, sshpam_oldsig);
- 	return (kill(thread, SIGTERM));
-@@ -209,7 +209,7 @@ pthread_cancel(sp_pthread_t thread)
- 
- /* ARGSUSED */
- static int
--pthread_join(sp_pthread_t thread, void **value)
-+pthread2_join(sp_pthread_t thread, void **value)
- {
- 	int status;
- 
-@@ -510,7 +510,7 @@ sshpam_thread(void *ctxtp)
- 	/* XXX - can't do much about an error here */
- 	ssh_msg_send(ctxt->pam_csock, sshpam_err, &buffer);
- 	buffer_free(&buffer);
--	pthread_exit(NULL);
-+	pthread2_exit(NULL);
- 
-  auth_fail:
- 	buffer_put_cstring(&buffer,
-@@ -521,7 +521,7 @@ sshpam_thread(void *ctxtp)
- 	else
- 		ssh_msg_send(ctxt->pam_csock, PAM_AUTH_ERR, &buffer);
- 	buffer_free(&buffer);
--	pthread_exit(NULL);
-+	pthread2_exit(NULL);
- 
- 	return (NULL); /* Avoid warning for non-pthread case */
- }
-@@ -533,8 +533,8 @@ sshpam_thread_cleanup(void)
- 
- 	debug3("PAM: %s entering", __func__);
- 	if (ctxt != NULL && ctxt->pam_thread != 0) {
--		pthread_cancel(ctxt->pam_thread);
--		pthread_join(ctxt->pam_thread, NULL);
-+		pthread2_cancel(ctxt->pam_thread);
-+		pthread2_join(ctxt->pam_thread, NULL);
- 		close(ctxt->pam_psock);
- 		close(ctxt->pam_csock);
- 		memset(ctxt, 0, sizeof(*ctxt));
-@@ -698,7 +698,7 @@ sshpam_init_ctx(Authctxt *authctxt)
- 	}
- 	ctxt->pam_psock = socks[0];
- 	ctxt->pam_csock = socks[1];
--	if (pthread_create(&ctxt->pam_thread, NULL, sshpam_thread, ctxt) == -1) {
-+	if (pthread2_create(&ctxt->pam_thread, NULL, sshpam_thread, ctxt) == -1) {
- 		error("PAM: failed to start authentication thread: %s",
- 		    strerror(errno));
- 		close(socks[0]);
 

--- a/net/openssh/patches/200-dscp-qos.patch
+++ /dev/null
@@ -1,22 +1,1 @@
---- a/ssh_config
-+++ b/ssh_config
-@@ -46,3 +46,6 @@
- #   VisualHostKey no
- #   ProxyCommand ssh -q -W %h:%p gateway.example.com
- #   RekeyLimit 1G 1h
-+
-+# enable DSCP QoS values (per RFC-4594)
-+#IPQoS AF21 AF11
---- a/sshd_config
-+++ b/sshd_config
-@@ -122,6 +122,9 @@ UsePrivilegeSeparation sandbox		# Defaul
- # no default banner path
- #Banner none
- 
-+# enable DSCP QoS values (per RFC-4594)
-+#IPQoS AF21 AF11
-+
- # override default of no subsystems
- Subsystem	sftp	/usr/libexec/sftp-server
- 
 

file:a/net/rsync/Makefile (deleted)
--- a/net/rsync/Makefile
+++ /dev/null
@@ -1,82 +1,1 @@
-#
-# Copyright (C) 2007-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=rsync
-PKG_VERSION:=3.1.0
-PKG_RELEASE:=2
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://rsync.samba.org/ftp/rsync/src
-PKG_MD5SUM:=3be148772a33224771a8d4d2a028b132
-
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/rsync
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=File Transfer
-  TITLE:=Fast remote file copy program (like rcp)
-  DEPENDS:=+libpopt +zlib
-  URL:=http://rsync.samba.org/
-endef
-
-define Package/rsyncd
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=File Transfer
-  TITLE:=Rsync daemon
-  DEPENDS:=+rsync
-  URL:=http://rsync.samba.org/
-endef
-
-define Package/rsync/description
- rsync is a program that allows files to be copied to and from remote machines
- in much the same way as rcp. It has many more options than rcp, and uses the
- rsync remote-update protocol to greatly speed up file transfers when the
- destination file already exists.
-
- The rsync remote-update protocol allows rsync to transfer just the differences
- between two sets of files across the network link.
-endef
-
-CONFIGURE_ARGS += \
-	--with-included-popt=no \
-	--with-included-zlib=no \
-	--disable-debug \
-	--disable-locale \
-	--disable-xattr-support \
-	--disable-acl-support \
-
-define Package/rsync/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
-endef
-
-define Package/rsyncd/description
- rsyncd is a configuration file and initscript to utilize rsync as a daemon. It
- uses the same binary as rsync.
-endef
-
-define Package/rsyncd/conffiles
-/etc/rsyncd.conf
-endef
-
-define Package/rsyncd/install
-	$(INSTALL_DIR) $(1)/etc
-	$(INSTALL_DATA) ./files/rsyncd.conf $(1)/etc/
-	$(INSTALL_DIR) $(1)/etc/init.d
-	$(INSTALL_BIN) ./files/rsyncd.init $(1)/etc/init.d/rsyncd
-endef
-
-$(eval $(call BuildPackage,rsync))
-$(eval $(call BuildPackage,rsyncd))
-

--- a/net/rsync/files/rsyncd.conf
+++ /dev/null
@@ -1,16 +1,1 @@
-# /etc/rsyncd.conf
-# Minimal configuration for rsync daemon
 
-# Next line required for init script
-pid file = /var/run/rsyncd.pid
-use chroot = yes
-uid = nobody
-gid = nogroup
-read only = yes
-
-# Simple example to configure server
-#[openwrt-etc]
-#path = /etc
-#comment = OpenWrt Configuration Files
-#exclude = /init.d
-

--- a/net/rsync/files/rsyncd.init
+++ /dev/null
@@ -1,15 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2011-2014 OpenWrt.org
 
-START=90
-STOP=10
-
-USE_PROCD=1
-PROG=/usr/bin/rsync
-
-start_service() {
-	procd_open_instance
-	procd_set_param command "$PROG" --daemon --no-detach
-	procd_close_instance
-}
-

file:a/net/rtorrent/Makefile (deleted)
--- a/net/rtorrent/Makefile
+++ /dev/null
@@ -1,93 +1,1 @@
-#
-# Copyright (C) 2007-2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=rtorrent
-PKG_VERSION:=0.9.3-git
-PKG_RELEASE:=$(PKG_SOURCE_VERSION)-1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/rakshasa/rtorrent.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=82a68420f4d90098e00cc92f082f10a8079e9800
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-
-PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/rtorrent/Default
-  SUBMENU:=BitTorrent
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=BitTorrent client for ncurses
-  URL:=http://libtorrent.rakshasa.no/
-  DEPENDS:=+libcurl +libtorrent +libncursesw +libsigcxx +libpthread
-endef
-
-define Package/rtorrent/Default/description
- rTorrent is a BitTorrent client for ncurses, using the libtorrent library.
- The client and library is written in C++ with emphasis on speed and
- efficiency, while delivering equivalent features to those found in GUI based
- clients in an ncurses client.
-endef
-
-define Package/rtorrent
-$(call Package/rtorrent/Default)
-  VARIANT:=norpc
-endef
-
-define Package/rtorrent/description
-$(call Package/rtorrent/Default/description)
- This package is built without xmlrpc support
-endef
-
-define Package/rtorrent-rpc
-$(call Package/rtorrent/Default)
-  VARIANT:=rpc
-  DEPENDS+=+xmlrpc-c-server
-  TITLE+=(with rpc support)
-endef
-
-define Package/rtorrent-rpc/description
-$(call Package/rtorrent/Default/description)
- This package is built with xmlrpc support
-endef
-
-TARGET_LDFLAGS += -lpthread -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
-
-CONFIGURE_ARGS+= \
-	--enable-shared \
-	--disable-static \
-	--disable-debug
-
-ifeq ($(BUILD_VARIANT),rpc)
-	CONFIGURE_ARGS += \
-		--with-xmlrpc-c
-endif
-
-
-define Build/Configure
-	( cd $(PKG_BUILD_DIR); ./autogen.sh );
-	$(call Build/Configure/Default)
-endef
-
-define Package/rtorrent/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rtorrent $(1)/usr/bin/
-endef
-
-Package/rtorrent-rpc/install = $(Package/rtorrent/install)
-
-$(eval $(call BuildPackage,rtorrent))
-$(eval $(call BuildPackage,rtorrent-rpc))
-

--- a/net/rtorrent/patches/100-fix-cross_compile.patch
+++ /dev/null
@@ -1,31 +1,1 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -4,7 +4,6 @@ AC_DEFINE(API_VERSION, 8, api version)
- 
- AM_INIT_AUTOMAKE
- AC_CONFIG_HEADERS(config.h)
--AM_PATH_CPPUNIT(1.9.6)
- 
- AC_PROG_CXX
- AC_PROG_LIBTOOL
---- a/scripts/common.m4
-+++ b/scripts/common.m4
-@@ -223,7 +223,7 @@ dnl   Need to fix this so that it uses t
- AC_DEFUN([TORRENT_CHECK_EXECINFO], [
-   AC_MSG_CHECKING(for execinfo.h)
- 
--  AC_RUN_IFELSE([AC_LANG_SOURCE([
-+  AC_LINK_IFELSE([AC_LANG_SOURCE([
-       #include <execinfo.h>
-       int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
-       ])],
-@@ -238,7 +238,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [
- AC_DEFUN([TORRENT_CHECK_ALIGNED], [
-   AC_MSG_CHECKING(the byte alignment)
- 
--  AC_RUN_IFELSE([AC_LANG_SOURCE([
-+  AC_LINK_IFELSE([AC_LANG_SOURCE([
-       #include <inttypes.h>
-       int main() {
-         char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 };
 

--- a/net/rtorrent/patches/120-fix-ncurses.patch
+++ /dev/null
@@ -1,12 +1,1 @@
---- a/src/display/canvas.h
-+++ b/src/display/canvas.h
-@@ -48,7 +48,7 @@ class Canvas {
- public:
-   typedef std::vector<Attributes> attributes_list;
- 
--  Canvas(int x = 0, int y = 0, int width = 0, int height = 0);
-+  Canvas(int x = 0, int y = 0, int width = 1, int height = 1);
-   ~Canvas() { delwin(m_window); }
- 
-   void                refresh()                                               { wnoutrefresh(m_window); }
 

file:a/net/sslh/Makefile (deleted)
--- a/net/sslh/Makefile
+++ /dev/null
@@ -1,52 +1,1 @@
-#
-# Copyright (C) 2009-2012 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=sslh
-PKG_VERSION:=1.14
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://rutschle.net/tech/
-PKG_MD5SUM:=36e64bd6c7d0a299d5acd1109988099b
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/sslh
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=Routing and Redirection
-  TITLE:=SSL/SSH multiplexer
-  URL:=http://rutschle.net/tech/sslh.shtml
-  MAINTAINER:=Matthias Buecher <mail@maddes.net>
-endef
-
-define Package/sslh/conffiles
-/etc/config/sslh
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CC="$(TARGET_CC)" \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		USELIBCONFIG= \
-		USELIBWRAP= \
-		all
-endef
-
-define Package/sslh/install
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/sslh-fork $(1)/usr/sbin/sslh
-	$(INSTALL_DIR) $(1)/etc/init.d/
-	$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
-	$(INSTALL_DIR) $(1)/etc/config
-	$(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
-endef
-
-$(eval $(call BuildPackage,sslh))
-

--- a/net/sslh/files/sslh.config
+++ /dev/null
@@ -1,31 +1,1 @@
-package 'sslh'
 
-config 'sslh' 'default'
-	# disable or enable
-	option 'enable' '1'
-	# listen defaults to '0.0.0.0:443' (all interfaces)
-	# multiple -p arguments may be supplied using a uci list
-	# -p <listenaddr>:<listenport>
-	option 'listen' ''
-	# ssh defaults to 'localhost:22'
-	# --ssh <sshhost>:<sshport>
-	option 'ssh' ''
-	# ssl defaults to 'localhost:443'
-	# --ssl <sslhost>:<sslport>
-	option 'ssl' ''
-	# openvpn defaults to 'localhost:1194'
-	# --openvpn <openvpnhost>:<openvpnport>
-	option 'openvpn' ''
-	# tinc defaults to 'localhost:655'
-	# --tinc <tinchost>:<tincport>
-	option 'tinc' ''
-	# xmpp defaults to 'localhost:5222'
-	# --xmpp <xmpphost>:<xmppport>
-	option 'xmpp' ''
-	# timeout (for ssh, then ssl is assumed) defaults to 2
-	# -t
-	option 'timeout' ''
-	# verbose defaults to off
-	# -v
-	option 'verbose' '0'
-

--- a/net/sslh/files/sslh.init
+++ /dev/null
@@ -1,63 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2009-2012 OpenWrt.org
 
-START=95
-
-# XXX: pid-files are useless because sslh forks after creating them
-SERVICE_USE_PID=
-
-start_instance() {
-	local section="$1"
-
-	# check if section is enabled (default)
-	local enable
-	config_get_bool enable "${section}" 'enable' '0'
-	[ ${enable} -gt 0 ] || return 1
-
-	local args=""
-	local val
-	# A) listen parameter
-	config_get vals "${section}" listen
-	[ -n "${vals}" ] && for val in $vals; do append args "-p ${val}"; done
-	# B) ssh parameter
-	config_get val "${section}" ssh
-	[ -n "${val}" ] && append args "--ssh ${val}"
-	# C) ssl parameter
-	config_get val "${section}" ssl
-	[ -n "${val}" ] && append args "--ssl ${val}"
-	# D) openvpn parameter
-        config_get val "${section}" openvpn
-        [ -n "${val}" ] && append args "--openvpn ${val}"
-	# E) tinc parameter
-        config_get val "${section}" tinc
-        [ -n "${val}" ] && append args "--tinc ${val}"
-	# F) xmpp parameter
-	config_get val "${section}" xmpp
-	[ -n "${val}" ] && append args "--xmpp ${val}"
-	# G) timeout (before a connection is considered to be SSH)
-	config_get val "${section}" timeout
-	[ -n "${val}" ] && append args "-t ${val}"
-	# H) verbose parameter
-	local verbosed
-	config_get_bool verbosed "${section}" verbose 0
-	[ "${verbosed}" -ne 0 ] && append args "-v"
-
-	# Defaults were removed for --user and --pidfile options
-	# in sslh 1.11; Define them here instead.
-	append args "--user nobody"
-	append args "--pidfile /var/run/sslh.pid"
-
-	# XXX: allow more that one instance to run simultaneously
-	SERVICE_MATCH_NAME=1 SERVICE_NAME="sslh-dummy-$$" \
-	service_start /usr/sbin/sslh ${args}
-}
-
-start() {
-	config_load 'sslh'
-	config_foreach start_instance 'sslh'
-}
-
-stop() {
-	service_stop /usr/sbin/sslh
-}
-

--- a/net/sslh/patches/001-no_sslh_select.patch
+++ /dev/null
@@ -1,30 +1,1 @@
---- a/Makefile
-+++ b/Makefile
-@@ -37,16 +37,12 @@ all: sslh $(MAN) echosrv
- 	$(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -c $<
- 
- 
--sslh: $(OBJS) sslh-fork sslh-select
-+sslh: $(OBJS) sslh-fork
- 
- sslh-fork: $(OBJS) sslh-fork.o Makefile common.h
- 	$(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-fork sslh-fork.o $(OBJS) $(LIBS)
- 	#strip sslh-fork
- 
--sslh-select: $(OBJS) sslh-select.o Makefile common.h 
--	$(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-select sslh-select.o $(OBJS) $(LIBS)
--	#strip sslh-select
--
- echosrv: $(OBJS) echosrv.o
- 	$(CC) $(CFLAGS) -o echosrv echosrv.o probe.o common.o $(LIBS)
- 
-@@ -77,7 +73,7 @@ uninstall:
- 	update-rc.d sslh remove
- 
- clean:
--	rm -f sslh-fork sslh-select echosrv $(MAN) *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info 
-+	rm -f sslh-fork echosrv $(MAN) *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info 
- 
- tags:
- 	ctags --globals -T *.[ch]
 

--- a/sound/pulseaudio/Makefile
+++ /dev/null
@@ -1,271 +1,1 @@
-#
-# Copyright (C) 2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=pulseaudio
-PKG_VERSION:=5.0
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/
-PKG_MD5SUM:=c43749838612f4860465e83ed62ca38e
-
-PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=intltool/host
-
-PKG_FIXUP:=autoreconf
-PKG_USE_MIPS16:=0
-
-PKG_INSTALL = 1
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/nls.mk
-
-#TODO: split pulse into executable and library (or even better into several libraries since they're used as loadable modules, so not linked into)
-define Package/pulseaudio/Default
-  SECTION:=sound
-  CATEGORY:=Sound
-  DEPENDS:=+libspeexdsp +libsndfile +libltdl +libpthread \
-	+librt +alsa-lib +libjson +libopenssl +libwrap +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
-  TITLE:=Network sound server
-  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
-  URL:=http://www.pulseaudio.org
-  PROVIDES:=pulseaudio
-endef
-
-define Package/pulseaudio-daemon
-  $(call Package/pulseaudio/Default)
-  VARIANT:=noavahi
-endef
-
-define Package/pulseaudio-daemon-avahi
-  $(call Package/pulseaudio/Default)
-  DEPENDS+=+dbus +libavahi-client +avahi-daemon
-  TITLE+= (avahi)
-  VARIANT:=avahi
-endef
-
-define Package/pulseaudio/Default/description
-  PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
-endef
-
-define Package/pulseaudio-daemon/description
-  $(call Package/pulseaudio/Default/description)
-endef
-
-define Package/pulseaudio-daemon-avahi/description
-  $(call Package/pulseaudio/Default/description)
-  This package is compiled against dbus and avahi.
-endef
-
-define Package/pulseaudio-daemon/conffiles
-/etc/pulse/client.conf
-/etc/pulse/daemon.conf
-/etc/pulse/default.pa
-/etc/pulse/system.pa
-endef
-
-define Package/pulseaudio-daemon-avahi/conffiles
-/etc/pulse/client.conf
-/etc/pulse/daemon.conf
-/etc/pulse/default.pa
-/etc/pulse/system.pa
-endef
-
-define Package/pulseaudio-tools
-  SECTION:=sound
-  CATEGORY:=Sound
-  DEPENDS:=+libsndfile pulseaudio
-  TITLE:=Tools for Pulseaudio
-  URL:=http://www.pulseaudio.org
-  VARIANT:=noavahi
-endef
-
-define Package/pulseaudio-profiles
-  SECTION:=sound
-  CATEGORY:=Sound
-  DEPENDS:=pulseaudio
-  TITLE:=Profiles for Pulseaudio
-  URL:=http://www.pulseaudio.org
-endef
-
-CONFIGURE_ARGS += \
-	--with-system-user=pulse \
-	--with-system-group=pulse \
-	--with-access-group=audio \
-	--with-database=simple \
-	--enable-alsa \
-	--disable-hal \
-	--disable-gconf \
-	--disable-nls \
-	--disable-manpages \
-	--enable-oss-output \
-	--disable-oss-wrapper \
-	--disable-samplerate \
-	--disable-per-user-esound-socket \
-	--disable-solaris \
-	--disable-gtk2 \
-	--disable-glib2 \
-	--disable-jack \
-	--disable-asyncns \
-	--disable-lirc \
-	--disable-bluez \
-	--disable-udev \
-	--without-fftw
-
-ifeq ($(BUILD_VARIANT),avahi)
-CONFIGURE_ARGS += \
-	--enable-avahi \
-	--enable-dbus
-endif
-
-ifeq ($(BUILD_VARIANT),noavahi)
-CONFIGURE_ARGS += \
-	--disable-avahi \
-	--disable-dbus
-endif
-
-CONFIGURE_VARS += \
-	PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
-
-#SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib
-TARGET_CFLAGS += -std=gnu99
-
-define Build/InstallDev
-	$(INSTALL_DIR) \
-		$(1)/usr/lib/pkgconfig \
-		$(1)/usr/include/pulse \
-		$(1)/usr/lib \
-		$(1)/usr/lib/pulseaudio
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/include/pulse/* \
-		$(1)/usr/include/pulse
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
-		$(1)/usr/lib/pkgconfig
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
-		$(1)/usr/lib/
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
-		$(1)/usr/lib/pulseaudio/
-endef
-
-define Package/pulseaudio-daemon/install
-	$(INSTALL_DIR) \
-		$(1)/etc/pulse \
-		$(1)/etc/init.d \
-		$(1)/usr/bin \
-		$(1)/usr/lib \
-		$(1)/usr/lib/pulseaudio \
-		$(1)/usr/lib/pulse-$(PKG_VERSION)/modules
-
-	$(INSTALL_BIN) \
-		$(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
-		$(1)/usr/bin/pulseaudio
-
-	$(INSTALL_BIN) \
-		./files/pulseaudio.init \
-		$(1)/etc/init.d/pulseaudio
-
-	$(INSTALL_CONF) \
-		$(PKG_INSTALL_DIR)/etc/pulse/* \
-		$(1)/etc/pulse
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
-		$(1)/usr/lib/
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
-		$(1)/usr/lib/pulseaudio/
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
-		$(1)/usr/lib/
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
-		$(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
-
-	chmod -R 0644 $(1)/etc/pulse/*
-endef
-
-define Package/pulseaudio-daemon-avahi/install
-	$(INSTALL_DIR) \
-		$(1)/etc/pulse \
-		$(1)/etc/init.d \
-		$(1)/usr/bin \
-		$(1)/usr/lib \
-		$(1)/usr/lib/pulseaudio \
-		$(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
-		$(1)/etc/dbus-1/system.d
-
-	$(INSTALL_BIN) \
-		$(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
-		$(1)/usr/bin/pulseaudio
-
-	$(INSTALL_BIN) \
-		./files/pulseaudio.init \
-		$(1)/etc/init.d/pulseaudio
-
-	$(INSTALL_CONF) \
-		$(PKG_INSTALL_DIR)/etc/pulse/* \
-		$(1)/etc/pulse
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
-		$(1)/usr/lib/
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
-		$(1)/usr/lib/pulseaudio/
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
-		$(1)/usr/lib/
-
-	$(CP) \
-		$(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
-		$(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
-
-	$(INSTALL_CONF) \
-		$(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
-		$(1)/etc/dbus-1/system.d/pulseaudio-system.conf
-
-	chmod -R 0644 $(1)/etc/pulse/* $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
-endef
-
-define Package/pulseaudio-tools/install
-	$(INSTALL_DIR) \
-		$(1)/usr/bin
-
-	$(INSTALL_BIN) \
-		$(PKG_INSTALL_DIR)/usr/bin/pa* \
-		$(1)/usr/bin/
-endef
-
-define Package/pulseaudio-profiles/install
-	$(INSTALL_DIR) \
-		$(1)/usr/share/pulseaudio/alsa-mixer/paths \
-		$(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
-
-	$(INSTALL_CONF) \
-		$(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
-		$(1)/usr/share/pulseaudio/alsa-mixer/paths
-
-	$(INSTALL_CONF) \
-		$(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
-		$(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
-endef
-
-$(eval $(call BuildPackage,pulseaudio-daemon))
-$(eval $(call BuildPackage,pulseaudio-daemon-avahi))
-$(eval $(call BuildPackage,pulseaudio-tools))
-$(eval $(call BuildPackage,pulseaudio-profiles))
-

--- a/sound/pulseaudio/files/pulseaudio.init
+++ /dev/null
@@ -1,32 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2011 OpenWrt.org
 
-START=65
-STOP=65
-
-USE_PROCD=1
-PROG=/usr/bin/pulseaudio
-
-start_service() {
-	user_exists pulse 51 || user_add pulse 51
-	group_exists pulse 51 || group_add pulse 51
-	[ -d /var/run/pulse ] || {
-		mkdir -m 0755 -p /var/run/pulse
-		chmod 0750 /var/run/pulse
-		chown pulse:pulse /var/run/pulse
-	}
-	[ -d /var/lib/pulse ] || {
-		mkdir -m 0755 -p /var/lib/pulse
-		chmod 0750 /var/lib/pulse
-		chown pulse:pulse /var/lib/pulse
-	}
-
-	chown root:pulse /dev/snd/* /dev/mixer /dev/dsp
-	chmod 664 /dev/snd/* /dev/mixer /dev/dsp
-
-	procd_open_instance
-	procd_set_param command $PROG --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 --realtime=false
-	procd_close_instance
-}
-
-

--- a/sound/pulseaudio/patches/001-no_default_64mb_alloc.patch
+++ /dev/null
@@ -1,12 +1,1 @@
---- a/src/pulsecore/memblock.c
-+++ b/src/pulsecore/memblock.c
-@@ -57,7 +57,7 @@
-  * stored in SHM and our OS does not commit the memory before we use
-  * it for the first time. */
- #define PA_MEMPOOL_SLOTS_MAX 1024
--#define PA_MEMPOOL_SLOT_SIZE (64*1024)
-+#define PA_MEMPOOL_SLOT_SIZE 64
- 
- #define PA_MEMEXPORT_SLOTS_MAX 128
- 
 

file:a/utils/ccid/Makefile (deleted)
--- a/utils/ccid/Makefile
+++ /dev/null
@@ -1,48 +1,1 @@
-#
-# Copyright (C) 2009-2012 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=ccid
-PKG_VERSION:=1.4.5
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://alioth.debian.org/frs/download.php/3672
-PKG_MD5SUM:=cb9a77194ac335c39b262ea83a5b7d2e
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/ccid
-  SECTION:=libs
-  CATEGORY:=Libraries
-  DEPENDS:=+libusb-1.0 +libpcsclite
-  TITLE:=Generic USB CCID smart card reader driver
-  URL:=http://pcsclite.alioth.debian.org/ccid.html
-endef
-
-define Package/ccid/description
-  Generic USB CCID (Chip/Smart Card Interface Devices) driver and ICCD
-  (Integrated Circuit(s) Card Devices).
-endef
-
-TARGET_CFLAGS += $(FPIC)
-
-CONFIGURE_ARGS += \
-	--enable-embedded \
-	--enable-usbdropdir=/usr/lib/pcsc/drivers
-
-define Package/ccid/install
-	$(INSTALL_DIR) $(1)/usr/lib/pcsc
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pcsc/drivers $(1)/usr/lib/pcsc/
-endef
-
-$(eval $(call BuildPackage,ccid))
-

file:a/utils/dump1090/Makefile (deleted)
--- a/utils/dump1090/Makefile
+++ /dev/null
@@ -1,52 +1,1 @@
-#
-# Copyright (C) 2013-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=dump1090
-PKG_VERSION:=2013-02-04
-PKG_RELEASE:=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/antirez/dump1090.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=ff0fe38722c768c7269afa733790a2b968ea3099
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-
-PKG_LICENSE:=BSD-3c
-
-PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/dump1090
-  SECTION:=utils
-  CATEGORY:=Utilities
-  TITLE:=Mode S decoder for the Realtek RTL2832U
-  URL:=https://github.com/antirez/dump1090
-  DEPENDS:=+libpthread +librtlsdr
-endef
-
-
-define Package/dump1090/description
- Dump1090 is a Mode S decoder specifically designed for RTLSDR devices.
- Embedded HTTP server that displays the currently detected aircrafts on
- Google Maps. Network output in Basestation and AVR formats.
-endef
-
-MAKE_FLAGS += \
-	CFLAGS="$(TARGET_CFLAGS)"
-
-define Package/dump1090/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(CP) $(PKG_BUILD_DIR)/dump1090 $(1)/usr/bin
-
-	$(INSTALL_DIR) $(1)/usr/share/dump1090
-	$(CP) $(PKG_BUILD_DIR)/gmap.html $(1)/usr/share/dump1090
-endef
-
-$(eval $(call BuildPackage,dump1090))
-

--- a/utils/pcsc-lite/Makefile
+++ /dev/null
@@ -1,99 +1,1 @@
-#
-# Copyright (C) 2009-2012 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=pcsc-lite
-PKG_VERSION:=1.8.2
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://alioth.debian.org/frs/download.php/3695
-PKG_MD5SUM:=cb7156346e9478c19085c918b605ed43
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/pcsc-lite/Default
-  TITLE:=Middleware to access a smart card using SCard API (PC/SC).
-  URL:=http://pcsclite.alioth.debian.org/
-endef
-
-define Package/pcsc-lite/Default/description
-  The purpose of PC/SC Lite is to provide a Windows(R) SCard
-  interface in a very small form factor for communicating to
-  smart cards and smart cards readers.
-endef
-
-define Package/libpcsclite
-  $(call Package/pcsc-lite/Default)
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE+= (library)
-  DEPENDS:=+libusb-1.0 +libpthread +librt
-endef
-
-define Package/libpcsclite/description
-  $(call Package/pcsc-lite/Default/description)
-  .
-  This package contains the PC/SC shared library.
-endef
-
-define Package/pcscd
-  $(call Package/pcsc-lite/Default)
-  SECTION:=utils
-  CATEGORY:=Utilities
-  TITLE+= (daemon)
-  DEPENDS:=+libpcsclite
-endef
-
-define Package/pcscd/description
-  $(call Package/pcsc-lite/Default/description)
-  .
-  This package contains the PC/SC daemon.
-endef
-
-TARGET_CFLAGS += $(FPIC)
-TARGET_LDFLAGS += -lpthread
-
-CONFIGURE_ARGS += \
-	--disable-libudev \
-	--enable-libusb \
-	--enable-static \
-	--enable-usbdropdir=/usr/lib/pcsc/drivers
-
-define Build/InstallDev
-	$(INSTALL_DIR) $(1)/usr/include/PCSC
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/
-	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/
-endef
-
-define Package/libpcsclite/install
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/
-endef
-
-define Package/pcscd/conffiles
-/etc/reader.conf.d/reader.conf
-endef
-
-define Package/pcscd/install
-	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/
-	$(INSTALL_DIR) $(1)/etc/init.d
-	$(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd
-	$(INSTALL_DIR) $(1)/etc/reader.conf.d
-endef
-
-$(eval $(call BuildPackage,libpcsclite))
-$(eval $(call BuildPackage,pcscd))
-

--- a/utils/pcsc-lite/files/pcscd.init
+++ /dev/null
@@ -1,15 +1,1 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2009-2011 OpenWrt.org
 
-START=50
-
-SERVICE_PID_FILE=/var/run/pcscd/pcscd.pid
-
-start() {
-	service_start /usr/sbin/pcscd
-}
-
-stop() {
-	service_stop /usr/sbin/pcscd
-}
-

--- a/utils/stm32flash/Makefile
+++ /dev/null
@@ -1,41 +1,1 @@
-#
-# Copyright (C) 2012-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=stm32flash
-PKG_REV:=61
-PKG_VERSION:=r$(PKG_REV)
-PKG_RELEASE:=2
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://stm32flash.googlecode.com/svn/trunk
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_PROTO:=svn
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/stm32flash
-  SECTION:=utils
-  CATEGORY:=Utilities
-  URL:=http://code.google.com/p/stm32flash/
-  TITLE:=Firmware flash tool for STM32's serial bootloader
-endef
-
-define Package/stm32flash/description
-  This tool can be used to burn firmware images to STM32 ARM processors
-  using the built-in serial bootloader.
-endef
-
-define Package/stm32flash/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/stm32flash $(1)/usr/bin/
-endef
-
-$(eval $(call BuildPackage,stm32flash))
-

--- a/utils/stm32flash/patches/001-cflags_override.patch
+++ /dev/null
@@ -1,31 +1,1 @@
---- a/Makefile
-+++ b/Makefile
-@@ -5,7 +5,7 @@ export AR
- 
- all:
- 	$(MAKE) -C parsers
--	$(CC) -g -o stm32flash -I./ \
-+	$(CC) $(LDFLAGS) -o stm32flash -I./ \
- 		main.c \
- 		utils.c \
- 		stm32.c \
-@@ -13,7 +13,7 @@ all:
- 		serial_platform.c \
- 		parsers/parsers.a \
- 		stm32/stmreset_binary.c \
--		-Wall
-+		$(CFLAGS)
- 
- clean:
- 	$(MAKE) -C parsers clean
---- a/parsers/Makefile
-+++ b/parsers/Makefile
-@@ -1,6 +1,6 @@
- 
- all:
--	$(CC) -g -Wall -c -I../ binary.c hex.c
-+	$(CC) $(CFLAGS) -Wall -c -I../ binary.c hex.c
- 	$(AR) r parsers.a        binary.o hex.o
- 
- clean:
 

comments