aboutsummaryrefslogtreecommitdiffstats
path: root/net-im
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2005-08-31 01:09:41 +0800
committergarga <garga@FreeBSD.org>2005-08-31 01:09:41 +0800
commit2e793b7b6eba5f84f1dc8841baff5efd31ce5b39 (patch)
tree3b18e23ee2966834e4cabb23926989bee8778f4c /net-im
parentbcd2652930e56e72f3d668918388b7b536d4dc1b (diff)
downloadfreebsd-ports-gnome-2e793b7b6eba5f84f1dc8841baff5efd31ce5b39.tar.gz
freebsd-ports-gnome-2e793b7b6eba5f84f1dc8841baff5efd31ce5b39.tar.zst
freebsd-ports-gnome-2e793b7b6eba5f84f1dc8841baff5efd31ce5b39.zip
- Unbreak it on 4.x
PR: ports/85075 Submitted by: Matthew Luckie <mjl@luckie.org.nz> Approved by: maintainer
Diffstat (limited to 'net-im')
-rw-r--r--net-im/gaim-openq/Makefile8
-rw-r--r--net-im/gaim-openq/files/patch-src-file_trans.c92
-rw-r--r--net-im/gaim-openq/files/patch-src-send_file.c52
-rw-r--r--net-im/gaim-openq/files/patch-src-send_file.h11
4 files changed, 150 insertions, 13 deletions
diff --git a/net-im/gaim-openq/Makefile b/net-im/gaim-openq/Makefile
index da8a71efe759..52ffbb3101db 100644
--- a/net-im/gaim-openq/Makefile
+++ b/net-im/gaim-openq/Makefile
@@ -27,10 +27,4 @@ CONFIGURE_ARGS= --enable-static=yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 500000
-BROKEN= "does not compile"
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-im/gaim-openq/files/patch-src-file_trans.c b/net-im/gaim-openq/files/patch-src-file_trans.c
index a734bb47b526..01da2c19086d 100644
--- a/net-im/gaim-openq/files/patch-src-file_trans.c
+++ b/net-im/gaim-openq/files/patch-src-file_trans.c
@@ -1,10 +1,96 @@
---- src/file_trans.c.orig Tue Apr 19 03:52:08 2005
-+++ src/file_trans.c Tue Apr 19 03:00:39 2005
-@@ -26,6 +26,7 @@
+--- src/file_trans.c.orig Thu Aug 18 19:21:53 2005
++++ src/file_trans.c Thu Aug 18 19:33:01 2005
+@@ -26,6 +26,9 @@
#define random rand
#endif
++#include <sys/types.h>
+#include <sys/socket.h>
++
#include "debug.h" // gaim_debug
#include "ft.h" // gaim_xfer
#include "md5.h"
+@@ -213,8 +216,8 @@
+ int _qq_xfer_open_file(const gchar *filename, const gchar *method, GaimXfer *xfer)
+ {
+ ft_info *info = xfer->data;
+- info->dest_fp = fopen(gaim_xfer_get_local_filename(xfer), method);
+- if (info->dest_fp == NULL) {
++ info->un.dest_fp = fopen(gaim_xfer_get_local_filename(xfer), method);
++ if (info->un.dest_fp == NULL) {
+ return -1;
+ }
+ return 0;
+@@ -225,26 +228,28 @@
+ {
+ ft_info *info = xfer->data;
+
+- fseek(info->dest_fp, index * len, SEEK_SET);
+- return fread(buffer, 1, len, info->dest_fp);
++ fseek(info->un.dest_fp, index * len, SEEK_SET);
++ return fread(buffer, 1, len, info->un.dest_fp);
+ }
+
+ gint
+ _qq_xfer_write_file(guint8 *buffer, guint index, guint len, GaimXfer *xfer)
+ {
+ ft_info *info = xfer->data;
+- fseek(info->dest_fp, index * len, SEEK_SET);
+- return fwrite(buffer, 1, len, info->dest_fp);
++ fseek(info->un.dest_fp, index * len, SEEK_SET);
++ return fwrite(buffer, 1, len, info->un.dest_fp);
+ }
+
+ void qq_xfer_close_file(GaimXfer *xfer)
+ {
+ ft_info *info = xfer->data;
+
+- if (info->dest_fp) fclose(info->dest_fp);
++ if (info->un.dest_fp) fclose(info->un.dest_fp);
+ }
+ #endif
+
++ssize_t _qq_xfer_write(const char *buf, size_t len, GaimXfer *xfer);
++
+ gint _qq_send_file(GaimConnection *gc, guint8 *data, gint len, guint16 packet_type, guint32 to_uid)
+ {
+ gint bytes;
+@@ -270,7 +275,6 @@
+ bytes += create_packet_dw(buf, &cursor, _encrypt_qq_uid(to_uid, file_key));
+ bytes += create_packet_data(buf, &cursor, data, len);
+
+- ssize_t _qq_xfer_write(const char *buf, size_t len, GaimXfer *xfer);
+ if (bytes == len + 12) {
+ //gaim_xfer_write(qd->xfer, buf, bytes);
+ _qq_xfer_write(buf, bytes, qd->xfer);
+@@ -397,10 +401,11 @@
+ gchar file_md5[16], filename_md5[16], *filename;
+ gint filename_len, filesize;
+ qq_data *qd;
++ ft_info *info;
+
+ g_return_if_fail(gc != NULL && gc->proto_data != NULL);
+ qd = (qq_data *) gc->proto_data;
+- ft_info *info = (ft_info *) qd->xfer->data;
++ info = (ft_info *) qd->xfer->data;
+
+ filename = (gchar *) gaim_xfer_get_filename(qd->xfer);
+ filesize = gaim_xfer_get_size(qd->xfer);
+@@ -669,6 +674,8 @@
+ GaimXfer *xfer = qd->xfer;
+ ft_info *info = (ft_info *) xfer->data;
+ guint32 mask;
++ guint8 *buffer;
++ gint readbytes;
+
+ gaim_debug(GAIM_DEBUG_INFO, "QQ", "receiving %dth fragment ack, slide window status %o, max_fragment_index %d\n",
+ fragment_index, info->window, info->max_fragment_index);
+@@ -698,8 +705,6 @@
+ {
+ //move the slide window
+ info->window &= ~mask;
+- guint8 *buffer;
+- gint readbytes;
+
+ buffer = g_newa(guint8, info->fragment_len);
+ readbytes = _qq_xfer_read_file(buffer, info->max_fragment_index + sizeof(info->window),
diff --git a/net-im/gaim-openq/files/patch-src-send_file.c b/net-im/gaim-openq/files/patch-src-send_file.c
index 1d943229558c..e585f555e0b7 100644
--- a/net-im/gaim-openq/files/patch-src-send_file.c
+++ b/net-im/gaim-openq/files/patch-src-send_file.c
@@ -1,10 +1,56 @@
---- src/send_file.c.orig Thu Dec 23 06:22:22 2004
-+++ src/send_file.c Wed Apr 20 13:16:55 2005
-@@ -22,6 +22,7 @@
+--- src/send_file.c.orig Thu Dec 23 18:22:22 2004
++++ src/send_file.c Thu Aug 18 18:18:11 2005
+@@ -22,6 +22,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
++#include <sys/types.h>
+#include <sys/socket.h>
#include <network.h>
#include "send_file.h"
+@@ -203,8 +205,8 @@
+ info = (ft_info *) xfer->data;
+
+ qq_xfer_close_file(xfer);
+- if (info->dest_fp != NULL) {
+- fclose(info->dest_fp);
++ if (info->un.dest_fp != NULL) {
++ fclose(info->un.dest_fp);
+ gaim_debug(GAIM_DEBUG_INFO, "QQ", "file closed\n");
+ }
+ if (info->major_fd != 0) {
+@@ -499,6 +501,8 @@
+ guint8 *cursor, *raw_data;
+ gint packet_len, bytes;
+ ft_info *info;
++ guint16 minor_port;
++ guint32 real_ip;
+
+ g_return_if_fail (gc != NULL && gc->proto_data != NULL);
+ qd = (qq_data *) gc->proto_data;
+@@ -506,8 +510,6 @@
+
+ gaim_debug(GAIM_DEBUG_INFO, "QQ", "I've accepted the file transfer request from %d\n", to_uid);
+ _qq_xfer_init_socket(qd->xfer);
+- guint16 minor_port;
+- guint32 real_ip;
+
+ packet_len = 79;
+ raw_data = g_newa (guint8, packet_len);
+@@ -809,6 +811,7 @@
+ GaimXfer *xfer;
+ gchar *sender_name;
+ ft_info *info;
++ gchar **fileinfo;
+
+ g_return_if_fail (gc != NULL && data != NULL && data_len != 0);
+ qd = (qq_data *) gc->proto_data;
+@@ -834,7 +837,6 @@
+ GAIM_XFER_RECEIVE,
+ sender_name);
+
+- gchar **fileinfo;
+ fileinfo = g_strsplit(data + 81 + 12, "\x1f", 2);
+ g_return_if_fail (fileinfo != NULL && fileinfo[0] != NULL && fileinfo[1] != NULL);
+ gaim_xfer_set_filename(xfer, fileinfo[0]);
diff --git a/net-im/gaim-openq/files/patch-src-send_file.h b/net-im/gaim-openq/files/patch-src-send_file.h
new file mode 100644
index 000000000000..961316f49502
--- /dev/null
+++ b/net-im/gaim-openq/files/patch-src-send_file.h
@@ -0,0 +1,11 @@
+--- src/send_file.h.orig Thu Aug 18 18:49:04 2005
++++ src/send_file.h Thu Aug 18 17:55:56 2005
+@@ -40,7 +40,7 @@
+ union {
+ FILE *dest_fp;
+ guint8 *buffer;
+- };
++ } un;
+ gboolean use_major;
+ } ft_info;
+