summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <sultan@gentoo.org>2021-11-03 17:48:38 +0100
committerStephan Hartmann <sultan@gentoo.org>2021-11-03 17:48:58 +0100
commit8729baea03c1267feb19fcea810489c836460483 (patch)
tree24fbf9e8b62c31dd56c029dabf1bdecb9d7c9226 /dev-util/gn
parentapp-text/gv: keyword ~arm64 (diff)
downloadgentoo-8729baea03c1267feb19fcea810489c836460483.tar.gz
gentoo-8729baea03c1267feb19fcea810489c836460483.tar.bz2
gentoo-8729baea03c1267feb19fcea810489c836460483.zip
dev-util/gn: bump to 0.1942
Bug: https://bugs.gentoo.org/821400 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'dev-util/gn')
-rw-r--r--dev-util/gn/Manifest1
-rw-r--r--dev-util/gn/files/gn-gen-r5.patch46
-rw-r--r--dev-util/gn/gn-0.1942.ebuild64
3 files changed, 111 insertions, 0 deletions
diff --git a/dev-util/gn/Manifest b/dev-util/gn/Manifest
index bb91def32a76..2e41b70c5b6f 100644
--- a/dev-util/gn/Manifest
+++ b/dev-util/gn/Manifest
@@ -1 +1,2 @@
DIST gn-0.1807.tar.xz 682644 BLAKE2B 5beb3c03b0ae467cb98eff2069ef6e4355cba56c57e2717139b698fa563efc404dd1cf0b3fd196f432ca3a13b0402e895b46407cb90bc16b63963710fd5be060 SHA512 82f468e389d08a46e582f816d056813af9bfc810ad0bd84f02731c17c0e2c6140a62e827b8a3c5f89eef467f9bcfc2e88dd7aed325a7955d8584e753fcd09103
+DIST gn-0.1942.tar.xz 706792 BLAKE2B 2cc3439c1765af9d8068c73f31bbd5bbc947bcf061e59ca3876d2a99687d1d26d6bfcef7cd5b897afb639b48a8a3d8e445b18a71494291368b5a2c0985126602 SHA512 bb2480fb18ff32b502a0448c7a5bf895b9ed4a27a269bf02481fa74b3046bf1c898623007284fbdf89735d1aebcd58ab6f9cfcea85d3652de86435794e2492b0
diff --git a/dev-util/gn/files/gn-gen-r5.patch b/dev-util/gn/files/gn-gen-r5.patch
new file mode 100644
index 000000000000..80966b3c7f5e
--- /dev/null
+++ b/dev-util/gn/files/gn-gen-r5.patch
@@ -0,0 +1,46 @@
+From ef45f2e73264e62ad3fb24d064453a17099da8d7 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sat, 14 Mar 2020 18:02:51 +0000
+Subject: [PATCH] Remove unwanted cflags/ldflags parameters
+
+---
+ build/gen.py | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/build/gen.py b/build/gen.py
+index 265b1f5..06c6d8b 100755
+--- a/build/gen.py
++++ b/build/gen.py
+@@ -343,11 +343,6 @@ def WriteGNNinja(path, platform, host, options):
+ if options.debug:
+ cflags.extend(['-O0', '-g'])
+ else:
+- cflags.append('-DNDEBUG')
+- 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.
+@@ -383,7 +378,6 @@ def WriteGNNinja(path, platform, host, options):
+ '-D_FILE_OFFSET_BITS=64',
+ '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS',
+ '-pthread',
+- '-pipe',
+ '-fno-exceptions',
+ '-fno-rtti',
+ '-fdiagnostics-color',
+@@ -411,9 +405,6 @@ def WriteGNNinja(path, platform, host, options):
+ '-Wno-cast-function-type', # Casting FARPROC to RegDeleteKeyExPtr
+ '-std=gnu++17',
+ ])
+- else:
+- # This is needed by libc++.
+- libs.append('-ldl')
+ elif platform.is_darwin():
+ min_mac_version_flag = '-mmacosx-version-min=10.9'
+ cflags.append(min_mac_version_flag)
+--
+2.32.0
+
diff --git a/dev-util/gn/gn-0.1942.ebuild b/dev-util/gn/gn-0.1942.ebuild
new file mode 100644
index 000000000000..0722a1480a04
--- /dev/null
+++ b/dev-util/gn/gn-0.1942.ebuild
@@ -0,0 +1,64 @@
+# Copyright 2018-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit 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/"
+SRC_URI="https://dev.gentoo.org/~sultan/distfiles/dev-util/gn/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="vim-syntax"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-util/ninja
+"
+
+PATCHES=(
+ "${FILESDIR}"/gn-gen-r5.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++
+ echo "$@" >&2
+ "$@" || die
+ 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
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles
+ doins -r misc/vim/{autoload,ftdetect,ftplugin,syntax}
+ fi
+}