From nobody@FreeBSD.org  Wed Feb  9 00:03:41 2011
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 95CAD1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  9 Feb 2011 00:03:41 +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 7A3B18FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  9 Feb 2011 00:03:41 +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 p1903eMS070622
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 9 Feb 2011 00:03:40 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p1903eOs070618;
	Wed, 9 Feb 2011 00:03:40 GMT
	(envelope-from nobody)
Message-Id: <201102090003.p1903eOs070618@red.freebsd.org>
Date: Wed, 9 Feb 2011 00:03:40 GMT
From: Grzegorz Blach <magik@roorback.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: new port: devel/ninja - a small build system similar to make
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         154603
>Category:       ports
>Synopsis:       new port: devel/ninja - a small build system similar to make
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 09 00:10:11 UTC 2011
>Closed-Date:    Sun Feb 13 11:11:44 UTC 2011
>Last-Modified:  Sun Feb 13 11:20:04 UTC 2011
>Originator:     Grzegorz Blach
>Release:        8.2-RC2
>Organization:
>Environment:
FreeBSD silver.nine 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #6 r218099: Sun Jan 30 18:56:31 CET 2011     magik@silver.nine:/usr/obj/usr/src/sys/SILVER  amd64

>Description:
Ninja is a small build system closest in spirit to Make.

Details on https://github.com/martine/ninja

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	devel/ninja
#	devel/ninja/pkg-descr
#	devel/ninja/Makefile
#	devel/ninja/distinfo
#
echo c - devel/ninja
mkdir -p devel/ninja > /dev/null 2>&1
echo x - devel/ninja/pkg-descr
sed 's/^X//' >devel/ninja/pkg-descr << '510a61658044b6a64cd5b5553e11f0ad'
XNinja is yet another build system. It takes as input the interdependencies
Xof files (typically source code and output executables) and orchestrates
Xbuilding them, quickly.
X
XNinja joins a sea of other build systems. Its distinguishing goal is to be
Xfast. It is born from my work on the Chromium browser project, which has
Xover 30,000 source files and whose other build systems (including one built
Xfrom custom non-recursive Makefiles) can take ten seconds to start building
Xafter changing one file. Ninja is under a second.
X
XWWW: https://github.com/martine/ninja
510a61658044b6a64cd5b5553e11f0ad
echo x - devel/ninja/Makefile
sed 's/^X//' >devel/ninja/Makefile << 'a4d06ad0c75a4dd311db1c69e561998c'
X# New ports collection makefile for:	ninja
X# Date created:				08 February 2011
X# Whom:					Grzegorz Blach <magik@roorback.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	ninja
XPORTVERSION=	20110208
XCATEGORIES=	devel
XMASTER_SITES=	http://files.roorback.net/src/
X
XMAINTAINER=	magik@roorback.net
XCOMMENT=	Ninja is a small build system closest in spirit to Make
X
XLIB_DEPENDS=	execinfo.1:${PORTSDIR}/devel/libexecinfo
X
XLICENSE=	ASL
XCONFLICTS=	irc/ninja-[0-9]*
X
XPLIST_FILES=	bin/ninja
X
XDOCSDIR=	${PREFIX}/share/doc/ninja
XPORTDOCS=	COPYING HACKING README manual.asciidoc todo
X
Xpost-patch:
X	@${REINPLACE_CMD} \
X	    -e 's|/bin/bash|/bin/sh|' \
X	    -e 's|conf_cflags = -O2|conf_cflags = ${CFLAGS} -I${LOCALBASE}/include|' \
X	    -e 's|conf_ldflags = -s|conf_ldflags = -s -L${LOCALBASE}/lib -lexecinfo|' \
X	    -e 's|g++|g++ -I${LOCALBASE}/include -L${LOCALBASE}/lib -lexecinfo|' \
X	    ${WRKSRC}/bootstrap.sh
X
Xdo-build:
X	@(cd ${WRKSRC}; ./bootstrap.sh)
X
Xdo-install:
X	@${INSTALL} -m 755 ${WRKSRC}/ninja ${PREFIX}/bin
X	@${MKDIR} ${DOCSDIR}
X	@(cd ${WRKSRC}; ${INSTALL} -m 644 ${PORTDOCS} ${DOCSDIR})
X
X.include <bsd.port.mk>
a4d06ad0c75a4dd311db1c69e561998c
echo x - devel/ninja/distinfo
sed 's/^X//' >devel/ninja/distinfo << '301aa92f68e218809c48ef64b6b4b3ea'
XSHA256 (ninja-20110208.tar.gz) = 0b4ce3a9b9755479b7e34e7da6a7dfbf6e49df0a38e0553bda1e2565cbba8b99
XSIZE (ninja-20110208.tar.gz) = 46644
301aa92f68e218809c48ef64b6b4b3ea
exit



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Wed Feb 9 02:48:41 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154603 
State-Changed-From-To: open->feedback 
State-Changed-By: miwi 
State-Changed-When: Thu Feb 10 16:33:20 UTC 2011 
State-Changed-Why:  
hi, 

port fails on 7.X and dosen't respect NOPORTDOCS/EXAMPLES please fix and 
resend 


http://64bit.miwibox.org/index.php?action=describe_port&id=2578 
http://32bit.miwibox.org/index.php?action=describe_port&id=2593 


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

From: Grzegorz Blach <magik@roorback.net>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Cc:  
Subject: Re: ports/154603: new port: devel/ninja - a small build system similar
 to make
Date: Thu, 10 Feb 2011 20:12:28 +0100

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 Changes:
 - - Fixed build on 7.X
 - - Respected NOPORTDOCS
 - - Added patch for recognizing number of cpus on FreeBSD
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (FreeBSD)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iQEcBAEBAgAGBQJNVDicAAoJEFCzIDMxqoILWSAIAI4y0RPefPoQTV6yNYWga0eA
 r6C7hU0xIaFLw4xzdf/l2TfvOGQXfa9s0bJPi1BGNhD307OiHlh84LQbl6Bc5kNC
 062NQSADBUhrwEhWyLlURY30UbfPpvj0KRJArOqdRbEs6+/q7phPBVTqQnoDRgps
 bFfgFSmGw6N9ebk8RDgzgp/KqxxolXWIO0PzD1nU9ehyZ8hlPp5wvZDJMgxNJ0XH
 qzidrlmgLxz2XC2jmevf2YBis3I9Y8ccgoq/x/SAm/QAhlXnjwj9dW+BRz6kf14W
 9v1O1UWnc8bv/dW0yFzRVbzNyZGEMtPdC9bJ6sluA0/zic0tRDWxJAJeiD2qXZ4=
 =y4cz
 -----END PGP SIGNATURE-----

From: Grzegorz Blach <magik@roorback.net>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Cc:  
Subject: Re: ports/154603: new port: devel/ninja - a small build system similar
 to make
Date: Fri, 11 Feb 2011 17:14:25 +0100

 This is a multi-part message in MIME format.
 --------------050501030008010101080306
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 Forgotten attachment
 
 --------------050501030008010101080306
 Content-Type: text/plain;
  name="ninja.shar.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="ninja.shar.txt"
 
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	devel/ninja
 #	devel/ninja/pkg-descr
 #	devel/ninja/files
 #	devel/ninja/files/patch-build.ninja
 #	devel/ninja/files/patch-src-ninja.cc
 #	devel/ninja/Makefile
 #	devel/ninja/distinfo
 #
 echo c - devel/ninja
 mkdir -p devel/ninja > /dev/null 2>&1
 echo x - devel/ninja/pkg-descr
 sed 's/^X//' >devel/ninja/pkg-descr << '510a61658044b6a64cd5b5553e11f0ad'
 XNinja is yet another build system. It takes as input the interdependencies
 Xof files (typically source code and output executables) and orchestrates
 Xbuilding them, quickly.
 X
 XNinja joins a sea of other build systems. Its distinguishing goal is to be
 Xfast. It is born from my work on the Chromium browser project, which has
 Xover 30,000 source files and whose other build systems (including one built
 Xfrom custom non-recursive Makefiles) can take ten seconds to start building
 Xafter changing one file. Ninja is under a second.
 X
 XWWW: https://github.com/martine/ninja
 510a61658044b6a64cd5b5553e11f0ad
 echo c - devel/ninja/files
 mkdir -p devel/ninja/files > /dev/null 2>&1
 echo x - devel/ninja/files/patch-build.ninja
 sed 's/^X//' >devel/ninja/files/patch-build.ninja << '01e1d7c668d097f67fd7e701790ead03'
 X--- build.ninja.orig	2011-02-10 19:29:29.000000000 +0100
 X+++ build.ninja	2011-02-10 19:29:33.000000000 +0100
 X@@ -24,7 +24,7 @@
 X   description = CC $out
 X 
 X rule ar
 X-  command = ar crsT $out $in
 X+  command = ar crs $out $in
 X   description = AR $out
 X 
 X rule link
 01e1d7c668d097f67fd7e701790ead03
 echo x - devel/ninja/files/patch-src-ninja.cc
 sed 's/^X//' >devel/ninja/files/patch-src-ninja.cc << '5e7698b3317f87584cb7ef199b09e282'
 X--- src/ninja.orig	2011-02-10 17:21:11.000000000 +0200
 X+++ src/ninja.cc	2011-02-10 17:21:43.000000000 +0200
 X@@ -20,6 +20,9 @@
 X #include <stdio.h>
 X #include <string.h>
 X #include <sys/stat.h>
 X+#if defined(__APPLE__) || defined(__FreeBSD__)
 X+#include <sys/sysctl.h>
 X+#endif
 X #include <sys/types.h>
 X 
 X #include "build.h"
 X@@ -64,6 +67,7 @@ void usage(const BuildConfig& config) {
 X int GuessParallelism() {
 X   int processors = 0;
 X 
 X+#if defined(linux)
 X   const char kProcessorPrefix[] = "processor\t";
 X   char buf[16 << 10];
 X   FILE* f = fopen("/proc/cpuinfo", "r");
 X@@ -74,6 +78,12 @@ int GuessParallelism() {
 X       ++processors;
 X   }
 X   fclose(f);
 X+#elif defined(__APPLE__) || defined(__FreeBSD__)
 X+  size_t procSize = sizeof(processors);
 X+  int name[] = {CTL_HW, HW_NCPU};
 X+  if (sysctl(name, sizeof(name) / sizeof(int), &processors, &procSize, NULL, 0))
 X+    return 2;
 X+#endif
 X 
 X   switch (processors) {
 X   case 0:
 5e7698b3317f87584cb7ef199b09e282
 echo x - devel/ninja/Makefile
 sed 's/^X//' >devel/ninja/Makefile << 'a4d06ad0c75a4dd311db1c69e561998c'
 X# New ports collection makefile for:	ninja
 X# Date created:				08 February 2011
 X# Whom:					Grzegorz Blach <magik@roorback.net>
 X#
 X# $FreeBSD$
 X#
 X
 XPORTNAME=	ninja
 XPORTVERSION=	20110208
 XCATEGORIES=	devel
 XMASTER_SITES=	http://files.roorback.net/src/
 X
 XMAINTAINER=	magik@roorback.net
 XCOMMENT=	Ninja is a small build system closest in spirit to Make
 X
 XLIB_DEPENDS=	execinfo.1:${PORTSDIR}/devel/libexecinfo
 X
 XLICENSE=	ASL
 XCONFLICTS=	irc/ninja-[0-9]*
 X
 XPLIST_FILES=	bin/ninja
 XPORTDOCS=	COPYING HACKING README manual.asciidoc todo
 X
 Xpost-patch:
 X	@${REINPLACE_CMD} \
 X	    -e 's|/bin/bash|/bin/sh|' \
 X	    -e 's|conf_cflags = -O2|conf_cflags = ${CXXFLAGS} -I${LOCALBASE}/include|' \
 X	    -e 's|conf_ldflags = -s|conf_ldflags = -s -L${LOCALBASE}/lib -lexecinfo|' \
 X	    -e 's|g++|g++ -I${LOCALBASE}/include -L${LOCALBASE}/lib -lexecinfo|' \
 X	    ${WRKSRC}/bootstrap.sh
 X
 Xdo-build:
 X	@(cd ${WRKSRC}; ./bootstrap.sh)
 X
 Xdo-install:
 X	@${INSTALL} -m 755 ${WRKSRC}/ninja ${PREFIX}/bin
 X.if !defined(NOPORTDOCS)
 X	@${MKDIR} ${DOCSDIR}
 X	@(cd ${WRKSRC}; ${INSTALL} -m 644 ${PORTDOCS} ${DOCSDIR})
 X.endif
 X
 X.include <bsd.port.mk>
 a4d06ad0c75a4dd311db1c69e561998c
 echo x - devel/ninja/distinfo
 sed 's/^X//' >devel/ninja/distinfo << '301aa92f68e218809c48ef64b6b4b3ea'
 XSHA256 (ninja-20110208.tar.gz) = 0b4ce3a9b9755479b7e34e7da6a7dfbf6e49df0a38e0553bda1e2565cbba8b99
 XSIZE (ninja-20110208.tar.gz) = 46644
 301aa92f68e218809c48ef64b6b4b3ea
 exit
 
 
 --------------050501030008010101080306--
State-Changed-From-To: feedback->closed 
State-Changed-By: miwi 
State-Changed-When: Sun Feb 13 11:11:44 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/154603: commit references a PR
Date: Sun, 13 Feb 2011 11:11:16 +0000 (UTC)

 miwi        2011-02-13 11:10:59 UTC
 
   FreeBSD ports repository
 
   Modified files:
     devel                Makefile 
   Added files:
     devel/ninja          Makefile distinfo pkg-descr 
     devel/ninja/files    patch-build.ninja patch-src-ninja.cc 
   Log:
   Ninja is yet another build system. It takes as input the interdependencies
   of files (typically source code and output executables) and orchestrates
   building them, quickly.
   
   Ninja joins a sea of other build systems. Its distinguishing goal is to be
   fast. It is born from my work on the Chromium browser project, which has
   over 30,000 source files and whose other build systems (including one built
   from custom non-recursive Makefiles) can take ten seconds to start building
   after changing one file. Ninja is under a second.
   
   WWW: https://github.com/martine/ninja
   
   PR:             ports/154603
   Submitted by:   Grzegorz Blach <magik at roorback.net>
   
   Revision  Changes    Path
   1.4221    +1 -0      ports/devel/Makefile
   1.1       +42 -0     ports/devel/ninja/Makefile (new)
   1.1       +2 -0      ports/devel/ninja/distinfo (new)
   1.1       +11 -0     ports/devel/ninja/files/patch-build.ninja (new)
   1.1       +33 -0     ports/devel/ninja/files/patch-src-ninja.cc (new)
   1.1       +11 -0     ports/devel/ninja/pkg-descr (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:
