From 8433fada0c2efa0bd91da7d759f805a56743e524 Mon Sep 17 00:00:00 2001
From: nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Sun, 23 Sep 2007 15:35:04 +0000
Subject: [PATCH] add the aMule P2P client

git-svn-id: svn://svn.openwrt.org/openwrt/packages@8982 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 net/amule/Makefile                       | 89 ++++++++++++++++++++++++
 net/amule/patches/001-no_backtrace.patch | 20 ++++++
 2 files changed, 109 insertions(+)
 create mode 100755 net/amule/Makefile
 create mode 100644 net/amule/patches/001-no_backtrace.patch

diff --git a/net/amule/Makefile b/net/amule/Makefile
new file mode 100755
index 000000000..02aa01102
--- /dev/null
+++ b/net/amule/Makefile
@@ -0,0 +1,89 @@
+# 
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=aMule
+PKG_VERSION:=2.1.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=@SF/amule
+PKG_MD5SUM:=
+
+PKG_BUILD_DEPENDS:=libgd
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/amule
+  SUBMENU:=P2P
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=A multi-platform eMule-like ed2k client
+  URL:=http://www.amule.org/
+  DEPENDS:=+libpng +libpthread +libncurses +libreadline +libwxbase
+endef
+
+CONFIGURE_ARGS+= \
+	--enable-shared \
+	--disable-static \
+	--disable-rpath \
+	--with-gnu-ld \
+	--disable-ccache \
+	--disable-debug \
+	--disable-optimize \
+	--disable-profile \
+	--disable-monolithic \
+	--enable-amule-daemon \
+	--enable-amulecmd \
+	--disable-amulecmdgui \
+	--enable-webserver \
+	--disable-webservergui \
+	--disable-amule-gui \
+	--disable-cas \
+	--disable-wxcas \
+	--disable-ed2k \
+	--disable-alc \
+	--disable-alcc \
+	--disable-systray \
+	--disable-utf8-systray \
+	--enable-embedded-crypto \
+	--enable-gsocket \
+	--disable-gtktest \
+	\
+	--with-zlib="$(STAGING_DIR)/usr" \
+	--with-gdlib-prefix="$(STAGING_DIR)/usr" \
+	--with-libpng-prefix="$(STAGING_DIR)/usr" \
+	--with-wx-prefix="$(STAGING_DIR)/usr" \
+	--without-crypto-prefix \
+	--without-libiconv-prefix \
+	--without-libintl-prefix \
+	--without-x \
+
+CONFIGURE_VARS+= \
+	CXX="g++-uc+std" \
+
+define Build/Configure
+	$(call Build/Configure/Default,)
+endef
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		HOSTCC="$(HOSTCC)" \
+		DESTDIR="$(PKG_INSTALL_DIR)" \
+		all install
+endef
+
+define Package/amule/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/amule{cmd,d,web} $(1)/usr/bin/
+	$(INSTALL_DIR) $(1)/usr/share
+	$(CP) $(PKG_INSTALL_DIR)/usr/share/amule $(1)/usr/share/
+endef
+
+$(eval $(call BuildPackage,amule))
diff --git a/net/amule/patches/001-no_backtrace.patch b/net/amule/patches/001-no_backtrace.patch
new file mode 100644
index 000000000..255551c64
--- /dev/null
+++ b/net/amule/patches/001-no_backtrace.patch
@@ -0,0 +1,20 @@
+--- aMule-2.1.3/src/libs/common/MuleDebug.cpp.orig	2006-01-01 06:17:25.000000000 +0100
++++ aMule-2.1.3/src/libs/common/MuleDebug.cpp	2007-09-23 15:12:40.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include "MuleDebug.h"			// Interface declaration
+ #include "StringFunctions.h"	// Needed for unicode2char
+ 
+-#ifdef __LINUX__
++#if defined(__LINUX__) && !defined(__UCLIBC__)
+ 	#include <execinfo.h>
+ 	#include <cxxabi.h>
+ 	#include <wx/thread.h>
+@@ -151,7 +151,7 @@
+ 	return walker.m_trace;
+ }
+ 
+-#elif defined(__LINUX__)
++#elif defined(__LINUX__) && !defined(__UCLIBC__)
+ 
+ #if HAVE_BFD
+