FreeBSD Bugzilla – Attachment 73630 Details for
Bug 106688
[update] comms/libticables2: version 1.0.2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
libticables2.update
libticables2.update (text/plain), 8.08 KB, created by
Tijl Coosemans
on 2006-12-13 21:50:12 UTC
(
hide
)
Description:
libticables2.update
Filename:
MIME Type:
Creator:
Tijl Coosemans
Created:
2006-12-13 21:50:12 UTC
Size:
8.08 KB
patch
obsolete
>diff -urN libticables2.orig/Makefile libticables2/Makefile >--- libticables2.orig/Makefile Wed Dec 13 16:58:17 2006 >+++ libticables2/Makefile Wed Dec 13 17:37:16 2006 >@@ -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 @@ > > .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 -urN libticables2.orig/distinfo libticables2/distinfo >--- libticables2.orig/distinfo Wed Dec 13 16:58:17 2006 >+++ libticables2/distinfo Wed Dec 13 17:03:53 2006 >@@ -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 -urN libticables2.orig/files/patch-silver libticables2/files/patch-silver >--- libticables2.orig/files/patch-silver Wed Dec 13 16:58:17 2006 >+++ libticables2/files/patch-silver Thu Jan 1 01:00:00 1970 >@@ -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 -urN libticables2.orig/files/patch-src-bsd-link_gry.c libticables2/files/patch-src-bsd-link_gry.c >--- libticables2.orig/files/patch-src-bsd-link_gry.c Wed Dec 13 16:58:17 2006 >+++ libticables2/files/patch-src-bsd-link_gry.c Thu Jan 1 01:00:00 1970 >@@ -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 -urN libticables2.orig/files/patch-src-bsd-link_ser.c libticables2/files/patch-src-bsd-link_ser.c >--- libticables2.orig/files/patch-src-bsd-link_ser.c Wed Dec 13 16:58:17 2006 >+++ libticables2/files/patch-src-bsd-link_ser.c Thu Jan 1 01:00:00 1970 >@@ -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;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 106688
: 73630