From beyert@fastmail.fm  Tue Nov 19 06:09:44 2013
Return-Path: <beyert@fastmail.fm>
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 3A838CA9
	for <FreeBSD-gnats-submit@FreeBSD.org>; Tue, 19 Nov 2013 06:09:44 +0000 (UTC)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 10D6D262F
	for <FreeBSD-gnats-submit@FreeBSD.org>; Tue, 19 Nov 2013 06:09:43 +0000 (UTC)
Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42])
	by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 9332920DF3;
	Tue, 19 Nov 2013 01:09:42 -0500 (EST)
Received: from frontend2 ([10.202.2.161])
  by compute2.internal (MEProxy); Tue, 19 Nov 2013 01:09:42 -0500
Received: from hypercube.aeonnet.fastmail.fm (unknown [76.90.217.240])
	by mail.messagingengine.com (Postfix) with ESMTPA id 003136800FF;
	Tue, 19 Nov 2013 01:09:41 -0500 (EST)
Message-Id: <87sius53do.wl@fastmail.fm>
Date: Mon, 18 Nov 2013 22:09:39 -0800
From: Timothy Beyer <beyert@cs.ucr.edu>
To: FreeBSD GNATS Submit <FreeBSD-gnats-submit@FreeBSD.org>
Cc: Timothy Beyer <beyert@cs.ucr.edu>
Subject: fix build: devel/bam

>Number:         184069
>Category:       ports
>Synopsis:       update port: devel/bam
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 19 06:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Timothy Beyer
>Release:        FreeBSD 9.2-RELEASE amd64
>Organization:
no organization
>Environment:
System: FreeBSD hypercube.aeonnet 9.2-RELEASE FreeBSD 9.2-RELEASE #0: Tue Oct 1 00:41:23 PDT 2013 root@hypercube.aeonnet:/usr/obj/usr/src/sys/CUSTOM-9.2 amd64

>Description:

- fix build with GCC, avoid possibility of potentially broken build for both gcc and clang

>How-To-Repeat:

    Apply patch and build port

>Fix:

    The included patch

--- bam.diff begins here ---
diff -urN bam.orig/Makefile bam/Makefile
--- bam.orig/Makefile	2013-09-20 10:03:26.000000000 -0700
+++ bam/Makefile	2013-11-18 22:03:20.000000000 -0800
@@ -14,16 +14,24 @@
 
 FETCH_ARGS=	"-Fpr"
 USE_BZIP2=	yes
+.if !defined(CC) || !${CC:T:Mclang}
+USE_GCC=	any
+.endif
 
 PLIST_FILES=	bin/bam
 
 NO_STAGE=	yes
+
 do-build:
 .if defined(CC) && ${CC:T:Mclang}
-	@${REINPLACE_CMD} -e 's|-ldl||g' ${WRKSRC}/make_unix_clang.sh
+	@${REINPLACE_CMD} -e "s|src/tools/txt2c|${WRKSRC}/src/tools/txt2c|g" \
+		${WRKSRC}/make_unix_clang.sh
+	@${REINPLACE_CMD} -e "s|-ldl||g" ${WRKSRC}/make_unix_clang.sh
 	(cd ${WRKSRC} && ${SH} make_unix_clang.sh)
 .else
-	@${REINPLACE_CMD} -e 's|-ldl||g' ${WRKSRC}/make_unix.sh
+	@${REINPLACE_CMD} -e "s|src/tools/txt2c|${WRKSRC}/src/tools/txt2c|g" \
+		${WRKSRC}/make_unix.sh
+	@${REINPLACE_CMD} -e "s|-ldl||g" ${WRKSRC}/make_unix.sh
 	(cd ${WRKSRC} && ${SH} make_unix.sh)
 .endif
 
--- bam.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
