Index: devel/fossil/Makefile
===================================================================
--- devel/fossil/Makefile	(revision 416979)
+++ devel/fossil/Makefile	(working copy)
@@ -31,7 +31,8 @@
 STATIC_CONFIGURE_ON=	--static
 FUSE_CONFIGURE_OFF=	--disable-fusefs
 FUSE_LIB_DEPENDS=	libfuse.so:sysutils/fusefs-libs
-FUSE_CFLAGS=		-I${LOCALBASE}/include -L${LOCALBASE}/lib
+FUSE_CFLAGS=		-I${LOCALBASE}/include
+FUSE_LDFLAGS=		-L${LOCALBASE}/lib
 
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/fossil
Index: devel/fossil/files/patch-autosetup_cc.tcl
===================================================================
--- devel/fossil/files/patch-autosetup_cc.tcl	(nonexistent)
+++ devel/fossil/files/patch-autosetup_cc.tcl	(working copy)
@@ -0,0 +1,11 @@
+--- autosetup/cc.tcl.orig	2016-06-17 21:17:53 UTC
++++ autosetup/cc.tcl
+@@ -501,6 +501,8 @@ proc cctest {args} {
+ 	if {!$opts(-link)} {
+ 		set tmp conftest__.o
+ 		lappend cmdline -c
++	} else {
++		lappend cmdline {*}[get-define LDFLAGS]
+ 	}
+ 	lappend cmdline {*}$opts(-cflags) {*}[get-define cc-default-debug ""]
+