diff options
author | Daniel Black <dragonheart@gentoo.org> | 2005-05-20 23:56:21 +0000 |
---|---|---|
committer | Daniel Black <dragonheart@gentoo.org> | 2005-05-20 23:56:21 +0000 |
commit | c339e250f03e92e4f3d4b9386e0b89744046e91f (patch) | |
tree | f1eafc23a108fe9fcbf760b32d88b542625e12f0 /app-admin | |
parent | version bumped as per bug #93351 (diff) | |
download | gentoo-2-c339e250f03e92e4f3d4b9386e0b89744046e91f.tar.gz gentoo-2-c339e250f03e92e4f3d4b9386e0b89744046e91f.tar.bz2 gentoo-2-c339e250f03e92e4f3d4b9386e0b89744046e91f.zip |
0.18-r3 x86 stable as per bug #93343. Old version cleanout
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/torsmo/ChangeLog | 8 | ||||
-rw-r--r-- | app-admin/torsmo/files/digest-torsmo-0.17 | 1 | ||||
-rw-r--r-- | app-admin/torsmo/files/digest-torsmo-0.17-r1 | 1 | ||||
-rw-r--r-- | app-admin/torsmo/files/digest-torsmo-0.18-r2 | 1 | ||||
-rw-r--r-- | app-admin/torsmo/files/torsmo-0.17-kernel2.4.patch | 102 | ||||
-rw-r--r-- | app-admin/torsmo/files/torsmo-0.17-mldonkey.patch | 659 | ||||
-rw-r--r-- | app-admin/torsmo/files/torsmo-0.17-mozilla.patch | 17 | ||||
-rw-r--r-- | app-admin/torsmo/torsmo-0.17-r1.ebuild | 53 | ||||
-rw-r--r-- | app-admin/torsmo/torsmo-0.17.ebuild | 48 | ||||
-rw-r--r-- | app-admin/torsmo/torsmo-0.18-r2.ebuild | 57 | ||||
-rw-r--r-- | app-admin/torsmo/torsmo-0.18-r3.ebuild | 4 |
11 files changed, 9 insertions, 942 deletions
diff --git a/app-admin/torsmo/ChangeLog b/app-admin/torsmo/ChangeLog index 1360a62fcee0..0c93ef76a385 100644 --- a/app-admin/torsmo/ChangeLog +++ b/app-admin/torsmo/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-admin/torsmo # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/torsmo/ChangeLog,v 1.28 2005/05/05 22:36:05 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/torsmo/ChangeLog,v 1.29 2005/05/20 23:56:21 dragonheart Exp $ + + 20 May 2005; Daniel Black <dragonheart@gentoo.org> + -files/torsmo-0.17-kernel2.4.patch, -files/torsmo-0.17-mldonkey.patch, + -files/torsmo-0.17-mozilla.patch, -torsmo-0.17.ebuild, + -torsmo-0.17-r1.ebuild, -torsmo-0.18-r2.ebuild, torsmo-0.18-r3.ebuild: + 0.18-r3 x86 stable as per bug #93343. Old version cleanout 05 May 2005; Sven Wegener <swegener@gentoo.org> torsmo-0.18-r2.ebuild, torsmo-0.18-r3.ebuild: diff --git a/app-admin/torsmo/files/digest-torsmo-0.17 b/app-admin/torsmo/files/digest-torsmo-0.17 deleted file mode 100644 index e37968182c78..000000000000 --- a/app-admin/torsmo/files/digest-torsmo-0.17 +++ /dev/null @@ -1 +0,0 @@ -MD5 8c82134cd78f9d4a7b6f6721ee2c16f9 torsmo-0.17.tar.gz 80286 diff --git a/app-admin/torsmo/files/digest-torsmo-0.17-r1 b/app-admin/torsmo/files/digest-torsmo-0.17-r1 deleted file mode 100644 index e37968182c78..000000000000 --- a/app-admin/torsmo/files/digest-torsmo-0.17-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 8c82134cd78f9d4a7b6f6721ee2c16f9 torsmo-0.17.tar.gz 80286 diff --git a/app-admin/torsmo/files/digest-torsmo-0.18-r2 b/app-admin/torsmo/files/digest-torsmo-0.18-r2 deleted file mode 100644 index f2c1092e434d..000000000000 --- a/app-admin/torsmo/files/digest-torsmo-0.18-r2 +++ /dev/null @@ -1 +0,0 @@ -MD5 88bd8f627637d785a1d681f4f15f00b6 torsmo-0.18.tar.gz 84020 diff --git a/app-admin/torsmo/files/torsmo-0.17-kernel2.4.patch b/app-admin/torsmo/files/torsmo-0.17-kernel2.4.patch deleted file mode 100644 index 0146d39adc97..000000000000 --- a/app-admin/torsmo/files/torsmo-0.17-kernel2.4.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- linux.c.orig 2004-05-25 18:27:19.000000000 +0930 -+++ linux.c 2004-12-03 06:11:57.604376744 +0930 -@@ -176,7 +176,24 @@ - static int running_processes; - static unsigned int cpu_user, cpu_system, cpu_nice; - --static FILE *stat_fp; -+static FILE *stat_fp, *proc_fp; -+ -+static void update_procs() { -+ static int rep; -+ char buf[64]; -+ float fj; -+ int dj; -+ if (proc_fp == NULL) -+ proc_fp = open_file("/proc/loadavg", &rep); -+ else -+ fseek(proc_fp, 0, SEEK_SET); -+ while (!feof(proc_fp)){ -+ if (fgets(buf, 64, proc_fp) == NULL) break; -+ else -+ sscanf(buf, "%f %f %f %d/%d %d",&fj,&fj,&fj,&running_processes,&dj,&dj); -+ } -+} -+ - - static void update_stat() { - static int rep; -@@ -191,10 +208,6 @@ - while (!feof(stat_fp)) { - if (fgets(buf, 255, stat_fp) == NULL) - break; -- -- if (strncmp(buf, "procs_running ", 14) == 0) { -- sscanf(buf, "%*s %d", &running_processes); -- } - else if (strncmp(buf, "cpu ", 4) == 0) { - sscanf(buf, "%*s %u %u %u", &cpu_user, &cpu_nice, &cpu_system); - } -@@ -204,7 +217,7 @@ - } - - int get_running_processes() { -- update_stat(); -+ update_procs(); - return running_processes; - } - -@@ -253,7 +266,7 @@ - } - } - --#define I2C_DIR "/sys/bus/i2c/devices/" -+#define I2C_DIR "/proc/sys/dev/sensors/" - - int open_i2c_sensor(const char *dev, const char *type, int n, int *div) { - char path[256]; -@@ -272,12 +285,13 @@ - if (strcmp(type, "vol") == 0) - type = "in"; - -- snprintf(path, 255, I2C_DIR "%s/%s%d_input", dev, type, n); -+ snprintf(path, 255, I2C_DIR "%s/%s%d", dev, type, n); - - /* open file */ - fd = open(path, O_RDONLY); - if (fd < 0) ERR("can't open '%s': %s", path, strerror(errno)); - -+ - if (strcmp(type, "in") == 0 || strcmp(type, "temp") == 0) - *div = 1; - else -@@ -287,7 +301,8 @@ - } - - double get_i2c_info(int fd, int div) { -- int val = 0; -+ double val = 0; -+ double jf; - - if (fd <= 0) return 0; - -@@ -301,14 +316,13 @@ - /* should read until n == 0 but I doubt that kernel will give these - * in multiple pieces. :) */ - buf[n] = '\0'; -- val = atoi(buf); -+ if (div) -+ sscanf(buf, "%lf %lf %lf", &jf, &jf, &val); -+ else -+ sscanf(buf, "%lf %lf", &jf, &val); - } - -- /* divide voltage and temperature by 1000 */ -- if (div) -- return val / 1000.0; -- else -- return val; -+ return val; - } - - void get_load_average(double v[3]) { diff --git a/app-admin/torsmo/files/torsmo-0.17-mldonkey.patch b/app-admin/torsmo/files/torsmo-0.17-mldonkey.patch deleted file mode 100644 index 9a0fdc4b482f..000000000000 --- a/app-admin/torsmo/files/torsmo-0.17-mldonkey.patch +++ /dev/null @@ -1,659 +0,0 @@ ---- torsmo.c 2004-05-25 12:58:51.000000000 +0200 -+++ torsmo-patched.c 2004-10-02 11:20:39.491806096 +0200 -@@ -22,6 +22,13 @@ - #include <X11/Xlib.h> - #include <X11/Xatom.h> - #include <X11/Xutil.h> -+#include <netdb.h> -+#include <fcntl.h> -+#include <sys/types.h> -+#include <sys/socket.h> -+#include <netinet/in.h> -+#include <arpa/inet.h> -+ - - /* alignments */ - enum { -@@ -31,6 +38,121 @@ - BOTTOM_RIGHT, - }; - -+/* mldonkey ----------------------------------------------------------------- */ -+ -+/* int64 */ -+ typedef long long int64; -+ -+ int64 buf_to_int(char *buf, int pos, int size); -+ void int_to_buf(int64 i, char *buf, int pos, int size); -+ -+ #define BUF8_TO_INT(buf, pos) buf_to_int((buf), (pos), 1) -+ #define BUF16_TO_INT(buf, pos) buf_to_int((buf), (pos), 2) -+ #define BUF32_TO_INT(buf, pos) buf_to_int((buf), (pos), 4) -+ #define BUF64_TO_INT(buf, pos) buf_to_int((buf), (pos), 8) -+ -+ #define INT_TO_BUF8(i, buf, pos) int_to_buf((i), (buf), (pos), 1) -+ #define INT_TO_BUF16(i, buf, pos) int_to_buf((i), (buf), (pos), 2) -+ #define INT_TO_BUF32(i, buf, pos) int_to_buf((i), (buf), (pos), 4) -+ #define INT_TO_BUF64(i, buf, pos) int_to_buf((i), (buf), (pos), 8) -+ -+/* The info necessary to connect to mldonkey. login and password can be NULL. */ -+typedef struct mldonkey_config { -+ char *mldonkey_hostname; -+ int mldonkey_port; -+ char *mldonkey_login; -+ char *mldonkey_password; -+} mldonkey_config; -+ -+/* The MLDonkey status returned */ -+typedef struct mldonkey_info { -+ int64 upload_counter; -+ int64 download_counter; -+ int nshared_files; -+ int64 shared_counter; -+ int tcp_upload_rate; -+ int tcp_download_rate; -+ int udp_upload_rate; -+ int udp_download_rate; -+ int ndownloaded_files; -+ int ndownloading_files; -+ int nconnected_networks; -+ int connected_networks[1]; -+} mldonkey_info; -+ -+mldonkey_info mlinfo; -+mldonkey_config mlconfig; -+ -+/* Call this function to update the information about mldonkey. -+ * Note that the function will not reconnect to mldonkey if the -+ * pointer to the mldonkey_config has not changed. As it uses static -+ * data, it cannot be used in a multithreaded env. -+ * Returns 1 if connected and info filled, 0 if connected but not filled, -+ * -1 otherwise. */ -+ -+enum to_gui { -+ CoreProtocol, /* 0 */ -+ Options_info, -+ RESERVED2, -+ DefineSearches, -+ Result_info, -+ Search_result, -+ Search_waiting, -+ File_info, -+ File_downloaded, -+ File_availability, -+ File_source, /* 10 */ -+ Server_busy, -+ Server_user, -+ Server_state, -+ Server_info, -+ Client_info, -+ Client_state, -+ Client_friend, -+ Client_file, -+ Console, -+ Network_info, /* 20 */ -+ User_info, -+ Room_info, -+ Room_message, -+ Room_add_user, -+ Client_stats, -+ Server_info_v2, -+ MessageFromClient, -+ ConnectedServers, -+ DownloadFiles, -+ DownloadedFiles, /* 30 */ -+ Room_info_v2, -+ Room_remove_user, -+ Shared_file_info, -+ Shared_file_upload, -+ Shared_file_unshared, -+ Add_section_option, -+ Client_stats_v2, -+ Add_plugin_option, -+ Client_stats_v3, -+ File_info_v2, /* 40 */ -+ DownloadFiles_v2, -+ DownloadedFiles_v2, -+ File_info_v3, -+ DownloadFiles_v3, -+ DownloadedFiles_v3, -+ File_downloaded_v2, -+ BadPassword, -+ Shared_file_info_v2, -+ Client_stats_v4, /* 49 */ -+}; -+ -+int get_mldonkey_status(mldonkey_config *, mldonkey_info *); -+int mldonkey_info_message(mldonkey_info *info); -+ -+#define MLDONKEY_DISCONNECTED 0 -+#define MLDONKEY_CONNECTING 1 -+#define MLDONKEY_AUTHENTICATING 2 -+#define MLDONKEY_CONNECTED 3 -+ -+/* end mldonkey ------------------------------------------------------------- */ -+ - /* default config file, undef if you don't want to use this at all */ - #define CONFIG_FILE "$HOME/.torsmorc" - static char *current_config; -@@ -415,7 +537,7 @@ - - /* text handling */ - --static int need_cpu_usage, need_net_stats, need_mails, need_meminfo; -+static int need_cpu_usage, need_net_stats, need_mails, need_meminfo, need_mldonkey; - - enum text_object_type { - OBJ_acpiacadapter, -@@ -448,6 +570,16 @@ - OBJ_memperc, - OBJ_mixer, - OBJ_mixerbar, -+ OBJ_ml_upload_counter, -+ OBJ_ml_download_counter, -+ OBJ_ml_nshared_files, -+ OBJ_ml_shared_counter, -+ OBJ_ml_tcp_upload_rate, -+ OBJ_ml_tcp_download_rate, -+ OBJ_ml_udp_upload_rate, -+ OBJ_ml_udp_download_rate, -+ OBJ_ml_ndownloaded_files, -+ OBJ_ml_ndownloading_files, - OBJ_new_mails, - OBJ_nodename, - OBJ_pre_exec, -@@ -479,7 +611,7 @@ - union { - char *s; - int i; -- int b; // battery number -+ int b; /* battery number */ - long l; - struct net_stat *net; - struct fs_stat *fs; -@@ -727,6 +859,36 @@ - OBJ(mixerbar) - /* TODO */ - END -+ OBJ(ml_upload_counter) -+ need_mldonkey = 1; -+ END -+ OBJ(ml_download_counter) -+ need_mldonkey = 1; -+ END -+ OBJ(ml_nshared_files) -+ need_mldonkey = 1; -+ END -+ OBJ(ml_shared_counter) -+ need_mldonkey = 1; -+ END -+ OBJ(ml_tcp_upload_rate) -+ need_mldonkey = 1; -+ END -+ OBJ(ml_tcp_download_rate) -+ need_mldonkey = 1; -+ END -+ OBJ(ml_udp_upload_rate) -+ need_mldonkey = 1; -+ END -+ OBJ(ml_udp_download_rate) -+ need_mldonkey = 1; -+ END -+ OBJ(ml_ndownloaded_files) -+ need_mldonkey = 1; -+ END -+ OBJ(ml_ndownloading_files) -+ need_mldonkey = 1; -+ END - OBJ(new_mails) END - OBJ(nodename) END - OBJ(processes) END -@@ -976,6 +1138,11 @@ - last_meminfo_update = current_update_time; - } - -+ if (need_mldonkey) { -+ get_mldonkey_status(&mlconfig, &mlinfo); -+ mldonkey_info_message(&mlinfo); -+ } -+ - /* update_fs_stat() won't do anything if there aren't fs -things */ - if (current_update_time - last_fs_update > 12.9) { - update_fs_stats(); -@@ -1144,6 +1311,36 @@ - OBJ(membar) { - new_bar(p, obj->data.i, memmax ? (mem*255) / (memmax) : 0); - } -+ OBJ(ml_upload_counter) { -+ snprintf(p, n, "%lld", mlinfo.upload_counter/1048576); -+ } -+ OBJ(ml_download_counter) { -+ snprintf(p, n, "%lld", mlinfo.download_counter/1048576); -+ } -+ OBJ(ml_nshared_files) { -+ snprintf(p, n, "%i", mlinfo.nshared_files); -+ } -+ OBJ(ml_shared_counter) { -+ snprintf(p, n, "%lld", mlinfo.shared_counter/1048576); -+ } -+ OBJ(ml_tcp_upload_rate) { -+ snprintf(p, n, "%.2f", (float)mlinfo.tcp_upload_rate/1024); -+ } -+ OBJ(ml_tcp_download_rate) { -+ snprintf(p, n, "%.2f",(float)mlinfo.tcp_download_rate/1024); -+ } -+ OBJ(ml_udp_upload_rate) { -+ snprintf(p, n, "%.2f",(float)mlinfo.udp_upload_rate/1024); -+ } -+ OBJ(ml_udp_download_rate) { -+ snprintf(p, n, "%.2f",(float)mlinfo.udp_download_rate/1024); -+ } -+ OBJ(ml_ndownloaded_files) { -+ snprintf(p, n, "%i", mlinfo.ndownloaded_files); -+ } -+ OBJ(ml_ndownloading_files) { -+ snprintf(p, n, "%i", mlinfo.ndownloading_files); -+ } - OBJ(new_mails) { - snprintf(p, n, "%d", new_mail_count); - } -@@ -2104,6 +2301,30 @@ - else - WTF - } -+ else if (strcasecmp(name, "mldonkey_hostname") == 0) { -+ if (value) -+ mlconfig.mldonkey_hostname = strdup(value); -+ else -+ WTF -+ } -+ else if (strcasecmp(name, "mldonkey_port") == 0) { -+ if (value) -+ mlconfig.mldonkey_port = atoi(value); -+ else -+ WTF -+ } -+ else if (strcasecmp(name, "mldonkey_login") == 0) { -+ if (value) -+ mlconfig.mldonkey_login = strdup(value); -+ else -+ WTF -+ } -+ else if (strcasecmp(name, "mldonkey_password") == 0) { -+ if (value) -+ mlconfig.mldonkey_password = strdup(value); -+ else -+ WTF -+ } - else if (strcasecmp(name, "no_buffers") == 0) { - no_buffers = string_to_bool(value); - } -@@ -2165,6 +2386,12 @@ - ; - - int main(int argc, char **argv) { -+ -+ mlconfig.mldonkey_hostname="127.0.0.1"; -+ mlconfig.mldonkey_port=4001; -+ mlconfig.mldonkey_login=NULL; -+ mlconfig.mldonkey_password=NULL; -+ - /* handle command line parameters that don't change configs */ - while (1) { - int c = getopt(argc, argv, getopt_string); -@@ -2387,3 +2614,355 @@ - - return 0; - } -+ -+/* mldonkey ----------------------------------------------------------------- */ -+ -+#define MAX_MESSAGE_LEN 65000 -+static int write_pos = 0; -+static char write_buf[MAX_MESSAGE_LEN]; -+static char read_buf[MAX_MESSAGE_LEN]; -+static int read_pos; -+static int mldonkey_sock = -1; -+static int mldonkey_state = MLDONKEY_DISCONNECTED; -+static mldonkey_config *old_config = NULL; -+ -+/* int64 ------------------------------ */ -+ -+int64 buf_to_int(char *buf, int pos, int size) -+{ -+ int i; -+ int64 res = 0; -+ -+ for(i = 0; i < size; i++){ -+ res += (buf[pos + i] & 0xFF) << (8 * i); -+ } -+ return res; -+} -+ -+void int_to_buf(int64 i, char *buf, int pos, int size) -+{ -+ int j; -+ -+ for(j = 0; j < size; j++){ -+ buf[pos + j] = (i & (-1)) >> (8 * j); -+ } -+} -+ -+/* Write operations --------------------- */ -+ -+void init_message() -+{ write_pos = 0; } -+ -+void write_int8(int code) -+{ -+ write_buf[write_pos++] = code; -+} -+ -+void write_opcode(int code) -+{ -+ write_buf[write_pos++] = code; -+} -+ -+void write_int16(int code) -+{ -+ INT_TO_BUF16(code, write_buf, write_pos); -+ write_pos += 2; -+} -+ -+void write_int32(int code) -+{ -+ INT_TO_BUF32(code, write_buf, write_pos); -+ write_pos += 4; -+} -+ -+void write_int64(int64 code) -+{ -+ INT_TO_BUF64(code, write_buf, write_pos); -+ write_pos += 8; -+} -+ -+void write_string(char *str) -+{ -+ if(str == NULL){ -+ write_int16(0); -+ } else { -+ int len = strlen(str); -+ write_int16(len); -+ memcpy((void *) (write_buf + write_pos), (void *) str, (size_t) len); -+ write_pos += len; -+ } -+} -+ -+ -+int write_message(char *mtype) -+{ -+ char header[4]; -+ -+ INT_TO_BUF32(write_pos, header, 0); -+ if(4 != write(mldonkey_sock, header, 4) || -+ write_pos != write(mldonkey_sock,(void *)write_buf,(size_t)write_pos)){ -+ ERR("Error in transmitting %s\n",mtype); -+ write_pos = 0; -+ -+ /* Immediatly close the connection */ -+ close(mldonkey_sock); -+ mldonkey_state = MLDONKEY_DISCONNECTED; -+ mldonkey_sock = -1; -+ return -1; -+ } else { -+ write_pos = 0; -+ return 0; -+ } -+} -+ -+ -+/* Read operations ----------------------------*/ -+ -+int read_int8() -+{ -+ return read_buf[read_pos++]; -+} -+ -+int read_int16() -+{ -+ int i = BUF16_TO_INT(read_buf, read_pos); -+ read_pos += 2; -+ return i; -+} -+ -+int read_int32() -+{ -+ int i = BUF32_TO_INT(read_buf, read_pos); -+ read_pos += 4; -+ return i; -+} -+ -+int64 read_int64() -+{ -+ int64 i = BUF64_TO_INT(read_buf, read_pos); -+ read_pos += 8; -+ return i; -+} -+ -+char* read_string() -+{ -+ char *buf; -+ int len; -+ -+ len = BUF16_TO_INT(read_buf, read_pos); -+ read_pos += 2; -+ -+ buf = (char *) malloc((size_t) len+1); -+ memmove(read_buf + read_pos, buf, len); -+ buf[len] = 0; -+ read_pos += len; -+ -+ return buf; -+} -+ -+/* protocol impl. ----------------------------- */ -+ -+void close_sock(); -+ -+/* This function returns the number of messages read, 0 if it blocks, -+-1 on error. */ -+int cut_messages(int reinit) -+{ -+ int nread; -+ static int toread = 0; -+ static int pos = 0; -+ -+ if(reinit){ -+ toread = 0; -+ pos = 0; -+ read_pos = 0; -+ return 0; -+ } -+ -+ while(1){ -+ if(toread == 0){ -+ nread = read(mldonkey_sock, read_buf+pos,4-pos); -+ if(nread <= 0){ -+ if(errno == EAGAIN) { -+ return 0; -+ } else { -+ close_sock(); -+ pos = 0; toread = 0; return -1; } -+ } -+ pos += nread; -+ if(pos == 4){ -+ toread = BUF32_TO_INT(read_buf,0); -+ pos = 0; -+ } -+ } else { -+ nread = read(mldonkey_sock, read_buf+pos, toread - pos); -+ if(nread <= 0){ -+ if(errno == EAGAIN) return 0; else { -+ pos = 0; toread = 0; -+ close_sock(); -+ return -1; } -+ } -+ pos += nread; -+ if(pos == toread){ -+ /* We have one message !!! */ -+ int old_pos = pos; -+ read_pos = 0; -+ pos = 0; -+ toread = 0; -+ -+ return old_pos; -+ } -+ } -+ } -+} -+ -+ -+void close_sock() -+{ -+ old_config = NULL; -+ if(mldonkey_sock >= 0) close(mldonkey_sock); -+ mldonkey_sock = -1; -+ mldonkey_state = MLDONKEY_DISCONNECTED; -+ cut_messages(1); -+} -+ -+int mldonkey_connect(mldonkey_config *config) -+{ -+ -+ if(config != old_config){ -+ struct sockaddr_in sa; -+ int retcode; -+ close_sock(); -+ -+ -+ old_config=config; -+ /* resolve hostname */ -+ memset(&sa, 0, sizeof(sa)); -+ -+ if(config->mldonkey_hostname == NULL) -+ config->mldonkey_hostname = "127.0.0.1"; -+ if(config->mldonkey_hostname[0] >= '0' && -+ config->mldonkey_hostname[0] <= '9'){ -+ #ifdef HAS_INET_ATON -+ if (inet_aton(config->mldonkey_hostname, &sa.sin_addr) == 0) return -1; -+ #else -+ -+ sa.sin_addr.s_addr = inet_addr(config->mldonkey_hostname); -+ if (sa.sin_addr.s_addr == (unsigned int) -1) return -1; -+ #endif -+ -+ } else { -+ struct hostent * hp; -+ hp = gethostbyname(config->mldonkey_hostname); -+ if (hp == (struct hostent *) NULL) return -1; -+ sa.sin_addr.s_addr = (unsigned int)hp->h_addr_list[0]; -+ } -+ -+ sa.sin_port = htons(config->mldonkey_port); -+ sa.sin_family = AF_INET; -+ -+ if ((mldonkey_sock = socket(PF_INET, SOCK_STREAM, 0)) < 0) { -+ ERR("Opening socket"); -+ close_sock(); -+ return -1; -+ } -+ -+ if( connect(mldonkey_sock, (struct sockaddr *) &sa, sizeof(sa)) < 0) { -+ if (errno != EAGAIN && -+ errno != EINTR && -+ errno != EINPROGRESS && -+ errno != EWOULDBLOCK) { -+ ERR("Connection"); -+ close_sock(); -+ return -1; -+ } -+ } -+ -+ retcode = fcntl(mldonkey_sock, F_GETFL, 0); -+ if (retcode == -1 || -+ fcntl(mldonkey_sock, F_SETFL, retcode | O_NONBLOCK) == -1){ -+ return -1; -+ } -+ -+ -+ mldonkey_state = MLDONKEY_CONNECTING; -+ return 0; -+ } -+ -+ return 0; -+} -+ -+int mldonkey_can_read() -+{ -+ return cut_messages(0); -+} -+ -+int mldonkey_info_message(mldonkey_info *info) -+{ -+ int opcode = read_int16(); -+ -+ switch(opcode){ -+ -+ case CoreProtocol : -+ init_message(); -+ -+ write_int16(0); /* GUI protocol */ -+ write_int32(10); /* Version 10 ! */ -+ write_message("GuiProtocol"); -+ -+ write_int16(47); /* GUI protocol */ -+ -+ write_int16(1); -+ write_int32(1); -+ write_int8(1); -+ write_message("GuiExtensions"); -+ -+ init_message(); -+ write_int16(5); /* Password */ -+ write_string(old_config->mldonkey_password); -+ write_message("Password"); -+ -+ break; -+ -+ case BadPassword : -+ ERR("Bad Password\n"); -+ close_sock(); -+ break; -+ -+ case Client_stats: -+ case Client_stats_v2: -+ case Client_stats_v3: -+ ERR("Client stats format too old...\n"); -+ break; -+ -+ case Client_stats_v4: -+ mldonkey_state = MLDONKEY_CONNECTED; -+ -+ info->upload_counter = read_int64(); -+ info->download_counter = read_int64(); -+ info->shared_counter = read_int64(); -+ info->nshared_files = read_int32(); -+ info->tcp_upload_rate = read_int32(); -+ info->tcp_download_rate = read_int32(); -+ info->udp_upload_rate = read_int32(); -+ info->udp_download_rate = read_int32(); -+ info->ndownloading_files = read_int32(); -+ info->ndownloaded_files = read_int32(); -+ -+ break; -+ } -+ -+ return 0; -+} -+ -+int get_mldonkey_status(mldonkey_config *config, mldonkey_info *info) -+{ -+ if( mldonkey_connect(config) >= 0){ -+ while(mldonkey_can_read() > 0){ -+ mldonkey_info_message(info); -+ } -+ } -+ return mldonkey_state; -+} -+ -+// end mldonkey ---------------------------------------------------------------- diff --git a/app-admin/torsmo/files/torsmo-0.17-mozilla.patch b/app-admin/torsmo/files/torsmo-0.17-mozilla.patch deleted file mode 100644 index 4a348a589005..000000000000 --- a/app-admin/torsmo/files/torsmo-0.17-mozilla.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- torsmo-orig/torsmo.c 2004-05-25 13:58:51.000000000 +0300 -+++ torsmo-0.17/torsmo.c 2004-08-16 08:24:36.080635032 +0300 -@@ -342,6 +342,14 @@ - } - } - else { -+ if (reading_status && strncmp(buf, "X-Mozilla-Status:", 17) == 0) { -+ /* check that mail isn't already read */ -+ if (strchr(buf+21, '0')) -+ new_mail_count++; -+ -+ reading_status = 0; -+ continue; -+ } - if (reading_status && strncmp(buf, "Status:", 7) == 0) { - /* check that mail isn't already read */ - if (strchr(buf+7, 'R') == NULL) diff --git a/app-admin/torsmo/torsmo-0.17-r1.ebuild b/app-admin/torsmo/torsmo-0.17-r1.ebuild deleted file mode 100644 index a6ed5fba7671..000000000000 --- a/app-admin/torsmo/torsmo-0.17-r1.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/torsmo/torsmo-0.17-r1.ebuild,v 1.5 2004/12/31 22:38:46 dragonheart Exp $ - -inherit eutils linux-info - -DESCRIPTION="system monitor that sits in the corner of your desktop" -HOMEPAGE="http://torsmo.sourceforge.net/" -SRC_URI="mirror://sourceforge/torsmo/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~x86 ~ppc ~amd64 ~sparc" -IUSE="mozilla" - -RDEPEND="virtual/libc - virtual/x11" -DEPEND="${RDEPEND} - >=sys-devel/automake-1.4 - sys-devel/autoconf - sys-apps/grep - sys-apps/sed - sys-devel/gcc" - -src_unpack() { - unpack ${A} - cd ${S} - use mozilla && epatch ${FILESDIR}/${P}-mozilla.patch - if kernel_is 2 4 - then - epatch ${FILESDIR}/${P}-kernel2.4.patch || die - fi - epatch ${FILESDIR}/${P}-mldonkey.patch || die -} - -src_install() { - emake DESTDIR=${D} install || die "make install failed" - dodoc ChangeLog AUTHORS README NEWS torsmorc.sample -} - -pkg_postinst() { - einfo 'default configuration file is "~/.torsmorc"' - einfo "you can find a sample configuration file in" - einfo "/usr/share/doc/${PF}/torsmorc.sample.gz" - einfo - einfo "Comment out temperature info lines if you have no kernel" - einfo "support for it." - einfo - ewarn "Torsmo doesn't work with window managers that" - ewarn "take control over root window such as Gnome's nautilus." - ewarn "May not work on KDE until you exit (and then only breifly)" - ewarn "for the above reason." -} diff --git a/app-admin/torsmo/torsmo-0.17.ebuild b/app-admin/torsmo/torsmo-0.17.ebuild deleted file mode 100644 index a04e5bd66387..000000000000 --- a/app-admin/torsmo/torsmo-0.17.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/torsmo/torsmo-0.17.ebuild,v 1.11 2004/12/31 22:38:46 dragonheart Exp $ - -inherit eutils - -DESCRIPTION="system monitor that sits in the corner of your desktop" -HOMEPAGE="http://torsmo.sourceforge.net/" -SRC_URI="mirror://sourceforge/torsmo/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="x86 ppc amd64 sparc" -IUSE="mozilla" - -RDEPEND="virtual/libc - virtual/x11" -DEPEND="${RDEPEND} - >=sys-devel/automake-1.4 - sys-devel/autoconf - sys-apps/grep - sys-apps/sed - sys-devel/gcc" - -src_unpack() { - unpack ${A} - cd ${S} - use mozilla && epatch ${FILESDIR}/${P}-mozilla.patch -} - -src_install() { - emake DESTDIR=${D} install || die "make install failed" - dodoc ChangeLog AUTHORS README NEWS torsmorc.sample -} - -pkg_postinst() { - einfo 'default configuration file is "~/.torsmorc"' - einfo "you can find a sample configuration file in" - einfo "/usr/share/doc/${PF}/torsmorc.sample.gz" - einfo - einfo "Comment out temperature info lines if you have no kernel" - einfo "support for it." - einfo - ewarn "Torsmo doesn't work with window managers that" - ewarn "take control over root window such as Gnome's nautilus." - ewarn "May not work on KDE until you exit (and then only breifly)" - ewarn "for the above reason." -} diff --git a/app-admin/torsmo/torsmo-0.18-r2.ebuild b/app-admin/torsmo/torsmo-0.18-r2.ebuild deleted file mode 100644 index 67cd982f788c..000000000000 --- a/app-admin/torsmo/torsmo-0.18-r2.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/torsmo/torsmo-0.18-r2.ebuild,v 1.2 2005/05/05 22:36:05 swegener Exp $ - -inherit eutils - -DESCRIPTION="minimalist system monitor for X" -HOMEPAGE="http://torsmo.sourceforge.net/" -SRC_URI="mirror://sourceforge/torsmo/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~x86 ~ppc ~amd64 ~sparc" -IUSE="truetype" - -RDEPEND="virtual/libc - virtual/x11 - truetype? ( >=media-libs/freetype-2 )" -DEPEND="${RDEPEND} - >=sys-devel/automake-1.4 - sys-devel/autoconf - sys-apps/grep - sys-apps/sed - sys-devel/gcc" - -src_unpack() { - unpack ${A} - cd ${S} - epatch ${FILESDIR}/${P}.xwin.patch || die "patch failed" -} - -src_compile() { - econf \ - `use_enable truetype xft` \ - --x-libraries=/usr/X11R6/lib/ || die "econf failed" - emake || die "compile failed" -} - -src_install() { - emake DESTDIR=${D} install || die "make install failed" - dodoc ChangeLog AUTHORS README torsmorc.sample -} - -pkg_postinst() { - einfo 'default configuration file is "~/.torsmorc"' - einfo "you can find a sample configuration file in" - einfo "/usr/share/doc/${PF}/torsmorc.sample.gz" - einfo - einfo "Comment out temperature info lines if you have no kernel" - einfo "support for it." - einfo - ewarn "Torsmo doesn't work with window managers that" - ewarn "take control over root window such as Gnome's nautilus." - einfo - ewarn "Please note that >=0.18 contains mozilla support without" - ewarn "patching, thus the mozilla USE flag has been dropped" -} diff --git a/app-admin/torsmo/torsmo-0.18-r3.ebuild b/app-admin/torsmo/torsmo-0.18-r3.ebuild index fd22a2653f70..5cf82b028b92 100644 --- a/app-admin/torsmo/torsmo-0.18-r3.ebuild +++ b/app-admin/torsmo/torsmo-0.18-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/torsmo/torsmo-0.18-r3.ebuild,v 1.3 2005/05/05 22:36:05 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/torsmo/torsmo-0.18-r3.ebuild,v 1.4 2005/05/20 23:56:21 dragonheart Exp $ inherit eutils @@ -10,7 +10,7 @@ SRC_URI="mirror://sourceforge/torsmo/${P}.tar.gz" LICENSE="BSD" SLOT="0" -KEYWORDS="~x86 ~ppc ~amd64 ~sparc" +KEYWORDS="x86 ~ppc ~amd64 ~sparc" IUSE="truetype seti" RDEPEND="virtual/libc |