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