From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Dec 13 21:50:19 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20C4216A403 for ; Wed, 13 Dec 2006 21:50:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 425F543CA4 for ; Wed, 13 Dec 2006 21:48:42 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kBDLoDZX073011 for ; Wed, 13 Dec 2006 21:50:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kBDLoDa4073010; Wed, 13 Dec 2006 21:50:13 GMT (envelope-from gnats) Resent-Date: Wed, 13 Dec 2006 21:50:13 GMT Resent-Message-Id: <200612132150.kBDLoDa4073010@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tijl Coosemans Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A652116A407 for ; Wed, 13 Dec 2006 21:41:08 +0000 (UTC) (envelope-from tijl@kalimero.kotnet.org) Received: from thumbler.kulnet.kuleuven.ac.be (thumbler.kulnet.kuleuven.ac.be [134.58.240.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id D13BA43C9F for ; Wed, 13 Dec 2006 21:39:36 +0000 (GMT) (envelope-from tijl@kalimero.kotnet.org) Received: from localhost (localhost [127.0.0.1]) by thumbler.kulnet.kuleuven.ac.be (Postfix) with ESMTP id B6EBE1388DC for ; Wed, 13 Dec 2006 22:41:06 +0100 (CET) Received: from smtp02.kuleuven.be (lepidus.kulnet.kuleuven.ac.be [134.58.240.72]) by thumbler.kulnet.kuleuven.ac.be (Postfix) with ESMTP id 9E521138895 for ; Wed, 13 Dec 2006 22:41:05 +0100 (CET) Received: from kalimero.kotnet.org (kalimero.kotnet.org [10.4.16.222]) by smtp02.kuleuven.be (Postfix) with ESMTP id 056262CAACE for ; Wed, 13 Dec 2006 22:41:00 +0100 (CET) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.8/8.13.8) with ESMTP id kBDLewsX084087 for ; Wed, 13 Dec 2006 22:40:58 +0100 (CET) (envelope-from tijl@kalimero.kotnet.org) Received: (from tijl@localhost) by kalimero.kotnet.org (8.13.8/8.13.8/Submit) id kBDLew4m084086; Wed, 13 Dec 2006 22:40:58 +0100 (CET) (envelope-from tijl) Message-Id: <200612132140.kBDLew4m084086@kalimero.kotnet.org> Date: Wed, 13 Dec 2006 22:40:58 +0100 (CET) From: Tijl Coosemans To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/106688: [update] comms/libticables2: version 1.0.2 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Tijl Coosemans List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 21:50:19 -0000 >Number: 106688 >Category: ports >Synopsis: [update] comms/libticables2: version 1.0.2 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Dec 13 21:50:12 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Tijl Coosemans >Release: FreeBSD 7.0-CURRENT i386 >Organization: >Environment: >Description: comms/libticables2 update to version 1.0.2 >How-To-Repeat: >Fix: In addition to the following patch the files/ subdirectory can be deleted. --- libticables2.update begins here --- 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 -.if ${OSVERSION} < 500000 post-patch: - @${REINPLACE_CMD} -e 's|||' \ + @${REINPLACE_CMD} -e 's|#include "linux/link_dev.c"||' \ + ${WRKSRC}/src/link_slv.c + @${REINPLACE_CMD} -e 's||"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 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 - #endif -+#if defined(HAVE_LIBUSB) -+#include -+#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 -+#include - #include - - #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; --- libticables2.update ends here --- >Release-Note: >Audit-Trail: >Unformatted: