diff options
author | Matt Jolly <kangie@gentoo.org> | 2024-10-10 12:55:59 +1000 |
---|---|---|
committer | Matt Jolly <kangie@gentoo.org> | 2024-10-11 23:19:34 +1000 |
commit | a390d9d78b6208b24420aaaee21c804a833c5684 (patch) | |
tree | d165955357a46717eb74923f0727821c438ad2b7 /dev-build | |
parent | kde-frameworks/qqc2-desktop-style: 6.7.0 version bump (diff) | |
download | gentoo-a390d9d78b6208b24420aaaee21c804a833c5684.tar.gz gentoo-a390d9d78b6208b24420aaaee21c804a833c5684.tar.bz2 gentoo-a390d9d78b6208b24420aaaee21c804a833c5684.zip |
dev-build/gn: add 0.2200-r1; update Live
The -r1 ebuild has an updated patch that does not
remove `-DNDEBUG` from CFLAGS in the non-debug build
path.
This has not caused issues before however current Chromium
builds that are otherwise fine fail asserts resulting in
messages like:
`FATAL:command_gen.cc(###)] Check failed: !rule.empty().`
It is expected that this will eventually be resolved by
changes to GN or Chromium. For now, Chromium builds
and upstream don't seem to be running into any
issues with using very similar commits as part of
their current DEPS file.
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Diffstat (limited to 'dev-build')
-rw-r--r-- | dev-build/gn/files/gn-gen-r7.patch | 39 | ||||
-rw-r--r-- | dev-build/gn/gn-0.2200-r1.ebuild | 66 | ||||
-rw-r--r-- | dev-build/gn/gn-9999.ebuild | 2 |
3 files changed, 106 insertions, 1 deletions
diff --git a/dev-build/gn/files/gn-gen-r7.patch b/dev-build/gn/files/gn-gen-r7.patch new file mode 100644 index 000000000000..f49236021406 --- /dev/null +++ b/dev-build/gn/files/gn-gen-r7.patch @@ -0,0 +1,39 @@ +From 74f21d84b06e63cd558a5e69f8195b5f93230a2f Mon Sep 17 00:00:00 2001 +From: Matt Jolly <kangie@gentoo.org> +Date: Thu, 10 Oct 2024 12:23:12 +1000 +Subject: [PATCH] Update patch to v7 + +--- + build/gen.py | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/build/gen.py b/build/gen.py +index d1c649cb..104ce569 100755 +--- a/build/gen.py ++++ b/build/gen.py +@@ -432,10 +432,10 @@ def WriteGNNinja(path, platform, host, options, args_list): + cflags.extend(['-D_LIBCPP_DEBUG=1', '-D_GLIBCXX_DEBUG=1']) + else: + cflags.append('-DNDEBUG') +- cflags.append('-O3') +- if options.no_strip: +- cflags.append('-g') +- ldflags.append('-O3') ++# cflags.append('-O3') ++# if options.no_strip: ++# cflags.append('-g') ++# ldflags.append('-O3') + # Use -fdata-sections and -ffunction-sections to place each function + # or data item into its own section so --gc-sections can eliminate any + # unused functions and data items. +@@ -482,7 +482,6 @@ def WriteGNNinja(path, platform, host, options, args_list): + '-D_FILE_OFFSET_BITS=64', + '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS', + '-pthread', +- '-pipe', + '-fno-exceptions', + '-fno-rtti', + '-fdiagnostics-color', +-- +2.46.2 + diff --git a/dev-build/gn/gn-0.2200-r1.ebuild b/dev-build/gn/gn-0.2200-r1.ebuild new file mode 100644 index 000000000000..dfc6073b0e1a --- /dev/null +++ b/dev-build/gn/gn-0.2200-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 2018-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..13} ) + +inherit edo ninja-utils python-any-r1 toolchain-funcs + +DESCRIPTION="GN is a meta-build system that generates build files for Ninja" +HOMEPAGE="https://gn.googlesource.com/" +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gn.googlesource.com/gn" +else + # The version number is derived from `git describe HEAD --abbrev=12` + SRC_URI="https://deps.gentoo.zip/dev-build/gn/${P}.tar.xz" + KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" +fi + +LICENSE="BSD" +SLOT="0" + +BDEPEND=" + ${PYTHON_DEPS} + app-alternatives/ninja +" + +PATCHES=( + "${FILESDIR}"/gn-gen-r7.patch +) + +pkg_setup() { + : +} + +src_configure() { + python_setup + tc-export AR CC CXX + unset CFLAGS + set -- ${EPYTHON} build/gen.py --no-last-commit-position --no-strip --no-static-libstdc++ --allow-warnings + edo "$@" + cat >out/last_commit_position.h <<-EOF || die + #ifndef OUT_LAST_COMMIT_POSITION_H_ + #define OUT_LAST_COMMIT_POSITION_H_ + #define LAST_COMMIT_POSITION_NUM ${PV##0.} + #define LAST_COMMIT_POSITION "${PV}" + #endif // OUT_LAST_COMMIT_POSITION_H_ + EOF +} + +src_compile() { + eninja -C out gn +} + +src_test() { + eninja -C out gn_unittests + out/gn_unittests || die +} + +src_install() { + dobin out/gn + einstalldocs + + insinto /usr/share/vim/vimfiles + doins -r misc/vim/{autoload,ftdetect,ftplugin,syntax} +} diff --git a/dev-build/gn/gn-9999.ebuild b/dev-build/gn/gn-9999.ebuild index a252da4d6f3f..dfc6073b0e1a 100644 --- a/dev-build/gn/gn-9999.ebuild +++ b/dev-build/gn/gn-9999.ebuild @@ -26,7 +26,7 @@ BDEPEND=" " PATCHES=( - "${FILESDIR}"/gn-gen-r6.patch + "${FILESDIR}"/gn-gen-r7.patch ) pkg_setup() { |