aboutsummaryrefslogtreecommitdiff
path: root/palm
diff options
context:
space:
mode:
authorAlexander Nedotsukov <bland@FreeBSD.org>2005-04-27 04:00:26 +0000
committerAlexander Nedotsukov <bland@FreeBSD.org>2005-04-27 04:00:26 +0000
commitfa879418db829cfc3fe19a6fb584e6d1bfc2ce86 (patch)
tree729e9b50cac58ee0bdbdf18447fa331eed809e26 /palm
parentfc0c338e9f2edac130ccf2b8513cbb2ab20719e2 (diff)
downloadports-fa879418db829cfc3fe19a6fb584e6d1bfc2ce86.tar.gz
ports-fa879418db829cfc3fe19a6fb584e6d1bfc2ce86.zip
Notes
Diffstat (limited to 'palm')
-rw-r--r--palm/gnome-pilot/Makefile2
-rw-r--r--palm/gnome-pilot/files/patch-gpilotd__gpilotd.c87
-rw-r--r--palm/gnomepilot2/Makefile2
-rw-r--r--palm/gnomepilot2/files/patch-gpilotd__gpilotd.c87
4 files changed, 176 insertions, 2 deletions
diff --git a/palm/gnome-pilot/Makefile b/palm/gnome-pilot/Makefile
index 7831945094c5..3946678249dc 100644
--- a/palm/gnome-pilot/Makefile
+++ b/palm/gnome-pilot/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gnomepilot2
PORTVERSION= 2.0.13
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= palm comms gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-pilot/2.0
diff --git a/palm/gnome-pilot/files/patch-gpilotd__gpilotd.c b/palm/gnome-pilot/files/patch-gpilotd__gpilotd.c
new file mode 100644
index 000000000000..b856f0a4af69
--- /dev/null
+++ b/palm/gnome-pilot/files/patch-gpilotd__gpilotd.c
@@ -0,0 +1,87 @@
+--- gpilotd/gpilotd.c.orig Thu Sep 2 11:43:47 2004
++++ gpilotd/gpilotd.c Sun Apr 24 15:56:14 2005
+@@ -27,6 +27,8 @@
+ #include "config.h"
+ #endif
+
++#define freebsd
++
+ /* for crypt () */
+ #ifdef USE_XOPEN_SOURCE
+ #ifndef _XOPEN_SOURCE
+@@ -903,7 +905,7 @@
+ }
+
+ fclose (f);
+-
++
+ if (visor_exists) {
+ l = context->devices;
+ while (l) {
+@@ -928,6 +930,49 @@
+ }
+
+ #endif
++#ifdef freebsd
++static gboolean
++visor_devices_timeout (gpointer data)
++{
++ GPilotContext *context = data;
++ GPilotDevice *device;
++ GList *l;
++ int i;
++ gboolean visor_exists = FALSE, visor_net = TRUE;
++
++ g_assert (context != NULL);
++
++ if (context->paused)
++ return FALSE;
++
++ l = context->devices;
++ while (l) {
++ device = l->data;
++
++ struct stat dummy;
++
++ /* Make sure usb device exists */
++ if (stat(device->port, &dummy) == 0) {
++ if (device->type == PILOT_DEVICE_USB_VISOR) {
++ if (!visor_net)
++ device->type = PILOT_DEVICE_SERIAL;
++
++ /* just try to synch. Until I can talk to
++ * the kernel guys this is the best way to
++ * go. */
++ sync_device (device, context);
++ if (!visor_net)
++ device->type = PILOT_DEVICE_USB_VISOR;
++ }
++ }
++ l = l->next;
++
++ }
++
++ return TRUE;
++}
++
++#endif
+ #endif
+
+ void monitor_channel (GPilotDevice *dev,GPilotContext *context)
+@@ -959,16 +1004,12 @@
+ #endif /* WITH_NETWORK */
+ } if (dev->type == PILOT_DEVICE_USB_VISOR) {
+ #ifdef WITH_USB_VISOR
+-#ifdef linux
+ /* We want to watch the /proc/bus/usb/devices file once
+ * per context, and then check all devices each time it is
+ * woken up. */
+ if (visor_timeout_id == -1) {
+ visor_timeout_id = g_timeout_add (2000, visor_devices_timeout, context);
+ }
+-#else /* linux*/
+- g_assert_not_reached ();
+-#endif /* linux */
+ #endif /* WITH_USB_VISOR */
+ dev->device_exists = FALSE;
+ }
diff --git a/palm/gnomepilot2/Makefile b/palm/gnomepilot2/Makefile
index 7831945094c5..3946678249dc 100644
--- a/palm/gnomepilot2/Makefile
+++ b/palm/gnomepilot2/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gnomepilot2
PORTVERSION= 2.0.13
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= palm comms gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-pilot/2.0
diff --git a/palm/gnomepilot2/files/patch-gpilotd__gpilotd.c b/palm/gnomepilot2/files/patch-gpilotd__gpilotd.c
new file mode 100644
index 000000000000..b856f0a4af69
--- /dev/null
+++ b/palm/gnomepilot2/files/patch-gpilotd__gpilotd.c
@@ -0,0 +1,87 @@
+--- gpilotd/gpilotd.c.orig Thu Sep 2 11:43:47 2004
++++ gpilotd/gpilotd.c Sun Apr 24 15:56:14 2005
+@@ -27,6 +27,8 @@
+ #include "config.h"
+ #endif
+
++#define freebsd
++
+ /* for crypt () */
+ #ifdef USE_XOPEN_SOURCE
+ #ifndef _XOPEN_SOURCE
+@@ -903,7 +905,7 @@
+ }
+
+ fclose (f);
+-
++
+ if (visor_exists) {
+ l = context->devices;
+ while (l) {
+@@ -928,6 +930,49 @@
+ }
+
+ #endif
++#ifdef freebsd
++static gboolean
++visor_devices_timeout (gpointer data)
++{
++ GPilotContext *context = data;
++ GPilotDevice *device;
++ GList *l;
++ int i;
++ gboolean visor_exists = FALSE, visor_net = TRUE;
++
++ g_assert (context != NULL);
++
++ if (context->paused)
++ return FALSE;
++
++ l = context->devices;
++ while (l) {
++ device = l->data;
++
++ struct stat dummy;
++
++ /* Make sure usb device exists */
++ if (stat(device->port, &dummy) == 0) {
++ if (device->type == PILOT_DEVICE_USB_VISOR) {
++ if (!visor_net)
++ device->type = PILOT_DEVICE_SERIAL;
++
++ /* just try to synch. Until I can talk to
++ * the kernel guys this is the best way to
++ * go. */
++ sync_device (device, context);
++ if (!visor_net)
++ device->type = PILOT_DEVICE_USB_VISOR;
++ }
++ }
++ l = l->next;
++
++ }
++
++ return TRUE;
++}
++
++#endif
+ #endif
+
+ void monitor_channel (GPilotDevice *dev,GPilotContext *context)
+@@ -959,16 +1004,12 @@
+ #endif /* WITH_NETWORK */
+ } if (dev->type == PILOT_DEVICE_USB_VISOR) {
+ #ifdef WITH_USB_VISOR
+-#ifdef linux
+ /* We want to watch the /proc/bus/usb/devices file once
+ * per context, and then check all devices each time it is
+ * woken up. */
+ if (visor_timeout_id == -1) {
+ visor_timeout_id = g_timeout_add (2000, visor_devices_timeout, context);
+ }
+-#else /* linux*/
+- g_assert_not_reached ();
+-#endif /* linux */
+ #endif /* WITH_USB_VISOR */
+ dev->device_exists = FALSE;
+ }