summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2006-12-15 18:56:57 +0000
committerRong-En Fan <rafan@FreeBSD.org>2006-12-15 18:56:57 +0000
commit6d16d47e6595cd33a40712eeb3a4bda6336182e3 (patch)
treed18ddb1d18cd0786da6dc77d1dbfd2a5148769a9 /comms
parentFix build with new gcc 4.x (diff)
- Update to 1.0.2
PR: ports/106688 Submitted by: Tijl Coosemans <tijl at ulyssis.org> (maintainer)
Notes
Notes: svn path=/head/; revision=179865
Diffstat (limited to 'comms')
-rw-r--r--comms/libticables2/Makefile12
-rw-r--r--comms/libticables2/distinfo6
-rw-r--r--comms/libticables2/files/patch-silver78
-rw-r--r--comms/libticables2/files/patch-src-bsd-link_gry.c104
-rw-r--r--comms/libticables2/files/patch-src-bsd-link_ser.c39
5 files changed, 10 insertions, 229 deletions
diff --git a/comms/libticables2/Makefile b/comms/libticables2/Makefile
index 92844656f322..5071cd23b3d9 100644
--- a/comms/libticables2/Makefile
+++ b/comms/libticables2/Makefile
@@ -6,11 +6,11 @@
#
PORTNAME= libticables2
-PORTVERSION= 1.0.0
+PORTVERSION= 1.0.2
CATEGORIES= comms
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= gtktiemu
-DISTNAME= ${PORTNAME}-20060925
+DISTNAME= ${PORTNAME}-20061030
MAINTAINER= tijl@ulyssis.org
COMMENT= TI calculator link cables library
@@ -38,10 +38,12 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include"\
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 500000
post-patch:
- @${REINPLACE_CMD} -e 's|<stdint\.h>|<inttypes.h>|' \
+ @${REINPLACE_CMD} -e 's|#include "linux/link_dev.c"||' \
+ ${WRKSRC}/src/link_slv.c
+ @${REINPLACE_CMD} -e 's|<stdint\.h>|"stdints1.h"|' \
${WRKSRC}/src/linux/ioports.c
-.endif
+ @${REINPLACE_CMD} -e 's|return usb_probe_devices2|return usb_probe_devices1|' \
+ ${WRKSRC}/src/linux/link_slv.c
.include <bsd.port.post.mk>
diff --git a/comms/libticables2/distinfo b/comms/libticables2/distinfo
index 1e3c3afcecf6..d4d583793f13 100644
--- a/comms/libticables2/distinfo
+++ b/comms/libticables2/distinfo
@@ -1,3 +1,3 @@
-MD5 (libticables2-20060925.tar.bz2) = ced32aaebb4ef940f781d20919887a69
-SHA256 (libticables2-20060925.tar.bz2) = 065b8423f7b0f73f46bf8fddb218330bba51d4aabd7585ebb9199623015c58c7
-SIZE (libticables2-20060925.tar.bz2) = 507489
+MD5 (libticables2-20061030.tar.bz2) = 27f8ddf8205a591f31b69d3fb5f214e9
+SHA256 (libticables2-20061030.tar.bz2) = 3d0e920cb92395a2f76e779b16aba59b0ae2362bfc957aa723a4ce5bd2fc839c
+SIZE (libticables2-20061030.tar.bz2) = 511215
diff --git a/comms/libticables2/files/patch-silver b/comms/libticables2/files/patch-silver
deleted file mode 100644
index 7c71e3dcc6a5..000000000000
--- a/comms/libticables2/files/patch-silver
+++ /dev/null
@@ -1,78 +0,0 @@
-Index: src/ticables.c
-===================================================================
---- src/ticables.c (revision 2995)
-+++ src/ticables.c (working copy)
-@@ -33,6 +33,9 @@
- #ifdef __LINUX__
- #include <sys/utsname.h>
- #endif
-+#if defined(HAVE_LIBUSB)
-+#include <usb.h>
-+#endif
-
- #include "gettext.h"
- #include "ticables.h"
-@@ -140,6 +143,10 @@
- ticables_info("kernel: %s", buf.release);
- }
- #endif
-+#if defined(HAVE_LIBUSB)
-+ /* init the libusb */
-+ usb_init();
-+#endif
-
- return (++ticables_instance);
- }
-Index: src/linux/link_slv.c
-===================================================================
---- src/linux/link_slv.c (revision 2995)
-+++ src/linux/link_slv.c (working copy)
-@@ -245,11 +245,11 @@
- han = usb_open(dev);
- ret = usb_get_string_simple(han, dev->descriptor.iProduct,
- string, sizeof(string));
-+ usb_close(han);
- if (ret > 0)
- return string;
- else
- return "";
-- usb_close(han);
- }
-
- return string;
-@@ -276,7 +276,7 @@
- if(dev->descriptor.idProduct == tigl_infos[i].pid)
- {
- ticables_info(" found <%s> on #%i, version <%x.%02x>",
-- tigl_get_product(dev), j+1,
-+ /*tigl_get_product(dev)*/ "", j+1,
- dev->descriptor.bcdDevice >> 8,
- dev->descriptor.bcdDevice & 0xff);
-
-@@ -296,9 +296,6 @@
- {
- int ret = 0;
-
-- /* init the libusb */
-- usb_init();
--
- /* find all usb busses on the system */
- ret = usb_find_busses();
- if (ret < 0)
-@@ -480,6 +477,7 @@
-
- static int slv_reset(CableHandle *h)
- {
-+#if !defined(__BSD__)
- /* Reset both endpoints */
- #ifdef SLV_RESET
- TRYC(tigl_reset(uHdl));
-@@ -487,7 +485,7 @@
- TRYC(slv_close(h));
- TRYC(slv_open(h));
- #endif
--
-+#endif
- return 0;
- }
-
diff --git a/comms/libticables2/files/patch-src-bsd-link_gry.c b/comms/libticables2/files/patch-src-bsd-link_gry.c
deleted file mode 100644
index de67b3114e68..000000000000
--- a/comms/libticables2/files/patch-src-bsd-link_gry.c
+++ /dev/null
@@ -1,104 +0,0 @@
---- src/bsd/link_gry.c.orig Wed Oct 11 15:19:24 2006
-+++ src/bsd/link_gry.c Wed Oct 11 16:26:38 2006
-@@ -51,10 +51,10 @@
-
- switch(h->port)
- {
-- case PORT_1: h->address = 0x3f8; h->device = strdup("/dev/cuaa0"); break;
-- case PORT_2: h->address = 0x2f8; h->device = strdup("/dev/cuaa1"); break;
-- case PORT_3: h->address = 0x3e8; h->device = strdup("/dev/cuaa2"); break;
-- case PORT_4: h->address = 0x3e8; h->device = strdup("/dev/cuaa3"); break;
-+ case PORT_1: h->address = 0x3f8; h->device = strdup("/dev/cuad0"); break;
-+ case PORT_2: h->address = 0x2f8; h->device = strdup("/dev/cuad1"); break;
-+ case PORT_3: h->address = 0x3e8; h->device = strdup("/dev/cuad2"); break;
-+ case PORT_4: h->address = 0x3e8; h->device = strdup("/dev/cuad3"); break;
- default: return ERR_ILLEGAL_ARG;
- }
- h->priv2 = (struct termios *)calloc(1, sizeof(struct termios));
-@@ -93,9 +93,15 @@
- termset->c_cflag = CS8 | CLOCAL | CREAD;
- termset->c_lflag = 0;
- #endif
-+ termset->c_cc[VMIN] = 0;
-+ termset->c_cc[VTIME] = h->timeout;
-
- cfsetispeed(termset, B9600);
- cfsetospeed(termset, B9600);
-+ tcsetattr(dev_fd, TCSANOW, termset);
-+
-+ if(tcflush(dev_fd, TCIOFLUSH) == -1)
-+ return ERR_FLUSH_ERROR;
-
- return 0;
- }
-@@ -111,31 +117,18 @@
-
- static int gry_reset(CableHandle *h)
- {
-- uint8_t unused[1024];
-- int n;
--
-- /* Flush the input */
-- termset->c_cc[VMIN] = 0;
-- termset->c_cc[VTIME] = 0;
-- tcsetattr(dev_fd, TCSANOW, termset);
-- do
-- {
-- n = read(dev_fd, (void *) unused, 1024);
-- } while ((n != 0) && (n != -1));
--
-- /* and set/restore the timeout */
-- termset->c_cc[VTIME] = h->timeout;
-- tcsetattr(dev_fd, TCSANOW, termset);
-+ if(tcflush(dev_fd, TCIOFLUSH) == -1)
-+ return ERR_FLUSH_ERROR;
-
- return 0;
- }
-
- static int gry_put(CableHandle* h, uint8_t *data, uint32_t len)
- {
-- int err;
-+ ssize_t ret;
-
-- err = write(dev_fd, (void *)data, len);
-- switch (err)
-+ ret = write(dev_fd, (void *)data, len);
-+ switch (ret)
- {
- case -1: //error
- return ERR_WRITE_ERROR;
-@@ -150,19 +143,24 @@
-
- static int gry_get(CableHandle* h, uint8_t *data, uint32_t len)
- {
-- int err;
-+ ssize_t ret;
-+ ssize_t i;
-
- tcdrain(dev_fd); // waits for all output written
-
-- err = read(dev_fd, (void *)data, len);
-- switch (err)
-+ for(i = 0; i < len; )
- {
-- case -1: //error
-- return ERR_READ_ERROR;
-- break;
-- case 0: // timeout
-- return ERR_READ_TIMEOUT;
-- break;
-+ ret = read(dev_fd, (void *)(data+i), len - i);
-+ switch (ret)
-+ {
-+ case -1: //error
-+ return ERR_READ_ERROR;
-+ break;
-+ case 0: // timeout
-+ return ERR_READ_TIMEOUT;
-+ break;
-+ }
-+ i += ret;
- }
-
- return 0;
diff --git a/comms/libticables2/files/patch-src-bsd-link_ser.c b/comms/libticables2/files/patch-src-bsd-link_ser.c
deleted file mode 100644
index bfbaa28902a3..000000000000
--- a/comms/libticables2/files/patch-src-bsd-link_ser.c
+++ /dev/null
@@ -1,39 +0,0 @@
---- src/bsd/link_ser.c.orig Wed Oct 11 15:11:06 2006
-+++ src/bsd/link_ser.c Wed Oct 11 15:12:04 2006
-@@ -26,6 +26,7 @@
- #endif
-
- #include <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
-
- #include "../ticables.h"
-@@ -39,21 +40,23 @@
-
- static int ser_prepare(CableHandle *h)
- {
-+ int ret;
-+
- switch(h->port)
- {
-- case PORT_1: h->address = 0x3f8; h->device = strdup("/dev/cuaa0");
-+ case PORT_1: h->address = 0x3f8; h->device = strdup("/dev/cuad0");
- break;
-- case PORT_2: h->address = 0x2f8; h->device = strdup("/dev/cuaa1");
-+ case PORT_2: h->address = 0x2f8; h->device = strdup("/dev/cuad1");
- break;
-- case PORT_3: h->address = 0x3e8; h->device = strdup("/dev/cuaa2");
-+ case PORT_3: h->address = 0x3e8; h->device = strdup("/dev/cuad2");
- break;
-- case PORT_4: h->address = 0x3e8; h->device = strdup("/dev/cuaa3");
-+ case PORT_4: h->address = 0x3e8; h->device = strdup("/dev/cuad3");
- break;
- default: return ERR_ILLEGAL_ARG;
- }
-
- // detect stuffs
-- err = check_for_tty(h->device));
-+ ret = check_for_tty(h->device);
- if(ret)
- {
- free(h->device); h->device = NULL;