diff --git a/devel/gn/Makefile b/devel/gn/Makefile index 783c53f27612..cd72a8827c92 100644 --- a/devel/gn/Makefile +++ b/devel/gn/Makefile @@ -1,43 +1,42 @@ PORTNAME= gn DISTVERSIONPREFIX= v -DISTVERSION= 1962 -PORTREVISION= 1 +DISTVERSION= 2072 CATEGORIES= devel MAINTAINER= o.hushchenkov@gmail.com COMMENT= Gn meta build framework - standalone version WWW= https://gn.googlesource.com/gn/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_riscv64= fails to build: ../src/util/build_config.h:168:2: Please add support for your architecture in build_config.h USES= alias compiler:c++17-lang ninja python:build shebangfix USE_GITHUB= yes GH_ACCOUNT= cglogic # mirror SHEBANG_FILES= ${CONFIGURE_SCRIPT} HAS_CONFIGURE= yes CONFIGURE_SCRIPT= build/gen.py CONFIGURE_ARGS= --platform freebsd ${WITH_DEBUG:D--debug} CONFIGURE_ENV= GN_VERSION=${PORTVERSION} CONFIGURE_OUTSOURCE= yes ALL_TARGET= # empty CONFLICTS_INSTALL= chromium-gn CONFIGURE_WRKSRC= ${WRKSRC}/out # --out-path breaks "make test" PLIST_FILES= bin/${PORTNAME} post-patch: @${REINPLACE_CMD} 's/"python3"/"${PYTHON_CMD:T}"/' \ ${WRKSRC}/src/gn/exec_process_unittest.cc do-install: ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin do-test: ${TEST_WRKSRC}/gn_unittests .include diff --git a/devel/gn/distinfo b/devel/gn/distinfo index 39b4b96fb71b..4578c8f2513b 100644 --- a/devel/gn/distinfo +++ b/devel/gn/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1639844136 -SHA256 (cglogic-gn-v1962_GH0.tar.gz) = cd7393695af1160e71b59ea6e6bc51de7bb0c54d03dd93a8e6046239366cd387 -SIZE (cglogic-gn-v1962_GH0.tar.gz) = 1025892 +TIMESTAMP = 1668875475 +SHA256 (cglogic-gn-v2072_GH0.tar.gz) = db79ae073bcac3944c56f5f166c4b764a58c06594134c85b742bf859b42c5a66 +SIZE (cglogic-gn-v2072_GH0.tar.gz) = 1056984 diff --git a/devel/gn/files/patch-build_gen.py b/devel/gn/files/patch-build_gen.py index 8175fefbfe23..4c053b86c2e2 100644 --- a/devel/gn/files/patch-build_gen.py +++ b/devel/gn/files/patch-build_gen.py @@ -1,41 +1,41 @@ - .git/ is missing in archive, so use version from environment ---- build/gen.py.orig 2021-12-21 20:25:21 UTC +--- build/gen.py.orig 2022-11-19 16:33:38 UTC +++ build/gen.py -@@ -213,25 +213,16 @@ def main(argv): +@@ -216,25 +216,16 @@ 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) +- ['git', 'describe', 'HEAD', '--abbrev=12', '--match', ROOT_TAG], +- shell=host.is_windows(), cwd=REPO_ROOT) - mo = re.match(ROOT_TAG + '-(\d+)-g([0-9a-f]+)', describe_output.decode()) - 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_NUM %s -#define LAST_COMMIT_POSITION "%s (%s)" +#define LAST_COMMIT_POSITION "%s" #endif // OUT_LAST_COMMIT_POSITION_H_ -''' % (mo.group(1), mo.group(1), mo.group(2)) +''' % (os.environ['GN_VERSION'], os.environ['GN_VERSION']) # Only write/touch this file if the commit position has changed. old_contents = '' -@@ -274,7 +265,7 @@ def WriteGenericNinja(path, static_libraries, executab +@@ -277,7 +268,7 @@ def WriteGenericNinja(path, static_libraries, executab 'msys': 'build_linux.ninja.template', 'darwin': 'build_mac.ninja.template', 'linux': 'build_linux.ninja.template', - 'freebsd': 'build_linux.ninja.template', + 'freebsd': 'build_openbsd.ninja.template', 'aix': 'build_aix.ninja.template', 'openbsd': 'build_openbsd.ninja.template', 'haiku': 'build_haiku.ninja.template', diff --git a/devel/gn/files/patch-src_gn_args.cc b/devel/gn/files/patch-src_gn_args.cc index 7e2fc6f9a3fc..628332310aaa 100644 --- a/devel/gn/files/patch-src_gn_args.cc +++ b/devel/gn/files/patch-src_gn_args.cc @@ -1,11 +1,11 @@ ---- src/gn/args.cc.orig 2021-12-17 12:22:18 UTC +--- src/gn/args.cc.orig 2022-11-19 16:37:02 UTC +++ src/gn/args.cc -@@ -360,7 +360,7 @@ void Args::SetSystemVarsLocked(Scope* dest) const { +@@ -362,7 +362,7 @@ void Args::SetSystemVarsLocked(Scope* dest) const { arch = kMips64; else if (os_arch == "s390x") arch = kS390X; - else if (os_arch == "ppc64" || os_arch == "ppc64le") + else if (os_arch == "ppc64" || os_arch == "ppc64le" || os_arch == "powerpc") // We handle the endianness inside //build/config/host_byteorder.gni. // This allows us to use the same toolchain as ppc64 BE // and specific flags are included using the host_byteorder logic.