# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup github 1.0 github.setup cglogic gn 2124 v revision 0 categories devel license BSD maintainers {@barracuda156 gmail.com:vital.had} openmaintainer description Gn meta build framework – standalone version long_description GN is a meta-build system that generates build files for Ninja. \ GN is currently used as the build system for Chromium, Fuchsia and related projects. homepage https://gn.googlesource.com/gn checksums rmd160 cb2d071cd328363724468a5a50b6739f0c5f52ed \ sha256 91ab314affb97c61cd4037520e873438ffa356bf6bbbbfc086e7bc3e9e9a20e3 \ size 1068534 github.tarball_from archive set py_ver 3.11 set py_ver_nodot [string map {. {}} ${py_ver}] depends_build-append \ port:ninja \ port:python${py_ver_nodot} depends_run-append port:python${py_ver_nodot} configure.python ${prefix}/bin/python${py_ver} compiler.cxx_standard 2017 patchfiles 0001-gen.py-do-not-force-random-macOS-version.patch \ 0002-mac-scoped-do-not-use-objc-types-when-unsupported.patch \ 0003-Fix-undefined-version-due-to-configure-not-honoring-.patch \ 0004-build_config.h-sys_info.cc-args.cc-fix-PowerPC-defin.patch \ 0005-semaphore-use-libdispatch-only-where-it-actually-exi.patch post-patch { reinplace "s|python3|${configure.python}|" ${worksrcpath}/src/gn/exec_process_unittest.cc reinplace "s|/usr/bin/env python3|${configure.python}|" ${worksrcpath}/build/full_test.py ${worksrcpath}/build/gen.py reinplace "s|@DEPLOYMENT_TARGET@|${macosx_deployment_target}|" ${worksrcpath}/build/gen.py reinplace "s|@VERSION@|${version}|" ${worksrcpath}/src/gn/gn_main.cc ${worksrcpath}/src/gn/scope_per_file_provider.cc } configure.cmd ${configure.python} ./build/gen.py # --prefix is not accepted by the configure script. configure.pre_args-delete \ --prefix=${prefix} # You would expect this to be honored, but it is not, and the sources include non-existent header unconditionally. # It is fixed by a patch above. configure.args --no-last-commit-position # Upstream seems to support minimum 10.9. Build fails with -Werror on older systems: # desc_builder.cc: error: redundant move in return statement [-Werror=redundant-move] if {${os.platform} eq "darwin" && ${os.major} < 13} { configure.args-append \ --allow-warnings } build.cmd ${prefix}/bin/ninja build.dir ${worksrcpath}/out build.target build.env-append CC=${configure.cc} CXX=${configure.cxx} destroot { copy ${worksrcpath}/out/${name} ${destroot}${prefix}/bin/ set docdir ${prefix}/share/doc/${name} xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} AUTHORS LICENSE OWNERS README.md ${destroot}${docdir} copy ${worksrcpath}/docs ${destroot}${docdir} } test.run yes test.cmd ${worksrcpath}/out/gn_unittests test.target