1 |
commit: ed32f54f25439b4e58939f264867880bbbea06b4 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 18 22:23:08 2018 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 19 15:52:22 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed32f54f |
7 |
|
8 |
dev-util/gn: bump to 0.1463 |
9 |
|
10 |
Package-Manager: Portage-2.3.46_p1_p562786, Repoman-2.3.10_p36_p562786 |
11 |
|
12 |
dev-util/gn/Manifest | 1 + |
13 |
dev-util/gn/files/gn-gen-r1.patch | 57 +++++++++++++++++++++++++++++++++++++++ |
14 |
dev-util/gn/gn-0.1463.ebuild | 56 ++++++++++++++++++++++++++++++++++++++ |
15 |
3 files changed, 114 insertions(+) |
16 |
|
17 |
diff --git a/dev-util/gn/Manifest b/dev-util/gn/Manifest |
18 |
index 105ea669977..0892e0a420b 100644 |
19 |
--- a/dev-util/gn/Manifest |
20 |
+++ b/dev-util/gn/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST gn-0.1445.tar.gz 958901 BLAKE2B f50dfa07c621e37d8a9face19ca91f28ca24e14717052218690e85911e25c91b109e6cede8d2be6c8493c0b7b8a305d530db4393123956c42da51cd4812d0300 SHA512 2ca21303aa8709fc4f23f15e01f2eaa8e77e394c27970a21361a22445d5cb29da150b1d05d77b471702ab2da2be04cea2a0d927eb0eb3a1baf3358c6eae15d06 |
23 |
+DIST gn-0.1463.tar.gz 905571 BLAKE2B e048e642704533d478fb751748a97f60283f63868ab1ab6fa5b8e7bc0322745cf21464eaa16194f684869b50f306668d3c7d3b4f72c3985b865d8492d1ff0901 SHA512 f32861a8fa44034b932e6aae4787fd7da6e4c6c19c5b6919de7b0d0f1ba20f415c1c55db95a08958a338b7b9de740ff49a29ab894a9c4e9049a89450d8c88281 |
24 |
|
25 |
diff --git a/dev-util/gn/files/gn-gen-r1.patch b/dev-util/gn/files/gn-gen-r1.patch |
26 |
new file mode 100644 |
27 |
index 00000000000..77fdefcf222 |
28 |
--- /dev/null |
29 |
+++ b/dev-util/gn/files/gn-gen-r1.patch |
30 |
@@ -0,0 +1,57 @@ |
31 |
+diff --git a/build/gen.py b/build/gen.py |
32 |
+index 76f88e84..5e088b2a 100755 |
33 |
+--- a/build/gen.py |
34 |
++++ b/build/gen.py |
35 |
+@@ -326,9 +326,6 @@ def WriteGNNinja(path, platform, host, options, linux_sysroot): |
36 |
+ if options.debug: |
37 |
+ cflags.extend(['-O0', '-g']) |
38 |
+ else: |
39 |
+- cflags.append('-DNDEBUG') |
40 |
+- cflags.append('-O3') |
41 |
+- ldflags.append('-O3') |
42 |
+ # Use -fdata-sections and -ffunction-sections to place each function |
43 |
+ # or data item into its own section so --gc-sections can eliminate any |
44 |
+ # unused functions and data items. |
45 |
+@@ -340,14 +337,6 @@ def WriteGNNinja(path, platform, host, options, linux_sysroot): |
46 |
+ # Garbage collection is done by default on aix. |
47 |
+ ldflags.append('-Wl,--gc-sections') |
48 |
+ |
49 |
+- # Omit all symbol information from the output file. |
50 |
+- if platform.is_darwin(): |
51 |
+- ldflags.append('-Wl,-S') |
52 |
+- elif platform.is_aix(): |
53 |
+- ldflags.append('-Wl,-s') |
54 |
+- else: |
55 |
+- ldflags.append('-Wl,-strip-all') |
56 |
+- |
57 |
+ # Enable identical code-folding. |
58 |
+ if options.use_icf: |
59 |
+ ldflags.append('-Wl,--icf=all') |
60 |
+@@ -356,26 +345,17 @@ def WriteGNNinja(path, platform, host, options, linux_sysroot): |
61 |
+ '-D_FILE_OFFSET_BITS=64', |
62 |
+ '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS', |
63 |
+ '-pthread', |
64 |
+- '-pipe', |
65 |
+ '-fno-exceptions', |
66 |
+ '-fno-rtti', |
67 |
+ ]) |
68 |
+ cflags_cc.extend(['-std=c++14', '-Wno-c++11-narrowing']) |
69 |
++ ldflags.append('-pthread') |
70 |
+ |
71 |
+ if platform.is_linux(): |
72 |
+ if linux_sysroot: |
73 |
+ # Use the sid sysroot that UpdateLinuxSysroot() downloads. |
74 |
+ cflags.append('--sysroot=' + linux_sysroot) |
75 |
+ ldflags.append('--sysroot=' + linux_sysroot) |
76 |
+- ldflags.extend([ |
77 |
+- '-static-libstdc++', |
78 |
+- '-Wl,--as-needed', |
79 |
+- ]) |
80 |
+- libs.extend([ |
81 |
+- # These are needed by libc++. |
82 |
+- '-ldl', |
83 |
+- '-lpthread', |
84 |
+- ]) |
85 |
+ elif platform.is_darwin(): |
86 |
+ min_mac_version_flag = '-mmacosx-version-min=10.9' |
87 |
+ cflags.append(min_mac_version_flag) |
88 |
|
89 |
diff --git a/dev-util/gn/gn-0.1463.ebuild b/dev-util/gn/gn-0.1463.ebuild |
90 |
new file mode 100644 |
91 |
index 00000000000..7192511c83e |
92 |
--- /dev/null |
93 |
+++ b/dev-util/gn/gn-0.1463.ebuild |
94 |
@@ -0,0 +1,56 @@ |
95 |
+# Copyright 1999-2018 Gentoo Foundation |
96 |
+# Distributed under the terms of the GNU General Public License v2 |
97 |
+ |
98 |
+EAPI=7 |
99 |
+PYTHON_COMPAT=( python2_7 ) |
100 |
+ |
101 |
+inherit ninja-utils python-any-r1 toolchain-funcs |
102 |
+ |
103 |
+DESCRIPTION="GN is a meta-build system that generates build files for Ninja" |
104 |
+HOMEPAGE="https://gn.googlesource.com/" |
105 |
+SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.gz" |
106 |
+ |
107 |
+LICENSE="BSD" |
108 |
+SLOT="0" |
109 |
+KEYWORDS="~amd64 ~x86" |
110 |
+ |
111 |
+BDEPEND=" |
112 |
+ ${PYTHON_DEPS} |
113 |
+ dev-util/ninja |
114 |
+" |
115 |
+ |
116 |
+PATCHES=( |
117 |
+ "${FILESDIR}"/gn-gen-r1.patch |
118 |
+) |
119 |
+ |
120 |
+pkg_setup() { |
121 |
+ : |
122 |
+} |
123 |
+ |
124 |
+src_configure() { |
125 |
+ python_setup |
126 |
+ tc-export AR CC CXX |
127 |
+ set -- ${EPYTHON} build/gen.py --no-sysroot --no-last-commit-position |
128 |
+ echo "$@" |
129 |
+ "$@" || die |
130 |
+ cat >out/last_commit_position.h <<-EOF || die |
131 |
+ #ifndef OUT_LAST_COMMIT_POSITION_H_ |
132 |
+ #define OUT_LAST_COMMIT_POSITION_H_ |
133 |
+ #define LAST_COMMIT_POSITION "${PV}" |
134 |
+ #endif // OUT_LAST_COMMIT_POSITION_H_ |
135 |
+ EOF |
136 |
+} |
137 |
+ |
138 |
+src_compile() { |
139 |
+ eninja -C out gn |
140 |
+} |
141 |
+ |
142 |
+src_test() { |
143 |
+ eninja -C out gn_unittests |
144 |
+ out/gn_unittests || die |
145 |
+} |
146 |
+ |
147 |
+src_install() { |
148 |
+ dobin out/gn |
149 |
+ einstalldocs |
150 |
+} |