summaryrefslogtreecommitdiff
path: root/dev-util/gn
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-11-13 13:10:00 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-11-13 13:10:00 +0000
commite9d044d4b9b71200a96adfa280848858c0f468c9 (patch)
tree1bd8ef816043a8cd340f1d774e79553a1a7d31d8 /dev-util/gn
parentfc2f1018fc323ef2c6572734a9b130427cba76a6 (diff)
gentoo resync : 13.11.2021
Diffstat (limited to 'dev-util/gn')
-rw-r--r--dev-util/gn/Manifest3
-rw-r--r--dev-util/gn/files/gn-gen-r5.patch46
-rw-r--r--dev-util/gn/gn-0.1943.ebuild64
3 files changed, 113 insertions, 0 deletions
diff --git a/dev-util/gn/Manifest b/dev-util/gn/Manifest
index 0bb42c4e27c6..ec9afb5c3367 100644
--- a/dev-util/gn/Manifest
+++ b/dev-util/gn/Manifest
@@ -1,4 +1,7 @@
AUX gn-gen-r4.patch 1559 BLAKE2B b92f487d4153ebd885d9cb1ca6889ca52b5afcccdb9a781fae568b861152a2cc3d9e61d5c406c5365311337a131fa99447528011af511b7aadd0975f692fe85b SHA512 b286651983f94894faf992da12a1ed51776c8207275e1b1e1776d0caf83615b02cb3d57198aec8b3736944b9cb8749028f79ebc7a700dd30babf122cfe5884d3
+AUX gn-gen-r5.patch 1563 BLAKE2B ff909ef01743ca36d866257ad3bc2a1ca7a4e894b6a0c7672d08d0e1cd412b1056477f77ab64c75fa67a5c21794cecdd87f6bb75ebd963fff0ee3599523c73f6 SHA512 bb18dc2900084ca15ee12addec56d32cce520cb0d229bddbb69e8da7cca144887a6eb7267ea449613505dca4cdeba8ef0e4e69595fc202289d2f3c5fed2e4971
DIST gn-0.1807.tar.xz 682644 BLAKE2B 5beb3c03b0ae467cb98eff2069ef6e4355cba56c57e2717139b698fa563efc404dd1cf0b3fd196f432ca3a13b0402e895b46407cb90bc16b63963710fd5be060 SHA512 82f468e389d08a46e582f816d056813af9bfc810ad0bd84f02731c17c0e2c6140a62e827b8a3c5f89eef467f9bcfc2e88dd7aed325a7955d8584e753fcd09103
+DIST gn-0.1943.tar.xz 706792 BLAKE2B 51889ad85e86e702c2690c5c23010d666ef0467be92d982e6dea2eec2e20774c04425900cad64672c7782bf36e62984e612c04ff0f1c7e9598f2877270cf8504 SHA512 4e3270e13e35fa0ede3c81b563b72a9e9baee18b6412d32603d3c7a327315ceea86dc28c9c3b01c9e9f4d520e222dfeabe152f946eb0947d9285359568934864
EBUILD gn-0.1807.ebuild 1270 BLAKE2B 8a5480578e8d7e7fca80018f33416ecd0b50fc5ef07ae4b6a230df73f1aab351c8fb094244ea2ecda1fa923d42ba9027d7c6d385ceb5b1d42eed037eb985d65d SHA512 314b48cfbdf1a7a73baac2d8e7e141bed9d740d7a75f9c7ebae372230c86f5bff6e1f288be248517f0473381ab95aad7805f7dbd83cc91f50b9da3ea8cd0093d
+EBUILD gn-0.1943.ebuild 1296 BLAKE2B aeabd2372704d1861b9cdab16e5b9ecfc5d9ae84419e80e7f170365aa757026cd81dab2f625f7141d40c27d39779b0b312556cfa8d5841874d25b42c3a63416b SHA512 6e6662163e194a72b7959725dc08d05b9b12a5f1d2ded55dc11609c34a4dd09e23afff049b1d31f81d338ffd36ca08977a5b2269dd733a9eb516d04a4d182625
MISC metadata.xml 221 BLAKE2B ce7615d8eda5f58e7729bf86156010821052ae580769c3be3922f1270f1211bc5cf297afc5c68db67a46c1c01450c08751fc3cda0995d62bbe60da64d21802d6 SHA512 6ffee27f859f923795e8ded3a5544a82473f72568e96475374b937adbf0963f81d46fbcf4752a9d4eef3f071cadd3dedf141f43802b58c6a788243c7f05114cf
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.1943.ebuild b/dev-util/gn/gn-0.1943.ebuild
new file mode 100644
index 000000000000..57230dc162ed
--- /dev/null
+++ b/dev-util/gn/gn-0.1943.ebuild
@@ -0,0 +1,64 @@
+# Copyright 2018-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8,9,10} )
+
+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 ~riscv ~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
+}