From 8881d35f25ab27873649a53fa86eec05f731ba25 Mon Sep 17 00:00:00 2001 From: dcoppa Date: Tue, 24 Apr 2012 12:55:12 +0000 Subject: [PATCH] Bugfixing update to mldonkey-3.1.1 --- net/mldonkey/stable/Makefile | 6 ++-- net/mldonkey/stable/distinfo | 10 +++--- .../stable/patches/patch-config_configure_in | 34 +++++++++---------- .../patches/patch-src_utils_net_upnp_stubs_c | 31 +++++++++++++---- net/mldonkey/stable/pkg/PLIST | 3 +- 5 files changed, 51 insertions(+), 33 deletions(-) diff --git a/net/mldonkey/stable/Makefile b/net/mldonkey/stable/Makefile index a0c70d1614e..2c155b98dd6 100644 --- a/net/mldonkey/stable/Makefile +++ b/net/mldonkey/stable/Makefile @@ -1,11 +1,9 @@ -# $OpenBSD: Makefile,v 1.46 2012/02/28 15:38:55 dcoppa Exp $ +# $OpenBSD: Makefile,v 1.47 2012/04/24 12:55:12 dcoppa Exp $ COMMENT = e-donkey client -DISTNAME = mldonkey-3.1.0 +DISTNAME = mldonkey-3.1.1 CATEGORIES = net -REVISION = 5 - HOMEPAGE = http://mldonkey.sourceforge.net/Main_Page MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=mldonkey/} diff --git a/net/mldonkey/stable/distinfo b/net/mldonkey/stable/distinfo index 9f78f4f6751..33f9326bebe 100644 --- a/net/mldonkey/stable/distinfo +++ b/net/mldonkey/stable/distinfo @@ -1,5 +1,5 @@ -MD5 (mldonkey-3.1.0.tar.bz2) = Bycm0Vi6HpNsVUvjQefO/w== -RMD160 (mldonkey-3.1.0.tar.bz2) = acK/GTe7KnghZqOwjYfkU37APuo= -SHA1 (mldonkey-3.1.0.tar.bz2) = lHnGGrBnsBx2y8EeQUd/AKF/XUE= -SHA256 (mldonkey-3.1.0.tar.bz2) = /Q8TKhvqlsnfoveDcnjIzLu3A+/Cx6xIOGtRA6FFAwg= -SIZE (mldonkey-3.1.0.tar.bz2) = 2820081 +MD5 (mldonkey-3.1.1.tar.bz2) = WVTufPrhivsnMlSf2ZDn1g== +RMD160 (mldonkey-3.1.1.tar.bz2) = 5al+w+BML+Gw8B04rl/VOK2gluI= +SHA1 (mldonkey-3.1.1.tar.bz2) = LQvJ+ElyhSj4M+Mts7BRqrUbbH8= +SHA256 (mldonkey-3.1.1.tar.bz2) = mWKUqrJ08ySpE/ajZlAGxw06oXSPdcxcvFYO0N3uQLI= +SIZE (mldonkey-3.1.1.tar.bz2) = 2820894 diff --git a/net/mldonkey/stable/patches/patch-config_configure_in b/net/mldonkey/stable/patches/patch-config_configure_in index 05ca65c3098..5b43cd8880c 100644 --- a/net/mldonkey/stable/patches/patch-config_configure_in +++ b/net/mldonkey/stable/patches/patch-config_configure_in @@ -1,7 +1,7 @@ -$OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ ---- config/configure.in.orig Sun Aug 7 12:25:14 2011 -+++ config/configure.in Mon Dec 12 15:17:24 2011 -@@ -482,7 +482,7 @@ fi +$OpenBSD: patch-config_configure_in,v 1.17 2012/04/24 12:55:12 dcoppa Exp $ +--- config/configure.in.orig Thu Apr 5 16:07:22 2012 ++++ config/configure.in Tue Apr 24 13:55:45 2012 +@@ -485,7 +485,7 @@ fi OCAML_PATH= @@ -10,7 +10,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ echo " Checking system tools." echo "--------------------------------" -@@ -526,7 +526,7 @@ WGET="$ac_cv_prog_WGET" +@@ -529,7 +529,7 @@ WGET="$ac_cv_prog_WGET" echo "----------------------------------------" echo " Checking system tools finished." @@ -19,7 +19,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ echo "--------------------------------" echo " Checking Ocaml compiler." -@@ -769,7 +769,7 @@ if test "$DEBUG" = "yes"; then +@@ -772,7 +772,7 @@ if test "$DEBUG" = "yes"; then OCAMLOPT="$OCAMLOPT -g" fi @@ -28,7 +28,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ echo " Checking system headers." echo "----------------------------------" -@@ -823,7 +823,7 @@ AC_CHECK_HEADERS([sys/param.h sys/mount.h],,, +@@ -826,7 +826,7 @@ AC_CHECK_HEADERS([sys/param.h sys/mount.h],,, ]) echo "-------------------------------------------" echo " Checking system headers finished." @@ -37,7 +37,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ echo "-----------------------------------" echo " Checking system libraries." echo "-----------------------------------" -@@ -968,7 +968,7 @@ if test "$GD" != "no"; then +@@ -971,7 +971,7 @@ if test "$GD" != "no"; then PNG_LDFLAGS=`$PNGLIBCONFIG --ldflags` LDFLAGS="$LDFLAGS $PNG_LDFLAGS" fi @@ -46,7 +46,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ # restore variables LIBS=$SAVE_LIBS_PNG CFLAGS=$SAVE_CFLAGS_PNG -@@ -996,7 +996,7 @@ if test "$GD" != "no"; then +@@ -999,7 +999,7 @@ if test "$GD" != "no"; then GD=yes GD_PNG=yes AC_MSG_RESULT(yes) @@ -55,7 +55,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ AC_DEFINE(HAVE_GD_PNG, 1, [Define to 1 if you have png support in libgd.]) else AC_MSG_RESULT(no) -@@ -1130,7 +1130,7 @@ esac +@@ -1133,7 +1133,7 @@ esac echo "---------------------------------------------" echo " Checking system libraries finished." @@ -64,7 +64,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ CXX_VERSION= CRYPTOPPFLAGS= -@@ -1275,7 +1275,7 @@ echo "--------------------------------------" +@@ -1278,7 +1278,7 @@ echo "--------------------------------------" fi echo "-----------------------------------------------" echo " Checking activated networks finished." @@ -73,7 +73,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ if test -f $OCAMLLIB/lablgl.cma; then LABLGL_CMA=lablgl.cma -@@ -1446,7 +1446,7 @@ else +@@ -1449,7 +1449,7 @@ else MORE_TARGETS="$MORE_TARGETS $GUIS" AC_MSG_CHECKING(GToolbox.popup_menu args) GTOOLBOX="$OCAMLLIB/$LABLGTK_NAME/gToolbox.mli" @@ -82,7 +82,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ if test "$GTOOLBOX_ARGS" = "new"; then GTOOLBOX_POPUPMENU=' ~button: button ~time: time ' AC_MSG_RESULT(new) -@@ -1456,7 +1456,7 @@ else +@@ -1459,7 +1459,7 @@ else fi echo "---------------------------------------------------------" echo "End of GTK GUI configuration." @@ -91,7 +91,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ fi if test "$OS_FILES" = "mingw"; then -@@ -1569,16 +1569,16 @@ diff $GTK_AUTOCONF.new $GTK_AUTOCONF 2> /dev/null > /d +@@ -1572,16 +1572,16 @@ diff $GTK_AUTOCONF.new $GTK_AUTOCONF 2> /dev/null > /d cd .. @@ -111,7 +111,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ echo -n " - eDonkey " if test "$DONKEY" = "yes"; then if test "$DONKEY_SUI" = "yes"; then -@@ -1653,7 +1653,7 @@ else +@@ -1656,7 +1656,7 @@ else echo " disabled - currently not usable" fi @@ -120,7 +120,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ echo " - zlib (required) enabled" -@@ -1713,7 +1713,7 @@ else +@@ -1716,7 +1716,7 @@ else fi if test "$LABLGTK_CONFIG" = "yes"; then @@ -129,7 +129,7 @@ $OpenBSD: patch-config_configure_in,v 1.16 2011/12/12 14:57:23 dcoppa Exp $ if test "$GUI" = "newgui1"; then echo "GTK1 newgui" else -@@ -1733,17 +1733,14 @@ if test "$TARGET_TYPE" = "byte"; then +@@ -1736,17 +1736,14 @@ if test "$TARGET_TYPE" = "byte"; then OCAML_TYPE="- byte code" COMPILE_TARGET=".byte" fi diff --git a/net/mldonkey/stable/patches/patch-src_utils_net_upnp_stubs_c b/net/mldonkey/stable/patches/patch-src_utils_net_upnp_stubs_c index cda9e1cb5c0..8501b79a8bb 100644 --- a/net/mldonkey/stable/patches/patch-src_utils_net_upnp_stubs_c +++ b/net/mldonkey/stable/patches/patch-src_utils_net_upnp_stubs_c @@ -1,10 +1,18 @@ -$OpenBSD: patch-src_utils_net_upnp_stubs_c,v 1.1 2012/02/28 15:38:55 dcoppa Exp $ +$OpenBSD: patch-src_utils_net_upnp_stubs_c,v 1.2 2012/04/24 12:55:12 dcoppa Exp $ Fix build with latest libnatpmp/miniupnpc --- src/utils/net/upnp_stubs.c.orig Mon Nov 1 18:19:23 2010 -+++ src/utils/net/upnp_stubs.c Mon Feb 27 15:35:59 2012 -@@ -501,7 +501,7 @@ natpmpPulse( ml_upnpmp_t * map ) ++++ src/utils/net/upnp_stubs.c Tue Apr 24 14:41:55 2012 +@@ -164,7 +164,6 @@ static int g_inited = 0; + static int g_running = 0; + static int g_stop = 0; + static pthread_t g_pthread; +-//static pthread_cond_t cond; + static pthread_mutex_t g_mutex; + static pthread_mutex_t g_delay_mutex; + +@@ -501,7 +500,7 @@ natpmpPulse( ml_upnpmp_t * map ) if( map->enabled && ( map->natpmpState == ML_NATPMP_DISCOVER ) ) { @@ -13,7 +21,7 @@ Fix build with latest libnatpmp/miniupnpc dbg_printf( "initnatpmp = %d\n", val ); val = sendpublicaddressrequest( &map->natpmp ); dbg_printf( "sendpublicaddressrequest = %d\n", val ); -@@ -639,7 +639,7 @@ upnpPulse( ml_upnpmp_t * map ) +@@ -639,7 +638,7 @@ upnpPulse( ml_upnpmp_t * map ) { struct UPNPDev * devlist; errno = 0; @@ -22,7 +30,7 @@ Fix build with latest libnatpmp/miniupnpc if( devlist == NULL ) { dbg_printf( "upnpDiscover failed (errno %d - %s)\n", errno, str_errno( errno ) ); -@@ -680,7 +680,7 @@ upnpPulse( ml_upnpmp_t * map ) +@@ -680,7 +679,7 @@ upnpPulse( ml_upnpmp_t * map ) snprintf( type, sizeof( type ), "%s", ( map->isTcp ? "TCP" : "UDP" ) ); i = UPNP_GetSpecificPortMappingEntry( map->upnpUrls.controlURL, map->upnpData.first.servicetype, portStr, @@ -31,7 +39,7 @@ Fix build with latest libnatpmp/miniupnpc if( i != UPNPCOMMAND_SUCCESS ) { dbg_printf( "Port %d isn't forwarded\n", map->extPort ); -@@ -730,7 +730,7 @@ upnpPulse( ml_upnpmp_t * map ) +@@ -730,7 +729,7 @@ upnpPulse( ml_upnpmp_t * map ) err = UPNP_AddPortMapping( map->upnpUrls.controlURL, map->upnpData.first.servicetype, extPortStr, intPortStr, map->lanaddr, @@ -40,3 +48,14 @@ Fix build with latest libnatpmp/miniupnpc map->upnpMapped = !err; } dbg_printf( "Port forwarding through \"%s\", service \"%s\". (local address[%s:%d])\n", map->upnpUrls.controlURL, map->upnpData.first.servicetype, map->lanaddr, map->intPort ); +@@ -898,9 +897,9 @@ upnp_thread_start( ) + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + +- //pthread_cond_init(&cond, NULL); + pthread_mutex_init(&g_mutex, NULL); + pthread_mutex_init(&g_delay_mutex, NULL); ++ pthread_mutex_trylock(&g_mutex); + pthread_mutex_unlock(&g_mutex); + + err = pthread_create(&g_pthread, &attr, upnpNatpmpThread, NULL); diff --git a/net/mldonkey/stable/pkg/PLIST b/net/mldonkey/stable/pkg/PLIST index 6f0ba109016..476cba2d682 100644 --- a/net/mldonkey/stable/pkg/PLIST +++ b/net/mldonkey/stable/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.11 2010/09/17 15:58:30 dcoppa Exp $ +@comment $OpenBSD: PLIST,v 1.12 2012/04/24 12:55:12 dcoppa Exp $ bin/mlbt bin/mlbt+gui bin/mldc @@ -75,6 +75,7 @@ share/mldonkey/distrib/i18n/mlnet_strings.sp share/mldonkey/distrib/i18n/mlnet_strings.sv share/mldonkey/distrib/kill_mldonkey share/mldonkey/distrib/make_buginfo +share/mldonkey/distrib/mldonkey.desktop share/mldonkey/distrib/mldonkey_command share/mldonkey/distrib/mldonkey_gui_started_for_macosx share/mldonkey/distrib/mldonkey_previewer