From jake@xz.cx  Sun Jan  1 16:42:00 2012
Return-Path: <jake@xz.cx>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 56657106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  1 Jan 2012 16:42:00 +0000 (UTC)
	(envelope-from jake@xz.cx)
Received: from fs.xz.cx (fs.xz.cx [81.31.102.2])
	by mx1.freebsd.org (Postfix) with ESMTP id A3C238FC0A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  1 Jan 2012 16:41:59 +0000 (UTC)
Received: from fs.xz.cx (localhost [127.0.0.1])
	by fs.xz.cx (8.14.4/8.14.4) with ESMTP id q01GfvxM051102
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 1 Jan 2012 16:41:57 GMT
	(envelope-from jake@xz.cx)
Received: (from root@localhost)
	by fs.xz.cx (8.14.4/8.14.4/Submit) id q01Gfv3O051101;
	Sun, 1 Jan 2012 16:41:57 GMT
	(envelope-from jake@xz.cx)
Message-Id: <201201011641.q01Gfv3O051101@fs.xz.cx>
Date: Sun, 1 Jan 2012 16:41:57 GMT
From: Jake Smith <jake@xz.cx>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [MAINTAINER] devel/libk8055: add support for CLANG compiler, fix build on 7.x, support added for PREFIX 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         163753
>Category:       ports
>Synopsis:       [MAINTAINER] devel/libk8055: add support for CLANG compiler, fix build on 7.x, support added for PREFIX
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 01 16:50:10 UTC 2012
>Closed-Date:    Sat Jan 14 19:11:49 UTC 2012
>Last-Modified:  Sat Jan 14 19:20:31 UTC 2012
>Originator:     Jake Smith
>Release:        FreeBSD 8.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD xxx 8.2-RELEASE FreeBSD 8.2-RELEASE #0 r219081M: Wed Mar  2 08:29:52
>Description:

Fixed compile with CLANG
Fixed broken on 7.x, libusb depend added
Added Custom LOCALBASE and PREFIX for QATty
Will only fallback to gcc if no other compiler is set
Fully tested with redports.org

Added file(s):
- files/patch-Makefile

>How-To-Repeat:
>Fix:

--- libk8055-0.2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/devel/libk8055/Makefile /usr/home/jake/redports/export/jake/devel/libk8055/Makefile
--- /usr/ports/devel/libk8055/Makefile	2011-12-08 20:19:29.000000000 +0000
+++ /usr/home/jake/redports/export/jake/devel/libk8055/Makefile	2011-12-31 03:27:04.767185000 +0000
@@ -17,6 +17,7 @@
 MAN1=		k8055.1
 MANCOMPRESSED=	yes
 USE_LDCONFIG=	yes
+USE_CSTD=	gnu89
 
 PLIST_FILES=	bin/k8055 \
 		lib/libk8055.c \
@@ -27,8 +28,10 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} < 800000
-BROKEN=		does not compile on FreeBSD 7.X
+.if ${OSVERSION} < 800069
+LIB_DEPENDS+=	usb:${PORTSDIR}/devel/libusb
+CFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
 .endif
 
 post-patch:
diff -ruN --exclude=CVS /usr/ports/devel/libk8055/files/patch-Makefile /usr/home/jake/redports/export/jake/devel/libk8055/files/patch-Makefile
--- /usr/ports/devel/libk8055/files/patch-Makefile	1970-01-01 01:00:00.000000000 +0100
+++ /usr/home/jake/redports/export/jake/devel/libk8055/files/patch-Makefile	2011-12-31 03:15:57.558476000 +0000
@@ -0,0 +1,47 @@
+--- Makefile.orig	2011-12-31 03:12:14.464658120 +0000
++++ Makefile	2011-12-31 03:12:42.754252842 +0000
+@@ -1,22 +1,22 @@
+-cc = gcc
++CC ?= gcc
+ exec = k8055
+-bindir = /usr/local/bin
+-libdir = /usr/local/lib
+-includedir = /usr/local/include
+-mandir = /usr/local/man/man1
++bindir = ${PREFIX}/bin
++libdir = ${PREFIX}/lib
++includedir = ${PREFIX}/include
++mandir = ${MANPREFIX}/man/man1
+ OBJS = main.o libk8055.o
+ # if your are using Linux comment out next line
+-CFLAGS = -DDAEMON -Wall -D_BSD
++CFLAGS += -DDAEMON -Wall -D_BSD
+ # if you are using Linux incomment following line
+ #CFLAGS = -DDAEMON -Wall
+ 
+-libs = -lusb -L/usr/lib -lm
++libs = -lusb -L/usr/lib ${LDFLAGS} -lm
+ 
+ libk8055.so.0.1: libk8055.o
+-	$(cc) -Wall -o libk8055.so.0.2 -shared libk8055.o
++	$(CC) -Wall -o libk8055.so.0.2 -shared libk8055.o
+ 
+ libk8055.o: libk8055.c
+-	$(cc) -Wall -O -c -g -fPIC $(CFLAGS) libk8055.c
++	$(CC) -Wall -O -c -g -fPIC $(CFLAGS) libk8055.c
+ 	-ln -sf libk8055.so.0.2 libk8055.so
+ 
+ libk8055.c: k8055.h
+@@ -24,10 +24,10 @@
+ all: k8055_prog libk8055.so.0.1
+ 
+ %.o: %.c
+-	$(cc) $(CFLAGS) -c $<
++	$(CC) $(CFLAGS) -c $<
+ 
+ k8055_prog: $(OBJS)
+-	$(cc) $(OBJS) -o $(exec) $(libs)
++	$(CC) $(OBJS) -o $(exec) $(libs)
+ 	strip $(exec)
+     
+ clean:
--- libk8055-0.2.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Jan 1 16:50:21 UTC 2012 
Responsible-Changed-Why:  
miwi@ wants his PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163753 
Responsible-Changed-From-To: miwi->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Sat Jan 7 01:02:34 UTC 2012 
Responsible-Changed-Why:  
I'm testing this one per request 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163753 
Responsible-Changed-From-To: eadler->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Sat Jan 7 01:26:55 UTC 2012 
Responsible-Changed-Why:  
take it back without my approval dosent work that. plus u have to follow 
the rules at least to ask! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163753 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Sat Jan 14 19:11:47 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/163753: commit references a PR
Date: Sat, 14 Jan 2012 19:13:33 +0000 (UTC)

 miwi        2012-01-14 19:11:59 UTC
 
   FreeBSD ports repository
 
   Modified files:
     devel/libk8055       Makefile 
   Added files:
     devel/libk8055/files patch-Makefile 
   Log:
   - Fix build with clang
   - Fix build with FreeBSD 7.x
   - Respect LOCALBASE
   
   PR:             163753
   Submitted by:   Jake Smith <jake@xz.cx> (maintainer)
   
   Revision  Changes    Path
   1.3       +5 -2      ports/devel/libk8055/Makefile
   1.1       +47 -0     ports/devel/libk8055/files/patch-Makefile (new)
 _______________________________________________
 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:
