Update of /cvsroot/fink/experimental/beren12/finkinfo/net
In directory usw-pr-cvs1:/tmp/cvs-serv27997

Modified Files:
        gift-0.10.0-20020916-1.patch 
Log Message:
fix for gift

Index: gift-0.10.0-20020916-1.patch
===================================================================
RCS file: 
/cvsroot/fink/experimental/beren12/finkinfo/net/gift-0.10.0-20020916-1.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gift-0.10.0-20020916-1.patch        18 Sep 2002 19:09:48 -0000      1.1
+++ gift-0.10.0-20020916-1.patch        18 Sep 2002 21:00:40 -0000      1.2
@@ -1,6 +1,16 @@
-diff -ruN gift-0.10.0-20020916/OpenFT/openft.c 
gift-0.10.0-20020916.new/OpenFT/openft.c
---- gift-0.10.0-20020916/OpenFT/openft.c       Mon Sep 16 23:41:52 2002
-+++ gift-0.10.0-20020916.new/OpenFT/openft.c   Mon Sep 16 23:43:38 2002
+diff -ruN gift-0.10.0-20020916.orig/OpenFT/Makefile.am 
+gift-0.10.0-20020916/OpenFT/Makefile.am
+--- gift-0.10.0-20020916.orig/OpenFT/Makefile.am       2002-09-16 21:41:52.000000000 
+-0600
++++ gift-0.10.0-20020916/OpenFT/Makefile.am    2002-09-18 14:39:02.000000000 -0600
+@@ -26,5 +26,4 @@
+       $(top_builddir)/lib/libgiFT.la \
+       $(LIBDB_LIBS)
+ 
+-# _BIG_ hack
+-libOpenFT_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/lib/.libs
++#libOpenFT_la_LDFLAGS = -module -avoid-version
+diff -ruN gift-0.10.0-20020916.orig/OpenFT/openft.c 
+gift-0.10.0-20020916/OpenFT/openft.c
+--- gift-0.10.0-20020916.orig/OpenFT/openft.c  2002-09-16 21:41:52.000000000 -0600
++++ gift-0.10.0-20020916/OpenFT/openft.c       2002-09-18 13:34:49.000000000 -0600
 @@ -231,7 +231,7 @@
        share_comp_write ();
  
@@ -10,253 +20,9 @@
  
        /* OpenFT, here we come :) */
        node_maintain_links (NULL);
-diff -ruN gift-0.10.0-20020916/OpenFT/openft.c~ 
gift-0.10.0-20020916.new/OpenFT/openft.c~
---- gift-0.10.0-20020916/OpenFT/openft.c~      Wed Dec 31 19:00:00 1969
-+++ gift-0.10.0-20020916.new/OpenFT/openft.c~  Mon Sep 16 23:41:52 2002
-@@ -0,0 +1,240 @@
-+/*
-+ * openft.c
-+ *
-+ * Copyright (C) 2001-2002 giFT project (gift.sourceforge.net)
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License as published by the
-+ * Free Software Foundation; either version 2, or (at your option) any
-+ * later version.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details.
-+ */
-+
-+/* hack hack hack */
-+#define __OPENFT_C__
-+
-+#include <signal.h>
-+
-+#include "openft.h"
-+
-+#include "netorg.h"
-+
-+#include "share_comp.h"
-+#include "search.h"
-+#include "daemon.h"
-+
-+#include "xfer.h"
-+#include "html.h"
-+
-+#include "file.h"
-+#include "parse.h"
-+
-+#include "md5.h"
-+
-+/*****************************************************************************/
-+
-+#define MAINTAIN_LINKS_TIMER (2 * MINUTES)
-+
-+/*****************************************************************************/
-+
-+int openft_shutdown           = FALSE; /* boolean that is set when OpenFT is
-+                                        * shutting itself down */
-+
-+/*****************************************************************************/
-+
-+Config *openft_conf           = NULL;  /* ~/.giFT/gift.conf */
-+
-+Connection *ft_self           = NULL;  /* current class information */
-+Connection *http_bind         = NULL;
-+
-+Protocol *openft_proto        = NULL;  /* OpenFT protocol plugin pointer */
-+
-+static unsigned long ft_maint = 0;     /* timer for connection maintenance */
-+
-+/*****************************************************************************/
-+
-+/* handle share actions for giFT */
-+static void ft_daemon_share (FileShare *file, ProtocolCommand command,
-+                             void *data)
-+{
-+      switch (command)
-+      {
-+       case PROTOCOL_SHARE_ADD:    ft_share_local_add (file);    break;
-+       case PROTOCOL_SHARE_REMOVE: ft_share_local_remove (file); break;
-+       case PROTOCOL_SHARE_FLUSH:  ft_share_local_flush ();      break;
-+       case PROTOCOL_SHARE_SYNC:   ft_share_local_sync ();       break;
-+       default:                                                  break;
-+      }
-+}
-+
-+/*****************************************************************************/
-+
-+static Connection *cleanup_conn (Connection *c, Node *node, void *data)
-+{
-+      node_disconnect (c);
-+
-+#if 0
-+      openft_share_remove_by_host (node->ip, TRUE);
-+#endif
-+
-+      return NULL;
-+}
-+
-+/* shutdown */
-+static void ft_daemon_destroy (Protocol *p)
-+{
-+      TRACE_FUNC ();
-+
-+      hash_algo_unregister (p, "MD5");
-+
-+      /* boolean used by node_disconnect to disable certain behavior */
-+      openft_shutdown = TRUE;
-+
-+      /* write nodes cache */
-+      node_update_cache ();
-+
-+      /* disconnect */
-+      conn_clear ((ConnForeachFunc) cleanup_conn);
-+
-+      /* cleanup */
-+      config_free (openft_conf);
-+
-+      timer_remove (ft_maint);
-+
-+      net_close (http_bind->fd);
-+      net_close (ft_self->fd);
-+
-+      node_free (http_bind);
-+      node_free (ft_self);
-+
-+      /* get rid of our protocol specific data */
-+      ft_share_local_cleanup ();
-+}
-+
-+/*****************************************************************************/
-+
-+static Connection *http_start (unsigned short port)
-+{
-+      Connection *c;
-+
-+      TRACE (("http_port = %hu", port));
-+
-+      c = connection_new (openft_proto);
-+      c->fd = net_bind (port, FALSE);
-+
-+      input_add (openft_proto, c, INPUT_READ,
-+                 (InputCallback) http_server_incoming, FALSE);
-+
-+      node_conn_set (ft_self, 0, -1, port);
-+
-+      return c;
-+}
-+
-+static Connection *ft_start (unsigned short klass, unsigned short port)
-+{
-+      Connection *c;
-+
-+      /* firewalled users can not go beyond the user class */
-+      if (port == 0)
-+              klass = NODE_USER;
-+
-+#ifndef USE_LIBDB
-+      if (klass & NODE_SEARCH)
-+      {
-+              GIFT_WARN (("dropping NODE_SEARCH status due to lacking libdb "
-+                          "support"));
-+      }
-+
-+      klass &= ~NODE_SEARCH;
-+#endif /* !USE_LIBDB */
-+
-+      TRACE (("class = %hu, port = %hu", klass, port));
-+
-+      c = node_new (net_bind (port, FALSE));
-+
-+      input_add (openft_proto, c, INPUT_READ,
-+                 (InputCallback) ft_handle_incoming, FALSE);
-+
-+      node_state_set (c, NODE_CONNECTED);
-+      node_class_set (c, klass);
-+      node_conn_set  (c, 0, port, -1);
-+
-+      if (!(NODE (c)->cap))
-+              NODE (c)->cap = dataset_new (DATASET_LIST);
-+
-+      return c;
-+}
-+
-+static unsigned char *openft_hash_md5 (char *path, char *type, int *len)
-+{
-+      if (len)
-+              *len = 16;
-+
-+      return md5_digest (path, 0);
-+}
-+
-+/*****************************************************************************/
-+
-+/*
-+ * OpenFT was parsed out of /path/to/libOpenFT.so
-+ */
-+int OpenFT_init (Protocol *p)
-+{
-+      int klass;
-+      int port;
-+      int http_port;
-+
-+      TRACE_FUNC ();
-+
-+      hash_algo_register (p, "MD5", (HashAlgorithm) openft_hash_md5);
-+
-+      openft_proto = p;
-+
-+      /* set support */
-+      dataset_insert (&p->support, "range-get",  10, I_PTR (TRUE));
-+      dataset_insert (&p->support, "chat-user",  10, I_PTR (FALSE));
-+      dataset_insert (&p->support, "chat-group", 11, I_PTR (FALSE));
-+
-+      /* setup the symbols for the daemon to call */
-+      p->callback   =                    ft_daemon_callback;
-+      p->destroy    =                    ft_daemon_destroy;
-+      p->download   = (ProtocolCallback) ft_daemon_download;   /* xfer.c */
-+      p->upload     = (ProtocolCallback) ft_daemon_upload;     /* xfer.c */
-+      p->source_cmp =                    ft_daemon_source_cmp; /* xfer.c */
-+      p->share      = (ProtocolCallback) ft_daemon_share;
-+
-+      /* setup the configuration table */
-+      openft_conf = gift_config_new ("OpenFT");
-+      port        = config_get_int (openft_conf, "main/port=1215");
-+      http_port   = config_get_int (openft_conf, "main/http_port=1216");
-+      klass       = config_get_int (openft_conf, "main/class=1");
-+
-+      /* startup the listening sockets */
-+      ft_self   = ft_start   (klass, port);
-+      http_bind = http_start (http_port);
-+
-+      /* add the capabilities */
-+#ifdef USE_ZLIB
-+      dataset_insert (&NODE (ft_self)->cap, "ZLIB",     5, STRDUP ("ZLIB"));
-+#endif /* USE_ZLIB */
-+      dataset_insert (&NODE (ft_self)->cap, "MD5-FULL", 9, STRDUP ("MD5-FULL"));
-+
-+      /* setup the connection maintenance timer (2 minute intervals) */
-+      ft_maint = timer_add (MAINTAIN_LINKS_TIMER,
-+                            (TimerCallback) node_maintain_links, NULL);
-+
-+      /* make sure ~/.giFT/OpenFT/shares.gz is up to date */
-+      share_comp_write ();
-+
-+      /* delete any host shares left over from previous search node sessions */
-+      file_rmdir (gift_conf_path ("OpenFT/db/"));
-+
-+      /* OpenFT, here we come :) */
-+      node_maintain_links (NULL);
-+
-+      return TRUE;
-+}
-diff -ruN gift-0.10.0-20020916/autogen.macosx.sh 
gift-0.10.0-20020916.new/autogen.macosx.sh
---- gift-0.10.0-20020916/autogen.macosx.sh     Sat Aug 10 17:07:33 2002
-+++ gift-0.10.0-20020916.new/autogen.macosx.sh Mon Sep 16 23:43:38 2002
+diff -ruN gift-0.10.0-20020916.orig/autogen.macosx.sh 
+gift-0.10.0-20020916/autogen.macosx.sh
+--- gift-0.10.0-20020916.orig/autogen.macosx.sh        2002-08-10 15:07:33.000000000 
+-0600
++++ gift-0.10.0-20020916/autogen.macosx.sh     2002-09-18 13:34:49.000000000 -0600
 @@ -3,8 +3,6 @@
  
  srcdir=`dirname $0`
@@ -292,9 +58,9 @@
  
  case $CC in
  xlc )
-diff -ruN gift-0.10.0-20020916/configure.ac gift-0.10.0-20020916.new/configure.ac
---- gift-0.10.0-20020916/configure.ac  Mon Sep 16 23:41:50 2002
-+++ gift-0.10.0-20020916.new/configure.ac      Tue Sep 17 00:27:02 2002
+diff -ruN gift-0.10.0-20020916.orig/configure.ac gift-0.10.0-20020916/configure.ac
+--- gift-0.10.0-20020916.orig/configure.ac     2002-09-16 21:41:50.000000000 -0600
++++ gift-0.10.0-20020916/configure.ac  2002-09-18 13:34:49.000000000 -0600
 @@ -291,7 +291,7 @@
  if test x$use_libdb = xyes
  then
@@ -313,9 +79,26 @@
  
  dnl Default to compiler & linker defaults for files & libraries.
  OPT_ZLIB=
-diff -ruN gift-0.10.0-20020916/ltmain.patch gift-0.10.0-20020916.new/ltmain.patch
---- gift-0.10.0-20020916/ltmain.patch  Wed Dec 31 19:00:00 1969
-+++ gift-0.10.0-20020916.new/ltmain.patch      Mon Sep 16 23:43:38 2002
+diff -ruN gift-0.10.0-20020916.orig/etc/gift.conf gift-0.10.0-20020916/etc/gift.conf
+--- gift-0.10.0-20020916.orig/etc/gift.conf    2002-07-16 23:51:36.000000000 -0600
++++ gift-0.10.0-20020916/etc/gift.conf 2002-09-18 14:59:46.000000000 -0600
+@@ -39,11 +39,12 @@
+ # Windows.
+ #
+ # *nix users: use the extension '.so', or whatever is appropriate for your OS.
++# OSX and Darwin Users: use the extension '.dylib'.
+ # Windows users: use the extension '.dll'.
+ #
+ # Default: none
+ #
+-plugins = libOpenFT.so
++plugins = libOpenFT.dylib
+ 
+ ###############################################################################
+ # DOWNLOAD CONTROLS
+diff -ruN gift-0.10.0-20020916.orig/ltmain.patch gift-0.10.0-20020916/ltmain.patch
+--- gift-0.10.0-20020916.orig/ltmain.patch     1969-12-31 17:00:00.000000000 -0700
++++ gift-0.10.0-20020916/ltmain.patch  2002-09-18 13:34:49.000000000 -0600
 @@ -0,0 +1,62 @@
 +--- ltmain.sh.orig    2002-06-22 21:27:18.000000000 -0400
 ++++ ltmain.sh 2002-06-22 21:27:52.000000000 -0400



-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to