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-db/mongodb/, dev-db/mongodb/files/
Date: Fri, 30 Dec 2022 20:22:57
Message-Id: 1672431746.9eb857b35fcd0c1f67a45ec33a35782e71c09d57.sam@gentoo
1 commit: 9eb857b35fcd0c1f67a45ec33a35782e71c09d57
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 30 20:22:26 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 30 20:22:26 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9eb857b3
7
8 dev-db/mongodb: drop 4.2.17-r2, 4.2.23
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 dev-db/mongodb/Manifest | 2 -
13 dev-db/mongodb/files/mongodb-4.2.0-fix-scons.patch | 30 ----
14 .../mongodb/files/mongodb-4.2.15-no-compass.patch | 45 -----
15 .../mongodb/files/mongodb-4.2.17-boost-1.79.patch | 41 -----
16 dev-db/mongodb/mongodb-4.2.17-r2.ebuild | 184 ---------------------
17 dev-db/mongodb/mongodb-4.2.23.ebuild | 183 --------------------
18 6 files changed, 485 deletions(-)
19
20 diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
21 index b2ee764c3abe..b78b40d9e568 100644
22 --- a/dev-db/mongodb/Manifest
23 +++ b/dev-db/mongodb/Manifest
24 @@ -1,5 +1,3 @@
25 -DIST mongodb-src-r4.2.17.tar.gz 62216350 BLAKE2B 48169685a25fe00b5a1985bce1e65e13d1dc9c0a56ece6b9c735d8cd212d9c0c5e2912d593bdda351cceda49c8ed7962db42ca37814f88e0bf927066a2d8241b SHA512 ad5448aa6ea232746fdbc7107bd642e827fb7b9182c075f204722e7f625cbc83e7b0a199d2feb56bf27a8851bb38f9740abf0b38c022ddc92e676e7a2d81aef6
26 -DIST mongodb-src-r4.2.23.tar.gz 62276834 BLAKE2B bb3dfee47ece9a5cc43e10a322b7191709d32bcfcb9659b08a6412d60a83eaf2d8bc4b5784e99d8fc95be643498212d512a11dc93052f02086456a2d2e565da3 SHA512 5c0b341b0700af9f3682e63912569dd4063d8cff85c35f9e19d5882291f62bb1a56f85666278fe38f1bd7f06a46b8423c5e90969be5bb595281d883256c8def4
27 DIST mongodb-src-r4.4.10.tar.gz 50636024 BLAKE2B 4b840e1a17b3fcba32d30c649d981b1e2b1d5dd98deab99be599fd5d2aa70b75ff4225542d8da095ec4cb4615f9ccccfa455129d71ed39549efde0a025d7dac4 SHA512 afc04f90e03ec64fd74bdfe2bf33aaa5fc148811af91a8437dfb81fd3a784eedd80128886db99e247ec7e09dc5a73cf34f908ab927942648e15c8f12af6b64e2
28 DIST mongodb-src-r4.4.8.tar.gz 50492854 BLAKE2B 4776b17e88104879ea69468ff277b07dc317d936654bb26c69750e0aaf8f51bea73994e7fc4841228d8506db392e0454b5fd16257071b86a2e4ad34e90f33632 SHA512 9b0cd81c9c731255a6c079c040ed342a51a72e3ea72047d3ae959c0afde50b0cdb1fcfe7fcbea30c449a3618a09d213752277cee6eb9bc0a55915b9229543606
29 DIST mongodb-src-r5.0.5.tar.gz 54862473 BLAKE2B aafa693da904177a11067603f3835e2ee69abcdb206c2d36983633baa6008b861efeb590880098557e224cd7d6ac8fb23e4e9c63724d76bf90422862c99cdfe9 SHA512 318e58285c8a88fc3a4467ba8c1e6487a2aec403db02c50dbdb53df9a6671b9ea2417c8ee8212b205d642327d0d4bdd76f4bc9543c47e53115dfb981ef73f63e
30
31 diff --git a/dev-db/mongodb/files/mongodb-4.2.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-4.2.0-fix-scons.patch
32 deleted file mode 100644
33 index 3c929df6f964..000000000000
34 --- a/dev-db/mongodb/files/mongodb-4.2.0-fix-scons.patch
35 +++ /dev/null
36 @@ -1,30 +0,0 @@
37 ---- a/SConstruct 2019-08-21 09:25:00.980260318 +0200
38 -+++ b/SConstruct 2019-08-21 09:27:53.653601283 +0200
39 -@@ -1858,7 +1858,6 @@
40 - # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
41 - env.Append( CCFLAGS=["-fno-omit-frame-pointer",
42 - "-fno-strict-aliasing",
43 -- "-ggdb" if not env.TargetOSIs('emscripten') else "-g",
44 - "-pthread",
45 - "-Wall",
46 - "-Wsign-compare",
47 -@@ -1870,6 +1869,8 @@
48 - env.Append( CCFLAGS=["-Werror"] )
49 -
50 - env.Append( CXXFLAGS=["-Woverloaded-virtual"] )
51 -+ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
52 -+ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
53 - if env.ToolchainIs('clang'):
54 - env.Append( CXXFLAGS=['-Werror=unused-result'] )
55 -
56 -@@ -1890,8 +1891,8 @@
57 -
58 - env.Append( LIBS=[] )
59 -
60 -- #make scons colorgcc friendly
61 -- for key in ('HOME', 'TERM'):
62 -+ #make scons colorgcc, distcc, ccache friendly
63 -+ for key in ('HOME', 'PATH', 'TERM'):
64 - try:
65 - env['ENV'][key] = os.environ[key]
66 - except KeyError:
67
68 diff --git a/dev-db/mongodb/files/mongodb-4.2.15-no-compass.patch b/dev-db/mongodb/files/mongodb-4.2.15-no-compass.patch
69 deleted file mode 100644
70 index de2eda82f213..000000000000
71 --- a/dev-db/mongodb/files/mongodb-4.2.15-no-compass.patch
72 +++ /dev/null
73 @@ -1,45 +0,0 @@
74 -diff --git a/src/mongo/SConscript b/src/mongo/SConscript
75 -index 0379fcb0..1aabddba 100644
76 ---- a/src/mongo/SConscript
77 -+++ b/src/mongo/SConscript
78 -@@ -808,32 +808,6 @@ for full_dir, archive_dir in list(env["ARCHIVE_ADDITION_DIR_MAP"].items()):
79 - for target in env["DIST_BINARIES"]:
80 - installBinary(env, "db/modules/" + target)
81 -
82 --compass_script = "install_compass"
83 --if env.TargetOSIs('windows'):
84 -- # On windows the .in needs to be explicitly added to the file.
85 -- compass_script = "Install-Compass.ps1"
86 --
87 --compass_installer = f"#/src/mongo/installer/compass/{compass_script}"
88 --
89 --distBinaries.append(compass_installer)
90 --
91 --if not hygienic:
92 -- compass_script_installer = env.Install("$INSTALL_DIR/bin", compass_installer)
93 --else:
94 -- compass_script_installer = env.AutoInstall(
95 -- 'bin',
96 -- source=[
97 -- compass_installer,
98 -- ],
99 -- INSTALL_ALIAS=[
100 -- 'tools',
101 -- ],
102 -- )
103 --
104 --if env.TargetOSIs('posix'):
105 -- env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' )
106 -- env.AddPostAction( compass_installer, 'chmod 755 $TARGET' )
107 --
108 - # "dist" target is valid only when --use-new-tools is specified
109 - # Attempts to build release artifacts without tools must fail
110 - if has_option("use-new-tools"):
111 -@@ -851,7 +825,6 @@ if has_option("use-new-tools"):
112 - '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin',
113 - '--transform $BUILD_DIR/mongo/stripped/src/mongo-tools=$SERVER_DIST_BASENAME/bin',
114 - '--transform src/mongo-tools=$SERVER_DIST_BASENAME/bin',
115 -- '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin',
116 - '${TEMPFILE(SOURCES[1:])}'
117 - ],
118 - ),
119
120 diff --git a/dev-db/mongodb/files/mongodb-4.2.17-boost-1.79.patch b/dev-db/mongodb/files/mongodb-4.2.17-boost-1.79.patch
121 deleted file mode 100644
122 index b86efa142f5c..000000000000
123 --- a/dev-db/mongodb/files/mongodb-4.2.17-boost-1.79.patch
124 +++ /dev/null
125 @@ -1,41 +0,0 @@
126 -https://bugs.gentoo.org/844235
127 ---- a/src/mongo/util/processinfo_linux.cpp
128 -+++ b/src/mongo/util/processinfo_linux.cpp
129 -@@ -51,6 +51,7 @@
130 - #endif
131 -
132 - #include <boost/filesystem.hpp>
133 -+#include <boost/filesystem/fstream.hpp>
134 - #include <boost/none.hpp>
135 - #include <boost/optional.hpp>
136 - #include <fmt/format.h>
137 ---- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
138 -+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
139 -@@ -36,6 +36,7 @@
140 - #include <limits>
141 -
142 - #include <boost/filesystem.hpp>
143 -+#include <boost/filesystem/fstream.hpp>
144 - #include <boost/filesystem/path.hpp>
145 -
146 - #include "mongo/base/simple_string_data_comparator.h"
147 ---- a/src/mongo/shell/shell_utils_extended.cpp
148 -+++ b/src/mongo/shell/shell_utils_extended.cpp
149 -@@ -37,6 +37,7 @@
150 - #endif
151 -
152 - #include <boost/filesystem.hpp>
153 -+#include <boost/filesystem/fstream.hpp>
154 - #include <fstream>
155 -
156 - #include "mongo/scripting/engine.h"
157 ---- a/src/mongo/db/storage/storage_repair_observer.cpp
158 -+++ b/src/mongo/db/storage/storage_repair_observer.cpp
159 -@@ -41,6 +41,7 @@
160 - #include <sys/types.h>
161 - #endif
162 -
163 -+#include <boost/filesystem/fstream.hpp>
164 - #include <boost/filesystem/path.hpp>
165 -
166 - #include "mongo/db/dbhelpers.h"
167
168 diff --git a/dev-db/mongodb/mongodb-4.2.17-r2.ebuild b/dev-db/mongodb/mongodb-4.2.17-r2.ebuild
169 deleted file mode 100644
170 index a0cb6465d289..000000000000
171 --- a/dev-db/mongodb/mongodb-4.2.17-r2.ebuild
172 +++ /dev/null
173 @@ -1,184 +0,0 @@
174 -# Copyright 1999-2022 Gentoo Authors
175 -# Distributed under the terms of the GNU General Public License v2
176 -
177 -EAPI=7
178 -
179 -PYTHON_COMPAT=( python3_{8..10} )
180 -
181 -SCONS_MIN_VERSION="2.5.0"
182 -CHECKREQS_DISK_BUILD="2400M"
183 -CHECKREQS_DISK_USR="512M"
184 -CHECKREQS_MEMORY="1024M"
185 -
186 -inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
187 -
188 -MY_P=${PN}-src-r${PV/_rc/-rc}
189 -
190 -DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
191 -HOMEPAGE="https://www.mongodb.com"
192 -SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
193 -
194 -LICENSE="Apache-2.0 SSPL-1"
195 -SLOT="0"
196 -KEYWORDS="amd64 ~arm64"
197 -IUSE="debug kerberos lto ssl test +tools"
198 -RESTRICT="!test? ( test )"
199 -
200 -RDEPEND="acct-group/mongodb
201 - acct-user/mongodb
202 - >=app-arch/snappy-1.1.3:=
203 - >=dev-cpp/yaml-cpp-0.6.2:=
204 - dev-libs/boost:=
205 - >=dev-libs/libpcre-8.42[cxx]
206 - app-arch/zstd:=
207 - dev-libs/snowball-stemmer:=
208 - net-libs/libpcap
209 - >=sys-libs/zlib-1.2.11:=
210 - kerberos? ( dev-libs/cyrus-sasl[kerberos] )
211 - ssl? (
212 - >=dev-libs/openssl-1.0.1g:0=
213 - )"
214 -DEPEND="${RDEPEND}
215 - ${PYTHON_DEPS}
216 - sys-libs/ncurses:0=
217 - sys-libs/readline:0=
218 - debug? ( dev-util/valgrind )"
219 -BDEPEND="
220 - $(python_gen_any_dep '
221 - test? ( dev-python/pymongo[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] )
222 - >=dev-util/scons-2.5.0[${PYTHON_USEDEP}]
223 - dev-python/cheetah3[${PYTHON_USEDEP}]
224 - dev-python/psutil[${PYTHON_USEDEP}]
225 - dev-python/pyyaml[${PYTHON_USEDEP}]
226 - ')
227 -"
228 -PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
229 -
230 -PATCHES=(
231 - "${FILESDIR}/${PN}-4.2.0-fix-scons.patch"
232 - "${FILESDIR}/${PN}-4.4.1-gcc11.patch"
233 - "${FILESDIR}/${PN}-4.2.15-no-compass.patch"
234 - "${FILESDIR}/${PN}-5.0.2-glibc-2.34.patch"
235 - "${FILESDIR}/${PN}-4.2.17-boost-1.79.patch"
236 -)
237 -
238 -S="${WORKDIR}/${MY_P}"
239 -
240 -python_check_deps() {
241 - if use test; then
242 - python_has_version "dev-python/pymongo[${PYTHON_USEDEP}]" || return 1
243 - python_has_version "dev-python/requests[${PYTHON_USEDEP}]" || return 1
244 - fi
245 -
246 - python_has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" &&
247 - python_has_version "dev-python/cheetah3[${PYTHON_USEDEP}]" &&
248 - python_has_version "dev-python/psutil[${PYTHON_USEDEP}]" &&
249 - python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
250 -}
251 -
252 -pkg_pretend() {
253 - if [[ -n ${REPLACING_VERSIONS} ]]; then
254 - if ver_test "$REPLACING_VERSIONS" -lt 4.0; then
255 - ewarn "To upgrade from a version earlier than the 4.0-series, you must"
256 - ewarn "successively upgrade major releases until you have upgraded"
257 - ewarn "to 4.0-series. Then upgrade to 4.2 series."
258 - else
259 - ewarn "Be sure to set featureCompatibilityVersion to 4.0 before upgrading."
260 - fi
261 - fi
262 -}
263 -
264 -src_prepare() {
265 - default
266 -
267 - # remove bundled libs
268 - rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*,zstandard-*} || die
269 -
270 - # remove compass
271 - rm -r src/mongo/installer/compass || die
272 -}
273 -
274 -src_configure() {
275 - # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
276 - # --use-system-icu fails tests
277 - # --use-system-tcmalloc is strongly NOT recommended:
278 - scons_opts=(
279 - AR="$(tc-getAR)"
280 - CC="$(tc-getCC)"
281 - CXX="$(tc-getCXX)"
282 -
283 - --disable-warnings-as-errors
284 - --use-system-boost
285 - --use-system-pcre
286 - --use-system-snappy
287 - --use-system-stemmer
288 - --use-system-yaml
289 - --use-system-zlib
290 - --use-system-zstd
291 - )
292 -
293 - use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300
294 - use debug && scons_opts+=( --dbg=on )
295 - use kerberos && scons_opts+=( --use-sasl-client )
296 - use lto && scons_opts+=( --lto=on )
297 - use ssl && scons_opts+=( --ssl )
298 -
299 - # Needed to avoid forcing FORTIFY_SOURCE
300 - # Gentoo's toolchain applies these anyway
301 - scons_opts+=( --runtime-hardening=off )
302 -
303 - # respect mongoDB upstream's basic recommendations
304 - # see bug #536688 and #526114
305 - if ! use debug; then
306 - filter-flags '-m*'
307 - filter-flags '-O?'
308 - fi
309 -
310 - default
311 -}
312 -
313 -src_compile() {
314 - escons "${scons_opts[@]}" core tools
315 -}
316 -
317 -# FEATURES="test -usersandbox" emerge dev-db/mongodb
318 -src_test() {
319 - ewarn "Tests may hang with FEATURES=usersandbox"
320 - "${EPYTHON}" ./buildscripts/resmoke.py run --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed with ${EPYTHON}"
321 -}
322 -
323 -src_install() {
324 - escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
325 -
326 - doman debian/mongo*.1
327 - dodoc README docs/building.md
328 -
329 - newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
330 - newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
331 - newinitd "${FILESDIR}/mongos.initd-r3" mongos
332 - newconfd "${FILESDIR}/mongos.confd-r3" mongos
333 -
334 - insinto /etc
335 - newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
336 - newins "${FILESDIR}/mongos.conf-r2" mongos.conf
337 -
338 - systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
339 -
340 - insinto /etc/logrotate.d/
341 - newins "${FILESDIR}/${PN}.logrotate" ${PN}
342 -
343 - # see bug #526114
344 - pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
345 -
346 - local x
347 - for x in /var/{lib,log}/${PN}; do
348 - diropts -m0750 -o mongodb -g mongodb
349 - keepdir "${x}"
350 - done
351 -}
352 -
353 -pkg_postinst() {
354 - ewarn "Make sure to read the release notes and follow the upgrade process:"
355 - ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
356 - ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
357 -}
358
359 diff --git a/dev-db/mongodb/mongodb-4.2.23.ebuild b/dev-db/mongodb/mongodb-4.2.23.ebuild
360 deleted file mode 100644
361 index a56c83d47041..000000000000
362 --- a/dev-db/mongodb/mongodb-4.2.23.ebuild
363 +++ /dev/null
364 @@ -1,183 +0,0 @@
365 -# Copyright 1999-2022 Gentoo Authors
366 -# Distributed under the terms of the GNU General Public License v2
367 -
368 -EAPI=7
369 -
370 -PYTHON_COMPAT=( python3_{8..10} )
371 -
372 -SCONS_MIN_VERSION="2.5.0"
373 -CHECKREQS_DISK_BUILD="2400M"
374 -CHECKREQS_DISK_USR="512M"
375 -CHECKREQS_MEMORY="1024M"
376 -
377 -inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
378 -
379 -MY_P=${PN}-src-r${PV/_rc/-rc}
380 -
381 -DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
382 -HOMEPAGE="https://www.mongodb.com"
383 -SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
384 -
385 -LICENSE="Apache-2.0 SSPL-1"
386 -SLOT="0"
387 -KEYWORDS="~amd64 ~arm64"
388 -IUSE="debug kerberos lto ssl test +tools"
389 -RESTRICT="!test? ( test )"
390 -
391 -RDEPEND="acct-group/mongodb
392 - acct-user/mongodb
393 - >=app-arch/snappy-1.1.3:=
394 - >=dev-cpp/yaml-cpp-0.6.2:=
395 - dev-libs/boost:=
396 - >=dev-libs/libpcre-8.42[cxx]
397 - app-arch/zstd:=
398 - dev-libs/snowball-stemmer:=
399 - net-libs/libpcap
400 - >=sys-libs/zlib-1.2.11:=
401 - kerberos? ( dev-libs/cyrus-sasl[kerberos] )
402 - ssl? (
403 - >=dev-libs/openssl-1.0.1g:0=
404 - )"
405 -DEPEND="${RDEPEND}
406 - ${PYTHON_DEPS}
407 - sys-libs/ncurses:0=
408 - sys-libs/readline:0=
409 - debug? ( dev-util/valgrind )"
410 -BDEPEND="
411 - $(python_gen_any_dep '
412 - test? ( dev-python/pymongo[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] )
413 - >=dev-util/scons-2.5.0[${PYTHON_USEDEP}]
414 - dev-python/cheetah3[${PYTHON_USEDEP}]
415 - dev-python/psutil[${PYTHON_USEDEP}]
416 - dev-python/pyyaml[${PYTHON_USEDEP}]
417 - ')
418 -"
419 -PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
420 -
421 -PATCHES=(
422 - "${FILESDIR}/${PN}-4.2.0-fix-scons.patch"
423 - "${FILESDIR}/${PN}-4.4.1-gcc11.patch"
424 - "${FILESDIR}/${PN}-4.2.15-no-compass.patch"
425 - "${FILESDIR}/${PN}-4.2.17-boost-1.79.patch"
426 -)
427 -
428 -S="${WORKDIR}/${MY_P}"
429 -
430 -python_check_deps() {
431 - if use test; then
432 - python_has_version "dev-python/pymongo[${PYTHON_USEDEP}]" || return 1
433 - python_has_version "dev-python/requests[${PYTHON_USEDEP}]" || return 1
434 - fi
435 -
436 - python_has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" &&
437 - python_has_version "dev-python/cheetah3[${PYTHON_USEDEP}]" &&
438 - python_has_version "dev-python/psutil[${PYTHON_USEDEP}]" &&
439 - python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
440 -}
441 -
442 -pkg_pretend() {
443 - if [[ -n ${REPLACING_VERSIONS} ]]; then
444 - if ver_test "$REPLACING_VERSIONS" -lt 4.0; then
445 - ewarn "To upgrade from a version earlier than the 4.0-series, you must"
446 - ewarn "successively upgrade major releases until you have upgraded"
447 - ewarn "to 4.0-series. Then upgrade to 4.2 series."
448 - else
449 - ewarn "Be sure to set featureCompatibilityVersion to 4.0 before upgrading."
450 - fi
451 - fi
452 -}
453 -
454 -src_prepare() {
455 - default
456 -
457 - # remove bundled libs
458 - rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*,zstandard-*} || die
459 -
460 - # remove compass
461 - rm -r src/mongo/installer/compass || die
462 -}
463 -
464 -src_configure() {
465 - # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
466 - # --use-system-icu fails tests
467 - # --use-system-tcmalloc is strongly NOT recommended:
468 - scons_opts=(
469 - AR="$(tc-getAR)"
470 - CC="$(tc-getCC)"
471 - CXX="$(tc-getCXX)"
472 -
473 - --disable-warnings-as-errors
474 - --use-system-boost
475 - --use-system-pcre
476 - --use-system-snappy
477 - --use-system-stemmer
478 - --use-system-yaml
479 - --use-system-zlib
480 - --use-system-zstd
481 - )
482 -
483 - use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300
484 - use debug && scons_opts+=( --dbg=on )
485 - use kerberos && scons_opts+=( --use-sasl-client )
486 - use lto && scons_opts+=( --lto=on )
487 - use ssl && scons_opts+=( --ssl )
488 -
489 - # Needed to avoid forcing FORTIFY_SOURCE
490 - # Gentoo's toolchain applies these anyway
491 - scons_opts+=( --runtime-hardening=off )
492 -
493 - # respect mongoDB upstream's basic recommendations
494 - # see bug #536688 and #526114
495 - if ! use debug; then
496 - filter-flags '-m*'
497 - filter-flags '-O?'
498 - fi
499 -
500 - default
501 -}
502 -
503 -src_compile() {
504 - escons "${scons_opts[@]}" core tools
505 -}
506 -
507 -# FEATURES="test -usersandbox" emerge dev-db/mongodb
508 -src_test() {
509 - ewarn "Tests may hang with FEATURES=usersandbox"
510 - "${EPYTHON}" ./buildscripts/resmoke.py run --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed with ${EPYTHON}"
511 -}
512 -
513 -src_install() {
514 - escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
515 -
516 - doman debian/mongo*.1
517 - dodoc README docs/building.md
518 -
519 - newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
520 - newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
521 - newinitd "${FILESDIR}/mongos.initd-r3" mongos
522 - newconfd "${FILESDIR}/mongos.confd-r3" mongos
523 -
524 - insinto /etc
525 - newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
526 - newins "${FILESDIR}/mongos.conf-r2" mongos.conf
527 -
528 - systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
529 -
530 - insinto /etc/logrotate.d/
531 - newins "${FILESDIR}/${PN}.logrotate" ${PN}
532 -
533 - # see bug #526114
534 - pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
535 -
536 - local x
537 - for x in /var/{lib,log}/${PN}; do
538 - diropts -m0750 -o mongodb -g mongodb
539 - keepdir "${x}"
540 - done
541 -}
542 -
543 -pkg_postinst() {
544 - ewarn "Make sure to read the release notes and follow the upgrade process:"
545 - ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
546 - ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
547 -}