diff --git a/devel/gn/Makefile b/devel/gn/Makefile index eae375a18de0..5a3ce1977192 100644 --- a/devel/gn/Makefile +++ b/devel/gn/Makefile @@ -1,43 +1,44 @@ # Created by: Oleh Hushchenkov PORTNAME= gn DISTVERSIONPREFIX= v DISTVERSION= 1962 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= o.hushchenkov@gmail.com COMMENT= Gn meta build framework - standalone version 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/files/patch-build_gen.py b/devel/gn/files/patch-build_gen.py index 402cef5f9f7e..8175fefbfe23 100644 --- a/devel/gn/files/patch-build_gen.py +++ b/devel/gn/files/patch-build_gen.py @@ -1,32 +1,41 @@ - .git/ is missing in archive, so use version from environment ---- build/gen.py.orig 2021-12-18 16:25:54 UTC +--- build/gen.py.orig 2021-12-21 20:25:21 UTC +++ build/gen.py @@ -213,25 +213,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) - 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 + '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',