1 |
commit: 31b1852c8b72dbca9c03f9017c473b0f9add6dc0 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 15 01:04:50 2018 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 15 04:59:02 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31b1852c |
7 |
|
8 |
dev-util/gn: bump to 0.1479 |
9 |
|
10 |
Package-Manager: Portage-2.3.50_p14, Repoman-2.3.11_p21 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
dev-util/gn/Manifest | 1 + |
14 |
dev-util/gn/files/gn-gen-r2.patch | 70 +++++++++++++++++++++++++++++++++++++++ |
15 |
dev-util/gn/gn-0.1479.ebuild | 63 +++++++++++++++++++++++++++++++++++ |
16 |
3 files changed, 134 insertions(+) |
17 |
|
18 |
diff --git a/dev-util/gn/Manifest b/dev-util/gn/Manifest |
19 |
index 0892e0a420b..7fc339c546c 100644 |
20 |
--- a/dev-util/gn/Manifest |
21 |
+++ b/dev-util/gn/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST gn-0.1445.tar.gz 958901 BLAKE2B f50dfa07c621e37d8a9face19ca91f28ca24e14717052218690e85911e25c91b109e6cede8d2be6c8493c0b7b8a305d530db4393123956c42da51cd4812d0300 SHA512 2ca21303aa8709fc4f23f15e01f2eaa8e77e394c27970a21361a22445d5cb29da150b1d05d77b471702ab2da2be04cea2a0d927eb0eb3a1baf3358c6eae15d06 |
24 |
DIST gn-0.1463.tar.gz 905571 BLAKE2B e048e642704533d478fb751748a97f60283f63868ab1ab6fa5b8e7bc0322745cf21464eaa16194f684869b50f306668d3c7d3b4f72c3985b865d8492d1ff0901 SHA512 f32861a8fa44034b932e6aae4787fd7da6e4c6c19c5b6919de7b0d0f1ba20f415c1c55db95a08958a338b7b9de740ff49a29ab894a9c4e9049a89450d8c88281 |
25 |
+DIST gn-0.1479.tar.gz 909494 BLAKE2B 5d7165371337be630b2d8dcfd8cd067358d56d8d82501288a56bc15955674f0528fde27056c13f32a2b908576a9e2f28529dec9cd1f259e964405874ce74e90f SHA512 2be22c95952f9993d3f89e932abc0ed08eb2e99a3659322d90bf953b1f68591303b3490e0e55bf3988b1226fefef0a5b7f5d3039eb9ef76e4fe36a2e538ef94a |
26 |
|
27 |
diff --git a/dev-util/gn/files/gn-gen-r2.patch b/dev-util/gn/files/gn-gen-r2.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..701a317bf02 |
30 |
--- /dev/null |
31 |
+++ b/dev-util/gn/files/gn-gen-r2.patch |
32 |
@@ -0,0 +1,70 @@ |
33 |
+From 00e907811ea7fc56de73ad44903946a9179b1c4f Mon Sep 17 00:00:00 2001 |
34 |
+From: Mike Gilbert <floppym@g.o> |
35 |
+Date: Sun, 14 Oct 2018 20:34:07 -0400 |
36 |
+Subject: [PATCH] Remove unwanted cflags/ldflags parameters |
37 |
+ |
38 |
+--- |
39 |
+ build/gen.py | 19 +------------------ |
40 |
+ 1 file changed, 1 insertion(+), 18 deletions(-) |
41 |
+ |
42 |
+diff --git a/build/gen.py b/build/gen.py |
43 |
+index 11c92460..b186e3b0 100755 |
44 |
+--- a/build/gen.py |
45 |
++++ b/build/gen.py |
46 |
+@@ -326,9 +326,6 @@ def WriteGNNinja(path, platform, host, options, linux_sysroot): |
47 |
+ if options.debug: |
48 |
+ cflags.extend(['-O0', '-g']) |
49 |
+ else: |
50 |
+- cflags.append('-DNDEBUG') |
51 |
+- cflags.append('-O3') |
52 |
+- ldflags.append('-O3') |
53 |
+ # Use -fdata-sections and -ffunction-sections to place each function |
54 |
+ # or data item into its own section so --gc-sections can eliminate any |
55 |
+ # unused functions and data items. |
56 |
+@@ -340,14 +337,6 @@ def WriteGNNinja(path, platform, host, options, linux_sysroot): |
57 |
+ # Garbage collection is done by default on aix. |
58 |
+ ldflags.append('-Wl,--gc-sections') |
59 |
+ |
60 |
+- # Omit all symbol information from the output file. |
61 |
+- if platform.is_darwin(): |
62 |
+- ldflags.append('-Wl,-S') |
63 |
+- elif platform.is_aix(): |
64 |
+- ldflags.append('-Wl,-s') |
65 |
+- else: |
66 |
+- ldflags.append('-Wl,-strip-all') |
67 |
+- |
68 |
+ # Enable identical code-folding. |
69 |
+ if options.use_icf: |
70 |
+ ldflags.append('-Wl,--icf=all') |
71 |
+@@ -356,12 +345,12 @@ def WriteGNNinja(path, platform, host, options, linux_sysroot): |
72 |
+ '-D_FILE_OFFSET_BITS=64', |
73 |
+ '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS', |
74 |
+ '-pthread', |
75 |
+- '-pipe', |
76 |
+ '-fno-exceptions', |
77 |
+ '-fno-rtti', |
78 |
+ '-fdiagnostics-color', |
79 |
+ ]) |
80 |
+ cflags_cc.extend(['-std=c++14', '-Wno-c++11-narrowing']) |
81 |
++ ldflags.extend(['-pthread']) |
82 |
+ |
83 |
+ if platform.is_linux(): |
84 |
+ if linux_sysroot: |
85 |
+@@ -369,14 +358,8 @@ def WriteGNNinja(path, platform, host, options, linux_sysroot): |
86 |
+ cflags.append('--sysroot=' + linux_sysroot) |
87 |
+ ldflags.append('--sysroot=' + linux_sysroot) |
88 |
+ ldflags.extend([ |
89 |
+- '-static-libstdc++', |
90 |
+ '-Wl,--as-needed', |
91 |
+ ]) |
92 |
+- libs.extend([ |
93 |
+- # These are needed by libc++. |
94 |
+- '-ldl', |
95 |
+- '-lpthread', |
96 |
+- ]) |
97 |
+ elif platform.is_darwin(): |
98 |
+ min_mac_version_flag = '-mmacosx-version-min=10.9' |
99 |
+ cflags.append(min_mac_version_flag) |
100 |
+-- |
101 |
+2.19.1 |
102 |
+ |
103 |
|
104 |
diff --git a/dev-util/gn/gn-0.1479.ebuild b/dev-util/gn/gn-0.1479.ebuild |
105 |
new file mode 100644 |
106 |
index 00000000000..fc369d2c0db |
107 |
--- /dev/null |
108 |
+++ b/dev-util/gn/gn-0.1479.ebuild |
109 |
@@ -0,0 +1,63 @@ |
110 |
+# Copyright 1999-2018 Gentoo Authors |
111 |
+# Distributed under the terms of the GNU General Public License v2 |
112 |
+ |
113 |
+EAPI=7 |
114 |
+PYTHON_COMPAT=( python2_7 ) |
115 |
+ |
116 |
+inherit ninja-utils python-any-r1 toolchain-funcs |
117 |
+ |
118 |
+DESCRIPTION="GN is a meta-build system that generates build files for Ninja" |
119 |
+HOMEPAGE="https://gn.googlesource.com/" |
120 |
+SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.gz" |
121 |
+ |
122 |
+LICENSE="BSD" |
123 |
+SLOT="0" |
124 |
+KEYWORDS="~amd64 ~x86" |
125 |
+IUSE="vim-syntax" |
126 |
+ |
127 |
+BDEPEND=" |
128 |
+ ${PYTHON_DEPS} |
129 |
+ dev-util/ninja |
130 |
+" |
131 |
+ |
132 |
+PATCHES=( |
133 |
+ "${FILESDIR}"/gn-gen-r2.patch |
134 |
+) |
135 |
+ |
136 |
+pkg_setup() { |
137 |
+ : |
138 |
+} |
139 |
+ |
140 |
+src_configure() { |
141 |
+ python_setup |
142 |
+ tc-export AR CC CXX |
143 |
+ unset CFLAGS |
144 |
+ set -- ${EPYTHON} build/gen.py --no-sysroot --no-last-commit-position |
145 |
+ echo "$@" |
146 |
+ "$@" || die |
147 |
+ cat >out/last_commit_position.h <<-EOF || die |
148 |
+ #ifndef OUT_LAST_COMMIT_POSITION_H_ |
149 |
+ #define OUT_LAST_COMMIT_POSITION_H_ |
150 |
+ #define LAST_COMMIT_POSITION "${PV}" |
151 |
+ #endif // OUT_LAST_COMMIT_POSITION_H_ |
152 |
+ EOF |
153 |
+} |
154 |
+ |
155 |
+src_compile() { |
156 |
+ eninja -C out gn |
157 |
+} |
158 |
+ |
159 |
+src_test() { |
160 |
+ eninja -C out gn_unittests |
161 |
+ out/gn_unittests || die |
162 |
+} |
163 |
+ |
164 |
+src_install() { |
165 |
+ dobin out/gn |
166 |
+ einstalldocs |
167 |
+ |
168 |
+ if use vim-syntax; then |
169 |
+ insinto /usr/share/vim/vimfiles |
170 |
+ doins -r tools/gn/misc/vim/{autoload,ftdetect,ftplugin,syntax} |
171 |
+ fi |
172 |
+} |