From nobody@FreeBSD.org  Wed Jan 25 18:42:54 2012
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 351DC106576C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Jan 2012 18:42:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 23C8D8FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Jan 2012 18:42:54 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q0PIgrvS091169
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Jan 2012 18:42:53 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q0PIgrI1091161;
	Wed, 25 Jan 2012 18:42:53 GMT
	(envelope-from nobody)
Message-Id: <201201251842.q0PIgrI1091161@red.freebsd.org>
Date: Wed, 25 Jan 2012 18:42:53 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] [devel/talloc,devel/tdb] fix compile with MAKE_JOBS_UNSAFE=y
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         164488
>Category:       ports
>Synopsis:       [patch] devel/talloc,devel/tdb: fix compile with MAKE_JOBS_UNSAFE=y
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    timur
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 25 18:50:01 UTC 2012
>Closed-Date:    Fri Oct 19 04:46:08 UTC 2012
>Last-Modified:  Sun Feb 03 22:30:22 UTC 2013
>Originator:     Garrett Cooper
>Release:        n/a
>Organization:
n/a
>Environment:
n/a
>Description:
There's a bug in the ports Makefile for both databases/tdb and devel/talloc where if MAKE_JOBS_UNSAFE=y is specified when compiling the port it will fail when passing -j to the waf script as it's passing an empty _MAKE_JOBS value.

The check in the ports Makefile should instead check for _MAKE_JOBS being empty as this it what the code in bsd.port.mk currently does when either DISABLE_MAKE_JOBS or MAKE_JOBS_UNSAFE is specified on the command line.
>How-To-Repeat:
make -C /usr/ports/devel/talloc MAKE_JOBS_UNSAFE=y all
>Fix:


Patch attached with submission follows:

--- databases/tdb/Makefile	2012-01-25 10:37:01.794064453 -0800
+++ databases/tdb/Makefile	2012-01-25 10:37:16.549068673 -0800
@@ -57,7 +57,7 @@
 
 CONFIGURE_ARGS+=	--mandir=${MANPREFIX}/man
 
-.if !defined(DISABLE_MAKE_JOBS)
+.if !empty(_MAKE_JOBS)
 CONFIGURE_ARGS+=	--jobs=${MAKE_JOBS_NUMBER}
 _MAKE_JOBS=		--jobs=${MAKE_JOBS_NUMBER}
 .endif
--- devel/talloc/Makefile	2012-01-25 10:27:00.001064924 -0800
+++ devel/talloc/Makefile	2012-01-25 10:36:46.282447100 -0800
@@ -50,7 +50,7 @@
 
 CONFIGURE_ARGS+=	--mandir=${MANPREFIX}/man
 
-.if !defined(DISABLE_MAKE_JOBS)
+.if !empty(_MAKE_JOBS)
 CONFIGURE_ARGS+=	--jobs=${MAKE_JOBS_NUMBER}
 _MAKE_JOBS=		--jobs=${MAKE_JOBS_NUMBER}
 .endif


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->timur 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Jan 25 18:50:17 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Garrett Cooper <yaneurabeya@gmail.com>
To: bug-followup@FreeBSD.org, yanegomi@gmail.com
Cc:  
Subject: Re: ports/164488: [patch] devel/talloc,devel/tdb: fix compile with MAKE_JOBS_UNSAFE=y
Date: Wed, 25 Jan 2012 11:46:59 -0800

     I noticed looking at the code that this would make things
 recursive. There has to be a better way to solve this problem (maybe
 check for !defined(DISABLE_MAKE_JOBS) && !defined(MAKE_JOBS_UNSAFE)
 like what bsd.ports.mk current does)?
 Thanks!
 -Garrett
State-Changed-From-To: open->closed 
State-Changed-By: timur 
State-Changed-When: Fri Oct 19 04:46:07 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

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