svn commit: r493058 - in head/devel: . gn gn/files

Kurt Jaeger pi at FreeBSD.org
Sat Feb 16 18:52:39 UTC 2019


Author: pi
Date: Sat Feb 16 18:52:37 2019
New Revision: 493058
URL: https://svnweb.freebsd.org/changeset/ports/493058

Log:
  New port: devel/gn
  
  GN is a meta-build system that generates build files for Ninja.
  
  WWW: https://gn.googlesource.com/gn/
  
  PR:		234309
  Submitted by:	Oleh Hushchenkov <o.hushchenkov at gmail.com>

Added:
  head/devel/gn/
  head/devel/gn/Makefile   (contents, props changed)
  head/devel/gn/distinfo   (contents, props changed)
  head/devel/gn/files/
  head/devel/gn/files/patch-build_gen.py   (contents, props changed)
  head/devel/gn/pkg-descr   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Sat Feb 16 18:37:12 2019	(r493057)
+++ head/devel/Makefile	Sat Feb 16 18:52:37 2019	(r493058)
@@ -814,6 +814,7 @@
     SUBDIR += glslang
     SUBDIR += glui
     SUBDIR += gmake
+    SUBDIR += gn
     SUBDIR += gnatcoll
     SUBDIR += gnatpython
     SUBDIR += gnome-builder

Added: head/devel/gn/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gn/Makefile	Sat Feb 16 18:52:37 2019	(r493058)
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+PORTNAME=	gn
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1529
+CATEGORIES=	devel
+
+MAINTAINER=	o.hushchenkov at gmail.com
+COMMENT=	Gn meta build framework - standalone version
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		compiler:c++14-lang ninja python:2.7,build
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	cglogic # mirror
+
+CONFLICTS_INSTALL=	chromimum-gn*
+
+PLIST_FILES=	bin/gn
+
+do-configure:
+	cd ${WRKSRC} && GN_VERSION=${PORTVERSION} ${PYTHON_CMD} build/gen.py
+
+do-build:
+	cd ${WRKSRC} && ninja -C out
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/out/gn ${STAGEDIR}${PREFIX}/bin
+
+do-test: build
+	cd ${WRKSRC} && ./out/gn_unittests
+
+.include <bsd.port.mk>

Added: head/devel/gn/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gn/distinfo	Sat Feb 16 18:52:37 2019	(r493058)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1550242353
+SHA256 (cglogic-gn-v1529_GH0.tar.gz) = 8f292d3c3a6ea6d6f9b6d41f6e75c360414a7283796905d1b66f41617e2345d2
+SIZE (cglogic-gn-v1529_GH0.tar.gz) = 916888

Added: head/devel/gn/files/patch-build_gen.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gn/files/patch-build_gen.py	Sat Feb 16 18:52:37 2019	(r493058)
@@ -0,0 +1,29 @@
+--- build/gen.py.orig	2019-02-12 17:36:05 UTC
++++ build/gen.py
+@@ -115,24 +115,15 @@ def main(argv):
+ 
+ 
+ def GenerateLastCommitPosition(host, header):
+-  ROOT_TAG = 'initial-commit'
+-  describe_output = subprocess.check_output(
+-      ['git', 'describe', 'HEAD', '--match', ROOT_TAG], shell=host.is_windows(),
+-      cwd=REPO_ROOT)
+-  mo = re.match(ROOT_TAG + '-(\d+)-g([0-9a-f]+)', describe_output)
+-  if not mo:
+-    raise ValueError(
+-        'Unexpected output from git describe when generating version header')
+-
+   contents = '''// Generated by build/gen.py.
+ 
+ #ifndef OUT_LAST_COMMIT_POSITION_H_
+ #define OUT_LAST_COMMIT_POSITION_H_
+ 
+-#define LAST_COMMIT_POSITION "%s (%s)"
++#define LAST_COMMIT_POSITION "%s"
+ 
+ #endif  // OUT_LAST_COMMIT_POSITION_H_
+-''' % (mo.group(1), mo.group(2))
++''' % (os.environ['GN_VERSION'])
+ 
+   # Only write/touch this file if the commit position has changed.
+   old_contents = ''

Added: head/devel/gn/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gn/pkg-descr	Sat Feb 16 18:52:37 2019	(r493058)
@@ -0,0 +1,3 @@
+GN is a meta-build system that generates build files for Ninja.
+
+WWW: https://gn.googlesource.com/gn/


More information about the svn-ports-all mailing list