diff options
Diffstat (limited to 'dev-vcs/mercurial')
-rw-r--r-- | dev-vcs/mercurial/Manifest | 5 | ||||
-rw-r--r-- | dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch | 30 | ||||
-rw-r--r-- | dev-vcs/mercurial/mercurial-6.3.2.ebuild | 333 |
3 files changed, 368 insertions, 0 deletions
diff --git a/dev-vcs/mercurial/Manifest b/dev-vcs/mercurial/Manifest index f80a58408379..66a88df99985 100644 --- a/dev-vcs/mercurial/Manifest +++ b/dev-vcs/mercurial/Manifest @@ -2,6 +2,7 @@ AUX 70mercurial-gentoo.el 76 BLAKE2B 2b9488757b2516dc494ce4f38c89b63669886eefaeb AUX cacerts.rc 51 BLAKE2B 8b42b2f4514d938b051feb7e59c69e6b06d1ceabe6c5a252a3cb4033555bcccda9375ae1fa9a5607f07296bd094c425077f5788e2c9fbca9b22914da41ddf132 SHA512 39c40c6cc95c54dcae13effb5c23f541f49fd89e0f040e214673afd906c6d5140eb18801d55330f4455507b467f0fae011998e60932e9a2accf37a0e7a047b90 AUX mercurial-5.8.1-testing-timeout.patch 494 BLAKE2B 010ab51a2bf4963ab8340052c5becee5a4ace471755b97e8d9409a9697a6697ac87bb2a5fc7556948a68f81bd3a78d17a7ec7523a70ca79848b5c175ff4f3515 SHA512 d4a8f05ebc2f8f44f9646fbaebee4f522cd271dcb4f72681fcb53df58b09fd031643dd5644aff80bda0480aaa21daf333245cb5d83d71941fa74d81858f8da33 AUX mercurial-6.0.2-testing-pygments211.patch 2363 BLAKE2B ae098930f1f92ee851c2d3ec213f77e7da31b6e8a97ce3d04e6f13da719708ac70dc8851ff0079ff80ce81936277a131703ac1264cf5452d6fdbe2c28c882f9a SHA512 c50c76db08410c7006138d36c93d35dc7ec56b6846773d0b969c99f2303fc136beb86cc5105e453ddb4c8ec6ef0e3eebb419ed7b0cd0b0a1b21b26e75e6ee815 +AUX mercurial-6.3.2-setup-rust-makedirs.patch 988 BLAKE2B f05f8fa856674062b79a7d769ba72343384a80cdb3b2c3cac44eef22165e6ef27d4cca0bc986af81961ec3376e55d3c05bb35eafcc6c022f7ffe12b0c8b9fa0b SHA512 b7849db5ec83e06ce8f6bb86a9b8dd9eca949eb349077307d4b1d347b12ca9fba462cdb2661539186ea8951ae9cf08b7c0a233140eaf8bd07dd7f182a3ab78c1 DIST Inflector-0.11.4.crate 17438 BLAKE2B eaf0c7f983b3186e9bc89353021a10592f2877e46585bd50b96db9b087343d1199c7b6cf3fa53cd274fb6d33de025a904b8aa31a7ac9599ae3689ecdbcec34cd SHA512 f1f6463e033b6d3c16c51dc1e1a3f5569954308b95b59058294b7f9310919bbda797e99e6a07529071bb83f0688867a243997d33795a7136b0af73977004296e DIST adler-0.2.3.crate 12168 BLAKE2B c7743569d700d7ec3185e0459a18181148f8cd7579f4da1fab30eb2e3c3cabbe5a7467f7760f0cba4b2fdeb62f8d988ee1f24637685d76db7acb56f679cfc996 SHA512 565849eba122eb94d240a0cba875035537058cc168f137a8a3b99392d753815d56fa0e1a1e851062632700b0e3d12caf67f5f768b9f727956a2e5b599029e9dc DIST ahash-0.4.7.crate 51474 BLAKE2B 0974b90539398d61903ce7fcbecdfcd802fcb5c7ed631be919ec17be6951e68bc80787876cafebd33e40a80605f6e2352a86047077bc40575420bb6ee1a4915a SHA512 2f42cdbacb2b2f9bd7d94a4cc61294d7813428157ce242ba82f7c3fccb6e4b83c767f4dedd35ff26ae61a89506b388d7cf96af4e727c29a14b25b9f82b1f2126 @@ -96,6 +97,7 @@ DIST mercurial-5.8.tar.gz 7985326 BLAKE2B 3b64343b692c389368b9c61baf367fe739bb79 DIST mercurial-6.0.2.tar.gz 8089180 BLAKE2B 3141e20e844c451717c93c347bc30843d11b3f66fbea3808199ea3a18a992be0fdb8f8dabe0010e1f038cf797b6148b224e7d7cfb067c184bcfd4ca2060d9980 SHA512 1591618840a3e4b862f0eb9e560d511b59eb34815de2e6e6cc1179d32f88a1e9a6f14abf3e02d76e17dbab1ffe384e52d97721e39da252ac5ba98a2233853c9a DIST mercurial-6.1.4.tar.gz 8070694 BLAKE2B e37fa67c22a153c3a939d5c20b7b601ef520378a1999ddb49b00937807edbc2ed67bb7819aadf4c9aebef0a812d8be2a99e4f96058a09ca3844a2f969e1d5420 SHA512 b43221c078efd4978fd47414d9442f423a97660e1f4c10d704a8d3403051778d2a25a0b4be6315d0a2126d01c14910ccbe9a5be6242b561a2bea0c522f54b731 DIST mercurial-6.2.3.tar.gz 8058864 BLAKE2B 72d710985298f17b2940b0a5cda896e8cadb881db0c9293c2c32ff3c2100dc2291fa314157b433eb05a5a25a442c0e0ae021a5abf7c477885a1e39201f5b0b0a SHA512 0d82582e6d40ceabcc32419bf0423dd9f49b72b72c91a0f575181f92b355699a88f0426a192c46ca47f3105e47cb45dc3ac1a6499f4c83e01fa31e31c1ffdfbb +DIST mercurial-6.3.2.tar.gz 8092710 BLAKE2B c64759736719af4a675abddd0f4d3578c815fc11a1644c52d7aaddfafb547faf018253d9a47e6ac869e7c1de91ca518b0106e77104e998deed9cbeadd6d3cee2 SHA512 5ca7e448bf336c2a2d4db174c4f486f66f41eef33db14f152abb09b8d82416124d251784cb5898499580083ca104113d0763e27baa9b77feb90ba2fd96d40be5 DIST micro-timer-0.3.1.crate 3357 BLAKE2B 13c518d2b3de6fa683078b9906b719498da2e2be5a23e7a2511f3d1d69730769031ed6b488927bec845c0405782f55cfe5af8610d56d92e716ff5d9056650f5a SHA512 197beadbdf35dd0892f6e0c1a09b6b57472166ecaec3e10be12c436e1381540100092c9e717684db44b53375390cf2c245fdc6fdb376117fdf5b4405ade73cf7 DIST micro-timer-0.4.0.crate 3513 BLAKE2B cc189b0db3d6fff554dec8548243894f70ea0445e095179bbe5b0d06dae4de6c09bcded31f00507d2f238523a3ef300e25054102d37cc4768aeef569ee7fc6a0 SHA512 33f1b5c65d9fb293fd86d52509687b7f9adb7af6bdcb3904f24740a9ad58ba9b30987d2a63fc19afcd6a55467f294ab098401f53bafafbd15c48b30d87232585 DIST micro-timer-macros-0.3.1.crate 2928 BLAKE2B 148639d1f22965c7487fefd19b1413797aad0f9e0c4eb8ee7be181e7b6bd39e03a6d3d68131b05e09f87a3ef653d6eda643952025983b49736a9c6ddb778aafa SHA512 9c9ffc8432c9377d2de3fce931f398d7f77012f496dd6c011718abd46535205766d9f5a7c97ff14ecd87bb172039d8e92a8c45cfd9c14d220a368448da1b7917 @@ -104,6 +106,7 @@ DIST miniz_oxide-0.4.3.crate 50058 BLAKE2B bc7a152a984de061803c11255459ce3d8fa64 DIST num-integer-0.1.44.crate 22216 BLAKE2B e1c08427e006cde6f2084adadb6086e87e6d6f8bb8dfa757a8228aa671e862a366e4bd8ca5e0500008c18bab128aead9bd5b1e53568a4f40afadcaf3882ee98f SHA512 d07e27ede02a1d007373935fd91e57a26e0e84ae14bbe24be66763baae6850788bd64ad2598d2bde4f4fad6c8a4675c40bfe0927164b16b9b69de5e9a83d9771 DIST num-traits-0.2.14.crate 45476 BLAKE2B ae310d9d5640acc3e45e1e5d1d2f519539795922c0058ee940c94c94b6654b39358b7c18dd23a276f2c1b16a30dd4de4cbc8575bcda6a5c11e70665d670e6439 SHA512 c3028eca9f7b718de0db3a36cf3e462bdba43562d52c9b809ed4cc0aa6af403aea542d6d4da743cd1dd541397815a3c5a84cef4d6e40122994e4be6a62319b2e DIST num_cpus-1.13.0.crate 14704 BLAKE2B e7a26e597ad5e45309393a9500b031ba64a77831320cbb96d7861139a2f7a453b7ba06a3255439b43ac1e2e36269b0a350d514020d3cd82c2513b57934b3ebbc SHA512 e75ec298fa682be84bf4efb6cf40126da9233ef25f07e887c2fa7421ee78790204564e6406c8219466651f47421e27f69eca690bb9cdfc982b644d78cc10de3f +DIST once_cell-1.14.0.crate 31614 BLAKE2B b9ac8f889c86d4160ee026fca20b5135aa7bd60e8bfaf23946d003bcf0b666929a4da5859d874449d15b6ba0ec4c26e98273d020be50184b9d44ae90b8608175 SHA512 81531f06f32854e1794555e10ccd6ee2b6913bfefdd9eed52dd44a02e799fa6371cdf102cc67bc70d581a0cc4abb7dd16c9c12ede6df4ff38b20dc5908bad186 DIST opaque-debug-0.3.0.crate 5767 BLAKE2B fb5d32c876a271b41582563f5d6978d75bc1cba2cc34167f491bc198e6eded45b9dea65effa3aa972ede20978808b37ad1aadb6837f926fa3378ffd382076d41 SHA512 9909b06668a4f97b4d0e916de3e1d0a922a5a0b911a7ce190de786f62ceaccd382cbd0dbe01ab0f15e5472c10848482da2307a6d897928b6b7d5365bc0321cae DIST ouroboros-0.15.0.crate 6177 BLAKE2B 70989f764e3b83cf3f3ed598290540370a305a9b5e22f76954117a19c9bb0ccd4723892c0cbccd361a13e4961c49b3383a3f216b368d70de9d4908da87db1f72 SHA512 20e1dd42bd5789d3822c7f7d862f69c11695c19475cd943ce049b33184e231dac32d89745cf57a2db822f5f2967ee84b29320f40708612610e336aedb0c08be8 DIST ouroboros_macro-0.15.0.crate 16239 BLAKE2B 6e40a0bd4f04dfe5f1b93f2ff0f9d169792e8f5c9c57089061f488b4d0907d0b45c63d0ccfe2ee7e0989c7009d96760bb4c873afa688e1359db09c1ee8ce0a68 SHA512 78003e89f1a062957d66261474392b32d67a75ab1933b2dadf9c6a8c8ecd29d184ef4a1f25cadd7e1afb23aa58dacf69ca6969c327405be5dc97b8fbc09568ae @@ -174,6 +177,7 @@ DIST tempfile-3.3.0.crate 27578 BLAKE2B e98c5ed4c59b6ff411e89ad4eb529bbe15264d67 DIST termcolor-1.1.2.crate 17287 BLAKE2B 5ff748064c9fb6663befce2fd299edf6a6deb06ea72d21a62d6e77642934cca0933e10340fa84f636631cc08c76ba83ef2284b2212759129d54248e5fccb4c49 SHA512 f37b034345382cd621b1344a3fb301ca3d4d9db8b5858ac1ea82372c983229fce3c0ea8213d6b7e91291b6034affe11e2c3e593dbd95256294ce5c584b33e14c DIST textwrap-0.11.0.crate 17322 BLAKE2B 257428908342774593bbd3528fcdae710712ff54e8a711393a24356d8ba0e16e466a4b20c05f942c48ca76b3b5b5aaa90ec202f782cad892caa8b71ccf124da6 SHA512 f5c0fe4f28ff1a3a0931e8e235b5157a45f67967985bcc752418c5ec3481fca44a8ae4800088889b37e8cd0533f53d3c456d5ffd19b767b3f83a87b49a2e209a DIST thread_local-1.0.1.crate 12609 BLAKE2B 34206b5232262cda9cc0fb970e20f154d43ff1c4477a5ad5ff9200e6d874a6c7b2bcd99a2dae75a984b54574281e049ad35307ace0dd188f44c9a95fa93139cf SHA512 f2bfca4eee32a8fc88a01ff5bf24518c12142228d95916d13aae35ed6addd0b7da2235359f15220049ef197555344ac31a8833775e7a5bd49144db9c54b3165b +DIST thread_local-1.1.4.crate 13106 BLAKE2B 64c19368f8cec46f23b3052759c4c4ef0de50748432790e6ea11b12477239b177d54e60b9046fdcb2f495b8e0b37ad82809d03602edab9fc85cf814e3bd94fe2 SHA512 db7ff3eb88a73d9313dd58d72397614c5aae6be1d64ead7f16535cae2857be3b27d189e7955308591ec64a0d67777fd2a62a2b124ca73facb9a2d8e0458bdbb5 DIST time-0.1.44.crate 28885 BLAKE2B 5e2ca11af9da0847239a086330d0cd00fcb5b63862f9dfec46f72a065bb35ec2236a21ee1c56bf65e3117105e7815cafe67e3725b8575373e875dfcea401d967 SHA512 736a38637be0193a06fa35d42b4873b04a0a35d84cd2af85b7f653a1b67b95078577134bb187b777730e73cce67f437b45ff5c72b8e3f1f8e2ed3420ea0324cf DIST twox-hash-1.6.0.crate 21402 BLAKE2B 97a3e7ea21a891ca514438c249dd792c7bba299543dd477d6eb77d0268c2f67dc8df15139ad8c18df52455936656e4def72346ffc554f2e5ad1b7abc32b8a3e0 SHA512 e271c72920a9ad6a551005063b85b26f6525290983b799741ddae708d0dfa9d312a60953c05de4e9c3049e2a49293860bc18280b1dbfed9819ca2abac9f9cb50 DIST twox-hash-1.6.2.crate 21880 BLAKE2B c073cf7feb4e8714b8e73a1c9247178b5571dc4b79b84ce84f9020b6e66370b0c4c14259c88393230a13302dd18e449e2dc2939782f17c66d095a450a3e485a9 SHA512 8171cf6970f18143cf2bd186014fe5a72d3ec5b2cd1e718b45dbc94e5cb6bea1b2485a6f6332d52411ffb85d746266c408b3b3dbd6c7c18a98cc0dc953cc21b1 @@ -204,5 +208,6 @@ EBUILD mercurial-5.8.ebuild 6683 BLAKE2B 42336dfc424cf2228e243e20071926b9e1c9b90 EBUILD mercurial-6.0.2.ebuild 6777 BLAKE2B fac453ca9480f11e447557d1ad69cf7b7cf5900ed12c6483819062aef938615f9999374b44a55d605777ae53aa469225e28f66287cedc878127e13ab162e588e SHA512 5b8fd9b6ae905a3ac2da811099e9cde8031117c240738da9966a5043ea8e6525e2efd2137d126811d11d94f6a079331d77c45367999a141f03c8a5108a5761bd EBUILD mercurial-6.1.4.ebuild 6958 BLAKE2B 5b1abb25a02c368669fa96160abad95110596cf8cc58f9caecfaba1d1902d4948421970f90cda64157739872368bf5be42f808dcfa659bda2c13c44770c56805 SHA512 6d605d0cc35fe3df9a20601c65013cd27ede1f66fb4dc82d50462a5435e27da0a04521ce51fb0e598dee97c4a28ebb7a33addab5dcdf3a719a18ccdfc1735337 EBUILD mercurial-6.2.3.ebuild 7022 BLAKE2B 5c1d2e9dfc50c195fa806be6bedcf50346e0fc41593cf717d2a5b0eda453e5fa633bb2c719448343a618fec371bd3f3da0f601ee1e598e7efc1c4e05e488d5b8 SHA512 10c1a7af8760a51de2470789b0fa40788bcd6912719a07ba10f73bd90e29297ea8f7c46b2848610293c3a180efd66d19119843d94c09c5e4b40c96419a7bdaab +EBUILD mercurial-6.3.2.ebuild 7119 BLAKE2B 7389ba580455f3792b1891495d0532c9389b0cd14bd1440ff415a96cb688d3da1add2c2c2c4c923f02487fbd11a73928f185b4ae5d819d0ec1e0c1aebcacb175 SHA512 c4178e21a08251e5babf2a13e486cde71f6fcaeed0a465c81319be9ba79a969837986be5d2df7a875684c54632e78b0ab48907adfdcf345ed0a1441aeea33144 EBUILD mercurial-9999.ebuild 4352 BLAKE2B 69b81c1d9b36ca5d5866e74409e53e8aa72605bbd3f77d94a90a56a211e8ab00c7df7fb8372732f5aa1af747e05677147a056b322fa5bf917cf15329eb28eee4 SHA512 348de31e06db802e2b27dceea6fb441a88a1a97bda2745746a00018b508da7da6206acb138ec1b307f02baca186360bc0f3bf42640955bbde70ef29d2c6c74b6 MISC metadata.xml 543 BLAKE2B 648353ce40bb4e93585e0f34b7bd7eba764b421ae9962835d2e00ae6e893e1b0c9f7e94e1e3548f098a57f5901840986784e5c7e163679b41f6475ff9ba190ce SHA512 e6850e1b5088298ad42f2a9ce5313a4c974562242ee77e7af5c53bcb91bddb1676a24690a14d67dbac911735aaef462d70019b6fb764e1e17556df29b0ac7e1b diff --git a/dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch b/dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch new file mode 100644 index 000000000000..d2082ec6cd24 --- /dev/null +++ b/dev-vcs/mercurial/files/mercurial-6.3.2-setup-rust-makedirs.patch @@ -0,0 +1,30 @@ +# HG changeset patch +# User Cédric Krier <ced@b2ck.com> +# Date 1674932937 -3600 +# Sat Jan 28 20:08:57 2023 +0100 +# Node ID 65a97b8b1268169fecc21749b7472fd155bfb399 +# Parent a1123772333204cbeb766b17de8089a1d13d4a68 +# EXP-Topic setup-rust-build-makedirs-target +Ensure target directory exists with building rust extension + +When the rust extension is the first to be build, the target directory may not +exist so the copy fails. + +diff --git a/setup.py b/setup.py +--- a/setup.py ++++ b/setup.py +@@ -1454,11 +1454,13 @@ class RustStandaloneExtension(RustExtens + target = [target_dir] + target.extend(self.name.split('.')) + target[-1] += DYLIB_SUFFIX ++ target = os.path.join(*target) ++ os.makedirs(os.path.dirname(target), exist_ok=True) + shutil.copy2( + os.path.join( + self.rusttargetdir, self.dylibname + self.rustdylibsuffix() + ), +- os.path.join(*target), ++ target, + ) + + diff --git a/dev-vcs/mercurial/mercurial-6.3.2.ebuild b/dev-vcs/mercurial/mercurial-6.3.2.ebuild new file mode 100644 index 000000000000..606ff35a8f45 --- /dev/null +++ b/dev-vcs/mercurial/mercurial-6.3.2.ebuild @@ -0,0 +1,333 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="threads(+)" +DISTUTILS_USE_SETUPTOOLS=no +CARGO_OPTIONAL=1 + +CRATES=" + Inflector-0.11.4 + adler-0.2.3 + ahash-0.4.7 + aho-corasick-0.7.18 + aliasable-0.1.3 + ansi_term-0.12.1 + atty-0.2.14 + autocfg-1.0.1 + bitflags-1.3.2 + bitmaps-2.1.0 + block-buffer-0.9.0 + block-buffer-0.10.2 + byteorder-1.4.3 + bytes-cast-0.2.0 + bytes-cast-derive-0.1.0 + cc-1.0.66 + cfg-if-0.1.10 + cfg-if-1.0.0 + chrono-0.4.19 + clap-2.34.0 + const_fn-0.4.4 + convert_case-0.4.0 + cpufeatures-0.1.4 + cpufeatures-0.2.1 + cpython-0.7.0 + crc32fast-1.2.1 + crossbeam-channel-0.5.2 + crossbeam-deque-0.8.0 + crossbeam-epoch-0.9.1 + crossbeam-utils-0.8.1 + crypto-common-0.1.2 + ctor-0.1.16 + derive_more-0.99.17 + diff-0.1.12 + digest-0.9.0 + digest-0.10.2 + either-1.6.1 + env_logger-0.9.0 + fastrand-1.7.0 + flate2-1.0.22 + format-bytes-0.3.0 + format-bytes-macros-0.4.0 + generic-array-0.14.4 + getrandom-0.1.15 + getrandom-0.2.4 + glob-0.3.0 + hashbrown-0.9.1 + hermit-abi-0.1.17 + hex-0.4.3 + home-0.5.3 + humantime-2.1.0 + im-rc-15.0.0 + instant-0.1.12 + itertools-0.9.0 + itertools-0.10.3 + jobserver-0.1.21 + lazy_static-1.4.0 + libc-0.2.124 + libm-0.2.1 + libz-sys-1.1.2 + log-0.4.14 + memchr-2.4.1 + memmap2-0.5.7 + memoffset-0.6.1 + micro-timer-0.4.0 + micro-timer-macros-0.4.0 + miniz_oxide-0.4.3 + num-integer-0.1.44 + num-traits-0.2.14 + num_cpus-1.13.0 + once_cell-1.14.0 + opaque-debug-0.3.0 + ouroboros-0.15.0 + ouroboros_macro-0.15.0 + output_vt100-0.1.2 + paste-1.0.5 + pkg-config-0.3.19 + ppv-lite86-0.2.10 + pretty_assertions-1.1.0 + proc-macro-error-1.0.4 + proc-macro-error-attr-1.0.4 + proc-macro2-1.0.24 + python3-sys-0.7.0 + quote-1.0.7 + rand-0.7.3 + rand-0.8.5 + rand_chacha-0.2.2 + rand_chacha-0.3.1 + rand_core-0.5.1 + rand_core-0.6.3 + rand_distr-0.4.3 + rand_hc-0.2.0 + rand_pcg-0.3.1 + rand_xoshiro-0.4.0 + rayon-1.5.1 + rayon-core-1.9.1 + redox_syscall-0.2.11 + regex-1.5.5 + regex-syntax-0.6.25 + remove_dir_all-0.5.3 + rustc_version-0.4.0 + same-file-1.0.6 + scopeguard-1.1.0 + semver-1.0.6 + sha-1-0.9.6 + sha-1-0.10.0 + sized-chunks-0.6.2 + stable_deref_trait-1.2.0 + static_assertions-1.1.0 + strsim-0.8.0 + syn-1.0.54 + tempfile-3.3.0 + termcolor-1.1.2 + textwrap-0.11.0 + thread_local-1.1.4 + time-0.1.44 + twox-hash-1.6.2 + typenum-1.12.0 + unicode-width-0.1.9 + unicode-xid-0.2.1 + users-0.11.0 + vcpkg-0.2.11 + vcsgraph-0.2.0 + vec_map-0.8.2 + version_check-0.9.2 + wasi-0.9.0+wasi-snapshot-preview1 + wasi-0.10.0+wasi-snapshot-preview1 + which-4.2.5 + winapi-0.3.9 + winapi-i686-pc-windows-gnu-0.4.0 + winapi-util-0.1.5 + winapi-x86_64-pc-windows-gnu-0.4.0 + zstd-0.5.4+zstd.1.4.7 + zstd-safe-2.0.6+zstd.1.4.7 + zstd-sys-1.4.18+zstd.1.4.7 +" + +inherit bash-completion-r1 cargo elisp-common distutils-r1 flag-o-matic multiprocessing + +DESCRIPTION="Scalable distributed SCM" +HOMEPAGE="https://www.mercurial-scm.org/" +SRC_URI="https://www.mercurial-scm.org/release/${P}.tar.gz + rust? ( $(cargo_crate_uris ${CRATES}) )" + +LICENSE="GPL-2+ + rust? ( BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 ISC MIT MPL-2.0 PSF-2 Unlicense ZLIB )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+chg emacs gpg test tk rust" + +BDEPEND="rust? ( ${RUST_DEPEND} )" +RDEPEND=" + app-misc/ca-certificates + gpg? ( app-crypt/gnupg ) + tk? ( dev-lang/tk )" + +DEPEND="emacs? ( >=app-editors/emacs-23.1:* ) + test? ( + app-arch/unzip + dev-python/pygments[${PYTHON_USEDEP}] + )" + +PATCHES=( + "${FILESDIR}"/${P}-setup-rust-makedirs.patch +) + +SITEFILE="70${PN}-gentoo.el" + +RESTRICT="!test? ( test )" + +src_unpack() { + default_src_unpack + if use rust; then + local S="${S}/rust/hg-cpython" + cargo_src_unpack + fi +} + +python_prepare_all() { + # fix up logic that won't work in Gentoo Prefix (also won't outside in + # certain cases), bug #362891 + sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die + sed -i -e 's/__APPLE__/__NO_APPLE__/g' mercurial/cext/osutil.c || die + + distutils-r1_python_prepare_all +} + +src_compile() { + if use rust; then + pushd rust/hg-cpython || die + cargo_src_compile --no-default-features --jobs $(makeopts_jobs) + popd || die + fi + distutils-r1_src_compile +} + +python_compile() { + filter-flags -ftracer -ftree-vectorize + if use rust; then + local -x HGWITHRUSTEXT="cpython" + fi + distutils-r1_python_compile build_ext +} + +python_compile_all() { + rm -r contrib/win32 || die + if use chg; then + emake -C contrib/chg + fi + if use emacs; then + cd contrib || die + elisp-compile mercurial.el || die "elisp-compile failed!" + fi +} + +src_install() { + distutils-r1_src_install +} + +python_install() { + if use rust; then + local -x HGWITHRUSTEXT="cpython" + fi + + distutils-r1_python_install build_ext + python_doscript contrib/hg-ssh +} + +python_install_all() { + distutils-r1_python_install_all + + newbashcomp contrib/bash_completion hg + + insinto /usr/share/zsh/site-functions + newins contrib/zsh_completion _hg + + dobin hgeditor + if use tk; then + dobin contrib/hgk + fi + + if use emacs; then + elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!" + elisp-site-file-install "${FILESDIR}"/${SITEFILE} + fi + + local RM_CONTRIB=( hgk hg-ssh bash_completion zsh_completion plan9 *.el ) + + if use chg; then + dobin contrib/chg/chg + doman contrib/chg/chg.1 + RM_CONTRIB+=( chg ) + fi + + for f in ${RM_CONTRIB[@]}; do + rm -rf contrib/${f} || die + done + + dodoc -r contrib + docompress -x /usr/share/doc/${PF}/contrib + doman doc/*.? + dodoc CONTRIBUTORS hgweb.cgi + + insinto /etc/mercurial/hgrc.d + doins "${FILESDIR}/cacerts.rc" +} + +src_test() { + pushd tests &>/dev/null || die + rm -rf *svn* # Subversion tests fail with 1.5 + rm -f test-archive* # Fails due to verbose tar output changes + rm -f test-convert-baz* # GNU Arch baz + rm -f test-convert-cvs* # CVS + rm -f test-convert-darcs* # Darcs + rm -f test-convert-git* # git + rm -f test-convert-mtn* # monotone + rm -f test-convert-tla* # GNU Arch tla + rm -f test-largefiles* # tends to time out + rm -f test-https* # requires to support tls1.0 + rm -rf test-removeemptydirs* # requires access to access parent directories + if [[ ${EUID} -eq 0 ]]; then + einfo "Removing tests which require user privileges to succeed" + rm -f test-convert* + rm -f test-lock-badness* + rm -f test-permissions* + rm -f test-pull-permission* + rm -f test-journal-exists* + rm -f test-repair-strip* + fi + + popd &>/dev/null || die + distutils-r1_src_test +} + +python_test() { + if [[ ${EPYTHON} == python3.10 ]]; then + einfo "Skipping tests for unsupported Python 3.10" + return + fi + distutils_install_for_testing + cd tests || die + PYTHONWARNINGS=ignore "${PYTHON}" run-tests.py \ + --jobs $(makeopts_jobs) \ + --timeout 0 \ + || die "Tests fail with ${EPYTHON}" +} + +pkg_postinst() { + use emacs && elisp-site-regen + + elog "If you want to convert repositories from other tools using convert" + elog "extension please install correct tool:" + elog " dev-vcs/cvs" + elog " dev-vcs/darcs" + elog " dev-vcs/git" + elog " dev-vcs/monotone" + elog " dev-vcs/subversion" +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |