Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/watchman/
Date: Mon, 29 Aug 2022 20:13:10
Message-Id: 1661803976.6ea735568ba710dccf888357c5e724077cbfd079.sam@gentoo
1 commit: 6ea735568ba710dccf888357c5e724077cbfd079
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 29 19:53:46 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 29 20:12:56 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ea73556
7
8 dev-util/watchman: add 2022.08.29.00
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 dev-util/watchman/Manifest | 1 +
13 dev-util/watchman/watchman-2022.08.29.00.ebuild | 217 ++++++++++++++++++++++++
14 2 files changed, 218 insertions(+)
15
16 diff --git a/dev-util/watchman/Manifest b/dev-util/watchman/Manifest
17 index 62cabef802a3..146bde82ea31 100644
18 --- a/dev-util/watchman/Manifest
19 +++ b/dev-util/watchman/Manifest
20 @@ -86,6 +86,7 @@ DIST watchman-2022.07.04.00.tar.gz 3785684 BLAKE2B b27f71cd5d505d9383858434eaa90
21 DIST watchman-2022.08.08.00.tar.gz 3788351 BLAKE2B cdf5ea901bbe7ff46d32fadb7eb46d2346f3330fd20c2e14dd4faa54c3feabfaf4c0a76b83a4493bcd052b7fa9d08e7ed05ad3d1bc883edefef9812258afeba6 SHA512 537b52d50823ce27f0c42927f2c04a57bb273f53d9f4c91a6744a319ff8efef9f5ed202ec2f2a1dfd59b1c16f5e8044ba21148bd40ca45660813cc67c839d6a2
22 DIST watchman-2022.08.15.00.tar.gz 3783166 BLAKE2B a2090fb9e62890ea77e264c6d2727d93e8799b96ad4eaf7e02c58a8526fbd57b3b6ff2fdeddfb67a41771e2c0e29ca2f7fab2246ef8455df9902685c40c96138 SHA512 497f7127fe6efc5419f9f169b580701bdf88c4774b2c2d35b5c3849b29f679bf72569885cbb4411ebfd92e8d34eb589bf327d2362d8b5a1c141f9c063833f3e7
23 DIST watchman-2022.08.22.00.tar.gz 3785807 BLAKE2B 7be65183a03bbef4b880349bc04b27c71699ae3a7c140bddea4f3f40299d9bbf19d63980bba988eab4219205b7250c9de2045d29aa9a5c65820e03a1b4cc647d SHA512 33efa917f7561f8f6fddd77590ad87064cfcca10c3936ccc3fd078a3f425ae49ec4a7e0859251c3020f26a0e9086301fd23fc1fafe73746316bf336123463f9d
24 +DIST watchman-2022.08.29.00.tar.gz 3787691 BLAKE2B faf3f6afe351f7596256424c9e4f0c31fe826ee1097e216d04d869b3adee7ca1d4d9afbbea99fb3ca4f095d06171a1afe56fc5a71022242c4fde99246c3a1781 SHA512 25f6f133253335ece931fdbb131e8df4961c4b73877e2caa5008d3bd5e66e44b1121b7d4f2cd3367b1759476307aad8d6642089c482a6b65178b0a05510ea5f1
25 DIST winapi-0.3.9.crate 1200382 BLAKE2B cb5799749ccd935ea2d7068d953cecf19f543d9db7dc16ad4584bb7005373ada34937a3ced7225544d8bc765da599911c7a3190efefb3a25b7c1bb7123b4f673 SHA512 ff8b7b78065f3d8999ec03c725a0460ebc059771bf071c7a3df3f0ecd733edf3b0a2450024d4e24e1aedddaecd9038ce1376c0d8bbf45132068cf45cf4a53a97
26 DIST winapi-i686-pc-windows-gnu-0.4.0.crate 2918815 BLAKE2B 4d357e4d30f9552972170d65b9a5358b69c46a3e772fe05efc22f3d4ffc1caeeaad7aacdc7abd503a7ad0545f8bd7d22bf351dcb6df76f812fa4d45c34d65df0 SHA512 a672ccefd0730a8166fef1d4e39f9034d9ae426a3f5e28d1f4169fa5c5790767693f281d890e7804773b34acdb0ae1febac33cde8c50c0044a5a6152c7209ec2
27 DIST winapi-x86_64-pc-windows-gnu-0.4.0.crate 2947998 BLAKE2B 2ad1ea8b5fa07d544e910ccba043ae925269b76b26c9da356305b34b86741dd8b9aff0b9ffe3d562db4fcd7d7c46a11ce9e3168b782b1d89ae6881742b7ede82 SHA512 4a654af6a5d649dc87e00497245096b35a2894ae66f155cb62389902c3b93ddcc5cf7d0d8b9dd97b291d2d80bc686af2298e80abef6ac69883f4a54e79712513
28
29 diff --git a/dev-util/watchman/watchman-2022.08.29.00.ebuild b/dev-util/watchman/watchman-2022.08.29.00.ebuild
30 new file mode 100644
31 index 000000000000..ab5b42363940
32 --- /dev/null
33 +++ b/dev-util/watchman/watchman-2022.08.29.00.ebuild
34 @@ -0,0 +1,217 @@
35 +# Copyright 2020-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=8
39 +
40 +# These must be bumped together:
41 +# dev-cpp/edencommon
42 +# dev-cpp/folly
43 +# dev-util/watchman
44 +
45 +# TODO: Split into different variables then combine for each component?
46 +# Not all is in rust/ dir.
47 +# Rust components: watchman/cli watchman/rust/serde_bser watchman/rust/watchman_client
48 +CRATES="
49 +ahash-0.3.8
50 +ansi_term-0.12.1
51 +anyhow-1.0.55
52 +atty-0.2.14
53 +autocfg-1.1.0
54 +bitflags-1.3.2
55 +byteorder-1.4.3
56 +bytes-1.1.0
57 +cfg-if-1.0.0
58 +clap-2.34.0
59 +const-random-0.1.13
60 +const-random-macro-0.1.13
61 +crossbeam-0.8.1
62 +crossbeam-channel-0.5.2
63 +crossbeam-deque-0.8.1
64 +crossbeam-epoch-0.9.7
65 +crossbeam-queue-0.3.4
66 +crossbeam-utils-0.8.7
67 +crunchy-0.2.2
68 +either-1.6.1
69 +futures-0.1.31
70 +futures-0.3.21
71 +futures-channel-0.3.21
72 +futures-core-0.3.21
73 +futures-executor-0.3.21
74 +futures-io-0.3.21
75 +futures-macro-0.3.21
76 +futures-sink-0.3.21
77 +futures-task-0.3.21
78 +futures-util-0.3.21
79 +getrandom-0.2.5
80 +heck-0.3.3
81 +hermit-abi-0.1.19
82 +jwalk-0.6.0
83 +lazy_static-1.4.0
84 +libc-0.2.119
85 +lock_api-0.4.6
86 +log-0.4.14
87 +maplit-1.0.2
88 +memchr-2.4.1
89 +memoffset-0.6.5
90 +mio-0.8.0
91 +miow-0.3.7
92 +ntapi-0.3.7
93 +num_cpus-1.13.1
94 +once_cell-1.9.0
95 +parking_lot-0.12.0
96 +parking_lot_core-0.9.1
97 +pin-project-lite-0.2.8
98 +pin-utils-0.1.0
99 +proc-macro2-1.0.36
100 +proc-macro-error-1.0.4
101 +proc-macro-error-attr-1.0.4
102 +proc-macro-hack-0.5.19
103 +quote-1.0.15
104 +rayon-1.5.1
105 +rayon-core-1.9.1
106 +redox_syscall-0.2.10
107 +scopeguard-1.1.0
108 +serde-1.0.136
109 +serde_derive-1.0.136
110 +signal-hook-registry-1.4.0
111 +slab-0.4.5
112 +smallvec-1.8.0
113 +socket2-0.4.4
114 +strsim-0.8.0
115 +structopt-0.3.26
116 +structopt-derive-0.4.18
117 +syn-1.0.86
118 +textwrap-0.11.0
119 +thiserror-1.0.30
120 +thiserror-impl-1.0.30
121 +tiny-keccak-2.0.2
122 +tokio-1.17.0
123 +tokio-macros-1.7.0
124 +tokio-util-0.6.9
125 +unicode-segmentation-1.9.0
126 +unicode-width-0.1.9
127 +unicode-xid-0.2.2
128 +vec_map-0.8.2
129 +version_check-0.9.4
130 +wasi-0.10.2+wasi-snapshot-preview1
131 +winapi-0.3.9
132 +winapi-i686-pc-windows-gnu-0.4.0
133 +winapi-x86_64-pc-windows-gnu-0.4.0
134 +windows_aarch64_msvc-0.32.0
135 +windows_i686_gnu-0.32.0
136 +windows_i686_msvc-0.32.0
137 +windows-sys-0.32.0
138 +windows_x86_64_gnu-0.32.0
139 +windows_x86_64_msvc-0.32.0
140 +"
141 +
142 +DISTUTILS_USE_PEP517=setuptools
143 +PYTHON_COMPAT=( python3_{8..10} )
144 +inherit cargo cmake distutils-r1 tmpfiles
145 +
146 +DESCRIPTION="A file watching service"
147 +HOMEPAGE="https://facebook.github.io/watchman/"
148 +SRC_URI="https://github.com/facebook/watchman/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
149 +SRC_URI+=" $(cargo_crate_uris)"
150 +
151 +LICENSE="Apache-2.0"
152 +SLOT="0"
153 +KEYWORDS="~amd64"
154 +IUSE="llvm-libunwind python"
155 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
156 +
157 +# See https://github.com/facebook/watchman/blob/main/CMakeLists.txt#L342 for libevent
158 +RDEPEND="
159 + dev-libs/libevent:=
160 + dev-libs/libpcre2
161 + ~dev-cpp/edencommon-${PV}:=
162 + ~dev-cpp/folly-${PV}:=
163 + dev-cpp/glog:=
164 + >=dev-libs/libfmt-8.1.1-r1:=
165 + dev-libs/openssl:=
166 + llvm-libunwind? ( sys-libs/llvm-libunwind:= )
167 + !llvm-libunwind? ( sys-libs/libunwind:= )
168 + python? ( ${PYTHON_DEPS} )"
169 +# TODO: Make gtest test-only (needs a fair bit of patching)
170 +DEPEND="${RDEPEND}
171 + dev-cpp/gtest"
172 +
173 +PATCHES=(
174 + "${FILESDIR}"/${PN}-2022.07.04.00-python-working-dir.patch
175 + "${FILESDIR}"/${PN}-2022.02.28.00-libatomic.patch
176 + "${FILESDIR}"/${PN}-2022.08.08.00-musl-fsword-fix.patch
177 +)
178 +
179 +# Rust utility
180 +QA_FLAGS_IGNORED="usr/bin/watchmanctl"
181 +
182 +distutils_enable_tests unittest
183 +
184 +src_prepare() {
185 + cmake_src_prepare
186 +}
187 +
188 +src_configure() {
189 + # https://github.com/facebook/watchman/blob/789678cf9855fb07b402afb75b01e4f8786deba2/build/fbcode_builder/CMake/RustStaticLibrary.cmake#L17
190 + export RUST_VENDORED_CRATES_DIR="${ECARGO_VENDOR}"
191 + export RUST_CARGO_HOME="${ECARGO_HOME}"
192 + export CARGO_HOME="${ECARGO_HOME}"
193 + # Build system already handles avoiding Rust-jobs-while-CMake-jobs-spawned issue
194 + # https://github.com/facebook/watchman/blob/789678cf9855fb07b402afb75b01e4f8786deba2/build/fbcode_builder/CMake/RustStaticLibrary.cmake#L69
195 + # so no need to force -j1 via cargo jobs
196 +
197 + local mycmakeargs=(
198 + # Rust wrangling
199 + -DUSE_CARGO_VENDOR=ON
200 + -DGENERATE_CARGO_VENDOR_CONFIG=OFF
201 + -DRUST_CARGO_HOME="${RUST_CARGO_HOME}"
202 +
203 + # General bits
204 + -DWATCHMAN_STATE_DIR="${EPREFIX}"/run/watchman
205 + -DWATCHMAN_VERSION_OVERRIDE=${PV}
206 +
207 + # Fails to build against fbthrift for now in libatomic troubles
208 + -DENABLE_EDEN_SUPPORT=OFF
209 +
210 + # We handle this ourselves
211 + -DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON
212 + )
213 +
214 + cmake_src_configure
215 +}
216 +
217 +src_compile() {
218 + cmake_src_compile
219 +
220 + if use python ; then
221 + pushd watchman/python >/dev/null || die
222 + distutils-r1_src_compile
223 + popd >/dev/null || die
224 + fi
225 +}
226 +
227 +src_test() {
228 + cmake_src_test
229 +
230 + if use python ; then
231 + pushd watchman/python >/dev/null || die
232 + distutils-r1_src_test
233 + popd >/dev/null || die
234 + fi
235 +}
236 +
237 +src_install() {
238 + cmake_src_install
239 +
240 + newtmpfiles "${FILESDIR}"/watchman.tmpfiles watchman.conf
241 +
242 + if use python ; then
243 + pushd watchman/python >/dev/null || die
244 + distutils-r1_src_install
245 + popd >/dev/null || die
246 + fi
247 +}
248 +
249 +pkg_postinst() {
250 + tmpfiles_process watchman.conf
251 +}