From 5610bf8bdfb9435c15c59ab28ae15088c3b44b70 Mon Sep 17 00:00:00 2001 From: jmmv Date: Sat, 24 May 2003 09:50:26 +0000 Subject: - Fix application title (show OS name instead of hardcoding Linux). - Unlimit resources at startup by ourselves. - Bump PKGREVISION to 1. --- net/lmule/Makefile | 3 ++- net/lmule/distinfo | 7 ++++++- net/lmule/patches/patch-aa | 22 ++++++++++++++++++++++ net/lmule/patches/patch-ab | 28 ++++++++++++++++++++++++++++ net/lmule/patches/patch-ac | 39 +++++++++++++++++++++++++++++++++++++++ net/lmule/patches/patch-ad | 43 +++++++++++++++++++++++++++++++++++++++++++ net/lmule/patches/patch-ae | 20 ++++++++++++++++++++ 7 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 net/lmule/patches/patch-aa create mode 100644 net/lmule/patches/patch-ab create mode 100644 net/lmule/patches/patch-ac create mode 100644 net/lmule/patches/patch-ad create mode 100644 net/lmule/patches/patch-ae (limited to 'net') diff --git a/net/lmule/Makefile b/net/lmule/Makefile index 301ec52183a..65399b74f48 100644 --- a/net/lmule/Makefile +++ b/net/lmule/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.5 2003/05/09 09:36:28 jmmv Exp $ +# $NetBSD: Makefile,v 1.6 2003/05/24 09:50:26 jmmv Exp $ # DISTNAME= lmule-1.2.1 +PKGREVISION= 1 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lmule/} diff --git a/net/lmule/distinfo b/net/lmule/distinfo index fe6439c7783..ea730c80a76 100644 --- a/net/lmule/distinfo +++ b/net/lmule/distinfo @@ -1,5 +1,10 @@ -$NetBSD: distinfo,v 1.3 2003/05/09 09:36:28 jmmv Exp $ +$NetBSD: distinfo,v 1.4 2003/05/24 09:50:26 jmmv Exp $ SHA1 (lmule-1.2.1.tar.gz) = a7655629cc39bfa11f12ccda09a85918e5a5a7f0 Size (lmule-1.2.1.tar.gz) = 1393629 bytes +SHA1 (patch-aa) = 494fe9a34e90abdbf387c30ae4d5298fba798580 +SHA1 (patch-ab) = 89e90417306b89bb06f40d8c7997853a6a1891f6 +SHA1 (patch-ac) = 2ca8e6c01add774675d0f0c194be8dddd86c0693 +SHA1 (patch-ad) = 29649791bf287884d21c0534281c67fd5d7bdb97 +SHA1 (patch-ae) = f221f59763133f35df24d26de85e64ee2cb83800 SHA1 (patch-ag) = 7d804f8306efe306fed77f1c998f3cb115cabe0d diff --git a/net/lmule/patches/patch-aa b/net/lmule/patches/patch-aa new file mode 100644 index 00000000000..0f24341b298 --- /dev/null +++ b/net/lmule/patches/patch-aa @@ -0,0 +1,22 @@ +$NetBSD: patch-aa,v 1.3 2003/05/24 09:50:27 jmmv Exp $ + +--- configure.orig 2003-04-28 03:34:26.000000000 +0200 ++++ configure +@@ -5864,7 +5864,7 @@ fi; + + + for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +-stdlib.h string.h unistd.h sys/param.h ++stdlib.h string.h unistd.h sys/param.h sys/utsname.h sys/resource.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if eval "test \"\${$as_ac_Header+set}\" = set"; then +@@ -6000,7 +6000,7 @@ done + + for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ + geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ +-strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next ++strcasecmp strdup strtoul uname getrlimit setrlimit tsearch __argz_count __argz_stringify __argz_next + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + echo "$as_me:$LINENO: checking for $ac_func" >&5 diff --git a/net/lmule/patches/patch-ab b/net/lmule/patches/patch-ab new file mode 100644 index 00000000000..9235c476a56 --- /dev/null +++ b/net/lmule/patches/patch-ab @@ -0,0 +1,28 @@ +$NetBSD: patch-ab,v 1.3 2003/05/24 09:50:27 jmmv Exp $ + +--- src/SysTray.cpp.orig 2003-05-23 09:12:44.000000000 +0200 ++++ src/SysTray.cpp 2003-05-23 09:13:32.000000000 +0200 +@@ -37,6 +37,8 @@ + #include + #define _(String) gettext(String) + ++const char * GetAppTitle(); ++ + CSysTray::CSysTray(wxWindow* _parent,int _desktopMode) + { + gdk_rgb_init(); +@@ -71,11 +73,11 @@ + + if(use_legacy) { + status_docklet=gtk_window_new(GTK_WINDOW_TOPLEVEL); +- gtk_window_set_title(GTK_WINDOW(status_docklet),_("eMule for Linux")); ++ gtk_window_set_title(GTK_WINDOW(status_docklet),GetAppTitle()); + gtk_window_set_wmclass(GTK_WINDOW(status_docklet),"lMule_StatusDocklet","lmule"); + gtk_widget_set_usize(status_docklet,22,22); + } else { +- status_docklet=GTK_WIDGET(egg_tray_icon_new(_("eMule for Linux"))); ++ status_docklet=GTK_WIDGET(egg_tray_icon_new(GetAppTitle())); + if(status_docklet==NULL) { + printf("**** WARNING: Can't create status docklet. Systray will not be created.\n"); + desktopMode=4; + diff --git a/net/lmule/patches/patch-ac b/net/lmule/patches/patch-ac new file mode 100644 index 00000000000..3a103e7ab18 --- /dev/null +++ b/net/lmule/patches/patch-ac @@ -0,0 +1,39 @@ +$NetBSD: patch-ac,v 1.3 2003/05/24 09:50:27 jmmv Exp $ + +--- src/emule.cpp.orig 2003-04-27 16:19:51.000000000 +0200 ++++ src/emule.cpp +@@ -206,10 +206,34 @@ public: + + extern void InitXmlResource(); + ++#ifdef HAVE_SYS_RESOURCE_H ++#include ++#endif ++ ++static void UnlimitResource(int resType) ++{ ++#if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) ++ struct rlimit rl; ++ getrlimit(resType, &rl); ++ rl.rlim_cur = rl.rlim_max; ++ setrlimit(resType, &rl); ++#endif ++} ++ ++static void SetResourceLimits() ++{ ++ UnlimitResource(RLIMIT_DATA); ++ UnlimitResource(RLIMIT_FSIZE); ++ UnlimitResource(RLIMIT_NOFILE); ++ UnlimitResource(RLIMIT_RSS); ++} ++ + bool CemuleApp::OnInit() + { + //putenv("LANG=en_US"); + ++ SetResourceLimits(); ++ + // for resources + wxFileSystem::AddHandler(new wxZipFSHandler); + wxXmlResource::Get()->InitAllHandlers(); diff --git a/net/lmule/patches/patch-ad b/net/lmule/patches/patch-ad new file mode 100644 index 00000000000..738e20abf59 --- /dev/null +++ b/net/lmule/patches/patch-ad @@ -0,0 +1,43 @@ +$NetBSD: patch-ad,v 1.3 2003/05/24 09:50:27 jmmv Exp $ + +--- src/emuleDlg.cpp.orig 2003-04-27 16:19:51.000000000 +0200 ++++ src/emuleDlg.cpp +@@ -20,6 +20,7 @@ + // + + //#include "stdafx.h" ++#include "config.h" + #include "emule.h" + #include "emuleDlg.h" + #include "sockets.h" +@@ -130,6 +131,9 @@ void muleDefaultToolbar( wxToolBar *pare + + // CemuleDlg Dialog + #include ++#ifdef HAVE_SYS_UTSNAME_H ++#include ++#endif + + #if wxMINOR_VERSION > 4 + #define CLOSEBOX wxCLOSE_BOX +@@ -137,8 +141,19 @@ void muleDefaultToolbar( wxToolBar *pare + #define CLOSEBOX 0 + #endif + ++const char * GetAppTitle() ++{ ++#if defined(HAVE_UNAME) && defined(HAVE_SYS_UTSNAME_H) ++ struct utsname un; ++ uname(&un); ++ return CString("eMule for ") + un.sysname; ++#else ++ return CString("eMule for *NIX"); ++#endif ++} ++ + CemuleDlg::CemuleDlg(wxWindow* pParent /*=NULL*/) +- : wxFrame(pParent,CemuleDlg::IDD,_("eMule for Linux"),wxDefaultPosition,wxSize(800,520), ++ : wxFrame(pParent,CemuleDlg::IDD,GetAppTitle(),wxDefaultPosition,wxSize(800,520), + wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxDIALOG_NO_PARENT|wxTHICK_FRAME|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|CLOSEBOX) + { + m_app_state=APP_STATE_STARTING; diff --git a/net/lmule/patches/patch-ae b/net/lmule/patches/patch-ae new file mode 100644 index 00000000000..333e3af640d --- /dev/null +++ b/net/lmule/patches/patch-ae @@ -0,0 +1,20 @@ +$NetBSD: patch-ae,v 1.3 2003/05/24 09:50:27 jmmv Exp $ + +--- config.h.in.orig 2003-05-23 21:03:48.000000000 +0200 ++++ config.h.in +@@ -318,3 +318,15 @@ + /* Define to unsigned long or unsigned long long if and + don't define. */ + #undef uintmax_t ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_UTSNAME_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_RESOURCE_H ++ ++/* Define to 1 if you have the `getrlimit' function. */ ++#undef HAVE_GETRLIMIT ++ ++/* Define to 1 if you have the `setrlimit' function. */ ++#undef HAVE_SETRLIMIT -- cgit v1.2.3