diff options
author | Ben Lutgens <blutgens@gentoo.org> | 2001-04-27 16:24:54 +0000 |
---|---|---|
committer | Ben Lutgens <blutgens@gentoo.org> | 2001-04-27 16:24:54 +0000 |
commit | 1b0e99e10fa14322cb16f43c2f0572e34357684e (patch) | |
tree | 85be02c049bf5c118da725d84e5c1f63a05dfc60 /net-im | |
parent | Added gnomeicu-0.96.1, a gnome ICQ client and update some of my packages to (diff) | |
download | gentoo-2-1b0e99e10fa14322cb16f43c2f0572e34357684e.tar.gz gentoo-2-1b0e99e10fa14322cb16f43c2f0572e34357684e.tar.bz2 gentoo-2-1b0e99e10fa14322cb16f43c2f0572e34357684e.zip |
trying to clean up my mistakes from last night.
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/gnomeicu/files/digest-gnomeicu-0.96.1-r1 | 1 | ||||
-rw-r--r-- | net-im/gnomeicu/files/userserver.patch | 416 | ||||
-rw-r--r-- | net-im/gnomeicu/gnomeicu-0.96.1-r1.ebuild | 51 | ||||
-rw-r--r-- | net-im/gnomeicu/gnomeicu-0.96.1.ebuild | 5 |
4 files changed, 472 insertions, 1 deletions
diff --git a/net-im/gnomeicu/files/digest-gnomeicu-0.96.1-r1 b/net-im/gnomeicu/files/digest-gnomeicu-0.96.1-r1 new file mode 100644 index 000000000000..0a0eb44cbaba --- /dev/null +++ b/net-im/gnomeicu/files/digest-gnomeicu-0.96.1-r1 @@ -0,0 +1 @@ +MD5 1286c2d250562fc416836882b89bcdf1 gnomeicu-0.96.1.tar.bz2 diff --git a/net-im/gnomeicu/files/userserver.patch b/net-im/gnomeicu/files/userserver.patch new file mode 100644 index 000000000000..304f4b8cf9e0 --- /dev/null +++ b/net-im/gnomeicu/files/userserver.patch @@ -0,0 +1,416 @@ +*** userserver.c.orig Sun Jan 21 23:55:45 2001 +--- userserver.c Fri Apr 13 00:09:55 2001 +*************** +*** 1,4 **** +! /* $Id: userserver.patch,v 1.1 2001/04/27 16:24:54 blutgens Exp $ */ + + #include "common.h" + +--- 1,8 ---- +! /* +! $Id: userserver.patch,v 1.1 2001/04/27 16:24:54 blutgens Exp $ +! patched by drJeckyll <drJeckyll@hotmail.com> for IcuKrell 0.0.1a,b-0.1.2 12/04/2001 +! */ +! + + #include "common.h" + +*************** +*** 28,33 **** +--- 32,40 ---- + USERSERVER_CMD_NOOP = 0, + USERSERVER_CMD_DO = 1, + USERSERVER_CMD_READMSG = 2, ++ USERSERVER_CMD_MSGCOUNT = 3, ++ USERSERVER_CMD_GETSTATUS = 4, ++ USERSERVER_ICUKRELL_ASK = 9, + } UserServerCmd; + + void userserver_handler(gint sock) +*************** +*** 38,43 **** +--- 45,56 ---- + gchar c; + gchar *cmd, *args; + GSList *contact; ++ gchar msg_count = 0; ++ gchar online_users = 0; ++ gchar msg_count_buf[100]; ++ gchar icu_status[100]; ++ gchar online_list_[100]; ++ gchar online_list[65000]; + + /* Read in the packet */ + +*************** +*** 83,90 **** + + switch (cmdtype) + { +! case USERSERVER_CMD_NOOP: +! break; + case USERSERVER_CMD_READMSG: + contact = Contacts; + while( contact != NULL && g_slist_length( kontakt->stored_messages ) == 0 ) +--- 96,167 ---- + + switch (cmdtype) + { +! case USERSERVER_CMD_NOOP: +! break; +! +! case USERSERVER_CMD_MSGCOUNT: +! contact = Contacts; +! +! while (contact != NULL) +! { +! msg_count += g_slist_length(((CONTACT_PTR)contact->data)->stored_messages); +! contact = contact->next; +! } +! +! g_free( cmdbuf ); +! sprintf(msg_count_buf, "%d\n", msg_count); +! cmdbuf = g_strdup( msg_count_buf ); +! cmdlen = g_htonl( strlen(cmdbuf ) + 1 ); +! write( sock, &cmdlen, sizeof( unsigned long ) ); +! write( sock, cmdbuf, strlen( cmdbuf ) + 1 ); +! break; +! +! case USERSERVER_ICUKRELL_ASK: +! contact = Contacts; +! +! while (contact != NULL) +! { +! msg_count += g_slist_length(((CONTACT_PTR)contact->data)->stored_messages); +! if (kontakt->status != STATUS_OFFLINE) online_users++; +! contact = contact->next; +! } +! +! sprintf(icu_status, "Unknown"); +! if (Current_Status == STATUS_OFFLINE) sprintf(icu_status, "Offline"); +! else +! switch( Current_Status & 0xffff ) +! { +! case STATUS_ONLINE: +! sprintf(icu_status, "Online"); +! break; +! case STATUS_INVISIBLE: +! sprintf(icu_status, "Invisible"); +! break; +! case STATUS_NA: +! sprintf(icu_status, "N/A"); +! break; +! case STATUS_FREE_CHAT: +! sprintf(icu_status, "Free4Chat"); +! break; +! case STATUS_OCCUPIED: +! sprintf(icu_status, "Occupied"); +! break; +! case STATUS_AWAY: +! sprintf(icu_status, "Away"); +! break; +! case STATUS_DND: +! sprintf(icu_status, "DND"); +! break; +! } +! +! g_free( cmdbuf ); +! sprintf(msg_count_buf, "%s %d %d %s\n", icu_status, msg_count, online_users, toggles->theme_name); +! cmdbuf = g_strdup( msg_count_buf ); +! cmdlen = g_htonl( strlen(cmdbuf ) + 1 ); +! write( sock, &cmdlen, sizeof( unsigned long ) ); +! write( sock, cmdbuf, strlen( cmdbuf ) + 1 ); +! break; +! + case USERSERVER_CMD_READMSG: + contact = Contacts; + while( contact != NULL && g_slist_length( kontakt->stored_messages ) == 0 ) +*************** +*** 94,100 **** + { + g_free( cmdbuf ); + cmdbuf = g_strdup( _("No messages available.\n\n") ); +! cmdlen = g_htonl( strlen( cmdbuf + 1 ) ); + write( sock, &cmdlen, sizeof( unsigned long ) ); + write( sock, cmdbuf, strlen( cmdbuf ) + 1 ); + break; +--- 171,177 ---- + { + g_free( cmdbuf ); + cmdbuf = g_strdup( _("No messages available.\n\n") ); +! cmdlen = g_htonl( strlen( cmdbuf ) + 1 ); + write( sock, &cmdlen, sizeof( unsigned long ) ); + write( sock, cmdbuf, strlen( cmdbuf ) + 1 ); + break; +*************** +*** 103,116 **** + show_contact_message_client( contact, sock ); + break; + + case USERSERVER_CMD_DO: + cmd=strtok(cmdbuf," \t"); + if (!cmd) break; + + /* COMMAND: QUIT */ +! if (!strcasecmp(cmd,"quit")) + icq_quit(NULL,NULL); + + /* COMMAND: AWAY <MESSAGE> */ + else if (!strcasecmp(cmd,"away")) + { +--- 180,300 ---- + show_contact_message_client( contact, sock ); + break; + ++ case USERSERVER_CMD_GETSTATUS: ++ sprintf(icu_status, "Unknown"); ++ if (Current_Status == STATUS_OFFLINE) sprintf(icu_status, "Offline"); ++ else ++ switch( Current_Status & 0xffff ) ++ { ++ case STATUS_ONLINE: ++ sprintf(icu_status, "Online"); ++ break; ++ case STATUS_INVISIBLE: ++ sprintf(icu_status, "Invisible"); ++ break; ++ case STATUS_NA: ++ sprintf(icu_status, "N/A"); ++ break; ++ case STATUS_FREE_CHAT: ++ sprintf(icu_status, "Free4Chat"); ++ break; ++ case STATUS_OCCUPIED: ++ sprintf(icu_status, "Occupied"); ++ break; ++ case STATUS_AWAY: ++ sprintf(icu_status, "Away"); ++ break; ++ case STATUS_DND: ++ sprintf(icu_status, "DND"); ++ break; ++ } ++ ++ g_free( cmdbuf ); ++ sprintf(msg_count_buf, "%s\n", icu_status); ++ cmdbuf = g_strdup(msg_count_buf); ++ cmdlen = g_htonl(strlen(cmdbuf) + 1); ++ write( sock, &cmdlen, sizeof( unsigned long ) ); ++ write( sock, cmdbuf, strlen( cmdbuf ) + 1 ); ++ break; ++ + case USERSERVER_CMD_DO: + cmd=strtok(cmdbuf," \t"); + if (!cmd) break; + + /* COMMAND: QUIT */ +! else if (!strcasecmp(cmd,"quit")) + icq_quit(NULL,NULL); + ++ /* COMMAND: HIDE */ ++ else if (!strcasecmp(cmd,"hide")) ++ { ++ if (GTK_WIDGET_VISIBLE(app)) ++ { ++ gtk_widget_hide(app); ++ if (gnome_win_hints_get_workspace(app) != gnome_win_hints_get_current_workspace()) ++ gdk_window_withdraw( GTK_WIDGET(app)->window ); ++ } ++ } ++ ++ /* COMMAND: SHOW */ ++ else if (!strcasecmp(cmd,"show")) ++ { ++ if (!GTK_WIDGET_VISIBLE(app)) ++ { ++ if (gnome_win_hints_get_workspace(app) != gnome_win_hints_get_current_workspace()) ++ gnome_win_hints_set_workspace(app, gnome_win_hints_get_current_workspace()); ++ gtk_widget_show(app); ++ } ++ } ++ ++ /* COMMAND: SHOWHIDE */ ++ else if (!strcasecmp(cmd,"showhide")) ++ { ++ if (GTK_WIDGET_VISIBLE(app)) ++ { ++ gtk_widget_hide(app); ++ if (gnome_win_hints_get_workspace(app) != gnome_win_hints_get_current_workspace()) ++ gdk_window_withdraw( GTK_WIDGET(app)->window ); ++ } else ++ { ++ if (gnome_win_hints_get_workspace(app) != gnome_win_hints_get_current_workspace()) ++ gnome_win_hints_set_workspace(app, gnome_win_hints_get_current_workspace()); ++ gtk_widget_show(app); ++ } ++ } ++ ++ /* COMMAND: ADDCONTACT */ ++ else if (!strcasecmp(cmd,"addcontact")) ++ search_window(NULL, 0); ++ ++ /* COMMAND: CONNHISTORY */ ++ else if (!strcasecmp(cmd,"connhistory")) ++ toggle_log_window(NULL, 0); ++ ++ /* COMMAND: SHOWPREFS */ ++ else if (!strcasecmp(cmd,"showprefs")) ++ configure_window(NULL, 0); ++ ++ /* COMMAND: ISERINFO */ ++ else if (!strcasecmp(cmd,"changeinfo")) ++ change_info_window(NULL, 0); ++ ++ /* COMMAND: IGNORELIST */ ++ else if (!strcasecmp(cmd,"ignorelist")) ++ ignore_list_dialog(); ++ ++ /* COMMAND: VISIBLELIST */ ++ else if (!strcasecmp(cmd,"visiblelist")) ++ visible_list_dialog(); ++ ++ /* COMMAND: INVISIBLELIST */ ++ else if (!strcasecmp(cmd,"invisiblelist")) ++ invisible_list_dialog(); ++ ++ /* COMMAND: NOTIFYLIST */ ++ else if (!strcasecmp(cmd,"notifylist")) ++ notify_list_dialog(); ++ + /* COMMAND: AWAY <MESSAGE> */ + else if (!strcasecmp(cmd,"away")) + { +*************** +*** 123,129 **** + g_free( Away_Message ); + Away_Message = g_strdup( msg ); + } +! + /* COMMAND: USERADD <UIN> */ + else if (!strcasecmp(cmd,"adduser") || !strcasecmp(cmd,"useradd")) + { +--- 307,313 ---- + g_free( Away_Message ); + Away_Message = g_strdup( msg ); + } +! + /* COMMAND: USERADD <UIN> */ + else if (!strcasecmp(cmd,"adduser") || !strcasecmp(cmd,"useradd")) + { +*************** +*** 134,139 **** +--- 318,420 ---- + + Add_User(atol(uin), uin, TRUE); + } ++ ++ /* COMMAND: ONLINELIST */ ++ else if (!strcasecmp(cmd, "onlinelist")) ++ { ++ contact = Contacts; ++ ++ online_list[0] = 0; ++ while (contact != NULL) ++ { ++ if (kontakt->status != STATUS_OFFLINE) ++ { ++ sprintf(online_list_, "%s\t%d\t", kontakt->nick, kontakt->uin); ++ strcat(online_list, online_list_); ++ switch (kontakt->status & 0xffff) ++ { ++ case STATUS_ONLINE: ++ strcat(online_list, "Online"); ++ break; ++ case STATUS_INVISIBLE: ++ strcat(online_list, "Invisible"); ++ break; ++ case STATUS_NA: ++ strcat(online_list, "N/A"); ++ break; ++ case STATUS_NA_99A: ++ strcat(online_list, "N/A"); ++ break; ++ case STATUS_FREE_CHAT: ++ strcat(online_list, "Free4Chat"); ++ break; ++ case STATUS_OCCUPIED: ++ strcat(online_list, "Occupied"); ++ break; ++ case STATUS_OCCUPIED_MAC: ++ strcat(online_list, "Occupied"); ++ break; ++ case STATUS_AWAY: ++ strcat(online_list, "Away"); ++ break; ++ case STATUS_DND: ++ strcat(online_list, "DND"); ++ break; ++ } ++ strcat(online_list, "\t"); ++ } ++ contact = contact->next; ++ } ++ online_list[strlen(online_list) - 1] = 0; ++ ++ g_free(cmdbuf); ++ cmdbuf = g_strdup(online_list); ++ cmdlen = g_htonl(strlen(cmdbuf) + 1); ++ write(sock, &cmdlen, sizeof(unsigned long)); ++ write(sock, cmdbuf, strlen(cmdbuf) + 1); ++ } ++ ++ /* COMMAND: SENDMSGMENU */ ++ else if (strstr(cmd,"sendmsgmenu")) ++ { ++ gchar *mycmd; ++ gchar *newcmd, *newuin; ++ int iuin; ++ ++ mycmd = strdup(cmd); ++ newcmd = strtok(mycmd, "_"); ++ newuin = strtok(NULL, "_"); ++ iuin = atoi(newuin); ++ ++ contact = Contacts; ++ ++ while( contact != NULL ) ++ { ++ if (kontakt->uin == iuin) ++ { ++ GdkEventButton *event; ++ ++ event = g_new0( GdkEventButton, 1 ); ++ event->type = GDK_KEY_PRESS; ++ ((GdkEventKey*)event)->keyval = GDK_Return; ++ ++ icq_sendmessage_window(MainData->lb_userwin, event, contact); ++ } ++ ++ contact = contact->next; ++ } ++ ++ g_free(mycmd); ++ break; ++ } ++ ++ /* COMMAND: SENDMSG */ ++ else if (!strcasecmp(cmd,"sendmsg")) ++ { ++ icq_sendmessage_window_from_menu(NULL, NULL); ++ ++ break; ++ } + + /* COMMAND: MSG <UIN> <MSG> */ + else if (!strcasecmp(cmd,"msg")) +*************** +*** 172,177 **** +--- 453,460 ---- + if (!strcasecmp(args,"dnd")) + icq_set_status_dnd( NULL, NULL ); + } ++ ++ + + /* COMMAND: READEVENT */ + else if(!strcasecmp(cmd,"readevent")) diff --git a/net-im/gnomeicu/gnomeicu-0.96.1-r1.ebuild b/net-im/gnomeicu/gnomeicu-0.96.1-r1.ebuild new file mode 100644 index 000000000000..90c9e61b514d --- /dev/null +++ b/net-im/gnomeicu/gnomeicu-0.96.1-r1.ebuild @@ -0,0 +1,51 @@ +# Distributed under the terms of the GNU General Public License, v2 or later +# A Gnome ICQ Clone +# Author Ben Lutgens <blutgens@gentoo.org> + +A=${P}.tar.bz2 +S=${WORKDIR}/${P} +DESCRIPTION="Gnome ICQ Client" +SRC_URI="http://download.sourceforge.net/gnomeicu/${A}" +HOMEPAGE="http://gnomeicu.sourceforge.net/" + +DEPEND=">=x11-libs/gtk+-1.2.0 + >=gnome-base/gnome-core-1.2.4" + +src_unpack() { + unpack ${A} + cd ${S}/src + cp ${FILESDIR}/userserver.patch . + patch -p0 < userserver.patch +} + +src_compile() { + + + local myconf + local myprefix + myprefix="/opt/gnome" + if [ -z "`use esd`" ] + then + myconf="--disable-esd-test" + fi + if [ "`use socks5`" ]; + then + myconf="${myconf} --enable-socks5" + fi + +# This is busted, I'm not sure if it's my box or what, I don't have nls in use +# so the disabling should work perfectly. +# +# if [ -z "`use nls`" ] +# then +# myconf="${myconf} --disable-nls" +# fi + try ./configure --host=${CHOST} ${myconf} --prefix=${myprefix} + try make +} + +src_install() { + + try make DESTDIR=${D} install + dodoc AUTHORS COPYING CREDITS ChangeLog INSTALL NEWS README TODO ABOUT-NLS +} diff --git a/net-im/gnomeicu/gnomeicu-0.96.1.ebuild b/net-im/gnomeicu/gnomeicu-0.96.1.ebuild index 9b28a645fe61..ab4a9308b560 100644 --- a/net-im/gnomeicu/gnomeicu-0.96.1.ebuild +++ b/net-im/gnomeicu/gnomeicu-0.96.1.ebuild @@ -8,9 +8,12 @@ DESCRIPTION="Gnome ICQ Client" SRC_URI="http://download.sourceforge.net/gnomeicu/${A}" HOMEPAGE="http://gnomeicu.sourceforge.net/" -DEPEND=">=x11-libs/gtk+-1.2.0" +DEPEND=">=x11-libs/gtk+-1.2.0 + >=gnome-base/gnome-core-1.2.4" src_compile() { + + local myconf local myprefix myprefix="/opt/gnome" |