aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MOVED3
-rw-r--r--net-p2p/amule-devel/Makefile (renamed from net/amule-devel/Makefile)86
-rw-r--r--net-p2p/amule-devel/Makefile.man27
-rw-r--r--net-p2p/amule-devel/distinfo2
-rw-r--r--net-p2p/amule-devel/files/amuled.sh70
-rw-r--r--net-p2p/amule-devel/files/patch-amuleDlg.cpp24
-rw-r--r--net-p2p/amule-devel/pkg-descr (renamed from net/amule-devel/pkg-descr)0
-rw-r--r--net-p2p/amule-devel/pkg-plist121
-rw-r--r--net-p2p/amule/Makefile156
-rw-r--r--net-p2p/amule/Makefile.man27
-rw-r--r--net-p2p/amule/distinfo2
-rw-r--r--net-p2p/amule/files/amuled.sh70
-rw-r--r--net-p2p/amule/files/patch-amuleDlg.cpp24
-rw-r--r--net-p2p/amule/pkg-descr6
-rw-r--r--net-p2p/amule/pkg-plist121
-rw-r--r--net-p2p/amule2/Makefile156
-rw-r--r--net-p2p/amule2/Makefile.man27
-rw-r--r--net-p2p/amule2/distinfo2
-rw-r--r--net-p2p/amule2/files/amuled.sh70
-rw-r--r--net-p2p/amule2/files/patch-amuleDlg.cpp24
-rw-r--r--net-p2p/amule2/pkg-descr6
-rw-r--r--net-p2p/amule2/pkg-plist121
-rw-r--r--net/Makefile2
-rw-r--r--net/amule-devel/distinfo2
-rw-r--r--net/amule-devel/files/patch-ClientDetailDialog.cpp15
-rw-r--r--net/amule-devel/files/patch-DownloadQueue.cpp16
-rw-r--r--net/amule-devel/files/patch-SysTray.cpp15
-rw-r--r--net/amule-devel/files/patch-UDPSocket.cpp16
-rw-r--r--net/amule-devel/files/patch-UploadQueue.cpp16
-rw-r--r--net/amule-devel/files/patch-bithelp.h19
-rw-r--r--net/amule-devel/files/patch-configure13
-rw-r--r--net/amule-devel/files/patch-eggtrayicon.c11
-rw-r--r--net/amule-devel/files/patch-gtkplugxembed.c20
-rw-r--r--net/amule-devel/files/patch-html.c26
-rw-r--r--net/amule-devel/files/patch-md4.h19
-rw-r--r--net/amule-devel/pkg-plist107
-rw-r--r--net/amule2/Makefile156
-rw-r--r--net/amule2/Makefile.man27
-rw-r--r--net/amule2/distinfo2
-rw-r--r--net/amule2/files/amuled.sh70
-rw-r--r--net/amule2/files/patch-amuleDlg.cpp24
-rw-r--r--net/amule2/pkg-descr6
-rw-r--r--net/amule2/pkg-plist121
43 files changed, 1529 insertions, 319 deletions
diff --git a/MOVED b/MOVED
index bf7ac485c803..f76e9ea0a4c9 100644
--- a/MOVED
+++ b/MOVED
@@ -1488,4 +1488,5 @@ mail/sendmail811|mail/sendmail|2005-05-13|obsolete
games/xpilot-ng|games/xpilot-ng-server|2005-05-15|split into -client and -server
devel/p5-POE-Component-EasyDBI|databases/p5-POE-Component-EasyDBI|2005-05-15|move to a better category
www/mnogosearch|www/mnogosearch31|2004-05-15|finished repocopy
-net/amule|net/amule1|2005-05-16|renamed
+net/amule|net/amule1|2005-05-16|port renamed
+net/amule-devel|net/amule2|2005-05-16|obsolete
diff --git a/net/amule-devel/Makefile b/net-p2p/amule-devel/Makefile
index 680a7efddc0c..4d7c35c47c6b 100644
--- a/net/amule-devel/Makefile
+++ b/net-p2p/amule-devel/Makefile
@@ -1,4 +1,4 @@
-# New ports collection makefile for: amule
+# New ports collection makefile for: amule2
# Date created: Wed Nov 05 09:30:00 UTC 2003
# Whom: Ganael LAPLANCHE <ganael.laplanche@martymac.com>
#
@@ -6,22 +6,20 @@
#
PORTNAME= aMule
-PORTVERSION= 2.0.0rc7
-PORTREVISION= 3
+PORTVERSION= 2.0.0
CATEGORIES= net
MASTER_SITES= http://download.berlios.de/amule/
-PKGNAMESUFFIX= -devel
MAINTAINER= ganael.laplanche@martymac.com
COMMENT= The all-platform eMule p2p client
-LIB_DEPENDS= wx_gtk2-2.4.0:${PORTSDIR}/x11-toolkits/wxgtk24 \
- curl.3:${PORTSDIR}/ftp/curl \
- execinfo.1:${PORTSDIR}/devel/libexecinfo
+LIB_DEPENDS= wx_gtk2u_core-2.6:${PORTSDIR}/x11-toolkits/wxgtk26-unicode \
+ curl.3:${PORTSDIR}/ftp/curl
# gd.4:${PORTSDIR}/graphics/gd
+# png.5:${PORTSDIR}/graphics/png
-LATEST_LINK= ${PORTNAME}${PKGNAMESUFFIX}
-CONFLICTS= aMule-[0-9]*
+LATEST_LINK= aMule2
+CONFLICTS= aMule-1.* aMule-devel-[0-9]*
USE_X_PREFIX= yes
USE_GNOME= gnomehier gnomehack gnomeprefix
@@ -36,9 +34,10 @@ CONFIGURE_ARGS= --disable-debug \
--with-wxbase-config=${WX_CONFIG} \
--with-curl-config=${CURL_CONFIG} \
--enable-embedded_crypto \
- --enable-utf8-systray
+ --enable-utf8-systray \
+ --enable-monolithic
# --with-gdlib-prefix=${LOCALBASE} \
-# --with-gdlib-exec-prefix=${LOCALBASE}
+# --with-libpng-prefix=${LOCALBASE}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}"
@@ -48,14 +47,18 @@ OPTIONS= OPTIMIZE "Build with optimization" on \
AMULECMD "Compile aMule command line client (+GUI)" on \
AMULEWEBSRV "Compile aMule WebServer (+GUI)" on \
CAS "Compile C aMule Statistics (+GUI)" on \
- ALC "Compile aMule Link Creator (+GUI)" on
-# AMULEDAEMON "Compile aMule daemon version (+GUI) - unsupported yet : needs wxGtk >= 2.5.1" on
+ ALC "Compile aMule Link Creator (+GUI)" on \
+ AMULEDAEMON "Compile aMule daemon version - EXPERIMENTAL" off
-WX_CONFIG?= ${X11BASE}/bin/wxgtk2-2.4-config
+WX_CONFIG?= ${X11BASE}/bin/wxgtk2u-2.6-config
CURL_CONFIG?= ${LOCALBASE}/bin/curl-config
.include <bsd.port.pre.mk>
+.if ${OSVERSION} < 500000
+BROKEN= "Won't compile on FreeBSD 4.x - See net/amule1 for 4.x compatibility."
+.endif
+
# Configure options
.if defined(WITH_OPTIMIZE)
CONFIGURE_ARGS+= --enable-optimize
@@ -64,7 +67,7 @@ CONFIGURE_ARGS+= --disable-optimize
.endif
.if defined(WITH_ED2K)
-CONFIGURE_ARGS+= --enable-ed2k --program-transform-name="s/ed2k/amule-ed2k/"
+CONFIGURE_ARGS+= --enable-ed2k
PLIST_SUB+= PL_ED2K=""
.else
CONFIGURE_ARGS+= --disable-ed2k
@@ -103,12 +106,51 @@ CONFIGURE_ARGS+= --disable-alc --disable-alcc
PLIST_SUB+= PL_ALC="@comment "
.endif
-#.if defined(WITH_AMULEDAEMON)
-#CONFIGURE_ARGS+= --enable-amule-daemon --enable-amule-gui
-#PLIST_SUB+= PL_AMULEDAEMON=""
-#.else
-#CONFIGURE_ARGS+= --disable-amule-daemon --disable-amule-gui
-#PLIST_SUB+= PL_AMULEDAEMON="@comment "
-#.endif
+.if defined(WITH_AMULEDAEMON)
+CONFIGURE_ARGS+= --enable-amule-daemon --enable-amule-gui
+PLIST_SUB+= PL_AMULEDAEMON=""
+USE_RC_SUBR= yes
+RCSCRIPT= ${PREFIX}/etc/rc.d/amuled.sh
+.else
+CONFIGURE_ARGS+= --disable-amule-daemon --disable-amule-gui
+PLIST_SUB+= PL_AMULEDAEMON="@comment "
+.endif
+
+# Man pages management
+.include "Makefile.man"
+
+# Copy startup script if needed (amuledaemon compiled)
+post-install:
+.if defined(WITH_AMULEDAEMON)
+ ${ECHO} "Installing ${RCSCRIPT} startup file."
+ ${INSTALL_SCRIPT} ${FILESDIR}/amuled.sh ${RCSCRIPT}
+.endif
+
+# fr manpages are still incomplete and can't be managed
+# by MANLANG. Will be done when pages are complete.
+.if defined(WITH_AMULECMD)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amulecmd.1
+.endif
+.if defined(WITH_AMULEWEBSRV)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amuleweb.1
+.endif
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amule.1
+.if defined(WITH_AMULEDAEMON)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amuled.1
+.endif
+.if defined(WITH_ED2K)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/ed2k.1
+.endif
+.if defined(WITH_ALC)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/alcc.1
+.endif
+.if defined(WITH_AMULECMD)
+ ${RM} ${PREFIX}/man/fr/man1/amulecmdDLG.1
+ ${LN} ${PREFIX}/man/fr/man1/amulecmd.1.gz ${PREFIX}/man/fr/man1/amulecmdDLG.1.gz
+.endif
+.if defined(WITH_AMULEWEBSRV)
+ ${RM} ${PREFIX}/man/fr/man1/amulewebDLG.1
+ ${LN} ${PREFIX}/man/fr/man1/amuleweb.1.gz ${PREFIX}/man/fr/man1/amulewebDLG.1.gz
+.endif
.include <bsd.port.post.mk>
diff --git a/net-p2p/amule-devel/Makefile.man b/net-p2p/amule-devel/Makefile.man
new file mode 100644
index 000000000000..f22f99d31c0a
--- /dev/null
+++ b/net-p2p/amule-devel/Makefile.man
@@ -0,0 +1,27 @@
+# TODO : Add fr here when pages are complete
+MANLANG= "" de es hu
+MANCOMPRESSED= no
+.if defined(WITH_CAS)
+MAN1+= cas.1
+MAN1+= wxcas.1
+.endif
+.if defined(WITH_ALC)
+MAN1+= alc.1
+MAN1+= alcc.1
+.endif
+.if defined(WITH_AMULEWEBSRV)
+MAN1+= amuleweb.1
+MLINKS+= amuleweb.1 amulewebDLG.1
+.endif
+.if defined(WITH_AMULECMD)
+MAN1+= amulecmd.1
+MLINKS+= amulecmd.1 amulecmdDLG.1
+.endif
+.if defined(WITH_ED2K)
+MAN1+= ed2k.1
+.endif
+.if defined(WITH_AMULEDAEMON)
+MAN1+= amuled.1
+.endif
+MAN1+= amule.1
+MAN1+= xas.1
diff --git a/net-p2p/amule-devel/distinfo b/net-p2p/amule-devel/distinfo
new file mode 100644
index 000000000000..5a651f1921ac
--- /dev/null
+++ b/net-p2p/amule-devel/distinfo
@@ -0,0 +1,2 @@
+MD5 (aMule-2.0.0.tar.gz) = e6680641e171ddf4236c955168947ba0
+SIZE (aMule-2.0.0.tar.gz) = 3020088
diff --git a/net-p2p/amule-devel/files/amuled.sh b/net-p2p/amule-devel/files/amuled.sh
new file mode 100644
index 000000000000..7ebdbadaff68
--- /dev/null
+++ b/net-p2p/amule-devel/files/amuled.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# aMule RCng startup script
+# Ogirinal work from Gabriele Cecchetti (amule.org forum)
+# Modified by Ganaël LAPLANCHE (ganael.laplanche@martymac.com)
+#
+
+# PROVIDE: amuled
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable amuled at startup
+# amuled (bool): Set to "NO" by default.
+# Set it to "YES" to enable amuled
+# amuled_user (str): Set to user running amuled
+# (default 'aMule')
+# amuled_home (str): Set to home directory of user running amuled
+# (default /home/${amuled_user})
+#
+. /etc/rc.subr
+
+name="amuled"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+[ -z "$amuled_enable" ] && amuled_enable="NO"
+[ -z "$amuled_user" ] && amuled_user="aMule"
+[ -z "$amuled_home" ] && amuled_home="/home/${amuled_user}"
+
+required_dirs=${amuled_home}
+required_files="${amuled_home}/.aMule/amule.conf"
+
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+
+amuled_start()
+{
+ if [ ! -f /var/run/${name}.run ]
+ then
+ su -l ${amuled_user} -c "amuled &" 2>>/var/log/${name}.log >>/var/log/${name}.log && touch /var/run/${name}.run
+ echo "Started ${name}."
+ echo `date` : "Started ${name}." >> /var/log/${name}.log
+ else
+ echo "${name} seems to be already running -- remove /var/run/${name}.run manually if needed."
+ fi
+}
+
+amuled_stop()
+{
+ if [ -f /var/run/${name}.run ]
+ then
+ # The following line is much better, but doesn't stop totally amuled
+ # su -l ${amuled_user} -c "amulecmd -c Shutdown" 2>>/var/log/${name}.log >>/var/log/${name}.log
+ # Since amuled catches SIGTERM, this way is preferred for now
+ killall -TERM amuled 2>>/var/log/${name}.log >>/var/log/${name}.log ; sleep 3
+ killall -KILL amuled 2>>/var/log/${name}.log >>/var/log/${name}.log
+ # Also kill amuleweb if needed
+ killall -KILL amuleweb 2>/dev/null >/dev/null
+ rm -f /var/run/${name}.run
+ echo "Stopped ${name}."
+ echo `date` : "Stopped ${name}." >> /var/log/${name}.log
+ else
+ echo "${name} doesn't seem to be running -- create /var/run/${name}.run if needed."
+ fi
+}
+
+run_rc_command "$1"
diff --git a/net-p2p/amule-devel/files/patch-amuleDlg.cpp b/net-p2p/amule-devel/files/patch-amuleDlg.cpp
new file mode 100644
index 000000000000..189eba15f49b
--- /dev/null
+++ b/net-p2p/amule-devel/files/patch-amuleDlg.cpp
@@ -0,0 +1,24 @@
+--- src/amuleDlg.cpp.orig Tue May 3 20:37:09 2005
++++ src/amuleDlg.cpp Tue May 3 20:39:53 2005
+@@ -502,9 +502,9 @@
+ {
+ wxString msg = wxT(" ");
+ #ifdef CLIENT_GUI
+- msg << _("aMule remote control ") << wxT(VERSION);
++ msg << _("aMule remote control ") << wxT(VERSION) << wxT(" for FreeBSD");
+ #else
+- msg << wxT("aMule ") << wxT(VERSION);
++ msg << wxT("aMule ") << wxT(VERSION) << wxT(" for FreeBSD");
+ #endif
+ msg << wxT(" ");
+ #ifdef CVSDATE
+@@ -514,7 +514,8 @@
+ " 'All-Platform' p2p client based on eMule \n\n"
+ " Website: http://www.amule.org \n"
+ " Forum: http://forum.amule.org \n"
+- " FAQ: http://wiki.amule.org \n\n"
++ " FAQ: http://wiki.amule.org \n"
++ " FreeBSD port: http://contribs.martymac.com \n\n"
+ " Contact: admin@amule.org (administrative issues) \n"
+ " Copyright (C) 2003-2005 aMule Team \n");
+ if (is_safe_state) {
diff --git a/net/amule-devel/pkg-descr b/net-p2p/amule-devel/pkg-descr
index afd986a280da..afd986a280da 100644
--- a/net/amule-devel/pkg-descr
+++ b/net-p2p/amule-devel/pkg-descr
diff --git a/net-p2p/amule-devel/pkg-plist b/net-p2p/amule-devel/pkg-plist
new file mode 100644
index 000000000000..64c43cfaa6d8
--- /dev/null
+++ b/net-p2p/amule-devel/pkg-plist
@@ -0,0 +1,121 @@
+%%PL_AMULEDAEMON%%@unexec %D/etc/rc.d/amuled.sh stop > /dev/null 2>&1 || true
+%%PL_AMULEDAEMON%%etc/rc.d/amuled.sh
+%%PL_ALC%%man/fr/man1/alcc.1.gz
+%%PL_AMULEWEBSRV%%man/fr/man1/amuleweb.1.gz
+%%PL_AMULEWEBSRV%%man/fr/man1/amulewebDLG.1.gz
+%%PL_AMULECMD%%man/fr/man1/amulecmd.1.gz
+%%PL_AMULECMD%%man/fr/man1/amulecmdDLG.1.gz
+%%PL_ED2K%%man/fr/man1/ed2k.1.gz
+%%PL_AMULEDAEMON%%man/fr/man1/amuled.1.gz
+man/fr/man1/amule.1.gz
+share/locale/en_GB/LC_MESSAGES/amule.mo
+share/locale/en_US/LC_MESSAGES/amule.mo
+share/locale/es/LC_MESSAGES/amule.mo
+share/locale/de/LC_MESSAGES/amule.mo
+share/locale/fr/LC_MESSAGES/amule.mo
+share/locale/it/LC_MESSAGES/amule.mo
+share/locale/ko/LC_MESSAGES/amule.mo
+share/locale/pl/LC_MESSAGES/amule.mo
+share/locale/et_EE/LC_MESSAGES/amule.mo
+share/locale/ru/LC_MESSAGES/amule.mo
+share/locale/bg/LC_MESSAGES/amule.mo
+share/locale/es_MX/LC_MESSAGES/amule.mo
+share/locale/pt_BR/LC_MESSAGES/amule.mo
+share/locale/gl/LC_MESSAGES/amule.mo
+share/locale/eu/LC_MESSAGES/amule.mo
+share/locale/nl/LC_MESSAGES/amule.mo
+share/locale/ar/LC_MESSAGES/amule.mo
+share/locale/fi/LC_MESSAGES/amule.mo
+share/locale/zh_CN/LC_MESSAGES/amule.mo
+share/locale/zh_TW/LC_MESSAGES/amule.mo
+share/locale/da/LC_MESSAGES/amule.mo
+share/locale/hu/LC_MESSAGES/amule.mo
+share/locale/ca/LC_MESSAGES/amule.mo
+share/locale/it_CH/LC_MESSAGES/amule.mo
+share/locale/pt_PT/LC_MESSAGES/amule.mo
+share/locale/hr/LC_MESSAGES/amule.mo
+share/locale/sl/LC_MESSAGES/amule.mo
+share/gnome/doc/aMule-2.0.0/ABOUT-NLS
+share/gnome/doc/aMule-2.0.0/amulesig.txt
+share/gnome/doc/aMule-2.0.0/amule-win32.HOWTO.txt
+share/gnome/doc/aMule-2.0.0/Changelog
+share/gnome/doc/aMule-2.0.0/Doxyfile
+share/gnome/doc/aMule-2.0.0/ED2K-Links.HOWTO
+share/gnome/doc/aMule-2.0.0/INSTALL
+share/gnome/doc/aMule-2.0.0/license.txt
+share/gnome/doc/aMule-2.0.0/README
+share/gnome/doc/aMule-2.0.0/TODO
+share/gnome/doc/aMule-2.0.0/EC_Protocol.txt
+share/gnome/doc/aMule-2.0.0/socks4.protocol
+@unexec rmdir %D/share/gnome/doc/aMule-2.0.0 2>/dev/null || true
+@unexec rmdir %D/share/gnome/doc 2>/dev/null || true
+%%PL_CAS%%share/gnome/cas/tmp.html
+%%PL_CAS%%share/gnome/cas/stat.png
+%%PL_CAS%%@unexec rmdir %D/share/gnome/cas 2>/dev/null || true
+%%PL_CAS%%share/gnome/pixmaps/wxcas.xpm
+%%PL_ALC%%share/gnome/pixmaps/alc.xpm
+share/gnome/pixmaps/amule.xpm
+@unexec rmdir %D/share/gnome/pixmaps 2>/dev/null || true
+%%PL_CAS%%share/gnome/applications/wxcas.desktop
+%%PL_ALC%%share/gnome/applications/alc.desktop
+share/gnome/applications/amule.desktop
+@unexec rmdir %D/share/gnome/applications 2>/dev/null || true
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/aMule.tmpl
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/add_server.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_down.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_right.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_up.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/back.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/black.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue1.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue2.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue3.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue4.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue5.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue6.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_download.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_kad.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_search.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_servers.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_settings.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_shared.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_stats.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/emule.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/green.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/greenpercent.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_cancel.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_connect.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_down.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_ed2klink.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_info.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/log.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/logo.jpg
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_pause.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_resume.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_up.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/main_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/main_top_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/red.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/top_bar_bg2.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/top_bar_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/transparent.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/yellow.gif
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule/webserver/default 2>/dev/null || true
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule/webserver 2>/dev/null || true
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule 2>/dev/null || true
+lib/xchat/plugins/xas.pl
+@unexec rmdir %D/lib/xchat/plugins 2>/dev/null || true
+@unexec rmdir %D/lib/xchat 2>/dev/null || true
+%%PL_CAS%%bin/cas
+%%PL_CAS%%bin/wxcas
+%%PL_ALC%%bin/alc
+%%PL_ALC%%bin/alcc
+%%PL_AMULEWEBSRV%%bin/amuleweb
+%%PL_AMULEWEBSRV%%bin/amulewebDLG
+%%PL_AMULECMD%%bin/amulecmd
+%%PL_AMULECMD%%bin/amulecmdDLG
+%%PL_ED2K%%bin/ed2k
+%%PL_AMULEDAEMON%%bin/amulegui
+%%PL_AMULEDAEMON%%bin/amuled
+bin/amule
diff --git a/net-p2p/amule/Makefile b/net-p2p/amule/Makefile
new file mode 100644
index 000000000000..4d7c35c47c6b
--- /dev/null
+++ b/net-p2p/amule/Makefile
@@ -0,0 +1,156 @@
+# New ports collection makefile for: amule2
+# Date created: Wed Nov 05 09:30:00 UTC 2003
+# Whom: Ganael LAPLANCHE <ganael.laplanche@martymac.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= aMule
+PORTVERSION= 2.0.0
+CATEGORIES= net
+MASTER_SITES= http://download.berlios.de/amule/
+
+MAINTAINER= ganael.laplanche@martymac.com
+COMMENT= The all-platform eMule p2p client
+
+LIB_DEPENDS= wx_gtk2u_core-2.6:${PORTSDIR}/x11-toolkits/wxgtk26-unicode \
+ curl.3:${PORTSDIR}/ftp/curl
+# gd.4:${PORTSDIR}/graphics/gd
+# png.5:${PORTSDIR}/graphics/png
+
+LATEST_LINK= aMule2
+CONFLICTS= aMule-1.* aMule-devel-[0-9]*
+
+USE_X_PREFIX= yes
+USE_GNOME= gnomehier gnomehack gnomeprefix
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ARGS= --disable-debug \
+ --without-included-gettext \
+ --with-libintl-prefix=${LOCALBASE} \
+ --with-libiconv-prefix=${LOCALBASE} \
+ --with-wx-config=${WX_CONFIG} \
+ --with-wxbase-config=${WX_CONFIG} \
+ --with-curl-config=${CURL_CONFIG} \
+ --enable-embedded_crypto \
+ --enable-utf8-systray \
+ --enable-monolithic
+# --with-gdlib-prefix=${LOCALBASE} \
+# --with-libpng-prefix=${LOCALBASE}
+
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
+ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}"
+
+OPTIONS= OPTIMIZE "Build with optimization" on \
+ ED2K "Compile aMule ed2k links handler" on \
+ AMULECMD "Compile aMule command line client (+GUI)" on \
+ AMULEWEBSRV "Compile aMule WebServer (+GUI)" on \
+ CAS "Compile C aMule Statistics (+GUI)" on \
+ ALC "Compile aMule Link Creator (+GUI)" on \
+ AMULEDAEMON "Compile aMule daemon version - EXPERIMENTAL" off
+
+WX_CONFIG?= ${X11BASE}/bin/wxgtk2u-2.6-config
+CURL_CONFIG?= ${LOCALBASE}/bin/curl-config
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+BROKEN= "Won't compile on FreeBSD 4.x - See net/amule1 for 4.x compatibility."
+.endif
+
+# Configure options
+.if defined(WITH_OPTIMIZE)
+CONFIGURE_ARGS+= --enable-optimize
+.else
+CONFIGURE_ARGS+= --disable-optimize
+.endif
+
+.if defined(WITH_ED2K)
+CONFIGURE_ARGS+= --enable-ed2k
+PLIST_SUB+= PL_ED2K=""
+.else
+CONFIGURE_ARGS+= --disable-ed2k
+PLIST_SUB+= PL_ED2K="@comment "
+.endif
+
+.if defined(WITH_AMULECMD)
+CONFIGURE_ARGS+= --enable-amulecmd --enable-amulecmdgui
+PLIST_SUB+= PL_AMULECMD=""
+.else
+CONFIGURE_ARGS+= --disable-amulecmd --disable-amulecmdgui
+PLIST_SUB+= PL_AMULECMD="@comment "
+.endif
+
+.if defined(WITH_AMULEWEBSRV)
+CONFIGURE_ARGS+= --enable-webserver --enable-webservergui
+PLIST_SUB+= PL_AMULEWEBSRV=""
+.else
+CONFIGURE_ARGS+= --disable-webserver --disable-webservergui
+PLIST_SUB+= PL_AMULEWEBSRV="@comment "
+.endif
+
+.if defined(WITH_CAS)
+CONFIGURE_ARGS+= --enable-cas --enable-wxcas
+PLIST_SUB+= PL_CAS=""
+.else
+CONFIGURE_ARGS+= --disable-cas --disable-wxcas
+PLIST_SUB+= PL_CAS="@comment "
+.endif
+
+.if defined(WITH_ALC)
+CONFIGURE_ARGS+= --enable-alc --enable-alcc
+PLIST_SUB+= PL_ALC=""
+.else
+CONFIGURE_ARGS+= --disable-alc --disable-alcc
+PLIST_SUB+= PL_ALC="@comment "
+.endif
+
+.if defined(WITH_AMULEDAEMON)
+CONFIGURE_ARGS+= --enable-amule-daemon --enable-amule-gui
+PLIST_SUB+= PL_AMULEDAEMON=""
+USE_RC_SUBR= yes
+RCSCRIPT= ${PREFIX}/etc/rc.d/amuled.sh
+.else
+CONFIGURE_ARGS+= --disable-amule-daemon --disable-amule-gui
+PLIST_SUB+= PL_AMULEDAEMON="@comment "
+.endif
+
+# Man pages management
+.include "Makefile.man"
+
+# Copy startup script if needed (amuledaemon compiled)
+post-install:
+.if defined(WITH_AMULEDAEMON)
+ ${ECHO} "Installing ${RCSCRIPT} startup file."
+ ${INSTALL_SCRIPT} ${FILESDIR}/amuled.sh ${RCSCRIPT}
+.endif
+
+# fr manpages are still incomplete and can't be managed
+# by MANLANG. Will be done when pages are complete.
+.if defined(WITH_AMULECMD)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amulecmd.1
+.endif
+.if defined(WITH_AMULEWEBSRV)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amuleweb.1
+.endif
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amule.1
+.if defined(WITH_AMULEDAEMON)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amuled.1
+.endif
+.if defined(WITH_ED2K)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/ed2k.1
+.endif
+.if defined(WITH_ALC)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/alcc.1
+.endif
+.if defined(WITH_AMULECMD)
+ ${RM} ${PREFIX}/man/fr/man1/amulecmdDLG.1
+ ${LN} ${PREFIX}/man/fr/man1/amulecmd.1.gz ${PREFIX}/man/fr/man1/amulecmdDLG.1.gz
+.endif
+.if defined(WITH_AMULEWEBSRV)
+ ${RM} ${PREFIX}/man/fr/man1/amulewebDLG.1
+ ${LN} ${PREFIX}/man/fr/man1/amuleweb.1.gz ${PREFIX}/man/fr/man1/amulewebDLG.1.gz
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/net-p2p/amule/Makefile.man b/net-p2p/amule/Makefile.man
new file mode 100644
index 000000000000..f22f99d31c0a
--- /dev/null
+++ b/net-p2p/amule/Makefile.man
@@ -0,0 +1,27 @@
+# TODO : Add fr here when pages are complete
+MANLANG= "" de es hu
+MANCOMPRESSED= no
+.if defined(WITH_CAS)
+MAN1+= cas.1
+MAN1+= wxcas.1
+.endif
+.if defined(WITH_ALC)
+MAN1+= alc.1
+MAN1+= alcc.1
+.endif
+.if defined(WITH_AMULEWEBSRV)
+MAN1+= amuleweb.1
+MLINKS+= amuleweb.1 amulewebDLG.1
+.endif
+.if defined(WITH_AMULECMD)
+MAN1+= amulecmd.1
+MLINKS+= amulecmd.1 amulecmdDLG.1
+.endif
+.if defined(WITH_ED2K)
+MAN1+= ed2k.1
+.endif
+.if defined(WITH_AMULEDAEMON)
+MAN1+= amuled.1
+.endif
+MAN1+= amule.1
+MAN1+= xas.1
diff --git a/net-p2p/amule/distinfo b/net-p2p/amule/distinfo
new file mode 100644
index 000000000000..5a651f1921ac
--- /dev/null
+++ b/net-p2p/amule/distinfo
@@ -0,0 +1,2 @@
+MD5 (aMule-2.0.0.tar.gz) = e6680641e171ddf4236c955168947ba0
+SIZE (aMule-2.0.0.tar.gz) = 3020088
diff --git a/net-p2p/amule/files/amuled.sh b/net-p2p/amule/files/amuled.sh
new file mode 100644
index 000000000000..7ebdbadaff68
--- /dev/null
+++ b/net-p2p/amule/files/amuled.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# aMule RCng startup script
+# Ogirinal work from Gabriele Cecchetti (amule.org forum)
+# Modified by Ganaël LAPLANCHE (ganael.laplanche@martymac.com)
+#
+
+# PROVIDE: amuled
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable amuled at startup
+# amuled (bool): Set to "NO" by default.
+# Set it to "YES" to enable amuled
+# amuled_user (str): Set to user running amuled
+# (default 'aMule')
+# amuled_home (str): Set to home directory of user running amuled
+# (default /home/${amuled_user})
+#
+. /etc/rc.subr
+
+name="amuled"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+[ -z "$amuled_enable" ] && amuled_enable="NO"
+[ -z "$amuled_user" ] && amuled_user="aMule"
+[ -z "$amuled_home" ] && amuled_home="/home/${amuled_user}"
+
+required_dirs=${amuled_home}
+required_files="${amuled_home}/.aMule/amule.conf"
+
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+
+amuled_start()
+{
+ if [ ! -f /var/run/${name}.run ]
+ then
+ su -l ${amuled_user} -c "amuled &" 2>>/var/log/${name}.log >>/var/log/${name}.log && touch /var/run/${name}.run
+ echo "Started ${name}."
+ echo `date` : "Started ${name}." >> /var/log/${name}.log
+ else
+ echo "${name} seems to be already running -- remove /var/run/${name}.run manually if needed."
+ fi
+}
+
+amuled_stop()
+{
+ if [ -f /var/run/${name}.run ]
+ then
+ # The following line is much better, but doesn't stop totally amuled
+ # su -l ${amuled_user} -c "amulecmd -c Shutdown" 2>>/var/log/${name}.log >>/var/log/${name}.log
+ # Since amuled catches SIGTERM, this way is preferred for now
+ killall -TERM amuled 2>>/var/log/${name}.log >>/var/log/${name}.log ; sleep 3
+ killall -KILL amuled 2>>/var/log/${name}.log >>/var/log/${name}.log
+ # Also kill amuleweb if needed
+ killall -KILL amuleweb 2>/dev/null >/dev/null
+ rm -f /var/run/${name}.run
+ echo "Stopped ${name}."
+ echo `date` : "Stopped ${name}." >> /var/log/${name}.log
+ else
+ echo "${name} doesn't seem to be running -- create /var/run/${name}.run if needed."
+ fi
+}
+
+run_rc_command "$1"
diff --git a/net-p2p/amule/files/patch-amuleDlg.cpp b/net-p2p/amule/files/patch-amuleDlg.cpp
new file mode 100644
index 000000000000..189eba15f49b
--- /dev/null
+++ b/net-p2p/amule/files/patch-amuleDlg.cpp
@@ -0,0 +1,24 @@
+--- src/amuleDlg.cpp.orig Tue May 3 20:37:09 2005
++++ src/amuleDlg.cpp Tue May 3 20:39:53 2005
+@@ -502,9 +502,9 @@
+ {
+ wxString msg = wxT(" ");
+ #ifdef CLIENT_GUI
+- msg << _("aMule remote control ") << wxT(VERSION);
++ msg << _("aMule remote control ") << wxT(VERSION) << wxT(" for FreeBSD");
+ #else
+- msg << wxT("aMule ") << wxT(VERSION);
++ msg << wxT("aMule ") << wxT(VERSION) << wxT(" for FreeBSD");
+ #endif
+ msg << wxT(" ");
+ #ifdef CVSDATE
+@@ -514,7 +514,8 @@
+ " 'All-Platform' p2p client based on eMule \n\n"
+ " Website: http://www.amule.org \n"
+ " Forum: http://forum.amule.org \n"
+- " FAQ: http://wiki.amule.org \n\n"
++ " FAQ: http://wiki.amule.org \n"
++ " FreeBSD port: http://contribs.martymac.com \n\n"
+ " Contact: admin@amule.org (administrative issues) \n"
+ " Copyright (C) 2003-2005 aMule Team \n");
+ if (is_safe_state) {
diff --git a/net-p2p/amule/pkg-descr b/net-p2p/amule/pkg-descr
new file mode 100644
index 000000000000..afd986a280da
--- /dev/null
+++ b/net-p2p/amule/pkg-descr
@@ -0,0 +1,6 @@
+aMule, the all-platform eMule p2p client
+
+aMule is a multiplatform fork of xMule
+client using wxWindows class library.
+
+WWW: http://www.amule.org
diff --git a/net-p2p/amule/pkg-plist b/net-p2p/amule/pkg-plist
new file mode 100644
index 000000000000..64c43cfaa6d8
--- /dev/null
+++ b/net-p2p/amule/pkg-plist
@@ -0,0 +1,121 @@
+%%PL_AMULEDAEMON%%@unexec %D/etc/rc.d/amuled.sh stop > /dev/null 2>&1 || true
+%%PL_AMULEDAEMON%%etc/rc.d/amuled.sh
+%%PL_ALC%%man/fr/man1/alcc.1.gz
+%%PL_AMULEWEBSRV%%man/fr/man1/amuleweb.1.gz
+%%PL_AMULEWEBSRV%%man/fr/man1/amulewebDLG.1.gz
+%%PL_AMULECMD%%man/fr/man1/amulecmd.1.gz
+%%PL_AMULECMD%%man/fr/man1/amulecmdDLG.1.gz
+%%PL_ED2K%%man/fr/man1/ed2k.1.gz
+%%PL_AMULEDAEMON%%man/fr/man1/amuled.1.gz
+man/fr/man1/amule.1.gz
+share/locale/en_GB/LC_MESSAGES/amule.mo
+share/locale/en_US/LC_MESSAGES/amule.mo
+share/locale/es/LC_MESSAGES/amule.mo
+share/locale/de/LC_MESSAGES/amule.mo
+share/locale/fr/LC_MESSAGES/amule.mo
+share/locale/it/LC_MESSAGES/amule.mo
+share/locale/ko/LC_MESSAGES/amule.mo
+share/locale/pl/LC_MESSAGES/amule.mo
+share/locale/et_EE/LC_MESSAGES/amule.mo
+share/locale/ru/LC_MESSAGES/amule.mo
+share/locale/bg/LC_MESSAGES/amule.mo
+share/locale/es_MX/LC_MESSAGES/amule.mo
+share/locale/pt_BR/LC_MESSAGES/amule.mo
+share/locale/gl/LC_MESSAGES/amule.mo
+share/locale/eu/LC_MESSAGES/amule.mo
+share/locale/nl/LC_MESSAGES/amule.mo
+share/locale/ar/LC_MESSAGES/amule.mo
+share/locale/fi/LC_MESSAGES/amule.mo
+share/locale/zh_CN/LC_MESSAGES/amule.mo
+share/locale/zh_TW/LC_MESSAGES/amule.mo
+share/locale/da/LC_MESSAGES/amule.mo
+share/locale/hu/LC_MESSAGES/amule.mo
+share/locale/ca/LC_MESSAGES/amule.mo
+share/locale/it_CH/LC_MESSAGES/amule.mo
+share/locale/pt_PT/LC_MESSAGES/amule.mo
+share/locale/hr/LC_MESSAGES/amule.mo
+share/locale/sl/LC_MESSAGES/amule.mo
+share/gnome/doc/aMule-2.0.0/ABOUT-NLS
+share/gnome/doc/aMule-2.0.0/amulesig.txt
+share/gnome/doc/aMule-2.0.0/amule-win32.HOWTO.txt
+share/gnome/doc/aMule-2.0.0/Changelog
+share/gnome/doc/aMule-2.0.0/Doxyfile
+share/gnome/doc/aMule-2.0.0/ED2K-Links.HOWTO
+share/gnome/doc/aMule-2.0.0/INSTALL
+share/gnome/doc/aMule-2.0.0/license.txt
+share/gnome/doc/aMule-2.0.0/README
+share/gnome/doc/aMule-2.0.0/TODO
+share/gnome/doc/aMule-2.0.0/EC_Protocol.txt
+share/gnome/doc/aMule-2.0.0/socks4.protocol
+@unexec rmdir %D/share/gnome/doc/aMule-2.0.0 2>/dev/null || true
+@unexec rmdir %D/share/gnome/doc 2>/dev/null || true
+%%PL_CAS%%share/gnome/cas/tmp.html
+%%PL_CAS%%share/gnome/cas/stat.png
+%%PL_CAS%%@unexec rmdir %D/share/gnome/cas 2>/dev/null || true
+%%PL_CAS%%share/gnome/pixmaps/wxcas.xpm
+%%PL_ALC%%share/gnome/pixmaps/alc.xpm
+share/gnome/pixmaps/amule.xpm
+@unexec rmdir %D/share/gnome/pixmaps 2>/dev/null || true
+%%PL_CAS%%share/gnome/applications/wxcas.desktop
+%%PL_ALC%%share/gnome/applications/alc.desktop
+share/gnome/applications/amule.desktop
+@unexec rmdir %D/share/gnome/applications 2>/dev/null || true
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/aMule.tmpl
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/add_server.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_down.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_right.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_up.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/back.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/black.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue1.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue2.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue3.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue4.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue5.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue6.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_download.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_kad.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_search.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_servers.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_settings.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_shared.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_stats.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/emule.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/green.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/greenpercent.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_cancel.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_connect.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_down.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_ed2klink.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_info.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/log.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/logo.jpg
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_pause.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_resume.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_up.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/main_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/main_top_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/red.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/top_bar_bg2.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/top_bar_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/transparent.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/yellow.gif
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule/webserver/default 2>/dev/null || true
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule/webserver 2>/dev/null || true
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule 2>/dev/null || true
+lib/xchat/plugins/xas.pl
+@unexec rmdir %D/lib/xchat/plugins 2>/dev/null || true
+@unexec rmdir %D/lib/xchat 2>/dev/null || true
+%%PL_CAS%%bin/cas
+%%PL_CAS%%bin/wxcas
+%%PL_ALC%%bin/alc
+%%PL_ALC%%bin/alcc
+%%PL_AMULEWEBSRV%%bin/amuleweb
+%%PL_AMULEWEBSRV%%bin/amulewebDLG
+%%PL_AMULECMD%%bin/amulecmd
+%%PL_AMULECMD%%bin/amulecmdDLG
+%%PL_ED2K%%bin/ed2k
+%%PL_AMULEDAEMON%%bin/amulegui
+%%PL_AMULEDAEMON%%bin/amuled
+bin/amule
diff --git a/net-p2p/amule2/Makefile b/net-p2p/amule2/Makefile
new file mode 100644
index 000000000000..4d7c35c47c6b
--- /dev/null
+++ b/net-p2p/amule2/Makefile
@@ -0,0 +1,156 @@
+# New ports collection makefile for: amule2
+# Date created: Wed Nov 05 09:30:00 UTC 2003
+# Whom: Ganael LAPLANCHE <ganael.laplanche@martymac.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= aMule
+PORTVERSION= 2.0.0
+CATEGORIES= net
+MASTER_SITES= http://download.berlios.de/amule/
+
+MAINTAINER= ganael.laplanche@martymac.com
+COMMENT= The all-platform eMule p2p client
+
+LIB_DEPENDS= wx_gtk2u_core-2.6:${PORTSDIR}/x11-toolkits/wxgtk26-unicode \
+ curl.3:${PORTSDIR}/ftp/curl
+# gd.4:${PORTSDIR}/graphics/gd
+# png.5:${PORTSDIR}/graphics/png
+
+LATEST_LINK= aMule2
+CONFLICTS= aMule-1.* aMule-devel-[0-9]*
+
+USE_X_PREFIX= yes
+USE_GNOME= gnomehier gnomehack gnomeprefix
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ARGS= --disable-debug \
+ --without-included-gettext \
+ --with-libintl-prefix=${LOCALBASE} \
+ --with-libiconv-prefix=${LOCALBASE} \
+ --with-wx-config=${WX_CONFIG} \
+ --with-wxbase-config=${WX_CONFIG} \
+ --with-curl-config=${CURL_CONFIG} \
+ --enable-embedded_crypto \
+ --enable-utf8-systray \
+ --enable-monolithic
+# --with-gdlib-prefix=${LOCALBASE} \
+# --with-libpng-prefix=${LOCALBASE}
+
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
+ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}"
+
+OPTIONS= OPTIMIZE "Build with optimization" on \
+ ED2K "Compile aMule ed2k links handler" on \
+ AMULECMD "Compile aMule command line client (+GUI)" on \
+ AMULEWEBSRV "Compile aMule WebServer (+GUI)" on \
+ CAS "Compile C aMule Statistics (+GUI)" on \
+ ALC "Compile aMule Link Creator (+GUI)" on \
+ AMULEDAEMON "Compile aMule daemon version - EXPERIMENTAL" off
+
+WX_CONFIG?= ${X11BASE}/bin/wxgtk2u-2.6-config
+CURL_CONFIG?= ${LOCALBASE}/bin/curl-config
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+BROKEN= "Won't compile on FreeBSD 4.x - See net/amule1 for 4.x compatibility."
+.endif
+
+# Configure options
+.if defined(WITH_OPTIMIZE)
+CONFIGURE_ARGS+= --enable-optimize
+.else
+CONFIGURE_ARGS+= --disable-optimize
+.endif
+
+.if defined(WITH_ED2K)
+CONFIGURE_ARGS+= --enable-ed2k
+PLIST_SUB+= PL_ED2K=""
+.else
+CONFIGURE_ARGS+= --disable-ed2k
+PLIST_SUB+= PL_ED2K="@comment "
+.endif
+
+.if defined(WITH_AMULECMD)
+CONFIGURE_ARGS+= --enable-amulecmd --enable-amulecmdgui
+PLIST_SUB+= PL_AMULECMD=""
+.else
+CONFIGURE_ARGS+= --disable-amulecmd --disable-amulecmdgui
+PLIST_SUB+= PL_AMULECMD="@comment "
+.endif
+
+.if defined(WITH_AMULEWEBSRV)
+CONFIGURE_ARGS+= --enable-webserver --enable-webservergui
+PLIST_SUB+= PL_AMULEWEBSRV=""
+.else
+CONFIGURE_ARGS+= --disable-webserver --disable-webservergui
+PLIST_SUB+= PL_AMULEWEBSRV="@comment "
+.endif
+
+.if defined(WITH_CAS)
+CONFIGURE_ARGS+= --enable-cas --enable-wxcas
+PLIST_SUB+= PL_CAS=""
+.else
+CONFIGURE_ARGS+= --disable-cas --disable-wxcas
+PLIST_SUB+= PL_CAS="@comment "
+.endif
+
+.if defined(WITH_ALC)
+CONFIGURE_ARGS+= --enable-alc --enable-alcc
+PLIST_SUB+= PL_ALC=""
+.else
+CONFIGURE_ARGS+= --disable-alc --disable-alcc
+PLIST_SUB+= PL_ALC="@comment "
+.endif
+
+.if defined(WITH_AMULEDAEMON)
+CONFIGURE_ARGS+= --enable-amule-daemon --enable-amule-gui
+PLIST_SUB+= PL_AMULEDAEMON=""
+USE_RC_SUBR= yes
+RCSCRIPT= ${PREFIX}/etc/rc.d/amuled.sh
+.else
+CONFIGURE_ARGS+= --disable-amule-daemon --disable-amule-gui
+PLIST_SUB+= PL_AMULEDAEMON="@comment "
+.endif
+
+# Man pages management
+.include "Makefile.man"
+
+# Copy startup script if needed (amuledaemon compiled)
+post-install:
+.if defined(WITH_AMULEDAEMON)
+ ${ECHO} "Installing ${RCSCRIPT} startup file."
+ ${INSTALL_SCRIPT} ${FILESDIR}/amuled.sh ${RCSCRIPT}
+.endif
+
+# fr manpages are still incomplete and can't be managed
+# by MANLANG. Will be done when pages are complete.
+.if defined(WITH_AMULECMD)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amulecmd.1
+.endif
+.if defined(WITH_AMULEWEBSRV)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amuleweb.1
+.endif
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amule.1
+.if defined(WITH_AMULEDAEMON)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amuled.1
+.endif
+.if defined(WITH_ED2K)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/ed2k.1
+.endif
+.if defined(WITH_ALC)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/alcc.1
+.endif
+.if defined(WITH_AMULECMD)
+ ${RM} ${PREFIX}/man/fr/man1/amulecmdDLG.1
+ ${LN} ${PREFIX}/man/fr/man1/amulecmd.1.gz ${PREFIX}/man/fr/man1/amulecmdDLG.1.gz
+.endif
+.if defined(WITH_AMULEWEBSRV)
+ ${RM} ${PREFIX}/man/fr/man1/amulewebDLG.1
+ ${LN} ${PREFIX}/man/fr/man1/amuleweb.1.gz ${PREFIX}/man/fr/man1/amulewebDLG.1.gz
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/net-p2p/amule2/Makefile.man b/net-p2p/amule2/Makefile.man
new file mode 100644
index 000000000000..f22f99d31c0a
--- /dev/null
+++ b/net-p2p/amule2/Makefile.man
@@ -0,0 +1,27 @@
+# TODO : Add fr here when pages are complete
+MANLANG= "" de es hu
+MANCOMPRESSED= no
+.if defined(WITH_CAS)
+MAN1+= cas.1
+MAN1+= wxcas.1
+.endif
+.if defined(WITH_ALC)
+MAN1+= alc.1
+MAN1+= alcc.1
+.endif
+.if defined(WITH_AMULEWEBSRV)
+MAN1+= amuleweb.1
+MLINKS+= amuleweb.1 amulewebDLG.1
+.endif
+.if defined(WITH_AMULECMD)
+MAN1+= amulecmd.1
+MLINKS+= amulecmd.1 amulecmdDLG.1
+.endif
+.if defined(WITH_ED2K)
+MAN1+= ed2k.1
+.endif
+.if defined(WITH_AMULEDAEMON)
+MAN1+= amuled.1
+.endif
+MAN1+= amule.1
+MAN1+= xas.1
diff --git a/net-p2p/amule2/distinfo b/net-p2p/amule2/distinfo
new file mode 100644
index 000000000000..5a651f1921ac
--- /dev/null
+++ b/net-p2p/amule2/distinfo
@@ -0,0 +1,2 @@
+MD5 (aMule-2.0.0.tar.gz) = e6680641e171ddf4236c955168947ba0
+SIZE (aMule-2.0.0.tar.gz) = 3020088
diff --git a/net-p2p/amule2/files/amuled.sh b/net-p2p/amule2/files/amuled.sh
new file mode 100644
index 000000000000..7ebdbadaff68
--- /dev/null
+++ b/net-p2p/amule2/files/amuled.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# aMule RCng startup script
+# Ogirinal work from Gabriele Cecchetti (amule.org forum)
+# Modified by Ganaël LAPLANCHE (ganael.laplanche@martymac.com)
+#
+
+# PROVIDE: amuled
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable amuled at startup
+# amuled (bool): Set to "NO" by default.
+# Set it to "YES" to enable amuled
+# amuled_user (str): Set to user running amuled
+# (default 'aMule')
+# amuled_home (str): Set to home directory of user running amuled
+# (default /home/${amuled_user})
+#
+. /etc/rc.subr
+
+name="amuled"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+[ -z "$amuled_enable" ] && amuled_enable="NO"
+[ -z "$amuled_user" ] && amuled_user="aMule"
+[ -z "$amuled_home" ] && amuled_home="/home/${amuled_user}"
+
+required_dirs=${amuled_home}
+required_files="${amuled_home}/.aMule/amule.conf"
+
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+
+amuled_start()
+{
+ if [ ! -f /var/run/${name}.run ]
+ then
+ su -l ${amuled_user} -c "amuled &" 2>>/var/log/${name}.log >>/var/log/${name}.log && touch /var/run/${name}.run
+ echo "Started ${name}."
+ echo `date` : "Started ${name}." >> /var/log/${name}.log
+ else
+ echo "${name} seems to be already running -- remove /var/run/${name}.run manually if needed."
+ fi
+}
+
+amuled_stop()
+{
+ if [ -f /var/run/${name}.run ]
+ then
+ # The following line is much better, but doesn't stop totally amuled
+ # su -l ${amuled_user} -c "amulecmd -c Shutdown" 2>>/var/log/${name}.log >>/var/log/${name}.log
+ # Since amuled catches SIGTERM, this way is preferred for now
+ killall -TERM amuled 2>>/var/log/${name}.log >>/var/log/${name}.log ; sleep 3
+ killall -KILL amuled 2>>/var/log/${name}.log >>/var/log/${name}.log
+ # Also kill amuleweb if needed
+ killall -KILL amuleweb 2>/dev/null >/dev/null
+ rm -f /var/run/${name}.run
+ echo "Stopped ${name}."
+ echo `date` : "Stopped ${name}." >> /var/log/${name}.log
+ else
+ echo "${name} doesn't seem to be running -- create /var/run/${name}.run if needed."
+ fi
+}
+
+run_rc_command "$1"
diff --git a/net-p2p/amule2/files/patch-amuleDlg.cpp b/net-p2p/amule2/files/patch-amuleDlg.cpp
new file mode 100644
index 000000000000..189eba15f49b
--- /dev/null
+++ b/net-p2p/amule2/files/patch-amuleDlg.cpp
@@ -0,0 +1,24 @@
+--- src/amuleDlg.cpp.orig Tue May 3 20:37:09 2005
++++ src/amuleDlg.cpp Tue May 3 20:39:53 2005
+@@ -502,9 +502,9 @@
+ {
+ wxString msg = wxT(" ");
+ #ifdef CLIENT_GUI
+- msg << _("aMule remote control ") << wxT(VERSION);
++ msg << _("aMule remote control ") << wxT(VERSION) << wxT(" for FreeBSD");
+ #else
+- msg << wxT("aMule ") << wxT(VERSION);
++ msg << wxT("aMule ") << wxT(VERSION) << wxT(" for FreeBSD");
+ #endif
+ msg << wxT(" ");
+ #ifdef CVSDATE
+@@ -514,7 +514,8 @@
+ " 'All-Platform' p2p client based on eMule \n\n"
+ " Website: http://www.amule.org \n"
+ " Forum: http://forum.amule.org \n"
+- " FAQ: http://wiki.amule.org \n\n"
++ " FAQ: http://wiki.amule.org \n"
++ " FreeBSD port: http://contribs.martymac.com \n\n"
+ " Contact: admin@amule.org (administrative issues) \n"
+ " Copyright (C) 2003-2005 aMule Team \n");
+ if (is_safe_state) {
diff --git a/net-p2p/amule2/pkg-descr b/net-p2p/amule2/pkg-descr
new file mode 100644
index 000000000000..afd986a280da
--- /dev/null
+++ b/net-p2p/amule2/pkg-descr
@@ -0,0 +1,6 @@
+aMule, the all-platform eMule p2p client
+
+aMule is a multiplatform fork of xMule
+client using wxWindows class library.
+
+WWW: http://www.amule.org
diff --git a/net-p2p/amule2/pkg-plist b/net-p2p/amule2/pkg-plist
new file mode 100644
index 000000000000..64c43cfaa6d8
--- /dev/null
+++ b/net-p2p/amule2/pkg-plist
@@ -0,0 +1,121 @@
+%%PL_AMULEDAEMON%%@unexec %D/etc/rc.d/amuled.sh stop > /dev/null 2>&1 || true
+%%PL_AMULEDAEMON%%etc/rc.d/amuled.sh
+%%PL_ALC%%man/fr/man1/alcc.1.gz
+%%PL_AMULEWEBSRV%%man/fr/man1/amuleweb.1.gz
+%%PL_AMULEWEBSRV%%man/fr/man1/amulewebDLG.1.gz
+%%PL_AMULECMD%%man/fr/man1/amulecmd.1.gz
+%%PL_AMULECMD%%man/fr/man1/amulecmdDLG.1.gz
+%%PL_ED2K%%man/fr/man1/ed2k.1.gz
+%%PL_AMULEDAEMON%%man/fr/man1/amuled.1.gz
+man/fr/man1/amule.1.gz
+share/locale/en_GB/LC_MESSAGES/amule.mo
+share/locale/en_US/LC_MESSAGES/amule.mo
+share/locale/es/LC_MESSAGES/amule.mo
+share/locale/de/LC_MESSAGES/amule.mo
+share/locale/fr/LC_MESSAGES/amule.mo
+share/locale/it/LC_MESSAGES/amule.mo
+share/locale/ko/LC_MESSAGES/amule.mo
+share/locale/pl/LC_MESSAGES/amule.mo
+share/locale/et_EE/LC_MESSAGES/amule.mo
+share/locale/ru/LC_MESSAGES/amule.mo
+share/locale/bg/LC_MESSAGES/amule.mo
+share/locale/es_MX/LC_MESSAGES/amule.mo
+share/locale/pt_BR/LC_MESSAGES/amule.mo
+share/locale/gl/LC_MESSAGES/amule.mo
+share/locale/eu/LC_MESSAGES/amule.mo
+share/locale/nl/LC_MESSAGES/amule.mo
+share/locale/ar/LC_MESSAGES/amule.mo
+share/locale/fi/LC_MESSAGES/amule.mo
+share/locale/zh_CN/LC_MESSAGES/amule.mo
+share/locale/zh_TW/LC_MESSAGES/amule.mo
+share/locale/da/LC_MESSAGES/amule.mo
+share/locale/hu/LC_MESSAGES/amule.mo
+share/locale/ca/LC_MESSAGES/amule.mo
+share/locale/it_CH/LC_MESSAGES/amule.mo
+share/locale/pt_PT/LC_MESSAGES/amule.mo
+share/locale/hr/LC_MESSAGES/amule.mo
+share/locale/sl/LC_MESSAGES/amule.mo
+share/gnome/doc/aMule-2.0.0/ABOUT-NLS
+share/gnome/doc/aMule-2.0.0/amulesig.txt
+share/gnome/doc/aMule-2.0.0/amule-win32.HOWTO.txt
+share/gnome/doc/aMule-2.0.0/Changelog
+share/gnome/doc/aMule-2.0.0/Doxyfile
+share/gnome/doc/aMule-2.0.0/ED2K-Links.HOWTO
+share/gnome/doc/aMule-2.0.0/INSTALL
+share/gnome/doc/aMule-2.0.0/license.txt
+share/gnome/doc/aMule-2.0.0/README
+share/gnome/doc/aMule-2.0.0/TODO
+share/gnome/doc/aMule-2.0.0/EC_Protocol.txt
+share/gnome/doc/aMule-2.0.0/socks4.protocol
+@unexec rmdir %D/share/gnome/doc/aMule-2.0.0 2>/dev/null || true
+@unexec rmdir %D/share/gnome/doc 2>/dev/null || true
+%%PL_CAS%%share/gnome/cas/tmp.html
+%%PL_CAS%%share/gnome/cas/stat.png
+%%PL_CAS%%@unexec rmdir %D/share/gnome/cas 2>/dev/null || true
+%%PL_CAS%%share/gnome/pixmaps/wxcas.xpm
+%%PL_ALC%%share/gnome/pixmaps/alc.xpm
+share/gnome/pixmaps/amule.xpm
+@unexec rmdir %D/share/gnome/pixmaps 2>/dev/null || true
+%%PL_CAS%%share/gnome/applications/wxcas.desktop
+%%PL_ALC%%share/gnome/applications/alc.desktop
+share/gnome/applications/amule.desktop
+@unexec rmdir %D/share/gnome/applications 2>/dev/null || true
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/aMule.tmpl
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/add_server.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_down.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_right.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_up.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/back.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/black.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue1.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue2.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue3.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue4.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue5.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue6.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_download.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_kad.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_search.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_servers.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_settings.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_shared.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_stats.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/emule.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/green.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/greenpercent.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_cancel.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_connect.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_down.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_ed2klink.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_info.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/log.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/logo.jpg
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_pause.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_resume.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_up.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/main_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/main_top_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/red.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/top_bar_bg2.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/top_bar_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/transparent.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/yellow.gif
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule/webserver/default 2>/dev/null || true
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule/webserver 2>/dev/null || true
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule 2>/dev/null || true
+lib/xchat/plugins/xas.pl
+@unexec rmdir %D/lib/xchat/plugins 2>/dev/null || true
+@unexec rmdir %D/lib/xchat 2>/dev/null || true
+%%PL_CAS%%bin/cas
+%%PL_CAS%%bin/wxcas
+%%PL_ALC%%bin/alc
+%%PL_ALC%%bin/alcc
+%%PL_AMULEWEBSRV%%bin/amuleweb
+%%PL_AMULEWEBSRV%%bin/amulewebDLG
+%%PL_AMULECMD%%bin/amulecmd
+%%PL_AMULECMD%%bin/amulecmdDLG
+%%PL_ED2K%%bin/ed2k
+%%PL_AMULEDAEMON%%bin/amulegui
+%%PL_AMULEDAEMON%%bin/amuled
+bin/amule
diff --git a/net/Makefile b/net/Makefile
index 58667a6d8ec7..308ba80d029b 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -18,7 +18,7 @@
SUBDIR += aim
SUBDIR += amsn
SUBDIR += amule1
- SUBDIR += amule-devel
+ SUBDIR += amule2
SUBDIR += apache-soap
SUBDIR += apinger
SUBDIR += apollon
diff --git a/net/amule-devel/distinfo b/net/amule-devel/distinfo
deleted file mode 100644
index f12edd521887..000000000000
--- a/net/amule-devel/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (aMule-2.0.0rc7.tar.gz) = b62106da3c38be29314a542aa3d20e95
-SIZE (aMule-2.0.0rc7.tar.gz) = 2491155
diff --git a/net/amule-devel/files/patch-ClientDetailDialog.cpp b/net/amule-devel/files/patch-ClientDetailDialog.cpp
deleted file mode 100644
index d45e732c7beb..000000000000
--- a/net/amule-devel/files/patch-ClientDetailDialog.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/ClientDetailDialog.cpp.orig Sat Oct 23 05:00:14 2004
-+++ src/ClientDetailDialog.cpp Sat Oct 23 05:00:45 2004
-@@ -31,6 +31,12 @@
- #include <sys/types.h>
- #endif /* __BSD__ */
-
-+#if defined(__FreeBSD__) // for FreeBSD 4.x
-+ #if __FreeBSD__ < 5
-+ #include <sys/types.h>
-+ #endif
-+#endif
-+
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
diff --git a/net/amule-devel/files/patch-DownloadQueue.cpp b/net/amule-devel/files/patch-DownloadQueue.cpp
deleted file mode 100644
index ff564f8e9e5e..000000000000
--- a/net/amule-devel/files/patch-DownloadQueue.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
---- src/DownloadQueue.cpp.orig Sat Oct 23 05:04:50 2004
-+++ src/DownloadQueue.cpp Sat Oct 23 05:07:18 2004
-@@ -24,6 +24,13 @@
- #include <winsock.h>
- #include <wx/msw/winundef.h>
- #else
-+
-+ #if defined(__FreeBSD__)
-+ #if __FreeBSD__ < 5
-+ #include <sys/types.h>
-+ #endif
-+ #endif
-+
- #include <netdb.h> // Needed for gethostbyname_r
- #include <sys/socket.h> //
- #include <netinet/in.h> // These three are needed for inet_ntoa
diff --git a/net/amule-devel/files/patch-SysTray.cpp b/net/amule-devel/files/patch-SysTray.cpp
deleted file mode 100644
index deff76979910..000000000000
--- a/net/amule-devel/files/patch-SysTray.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/SysTray.cpp.orig Sat Oct 23 05:53:20 2004
-+++ src/SysTray.cpp Sat Oct 23 05:55:40 2004
-@@ -24,6 +24,12 @@
- #include <sys/types.h>
- #endif /* __BSD__ */
-
-+#if defined(__FreeBSD__) // for FreeBSD 4.x
-+ #if __FreeBSD__ < 5
-+ #include <sys/types.h>
-+ #endif
-+#endif
-+
- #include <cstddef> // Needed for NULL. Must be BEFORE gtk/gdk headers!
- #include <sys/socket.h> //
- #include <netinet/in.h> // Needed for inet_ntoa
diff --git a/net/amule-devel/files/patch-UDPSocket.cpp b/net/amule-devel/files/patch-UDPSocket.cpp
deleted file mode 100644
index f5ade56bc262..000000000000
--- a/net/amule-devel/files/patch-UDPSocket.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
---- src/UDPSocket.cpp.orig Fri Oct 1 09:06:52 2004
-+++ src/UDPSocket.cpp Sat Oct 23 05:18:16 2004
-@@ -23,6 +23,13 @@
- #include <winsock.h>
- #include <wx/msw/winundef.h>
- #else
-+
-+ #if defined(__FreeBSD__)
-+ #if __FreeBSD__ < 5
-+ #include <sys/types.h>
-+ #endif
-+ #endif
-+
- #include <netdb.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
diff --git a/net/amule-devel/files/patch-UploadQueue.cpp b/net/amule-devel/files/patch-UploadQueue.cpp
deleted file mode 100644
index 819d6168b4e5..000000000000
--- a/net/amule-devel/files/patch-UploadQueue.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
---- src/UploadQueue.cpp.orig Sat Oct 23 05:33:01 2004
-+++ src/UploadQueue.cpp Sat Oct 23 05:35:59 2004
-@@ -19,6 +19,13 @@
-
- #include <cstring>
- #include <cmath> // Needed for std::exp
-+
-+#if defined(__FreeBSD__) // for FreeBSD 4.x
-+ #if __FreeBSD__ < 5
-+ #include <algorithm> // needed for std::find
-+ #endif
-+#endif
-+
- #include "types.h"
- #ifdef __WXMSW__
- #include <winsock.h>
diff --git a/net/amule-devel/files/patch-bithelp.h b/net/amule-devel/files/patch-bithelp.h
deleted file mode 100644
index f7b8ddd510e4..000000000000
--- a/net/amule-devel/files/patch-bithelp.h
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/utils/aLinkCreator/src/bithelp.h.orig Sat Oct 23 04:44:33 2004
-+++ src/utils/aLinkCreator/src/bithelp.h Sat Oct 23 04:45:10 2004
-@@ -21,7 +21,15 @@
- #ifndef G10_BITHELP_H
- #define G10_BITHELP_H
-
--#include <stdint.h>
-+#if defined(__FreeBSD__)
-+ #if __FreeBSD__ < 5
-+ #include <inttypes.h>
-+ #else
-+ #include <stdint.h>
-+ #endif
-+#else
-+ #include <stdint.h>
-+#endif
-
- /****************
- * Rotate the 32 bit unsigned integer X by N bits left/right
diff --git a/net/amule-devel/files/patch-configure b/net/amule-devel/files/patch-configure
deleted file mode 100644
index 5b6c13f83d91..000000000000
--- a/net/amule-devel/files/patch-configure
+++ /dev/null
@@ -1,13 +0,0 @@
---- configure.orig Sat Oct 23 09:15:45 2004
-+++ configure Sat Oct 23 09:16:04 2004
-@@ -1865,8 +1865,8 @@
-
-
- # No -O2 by default, removing -fomit since it causes problems
--CFLAGS=" ${CFLAGS/-fomit-frame-pointer/}"
--CXXFLAGS=" ${CXXFLAGS/-fomit-frame-pointer/}"
-+#CFLAGS=" ${CFLAGS/-fomit-frame-pointer/}"
-+#CXXFLAGS=" ${CXXFLAGS/-fomit-frame-pointer/}"
-
- # System detection, need AC_CANONICAL_TARGET
- case "${target_os}" in
diff --git a/net/amule-devel/files/patch-eggtrayicon.c b/net/amule-devel/files/patch-eggtrayicon.c
deleted file mode 100644
index 1ccfc500d800..000000000000
--- a/net/amule-devel/files/patch-eggtrayicon.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/eggtrayicon.c.orig Sat Oct 23 05:41:59 2004
-+++ src/eggtrayicon.c Sat Oct 23 05:50:38 2004
-@@ -75,7 +75,7 @@
-
- static GdkFilterReturn
- egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_data)
--{ (void)event;
-+{
- EggTrayIcon *icon = user_data;
- XEvent *xev = (XEvent *)xevent;
-
diff --git a/net/amule-devel/files/patch-gtkplugxembed.c b/net/amule-devel/files/patch-gtkplugxembed.c
deleted file mode 100644
index 398f7838b413..000000000000
--- a/net/amule-devel/files/patch-gtkplugxembed.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/gtkplugxembed.c.orig Sat Oct 23 05:57:50 2004
-+++ src/gtkplugxembed.c Sat Oct 23 06:01:38 2004
-@@ -889,7 +889,7 @@
- static void
- focus_first_last (GtkPlugXEmbed *plug,
- GtkDirectionType direction)
--{ (void)direction;
-+{
- GtkWindow *window = GTK_WINDOW (plug);
- GtkWidget *parent;
-
-@@ -1045,7 +1045,7 @@
-
- static GdkFilterReturn
- gtk_plug_xembed_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
--{ (void)event;
-+{
- GtkPlugXEmbed *plug = GTK_PLUG_XEMBED (data);
- XEvent *xevent = (XEvent *)gdk_xevent;
-
diff --git a/net/amule-devel/files/patch-html.c b/net/amule-devel/files/patch-html.c
deleted file mode 100644
index 1f59e0d2fbce..000000000000
--- a/net/amule-devel/files/patch-html.c
+++ /dev/null
@@ -1,26 +0,0 @@
---- src/utils/cas/html.c.orig Wed Sep 29 01:21:07 2004
-+++ src/utils/cas/html.c Sat Oct 23 04:30:24 2004
-@@ -50,11 +50,6 @@
- FILE *temp;
-
-
-- snprintf(version, 25, "cas %s", CAS_VERSION);
-- snprintf(upload, 25, "%s kB/s", stats[6]);
-- snprintf(download, 25, "%s kB/s", stats[5]);
--
--
- char *search[] = {"#VERSION#", "#CLIENT#", "#NICK#", "#UPLOADRATE#" ,
- "#DOWNLOADRATE#" , "#QUEUE#" , "#NUMSHARE#" , "#SESSIONUP#" ,
- "#SESSIONDOWN#" , "#TOTALUP#", "#TOTALDOWN#" , "#SERVER#" , "#IP#",
-@@ -63,6 +58,11 @@
- char *repl[] = { version , lines[0] , stats[9] , upload , download ,
- stats[7] , stats[8] , stats[14] , stats[13] , stats[11] , stats[10] ,
- stats[1] , stats[2] , stats[3] };
-+
-+
-+ snprintf(version, 25, "cas %s", CAS_VERSION);
-+ snprintf(upload, 25, "%s kB/s", stats[6]);
-+ snprintf(download, 25, "%s kB/s", stats[5]);
-
- // get some memory to read the template into
- if ((fd = open (template, O_RDONLY)) < 0)
diff --git a/net/amule-devel/files/patch-md4.h b/net/amule-devel/files/patch-md4.h
deleted file mode 100644
index b9eb0a8c06b1..000000000000
--- a/net/amule-devel/files/patch-md4.h
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/utils/aLinkCreator/src/md4.h.orig Sat Oct 23 04:41:29 2004
-+++ src/utils/aLinkCreator/src/md4.h Sat Oct 23 04:42:03 2004
-@@ -54,7 +54,15 @@
- #include "wx/wx.h"
- #endif
-
--#include <stdint.h> // needed for uint32_t
-+#if defined(__FreeBSD__)
-+ #if __FreeBSD__ < 5
-+ #include <inttypes.h>
-+ #else
-+ #include <stdint.h>
-+ #endif
-+#else
-+ #include <stdint.h> // needed for uint32_t
-+#endif
-
- // Use wxString implementation or not
- //#define WANT_STRING_IMPLEMENTATION 1
diff --git a/net/amule-devel/pkg-plist b/net/amule-devel/pkg-plist
deleted file mode 100644
index b4952b7e7ca0..000000000000
--- a/net/amule-devel/pkg-plist
+++ /dev/null
@@ -1,107 +0,0 @@
-share/locale/ar/LC_MESSAGES/amule.mo
-share/locale/bg/LC_MESSAGES/amule.mo
-share/locale/ca/LC_MESSAGES/amule.mo
-share/locale/da/LC_MESSAGES/amule.mo
-share/locale/de/LC_MESSAGES/amule.mo
-share/locale/en_GB/LC_MESSAGES/amule.mo
-share/locale/es/LC_MESSAGES/amule.mo
-share/locale/es_MX/LC_MESSAGES/amule.mo
-share/locale/et_EE/LC_MESSAGES/amule.mo
-@unexec rmdir %D/share/locale/et_EE/LC_MESSAGES 2>/dev/null || true
-@unexec rmdir %D/share/locale/et_EE 2>/dev/null || true
-share/locale/eu/LC_MESSAGES/amule.mo
-share/locale/fi/LC_MESSAGES/amule.mo
-share/locale/fr/LC_MESSAGES/amule.mo
-share/locale/gl/LC_MESSAGES/amule.mo
-share/locale/hr/LC_MESSAGES/amule.mo
-share/locale/hu/LC_MESSAGES/amule.mo
-share/locale/it/LC_MESSAGES/amule.mo
-share/locale/it_CH/LC_MESSAGES/amule.mo
-@unexec rmdir %D/share/locale/it_CH/LC_MESSAGES 2>/dev/null || true
-@unexec rmdir %D/share/locale/it_CH 2>/dev/null || true
-share/locale/ko/LC_MESSAGES/amule.mo
-share/locale/nl/LC_MESSAGES/amule.mo
-share/locale/pl/LC_MESSAGES/amule.mo
-share/locale/pt_BR/LC_MESSAGES/amule.mo
-share/locale/pt_PT/LC_MESSAGES/amule.mo
-share/locale/ru/LC_MESSAGES/amule.mo
-share/locale/zh_CN/LC_MESSAGES/amule.mo
-share/locale/zh_TW/LC_MESSAGES/amule.mo
-share/gnome/doc/aMule-2.0.0rc7/ABOUT-NLS
-share/gnome/doc/aMule-2.0.0rc7/Changelog
-share/gnome/doc/aMule-2.0.0rc7/Doxyfile
-share/gnome/doc/aMule-2.0.0rc7/ED2K-Links.HOWTO
-share/gnome/doc/aMule-2.0.0rc7/INSTALL
-share/gnome/doc/aMule-2.0.0rc7/README
-share/gnome/doc/aMule-2.0.0rc7/TODO
-share/gnome/doc/aMule-2.0.0rc7/amule-win32.HOWTO.txt
-share/gnome/doc/aMule-2.0.0rc7/amulesig.txt
-share/gnome/doc/aMule-2.0.0rc7/license.txt
-@unexec rmdir %D/share/gnome/doc/aMule-2.0.0rc7 2>/dev/null || true
-@unexec rmdir %D/share/gnome/doc 2>/dev/null || true
-share/gnome/pixmaps/amule.xpm
-%%PL_ALC%%share/gnome/pixmaps/alc.xpm
-%%PL_CAS%%share/gnome/pixmaps/wxcas.xpm
-share/gnome/applications/amule.desktop
-%%PL_ALC%%share/gnome/applications/alc.desktop
-%%PL_CAS%%share/gnome/applications/wxcas.desktop
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/GraphCon.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/GraphDL.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/GraphUL.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/add_server.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/arrow_down.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/arrow_right.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/arrow_up.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/black.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/blue.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/blue1.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/blue2.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/blue3.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/blue4.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/blue5.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/blue6.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/cp_download.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/cp_kad.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/cp_search.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/cp_servers.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/cp_settings.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/cp_shared.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/cp_stats.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/emule.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/green.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/greenpercent.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/l_cancel.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/l_connect.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/l_down.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/l_ed2klink.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/l_info.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/l_pause.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/l_resume.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/l_up.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/log.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/main_bg.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/main_top_bg.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/red.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/top_bar_bg.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/top_bar_bg2.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/transparent.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/webserver/yellow.gif
-%%PL_AMULEWEBSRV%%share/gnome/amuleweb/aMule.tmpl
-%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amuleweb/webserver 2>/dev/null || true
-%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amuleweb 2>/dev/null || true
-%%PL_CAS%%share/gnome/cas/stat.png
-%%PL_CAS%%share/gnome/cas/tmp.html
-%%PL_CAS%%@unexec rmdir %D/share/gnome/cas 2>/dev/null || true
-lib/xchat/plugins/xas.pl
-@unexec rmdir %D/lib/xchat/plugins 2>/dev/null || true
-@unexec rmdir %D/lib/xchat 2>/dev/null || true
-%%PL_CAS%%bin/cas
-%%PL_CAS%%bin/wxcas
-%%PL_ALC%%bin/alc
-%%PL_ALC%%bin/alcc
-%%PL_AMULEWEBSRV%%bin/amuleweb
-%%PL_AMULEWEBSRV%%bin/amulewebDLG
-%%PL_AMULECMD%%bin/amulecmd
-%%PL_AMULECMD%%bin/amulecmdDLG
-%%PL_ED2K%%bin/amule-ed2k
-bin/amule
diff --git a/net/amule2/Makefile b/net/amule2/Makefile
new file mode 100644
index 000000000000..4d7c35c47c6b
--- /dev/null
+++ b/net/amule2/Makefile
@@ -0,0 +1,156 @@
+# New ports collection makefile for: amule2
+# Date created: Wed Nov 05 09:30:00 UTC 2003
+# Whom: Ganael LAPLANCHE <ganael.laplanche@martymac.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= aMule
+PORTVERSION= 2.0.0
+CATEGORIES= net
+MASTER_SITES= http://download.berlios.de/amule/
+
+MAINTAINER= ganael.laplanche@martymac.com
+COMMENT= The all-platform eMule p2p client
+
+LIB_DEPENDS= wx_gtk2u_core-2.6:${PORTSDIR}/x11-toolkits/wxgtk26-unicode \
+ curl.3:${PORTSDIR}/ftp/curl
+# gd.4:${PORTSDIR}/graphics/gd
+# png.5:${PORTSDIR}/graphics/png
+
+LATEST_LINK= aMule2
+CONFLICTS= aMule-1.* aMule-devel-[0-9]*
+
+USE_X_PREFIX= yes
+USE_GNOME= gnomehier gnomehack gnomeprefix
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ARGS= --disable-debug \
+ --without-included-gettext \
+ --with-libintl-prefix=${LOCALBASE} \
+ --with-libiconv-prefix=${LOCALBASE} \
+ --with-wx-config=${WX_CONFIG} \
+ --with-wxbase-config=${WX_CONFIG} \
+ --with-curl-config=${CURL_CONFIG} \
+ --enable-embedded_crypto \
+ --enable-utf8-systray \
+ --enable-monolithic
+# --with-gdlib-prefix=${LOCALBASE} \
+# --with-libpng-prefix=${LOCALBASE}
+
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
+ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}"
+
+OPTIONS= OPTIMIZE "Build with optimization" on \
+ ED2K "Compile aMule ed2k links handler" on \
+ AMULECMD "Compile aMule command line client (+GUI)" on \
+ AMULEWEBSRV "Compile aMule WebServer (+GUI)" on \
+ CAS "Compile C aMule Statistics (+GUI)" on \
+ ALC "Compile aMule Link Creator (+GUI)" on \
+ AMULEDAEMON "Compile aMule daemon version - EXPERIMENTAL" off
+
+WX_CONFIG?= ${X11BASE}/bin/wxgtk2u-2.6-config
+CURL_CONFIG?= ${LOCALBASE}/bin/curl-config
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+BROKEN= "Won't compile on FreeBSD 4.x - See net/amule1 for 4.x compatibility."
+.endif
+
+# Configure options
+.if defined(WITH_OPTIMIZE)
+CONFIGURE_ARGS+= --enable-optimize
+.else
+CONFIGURE_ARGS+= --disable-optimize
+.endif
+
+.if defined(WITH_ED2K)
+CONFIGURE_ARGS+= --enable-ed2k
+PLIST_SUB+= PL_ED2K=""
+.else
+CONFIGURE_ARGS+= --disable-ed2k
+PLIST_SUB+= PL_ED2K="@comment "
+.endif
+
+.if defined(WITH_AMULECMD)
+CONFIGURE_ARGS+= --enable-amulecmd --enable-amulecmdgui
+PLIST_SUB+= PL_AMULECMD=""
+.else
+CONFIGURE_ARGS+= --disable-amulecmd --disable-amulecmdgui
+PLIST_SUB+= PL_AMULECMD="@comment "
+.endif
+
+.if defined(WITH_AMULEWEBSRV)
+CONFIGURE_ARGS+= --enable-webserver --enable-webservergui
+PLIST_SUB+= PL_AMULEWEBSRV=""
+.else
+CONFIGURE_ARGS+= --disable-webserver --disable-webservergui
+PLIST_SUB+= PL_AMULEWEBSRV="@comment "
+.endif
+
+.if defined(WITH_CAS)
+CONFIGURE_ARGS+= --enable-cas --enable-wxcas
+PLIST_SUB+= PL_CAS=""
+.else
+CONFIGURE_ARGS+= --disable-cas --disable-wxcas
+PLIST_SUB+= PL_CAS="@comment "
+.endif
+
+.if defined(WITH_ALC)
+CONFIGURE_ARGS+= --enable-alc --enable-alcc
+PLIST_SUB+= PL_ALC=""
+.else
+CONFIGURE_ARGS+= --disable-alc --disable-alcc
+PLIST_SUB+= PL_ALC="@comment "
+.endif
+
+.if defined(WITH_AMULEDAEMON)
+CONFIGURE_ARGS+= --enable-amule-daemon --enable-amule-gui
+PLIST_SUB+= PL_AMULEDAEMON=""
+USE_RC_SUBR= yes
+RCSCRIPT= ${PREFIX}/etc/rc.d/amuled.sh
+.else
+CONFIGURE_ARGS+= --disable-amule-daemon --disable-amule-gui
+PLIST_SUB+= PL_AMULEDAEMON="@comment "
+.endif
+
+# Man pages management
+.include "Makefile.man"
+
+# Copy startup script if needed (amuledaemon compiled)
+post-install:
+.if defined(WITH_AMULEDAEMON)
+ ${ECHO} "Installing ${RCSCRIPT} startup file."
+ ${INSTALL_SCRIPT} ${FILESDIR}/amuled.sh ${RCSCRIPT}
+.endif
+
+# fr manpages are still incomplete and can't be managed
+# by MANLANG. Will be done when pages are complete.
+.if defined(WITH_AMULECMD)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amulecmd.1
+.endif
+.if defined(WITH_AMULEWEBSRV)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amuleweb.1
+.endif
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amule.1
+.if defined(WITH_AMULEDAEMON)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/amuled.1
+.endif
+.if defined(WITH_ED2K)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/ed2k.1
+.endif
+.if defined(WITH_ALC)
+ ${GZIP_CMD} ${PREFIX}/man/fr/man1/alcc.1
+.endif
+.if defined(WITH_AMULECMD)
+ ${RM} ${PREFIX}/man/fr/man1/amulecmdDLG.1
+ ${LN} ${PREFIX}/man/fr/man1/amulecmd.1.gz ${PREFIX}/man/fr/man1/amulecmdDLG.1.gz
+.endif
+.if defined(WITH_AMULEWEBSRV)
+ ${RM} ${PREFIX}/man/fr/man1/amulewebDLG.1
+ ${LN} ${PREFIX}/man/fr/man1/amuleweb.1.gz ${PREFIX}/man/fr/man1/amulewebDLG.1.gz
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/net/amule2/Makefile.man b/net/amule2/Makefile.man
new file mode 100644
index 000000000000..f22f99d31c0a
--- /dev/null
+++ b/net/amule2/Makefile.man
@@ -0,0 +1,27 @@
+# TODO : Add fr here when pages are complete
+MANLANG= "" de es hu
+MANCOMPRESSED= no
+.if defined(WITH_CAS)
+MAN1+= cas.1
+MAN1+= wxcas.1
+.endif
+.if defined(WITH_ALC)
+MAN1+= alc.1
+MAN1+= alcc.1
+.endif
+.if defined(WITH_AMULEWEBSRV)
+MAN1+= amuleweb.1
+MLINKS+= amuleweb.1 amulewebDLG.1
+.endif
+.if defined(WITH_AMULECMD)
+MAN1+= amulecmd.1
+MLINKS+= amulecmd.1 amulecmdDLG.1
+.endif
+.if defined(WITH_ED2K)
+MAN1+= ed2k.1
+.endif
+.if defined(WITH_AMULEDAEMON)
+MAN1+= amuled.1
+.endif
+MAN1+= amule.1
+MAN1+= xas.1
diff --git a/net/amule2/distinfo b/net/amule2/distinfo
new file mode 100644
index 000000000000..5a651f1921ac
--- /dev/null
+++ b/net/amule2/distinfo
@@ -0,0 +1,2 @@
+MD5 (aMule-2.0.0.tar.gz) = e6680641e171ddf4236c955168947ba0
+SIZE (aMule-2.0.0.tar.gz) = 3020088
diff --git a/net/amule2/files/amuled.sh b/net/amule2/files/amuled.sh
new file mode 100644
index 000000000000..7ebdbadaff68
--- /dev/null
+++ b/net/amule2/files/amuled.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# aMule RCng startup script
+# Ogirinal work from Gabriele Cecchetti (amule.org forum)
+# Modified by Ganaël LAPLANCHE (ganael.laplanche@martymac.com)
+#
+
+# PROVIDE: amuled
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable amuled at startup
+# amuled (bool): Set to "NO" by default.
+# Set it to "YES" to enable amuled
+# amuled_user (str): Set to user running amuled
+# (default 'aMule')
+# amuled_home (str): Set to home directory of user running amuled
+# (default /home/${amuled_user})
+#
+. /etc/rc.subr
+
+name="amuled"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+[ -z "$amuled_enable" ] && amuled_enable="NO"
+[ -z "$amuled_user" ] && amuled_user="aMule"
+[ -z "$amuled_home" ] && amuled_home="/home/${amuled_user}"
+
+required_dirs=${amuled_home}
+required_files="${amuled_home}/.aMule/amule.conf"
+
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+
+amuled_start()
+{
+ if [ ! -f /var/run/${name}.run ]
+ then
+ su -l ${amuled_user} -c "amuled &" 2>>/var/log/${name}.log >>/var/log/${name}.log && touch /var/run/${name}.run
+ echo "Started ${name}."
+ echo `date` : "Started ${name}." >> /var/log/${name}.log
+ else
+ echo "${name} seems to be already running -- remove /var/run/${name}.run manually if needed."
+ fi
+}
+
+amuled_stop()
+{
+ if [ -f /var/run/${name}.run ]
+ then
+ # The following line is much better, but doesn't stop totally amuled
+ # su -l ${amuled_user} -c "amulecmd -c Shutdown" 2>>/var/log/${name}.log >>/var/log/${name}.log
+ # Since amuled catches SIGTERM, this way is preferred for now
+ killall -TERM amuled 2>>/var/log/${name}.log >>/var/log/${name}.log ; sleep 3
+ killall -KILL amuled 2>>/var/log/${name}.log >>/var/log/${name}.log
+ # Also kill amuleweb if needed
+ killall -KILL amuleweb 2>/dev/null >/dev/null
+ rm -f /var/run/${name}.run
+ echo "Stopped ${name}."
+ echo `date` : "Stopped ${name}." >> /var/log/${name}.log
+ else
+ echo "${name} doesn't seem to be running -- create /var/run/${name}.run if needed."
+ fi
+}
+
+run_rc_command "$1"
diff --git a/net/amule2/files/patch-amuleDlg.cpp b/net/amule2/files/patch-amuleDlg.cpp
new file mode 100644
index 000000000000..189eba15f49b
--- /dev/null
+++ b/net/amule2/files/patch-amuleDlg.cpp
@@ -0,0 +1,24 @@
+--- src/amuleDlg.cpp.orig Tue May 3 20:37:09 2005
++++ src/amuleDlg.cpp Tue May 3 20:39:53 2005
+@@ -502,9 +502,9 @@
+ {
+ wxString msg = wxT(" ");
+ #ifdef CLIENT_GUI
+- msg << _("aMule remote control ") << wxT(VERSION);
++ msg << _("aMule remote control ") << wxT(VERSION) << wxT(" for FreeBSD");
+ #else
+- msg << wxT("aMule ") << wxT(VERSION);
++ msg << wxT("aMule ") << wxT(VERSION) << wxT(" for FreeBSD");
+ #endif
+ msg << wxT(" ");
+ #ifdef CVSDATE
+@@ -514,7 +514,8 @@
+ " 'All-Platform' p2p client based on eMule \n\n"
+ " Website: http://www.amule.org \n"
+ " Forum: http://forum.amule.org \n"
+- " FAQ: http://wiki.amule.org \n\n"
++ " FAQ: http://wiki.amule.org \n"
++ " FreeBSD port: http://contribs.martymac.com \n\n"
+ " Contact: admin@amule.org (administrative issues) \n"
+ " Copyright (C) 2003-2005 aMule Team \n");
+ if (is_safe_state) {
diff --git a/net/amule2/pkg-descr b/net/amule2/pkg-descr
new file mode 100644
index 000000000000..afd986a280da
--- /dev/null
+++ b/net/amule2/pkg-descr
@@ -0,0 +1,6 @@
+aMule, the all-platform eMule p2p client
+
+aMule is a multiplatform fork of xMule
+client using wxWindows class library.
+
+WWW: http://www.amule.org
diff --git a/net/amule2/pkg-plist b/net/amule2/pkg-plist
new file mode 100644
index 000000000000..64c43cfaa6d8
--- /dev/null
+++ b/net/amule2/pkg-plist
@@ -0,0 +1,121 @@
+%%PL_AMULEDAEMON%%@unexec %D/etc/rc.d/amuled.sh stop > /dev/null 2>&1 || true
+%%PL_AMULEDAEMON%%etc/rc.d/amuled.sh
+%%PL_ALC%%man/fr/man1/alcc.1.gz
+%%PL_AMULEWEBSRV%%man/fr/man1/amuleweb.1.gz
+%%PL_AMULEWEBSRV%%man/fr/man1/amulewebDLG.1.gz
+%%PL_AMULECMD%%man/fr/man1/amulecmd.1.gz
+%%PL_AMULECMD%%man/fr/man1/amulecmdDLG.1.gz
+%%PL_ED2K%%man/fr/man1/ed2k.1.gz
+%%PL_AMULEDAEMON%%man/fr/man1/amuled.1.gz
+man/fr/man1/amule.1.gz
+share/locale/en_GB/LC_MESSAGES/amule.mo
+share/locale/en_US/LC_MESSAGES/amule.mo
+share/locale/es/LC_MESSAGES/amule.mo
+share/locale/de/LC_MESSAGES/amule.mo
+share/locale/fr/LC_MESSAGES/amule.mo
+share/locale/it/LC_MESSAGES/amule.mo
+share/locale/ko/LC_MESSAGES/amule.mo
+share/locale/pl/LC_MESSAGES/amule.mo
+share/locale/et_EE/LC_MESSAGES/amule.mo
+share/locale/ru/LC_MESSAGES/amule.mo
+share/locale/bg/LC_MESSAGES/amule.mo
+share/locale/es_MX/LC_MESSAGES/amule.mo
+share/locale/pt_BR/LC_MESSAGES/amule.mo
+share/locale/gl/LC_MESSAGES/amule.mo
+share/locale/eu/LC_MESSAGES/amule.mo
+share/locale/nl/LC_MESSAGES/amule.mo
+share/locale/ar/LC_MESSAGES/amule.mo
+share/locale/fi/LC_MESSAGES/amule.mo
+share/locale/zh_CN/LC_MESSAGES/amule.mo
+share/locale/zh_TW/LC_MESSAGES/amule.mo
+share/locale/da/LC_MESSAGES/amule.mo
+share/locale/hu/LC_MESSAGES/amule.mo
+share/locale/ca/LC_MESSAGES/amule.mo
+share/locale/it_CH/LC_MESSAGES/amule.mo
+share/locale/pt_PT/LC_MESSAGES/amule.mo
+share/locale/hr/LC_MESSAGES/amule.mo
+share/locale/sl/LC_MESSAGES/amule.mo
+share/gnome/doc/aMule-2.0.0/ABOUT-NLS
+share/gnome/doc/aMule-2.0.0/amulesig.txt
+share/gnome/doc/aMule-2.0.0/amule-win32.HOWTO.txt
+share/gnome/doc/aMule-2.0.0/Changelog
+share/gnome/doc/aMule-2.0.0/Doxyfile
+share/gnome/doc/aMule-2.0.0/ED2K-Links.HOWTO
+share/gnome/doc/aMule-2.0.0/INSTALL
+share/gnome/doc/aMule-2.0.0/license.txt
+share/gnome/doc/aMule-2.0.0/README
+share/gnome/doc/aMule-2.0.0/TODO
+share/gnome/doc/aMule-2.0.0/EC_Protocol.txt
+share/gnome/doc/aMule-2.0.0/socks4.protocol
+@unexec rmdir %D/share/gnome/doc/aMule-2.0.0 2>/dev/null || true
+@unexec rmdir %D/share/gnome/doc 2>/dev/null || true
+%%PL_CAS%%share/gnome/cas/tmp.html
+%%PL_CAS%%share/gnome/cas/stat.png
+%%PL_CAS%%@unexec rmdir %D/share/gnome/cas 2>/dev/null || true
+%%PL_CAS%%share/gnome/pixmaps/wxcas.xpm
+%%PL_ALC%%share/gnome/pixmaps/alc.xpm
+share/gnome/pixmaps/amule.xpm
+@unexec rmdir %D/share/gnome/pixmaps 2>/dev/null || true
+%%PL_CAS%%share/gnome/applications/wxcas.desktop
+%%PL_ALC%%share/gnome/applications/alc.desktop
+share/gnome/applications/amule.desktop
+@unexec rmdir %D/share/gnome/applications 2>/dev/null || true
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/aMule.tmpl
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/add_server.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_down.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_right.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/arrow_up.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/back.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/black.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue1.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue2.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue3.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue4.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue5.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue6.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/blue.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_download.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_kad.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_search.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_servers.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_settings.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_shared.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/cp_stats.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/emule.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/green.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/greenpercent.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_cancel.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_connect.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_down.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_ed2klink.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_info.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/log.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/logo.jpg
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_pause.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_resume.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/l_up.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/main_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/main_top_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/red.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/top_bar_bg2.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/top_bar_bg.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/transparent.gif
+%%PL_AMULEWEBSRV%%share/gnome/amule/webserver/default/yellow.gif
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule/webserver/default 2>/dev/null || true
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule/webserver 2>/dev/null || true
+%%PL_AMULEWEBSRV%%@unexec rmdir %D/share/gnome/amule 2>/dev/null || true
+lib/xchat/plugins/xas.pl
+@unexec rmdir %D/lib/xchat/plugins 2>/dev/null || true
+@unexec rmdir %D/lib/xchat 2>/dev/null || true
+%%PL_CAS%%bin/cas
+%%PL_CAS%%bin/wxcas
+%%PL_ALC%%bin/alc
+%%PL_ALC%%bin/alcc
+%%PL_AMULEWEBSRV%%bin/amuleweb
+%%PL_AMULEWEBSRV%%bin/amulewebDLG
+%%PL_AMULECMD%%bin/amulecmd
+%%PL_AMULECMD%%bin/amulecmdDLG
+%%PL_ED2K%%bin/ed2k
+%%PL_AMULEDAEMON%%bin/amulegui
+%%PL_AMULEDAEMON%%bin/amuled
+bin/amule