From nobody@FreeBSD.org  Sat May 10 18:08:24 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 4138E52F
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 May 2014 18:08:24 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 2ECC4AC8
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 May 2014 18:08:24 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4AI8OcG091245
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 May 2014 18:08:24 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4AI8Opu091242;
	Sat, 10 May 2014 18:08:24 GMT
	(envelope-from nobody)
Message-Id: <201405101808.s4AI8Opu091242@cgiserv.freebsd.org>
Date: Sat, 10 May 2014 18:08:24 GMT
From: Bob Frazier <bobf@mrp3.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: add 'staging' support to comms/uarduno
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         189621
>Category:       ports
>Synopsis:       add 'staging' support to comms/uarduno
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rene
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 10 18:10:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Fri May 30 23:10:01 UTC 2014
>Originator:     Bob Frazier
>Release:        8.4-STABLE
>Organization:
S.F.T. Inc.
>Environment:
FreeBSD hack.SFT.local 8.4-STABLE FreeBSD 8.4-STABLE #0: Mon Feb 17 21:46:59 PST 2014     bobf@hack.SFT.local:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
patch for comms/uarduno to support staging

>How-To-Repeat:

>Fix:
apply supplied patch 'comms.uarduno.patch' from /usr/ports/comms/uarduno directory to add staging support.


Patch attached with submission follows:

--- Makefile	2013-09-20 09:03:29.000000000 -0700
+++ Makefile	2014-05-10 10:51:12.000000000 -0700
@@ -7,27 +7,26 @@
 MASTER_SITES=	http://mrp3.com/
 
 MAINTAINER=	bobf@mrp3.com
 COMMENT=	FreeBSD Kernel Driver for the Arduino Uno USB interface
 
-NO_PACKAGE=	You must (re)build this port with your kernel source
-
 SSP_UNSAFE=	kernel module does not support ssp
 
 # need to enforce installation into kernel module directory
 MAKE_ENV+=	KMODDIR=${KMODDIR}
 PREFIX=		${KMODDIR}
+MAKEOBJDIRPREFIX=
 
-NO_STAGE=	yes
+USES=		kmod
 .include <bsd.port.pre.mk>
 
 SRCPREFIX?=	${SRC_BASE}
 
 # disable mtree or you'll get a /boot/kernel/... directory hierarchy put there
 NO_MTREE= yes
 
-# some test targets need a predictable source directory
+## some test targets need a predictable source directory
 WRKSRC=		${WRKDIR}/uarduno
 
 PLIST_FILES=	uarduno.ko \
 		"@unexec kldxref ${KMODDIR}"
 
@@ -61,13 +60,11 @@
 
 # post-install target, make sure kernel module is unloaded
 post-install:
 	@if kldstat -q -m uhub/uarduno ; then \
 	 echo "" ; echo " +++ Unloading uarduno.ko (related devices will need to be re-attached)" ; kldunload uarduno ; fi
-	@${ECHO_MSG}
-	@${CAT} ${PKGMESSAGE}
-	@${ECHO_MSG}
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/uarduno.ko
 
 #
 # these next 2 targets are for developer use
 #
 # building a source tarball and related files


--- files/ids.txt	2014-01-23 11:55:14.000000000 -0800
+++ files/ids.txt	2014-05-10 10:57:43.000000000 -0700
@@ -14,19 +14,27 @@
 //     { 0xaaaa, 0xbbbb },
 //
 // Where '0xaaaa' is the vendor ID, and '0xbbbb' is the product ID that you
 // want the driver to recognize as an Arduino UNO.  It must end with a ','
 //
-// The default value of { 0x2341, 0x0001 } is already included as a reference.
-// NOTE:  do not remove or modify this entry unless you really really mean it.
+// The default values for Arduino UNO and MEGA are included as a reference.
+// These are provided 'as-is' though testing suggests they are correct.
 //
-// If you change this file, you will need to update it each
+// When new Arduino products are released, you can add the new information to
+// this file.  Please let me know so I can update it, too (thanks).  Send
+// new submissions to 'bobf@mrp3.com', with an appropriate subject line and
+// description of the entry.  Please test it first, thanks.
+//
+// If you change this file yourself, you will need to update it each
 // time you obtain a fresh copy of the ports tree.
 //
 //
 
     { 0x2341, 0x0001 },  // Arduino UNO, vendor 2341H, product 0001H
+    { 0x2341, 0x0042 },  // Arduino MEGA (rev 3), vendor 2341H, product 0042H
+    { 0x2341, 0x0043 },  // Arduino UNO (rev 3), vendor 2341H, product 0043H
+    { 0x2341, 0x0010 },  // Arduino MEGA 2560 R3, vendor 2341H, product 0010H 
 
 // place your entries below this line
 
 
 


>Release-Note:
>Audit-Trail:
Class-Changed-From-To: sw-bug->maintainer-update 
Class-Changed-By: edwin 
Class-Changed-When: Sat May 10 18:10:04 UTC 2014 
Class-Changed-Why:  
Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=189621 
Responsible-Changed-From-To: freebsd-ports-bugs->rene 
Responsible-Changed-By: rene 
Responsible-Changed-When: Fri May 30 21:57:03 UTC 2014 
Responsible-Changed-Why:  
Take 

http://www.freebsd.org/cgi/query-pr.cgi?pr=189621 
State-Changed-From-To: open->feedback 
State-Changed-By: rene 
State-Changed-When: Fri May 30 22:31:31 UTC 2014 
State-Changed-Why:  
Feedback requested. 

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

From: =?ISO-8859-1?Q?Ren=E9_Ladan?= <rene@freebsd.org>
To: bug-followup@FreeBSD.org, bobf@mrp3.com
Cc:  
Subject: Re: ports/189621: add &#39;staging&#39; support to comms/uarduno
Date: Sat, 31 May 2014 00:31:23 +0200

 I made some changes to your patch:
 
 - bump PORTREVISION because ids.txt changes
 - remove parts of Makefile which are already handled by USES=kmod:
   - CATEGORIES += kld
   - setting SSP_UNSAFE
   - adding KMODDIR to MAKE_ENV
   - running kldxref upon (de)installation
 - remove NO_MTREE, works fine with USES=kmod out of the box
 - allowing packaging as regular user by adding USES=uidfix and making
 the kernel object writable
 - setting the LICENSE to BSD2CLAUSE and moving it to the correct
 location in the Makefile
 - remove support for FreeBSD < 8.0
 - other portlint fixes
 
 Two questions left:
 - is BSD 2 clause the correct license?
 - upon installation, kldxref dumps core on my 10.0-amd64 box, claiming
 that the .ko just built has too many sections and is not dynamically linked.
 
 Can you investigate?
 
 Thanks,
 Ren

From: =?ISO-8859-1?Q?Ren=E9_Ladan?= <rene@freebsd.org>
To: bug-followup@FreeBSD.org, bobf@mrp3.com
Cc:  
Subject: Re: ports/189621: add &#39;staging&#39; support to comms/uarduno
Date: Sat, 31 May 2014 01:02:56 +0200

 Ok, the kldxref problem seems to be 64-bit specific. It works fine when
 installing the package in a 10-i386 poudriere jail.
 
 Ren
>Unformatted:
