From uspoerlein@gmail.com  Thu Jun 18 11:59:40 2009
Return-Path: <uspoerlein@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 67244106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Jun 2009 11:59:40 +0000 (UTC)
	(envelope-from uspoerlein@gmail.com)
Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2])
	by mx1.freebsd.org (Postfix) with ESMTP id ED3DE8FC16;
	Thu, 18 Jun 2009 11:59:39 +0000 (UTC)
	(envelope-from uspoerlein@gmail.com)
Received: from roadrunner.spoerlein.net (e180190083.adsl.alicedsl.de [85.180.190.83])
	by acme.spoerlein.net (8.14.3/8.14.3) with ESMTP id n5IBxbYZ057802
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 18 Jun 2009 13:59:38 +0200 (CEST)
	(envelope-from uspoerlein@gmail.com)
Received: from roadrunner.spoerlein.net (localhost [127.0.0.1])
	by roadrunner.spoerlein.net (8.14.3/8.14.3) with ESMTP id n5IBxXaq047492
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 18 Jun 2009 13:59:33 +0200 (CEST)
	(envelope-from uqs@roadrunner.spoerlein.net)
Received: (from uqs@localhost)
	by roadrunner.spoerlein.net (8.14.3/8.14.3/Submit) id n5IBxX6n047491;
	Thu, 18 Jun 2009 13:59:33 +0200 (CEST)
	(envelope-from uqs)
Message-Id: <200906181159.n5IBxX6n047491@roadrunner.spoerlein.net>
Date: Thu, 18 Jun 2009 13:59:33 +0200 (CEST)
From: Ulrich Spoerlein <uqs@spoerlein.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: samm@os2.kiev.ua, hps@freebsd.org
Subject: [PATCH] palm/pilot-link: Unbreak on 8-CURRENT
X-Send-Pr-Version: 3.113
X-GNATS-Notify: samm@os2.kiev.ua

>Number:         135694
>Category:       ports
>Synopsis:       [PATCH] palm/pilot-link: Unbreak on 8-CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wxs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 18 12:00:07 UTC 2009
>Closed-Date:    Thu Jul 09 03:12:58 UTC 2009
>Last-Modified:  Thu Jul  9 03:20:01 UTC 2009
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 7.2-STABLE i386
>Organization:
>Environment:
>Description:
The legacy USB stack has been removed, this port no longer builds.

I mapped the ioctls as best as I could and compile-tested on 7.2/i386 and
8.0/amd64.

@Hans Petter: Could you please take a look at the patch to see if it is the
right approach? Many thanks!

Port maintainer (samm@os2.kiev.ua) is cc'd.
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- pilot-link-0.12.3,1.patch begins here ---
Index: files/patch-libpisock_freebsdusb.c
===================================================================
RCS file: /tank/ncvs/ports/palm/pilot-link/files/patch-libpisock_freebsdusb.c,v
retrieving revision 1.1
diff -u -p -u -r1.1 patch-libpisock_freebsdusb.c
--- files/patch-libpisock_freebsdusb.c	2 Apr 2009 11:44:53 -0000	1.1
+++ files/patch-libpisock_freebsdusb.c	18 Jun 2009 11:56:45 -0000
@@ -1,15 +1,36 @@
---- libpisock/freebsdusb.c.orig	2006-10-12 06:21:22.000000000 -0800
-+++ libpisock/freebsdusb.c	2009-03-02 10:06:01.000000000 -0900
-@@ -48,7 +48,12 @@
+--- libpisock/freebsdusb.c.orig	2006-10-12 16:21:22.000000000 +0200
++++ libpisock/freebsdusb.c	2009-06-18 13:05:35.383212316 +0200
+@@ -48,7 +48,15 @@
  
  #if defined(__FreeBSD__)
  /* freebsd usb header */
 +#include <sys/param.h>
-+#if __FreeBSD_version+0 >= 800064
-+#include <legacy/dev/usb/usb.h>
-+#else
  #include <dev/usb/usb.h>
++#if __FreeBSD_version+0 >= 800092
++#include <dev/usb/usb_ioctl.h>
++#else
++/* redefine to legacy names, so this continues to build on FreeBSD 7.x */
++#define USB_SET_TX_TIMEOUT USB_SET_TIMEOUT
++#define USB_SET_RX_SHORT_XFER USB_SET_SHORT_XFER
 +#endif
  #define MAX_BUF 256
  #endif
  
+@@ -173,7 +181,7 @@
+ 	   will don't know exactly
+ 	what is coming so we can't specify exact byte amounts */
+ 	i = 1;
+-	if (ioctl(endpoint_fd, USB_SET_SHORT_XFER, &i) < 0) {
++	if (ioctl(endpoint_fd, USB_SET_RX_SHORT_XFER, &i) < 0) {
+ 		LOG((PI_DBG_DEV, PI_DBG_LVL_WARN,
+ 		 "DEV USB_SET_SHORT_XFER USB FreeBSD fd: %d failed\n",
+ 			endpoint_fd));
+@@ -182,7 +190,7 @@
+ 	/* 0 timeout value will cause us the wait until the device has data
+            available or is disconnected */
+ 	i = 0;
+-	if (ioctl(endpoint_fd, USB_SET_TIMEOUT, &i) < 0) {
++	if (ioctl(endpoint_fd, USB_SET_TX_TIMEOUT, &i) < 0) {
+ 		LOG((PI_DBG_DEV, PI_DBG_LVL_WARN,
+ 		 "DEV USB_SET_TIMEOUT USB FreeBSD fd: %d failed\n",
+ 			endpoint_fd));
--- pilot-link-0.12.3,1.patch ends here ---

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Thu Jun 18 12:00:19 UTC 2009 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135694 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: samm@os2.kiev.ua
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/135694: [PATCH] palm/pilot-link: Unbreak on 8-CURRENT
Date: Thu, 18 Jun 2009 12:00:17 UT

 Maintainer of palm/pilot-link,
 
 Please note that PR ports/135694 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/135694
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
Responsible-Changed-From-To: freebsd-ports-bugs->wxs 
Responsible-Changed-By: wxs 
Responsible-Changed-When: Thu Jul 2 19:04:36 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135694 
State-Changed-From-To: feedback->closed 
State-Changed-By: wxs 
State-Changed-When: Thu Jul 9 03:12:57 UTC 2009 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135694 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/135694: commit references a PR
Date: Thu,  9 Jul 2009 03:12:45 +0000 (UTC)

 wxs         2009-07-09 03:12:35 UTC
 
   FreeBSD ports repository
 
   Modified files:
     palm/pilot-link/files patch-libpisock_freebsdusb.c 
   Log:
   - Unbreak on -current.
   
   PR:             ports/135694
   Submitted by:   Ulrich Spoerlein <uqs@spoerlein.net>
   Approved by:    maintainer timeout
   
   Revision  Changes    Path
   1.2       +27 -6     ports/palm/pilot-link/files/patch-libpisock_freebsdusb.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
