From nobody@FreeBSD.org  Tue Jul 27 23:23:33 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E17F7106567A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Jul 2010 23:23:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id B6CB38FC26
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Jul 2010 23:23:33 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RNNXR3014383
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Jul 2010 23:23:33 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o6RNNXf3014376;
	Tue, 27 Jul 2010 23:23:33 GMT
	(envelope-from nobody)
Message-Id: <201007272323.o6RNNXf3014376@www.freebsd.org>
Date: Tue, 27 Jul 2010 23:23:33 GMT
From: Tuco <tuco.xyz@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: make ZFS makefiles use the libraries from build directory
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         149013
>Category:       kern
>Synopsis:       [zfs] [patch] make ZFS makefiles use the libraries from build directory
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 27 23:30:01 UTC 2010
>Closed-Date:    
>Last-Modified:  Wed Jul 28 02:14:53 UTC 2010
>Originator:     Tuco
>Release:        Debian GNU/kFreeBSD
>Organization:
>Environment:
>Description:
This patch makes ZFS makefiles use the libraries from build directory instead of installed ones. Useful in situations where these libraries might not be installed (which is unlikely on FreeBSD, but not so unlikely on Debian GNU/kFreeBSD).

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ur cddl/lib/libzfs/Makefile cddl/lib/libzfs/Makefile
--- cddl/lib/libzfs/Makefile	2008-11-17 15:49:29.000000000 -0500
+++ cddl/lib/libzfs/Makefile	2010-07-27 19:02:11.875304603 -0400
@@ -47,5 +47,6 @@
 CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair
 CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
 CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${.CURDIR}/../../../lib/libgeom
 
 .include <bsd.lib.mk>
diff -ur cddl/sbin/zfs/Makefile cddl/sbin/zfs/Makefile
--- cddl/sbin/zfs/Makefile	2008-03-27 19:21:25.000000000 -0400
+++ cddl/sbin/zfs/Makefile	2010-07-27 19:02:12.186072143 -0400
@@ -24,4 +24,10 @@
 LDADD=	-lzfs -lgeom -lbsdxml -lsbuf \
 	-lm -lnvpair -luutil -lutil
 
+LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs \
+	-L${.CURDIR}/../../../cddl/lib/libnvpair \
+	-L${.CURDIR}/../../../cddl/lib/libuutil \
+	-L${.CURDIR}/../../../lib/libgeom \
+	-L${.CURDIR}/../../../lib/libsbuf
+
 .include <bsd.prog.mk>
diff -ur cddl/sbin/zpool/Makefile cddl/sbin/zpool/Makefile
--- cddl/sbin/zpool/Makefile	2008-11-17 15:49:29.000000000 -0500
+++ cddl/sbin/zpool/Makefile	2010-07-27 19:02:46.066584053 -0400
@@ -26,4 +26,9 @@
 LDADD=	-lavl -lzfs -lgeom -lbsdxml -lsbuf \
 	-lm -lnvpair -luutil -lutil
 
+LDADD+= -L${.CURDIR}/../../../cddl/lib/libavl \
+	-L${.CURDIR}/../../../cddl/lib/libzfs \
+	-L${.CURDIR}/../../../cddl/lib/libnvpair \
+	-L${.CURDIR}/../../../cddl/lib/libuutil
+
 .include <bsd.prog.mk>


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jul 28 02:14:30 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149013 
>Unformatted:
