dev-build/gn: add 0.2235

Update gn-gen patch to address some changes that
are pending upstream.

Signed-off-by: Matt Jolly <kangie@gentoo.org>
This commit is contained in:
Matt Jolly
2025-05-18 14:34:52 +10:00
parent 258eb4854f
commit ef7d165cf5
4 changed files with 107 additions and 2 deletions
+1
View File
@@ -7,3 +7,4 @@ DIST gn-0.2200.tar.xz 753048 BLAKE2B 9c57e21a5cab2a5df92aee78baacb8260de0793689a
DIST gn-0.2207.tar.xz 753460 BLAKE2B 2c3cbaf9fb80c1bef15601d7ef0470446e7343b3037bd43a1ae205fe99183664a5ea45585b3591d5fb16f42ba85b922219da1949cc5663f1862341833d6b4216 SHA512 fc45508f6f6a50f21951b107177b284859dccc846a57bb40a54da0039ca2698dc30bf3d36d8d6de57755c3e38d970a8acbefef8c09dd118d1172d62feb1d3673
DIST gn-0.2217.tar.xz 754264 BLAKE2B 671cbe6d3767bf108604cd13fa1363339f1688ed9b2b59a8470225e077762bcc77d491636ba22e73e00ebeaf5054260cbce4e01f4db8cf30b7bf06ecbcb41151 SHA512 9f9872f35c1e8d7b33996377413c81c1cc9d9873fd0e889155089ceb609e6382eae3d776bb3c0cb83fe7c285997f1eca63c2d1807ff895a716cdb52dfc905366
DIST gn-0.2227.tar.xz 755232 BLAKE2B f7430d4175a91d2f2d3991c346477ee06b450e81fd1424019d3b9316da5def5637db312c2ed68eb392e71f3e0279d894f25f7c44e91b6f1e3e919d2bfaef5e19 SHA512 807bb74f5c9bb16a3f1d871bb1f31ee5415dd3e1ed16acbd0105438f1d8b562d77d44192bc968dbf5486b26de7a103ccf3c9aad4ad84c596509d1c5495af27b4
DIST gn-0.2235.tar.xz 755696 BLAKE2B a66577a1ce3dc726f4d6b06221428a8fdbced5c9f57bde1cd7538fbc3cef1c81b9a40a386d9f317d24c9400d0a8cca2c593013f4496ba34b6f3a26e49ed6569a SHA512 2acc5937ff684180a6529d80d97ed7b615e43a1e4b58544ae5e00ec6021c51aa99fb9150cb6642c3bebe4545af957f890a32bacc3942948c8b1a47efd30b3db7
+38
View File
@@ -0,0 +1,38 @@
https://gn-review.googlesource.com/c/gn/+/18760 (partially, at least)
From: Matt Jolly <kangie@gentoo.org>
Date: Sat, 17 May 2025 12:38:19 +1000
Subject: [PATCH] Update patch to v8
--- 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',
@@ -524,8 +524,6 @@
'-Wno-implicit-fallthrough',
'-Wno-redundant-move',
'-Wno-unused-variable',
- '-Wno-format', # Use of %llx, which is supported by _UCRT, false positive
- '-Wno-strict-aliasing', # Dereferencing punned pointer
'-Wno-cast-function-type', # Casting FARPROC to RegDeleteKeyExPtr
])
+66
View File
@@ -0,0 +1,66 @@
# Copyright 2018-2025 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-r8.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}
}
+2 -2
View File
@@ -1,4 +1,4 @@
# Copyright 2018-2024 Gentoo Authors
# Copyright 2018-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -26,7 +26,7 @@ BDEPEND="
"
PATCHES=(
"${FILESDIR}"/gn-gen-r7.patch
"${FILESDIR}"/gn-gen-r8.patch
)
pkg_setup() {