diff options
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/Manifest.gz | bin | 65287 -> 65278 bytes | |||
-rw-r--r-- | dev-util/bcc/Manifest | 2 | ||||
-rw-r--r-- | dev-util/bcc/bcc-0.32.0.ebuild | 208 | ||||
-rw-r--r-- | dev-util/maturin/Manifest | 2 | ||||
-rw-r--r-- | dev-util/maturin/maturin-1.7.7.ebuild | 600 |
5 files changed, 210 insertions, 602 deletions
diff --git a/dev-util/Manifest.gz b/dev-util/Manifest.gz Binary files differindex 47de141b388b..88e90772bbbd 100644 --- a/dev-util/Manifest.gz +++ b/dev-util/Manifest.gz diff --git a/dev-util/bcc/Manifest b/dev-util/bcc/Manifest index 3adeddca7430..e3dc544d7d1a 100644 --- a/dev-util/bcc/Manifest +++ b/dev-util/bcc/Manifest @@ -7,8 +7,10 @@ AUX bcc-0.9.0-no-luajit-automagic-dep.patch 463 BLAKE2B 286ed298055cbdb22d9c3f3f DIST bcc-0.29.1.tar.gz 6778304 BLAKE2B 23df483df59ef7d66117b15628299a32155136aa5254edbf76f7507a972f3ebcba1d4b2aa83c41e8f061eeeb96812f522c34fed27e9a37e5f4ad3478c7cde88f SHA512 9e60130ea602e19e6c6f88a8c17023cea5daf4c5bcc7af8816e9f5c662341136eb449a3fdf870ffad215495ac3bf895115c0d968d92ce79ebe2899b3e2464d24 DIST bcc-0.30.0.tar.gz 6797246 BLAKE2B 517f4fcce8bcaf4c8c17075f9a906b452ee14a0c46fa500c301521fe46d854fcf4f632e741b34168dfeb819d9b0d64b967e716fa6222ba7dcaeddb03570985e6 SHA512 70478ca8c18e7f106c462513ca9af46f49b4ebcca6380a9393208fca88f83895a7396f918bf5d01dce1bc4a876bccb9b95aa56d426e55d384cf11c9baaa6a89b DIST bcc-0.31.0.tar.gz 6807504 BLAKE2B 75739914a18a7952bbefbed6f55b88d3be4f0483d2fd74bf7d6f7a6491d659ab893e7bd6b5e74c7b2239d6a2a9db04522487e3b36e7ddf65b1cc2d8712f786a8 SHA512 a1fe855c316d0508814dc02382b13897ff565bee52de0fc9d7521eabd304227e41bf7d322b10ab29fd5b13aeac85cc75ee76ac348cf1f4bb6499b8853bac10ab +DIST bcc-0.32.0.tar.gz 6812595 BLAKE2B 8ff131fc5e15eac3432f26c6b0846f5b1686acbfaaaf4758ab2698cdc51857e33fcf2009aea9a2ec06986476c4938d534467ab3905f3c7a74dbe713515181a9f SHA512 3612580976f9c91a52c49bc83abdbaccc9a066c30a7f178997cb91910307e48743d831ec028e0099e776250770b55e8fc8c937bcc9b1e36fbec88370376d1df4 EBUILD bcc-0.29.1-r1.ebuild 3077 BLAKE2B 5bddc44ed9baf221d095a08b52671f95d9a9c9d9e42c3d59f74a8d36a30e0bd56321b41284ffe6298e99b09588fa14dac975bdcd7ce9661b0fa63f9fbf30991f SHA512 ba6c01e2862044f2b18120d67d44d68527794b7b1d7fb8e02e2dbbd39128b0227fc91a8ce5e1d8402c8926c6d1c276ace5d42f553c16ae1ef50f9a2a94654df1 EBUILD bcc-0.29.1-r2.ebuild 3215 BLAKE2B 9bfc2ea97801068acca85fb76b8f8c6741ba3bfad22c5ca8558c72ab45192be33e867432fb723adce10f7f6990c84123664578798087ecb28529e8a5b5ae0ba3 SHA512 eec526af76fe846346e5c940b6814509f7384b24352e09dc1ead3a7ae61c480e24bd19166fe58f3f00213b60e85984429a446cd94c7fa459950e042066a9ebe2 EBUILD bcc-0.30.0-r1.ebuild 3100 BLAKE2B 0d55aa7a737730575c0b35aaf6cf41a533e3a33112db120776f8eec99eaeef10bdb7f9db0fafaa8bae428fad9e0b8ab1ab29608df6e60aad8f7e0d7b7c4d94c4 SHA512 3ea3d73928d48c9a23a0fe16edc7981d0e7c70ef89f502322b0b05b048799447aa4675f4878a85a1e022c8a5a91a70e4adbcd0b8eb0e8afb8de8d48d8d5e22fc EBUILD bcc-0.31.0-r2.ebuild 4682 BLAKE2B 8e3be48d0173c10dc3924f7f62b19f97da8627aee15e125dc156cdc229e102391423a14c5b7637c8822c9adf7bb33c841271925ccf41e98b3bb17d2105620098 SHA512 fc56a5fd8944fd42a7f80db82ef32671251094f65ce7414adea810612e56b8214dbbf79619bbcc4dfaa1e8231ce5daac39c1b36c371ec572ce6e45559f543d19 +EBUILD bcc-0.32.0.ebuild 4690 BLAKE2B e5c40ed9bc1299f8ffa9be36bdc468d3dd6098638752cc51995edfdb147bf2ab48332cc04e37c2da022fa08fd8dd99b495e77021dfc28f309d569107cb87c3b3 SHA512 ceac4e49813fa0427379e251de9445d68776404ddf01343d99d67d86a071a3b696a2284ae2109e6e4122363cc08198419c3eec8e5749804b993a9e4340911c04 MISC metadata.xml 419 BLAKE2B 8b46153f6ab2d6959a767f105a9e33109f705bf879bd4d6708eb4a85e310140d8f810569bf3e37f89bd5a07758de7653697214643b606dc314009e8b8db709ac SHA512 3036d51a8ff5c5adc507387aad252ab7a90c341c5f04c626158353d938992e78c6b5e344354220141979f91522e0204e388d47fd0ccf91415634f6cde646a0c3 diff --git a/dev-util/bcc/bcc-0.32.0.ebuild b/dev-util/bcc/bcc-0.32.0.ebuild new file mode 100644 index 000000000000..0193f9da4405 --- /dev/null +++ b/dev-util/bcc/bcc-0.32.0.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( luajit ) +DISTUTILS_OPTIONAL=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{{10..13},13t} ) +LLVM_COMPAT=( {15..18} ) + +inherit cmake linux-info llvm-r1 lua-single distutils-r1 toolchain-funcs + +DESCRIPTION="Tools for BPF-based Linux IO analysis, networking, monitoring, and more" +HOMEPAGE="https://iovisor.github.io/bcc/" +SRC_URI="https://github.com/iovisor/bcc/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~riscv ~x86" +IUSE="+lua lzma +python static-libs test" + +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + lua? ( python ${LUA_REQUIRED_USE} ) +" + +# tests need root access +RESTRICT="test" + +RDEPEND=" + app-arch/zstd:= + >=dev-libs/elfutils-0.166:= + >=dev-libs/libbpf-1.2.0:= + dev-libs/libffi:= + sys-kernel/linux-headers + sys-libs/ncurses:=[tinfo] + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT}= + llvm-core/llvm:${LLVM_SLOT}= + ') + lzma? ( || ( + app-arch/xz-utils + app-arch/lzma + ) ) + python? ( ${PYTHON_DEPS} ) + lua? ( ${LUA_DEPS} ) +" +DEPEND=" + ${RDEPEND} + test? ( + || ( + net-misc/iputils[arping] + net-analyzer/arping + ) + net-analyzer/netperf + net-misc/iperf:* + ) +" +BDEPEND=" + app-arch/zip + sys-devel/flex + sys-devel/bison + virtual/pkgconfig + python? ( ${DISTUTILS_DEPS} ) +" + +PATCHES=( + "${FILESDIR}/bcc-0.9.0-no-luajit-automagic-dep.patch" + "${FILESDIR}/bcc-0.25.0-cmakelists.patch" + "${FILESDIR}/bcc-0.23.0-man-compress.patch" + "${FILESDIR}/bcc-0.31.0-no-automagic-deps.patch" +) + +pkg_pretend() { + local CONFIG_CHECK="~BPF ~BPF_SYSCALL ~NET_CLS_BPF ~NET_ACT_BPF + ~HAVE_EBPF_JIT ~BPF_EVENTS ~DEBUG_INFO ~FUNCTION_TRACER ~KALLSYMS_ALL + ~KPROBES" + + check_extra_config +} + +pkg_setup() { + llvm-r1_pkg_setup + use python && python_setup +} + +bcc_distutils_phase() { + if use python; then + local python_phase_func="distutils-r1_${EBUILD_PHASE_FUNC}" + + if declare -f "${python_phase_func}" > /dev/null; then + pushd "${S}/src/python" > /dev/null || die + MY_S="${S}" S="${S}/src/python" "${python_phase_func}" + popd > /dev/null || die + else + die "Called ${FUNCNAME[0]} called in ${EBUILD_PHASE_FUNC}, but ${python_phase_func} doesn't exist" + fi + fi +} + +src_prepare() { + local bpf_link_path + + # this avoids bundling + bpf_link_path="$(realpath --relative-to="${S}/src/cc/libbpf" /usr/include/bpf)" || die + ln -sfn "${bpf_link_path}" src/cc/libbpf/include || die + + # bug 811288 + local script scriptname + for script in $(find tools/old -type f -name "*.py" || die); do + mv "${script}" "tools/old/old-${script##*/}" || die + done + + sed -i '/#include <error.h>/d' examples/cpp/KModRetExample.cc || die + + use static-libs || PATCHES+=( "${FILESDIR}/bcc-0.31.0-dont-install-static-libs.patch" ) + + # use distutils-r1 eclass funcs rather than letting upstream handle python + printf '\n' > src/python/CMakeLists.txt || die + + if use python; then + for python_file in $(find "${S}/src/python" -name '*.py.in' || die); do + sed "s:@REVISION@:${PV%%_*}:" "${python_file}" > "${python_file%.in}" || die + done + fi + + cmake_src_prepare + bcc_distutils_phase +} + +src_configure() { + local mycmakeargs=( + -DREVISION=${PV%%_*} + -DENABLE_LLVM_SHARED=ON + -DENABLE_NO_PIE=OFF + -DWITH_LZMA=$(usex lzma) + -DCMAKE_USE_LIBBPF_PACKAGE=ON + -DLIBBPF_INCLUDE_DIRS="$($(tc-getPKG_CONFIG) --cflags-only-I libbpf | sed 's:-I::g')" + -DKERNEL_INCLUDE_DIRS="${KERNEL_DIR}" + -DNO_BLAZESYM=ON + -Wno-dev + ) + if use lua && use lua_single_target_luajit; then + mycmakeargs+=( -DWITH_LUAJIT=ON ) + fi + + cmake_src_configure + bcc_distutils_phase +} + +src_compile() { + cmake_src_compile + bcc_distutils_phase +} + +bcc_tool_name() { + local -A rename_tools=( + [trace]=1 + [profile]=1 + [inject]=1 + [capable]=1 + ) + + local name="${1}" + + local name="${name##*/}" + name="${name%.py}" + + [[ -n ${rename_tools[${name}]} ]] && name=bcc-${name} + + printf -- '%s\n' "${name}" +} + +python_install() { + distutils-r1_python_install + + python_scriptinto /usr/sbin + + local tool + for tool in $(grep -Elr '#!/usr/bin/(env |)python' "${MY_S}/tools"); do + python_newscript "${tool}" "$(bcc_tool_name "${tool}")" + done +} + +src_install() { + cmake_src_install + bcc_distutils_phase + + newenvd "${FILESDIR}"/60bcc.env 60bcc.env + + local tool target + for tool in "${ED}"/usr/share/bcc/tools/*; do + [[ -d ${tool} || ! -x ${tool} || ${tool} =~ .*[.](c|txt) ]] && continue + grep -qE '^#!/usr/bin/(env |)python' "${tool}" && continue + + target="/usr/sbin/$(bcc_tool_name "${tool}")" + [[ -e ${ED}${target} ]] && continue + + dosym -r "${tool#${ED}}" "${target}" + done + + docompress /usr/share/${PN}/man + + newenvd - "70${P}" <<-_EOF_ + MANPATH="${EPREFIX}/usr/share/${PN}/man" + _EOF_ +} diff --git a/dev-util/maturin/Manifest b/dev-util/maturin/Manifest index e7713a9e9c53..de699e423c8a 100644 --- a/dev-util/maturin/Manifest +++ b/dev-util/maturin/Manifest @@ -188,7 +188,6 @@ DIST lzxd-0.2.5.crate 22728 BLAKE2B 5822d0d453def5b937e7414e055b637e6aa018a4ced0 DIST mailparse-0.15.0.crate 37293 BLAKE2B 3ef9c0f3e65288066a1a792b3ad5bf4ca08126573fd15d9360b2d7748ba623ee0bf3eff1073b3244f1ca5007c2ea9c4e88310dc3809826ae940b13091df47134 SHA512 85899a2a65d195778615e3cebd2e5b6ad2ea3fd2b5a8929caab7fbd3e50306a5c99328deb7ffad9b3135f3fafca4c4e74f372e42a88d2785ade215334b92b416 DIST matchers-0.1.0.crate 6948 BLAKE2B ec3a5d01d2fedbb4dbf5bb185afbb9401410463a61f51674e0df6a571db352b2bbabfb99cdbdcfb4e511ae783165bf0258f5163f240a229b9087f9edbd0df41a SHA512 84214c1a84952d85631aa1ab5115df7cda223ac64e2acf055b6129ba1aa26ddc87615a8b51ca890ce3fee0419053fa7fe1599ae128f1d211b58c07b0c4af3b19 DIST maturin-1.7.4.gh.tar.gz 511488 BLAKE2B 008b2d67d553479040fcd3062b93ca12dc6f2b98c3d6cb43cac7ff0d8e4772417b99fbf2a73ed96cfcc8a7372b37d845e8485ba0afc80342943a10d716492377 SHA512 72fb43a10d3cdf35eca224232c59723bff5b9230c7d40ff01537e1ba869254b4b6e9a0c52e8b7154f7b74f0f0b5bace4e7bb9ac5257c9fbc04750160791c35e3 -DIST maturin-1.7.7.gh.tar.gz 526716 BLAKE2B 3ba81530e84b9f1ade50b4d17aa5841a75ae731e32ac0e2581ea31a424042141e3d452c5547f79d84f76e6205255c8137354aa7e203f97349f9e88a28b91a30f SHA512 4926cd5fa764f571d2b98cd0ec2e458c0da09524521d99c85179a55bb2729d1a12fdcbc2e56e9ccc62ed2a40a4c4a9b71c2fc51a2c3e69f58c5c9a7aa48244ee DIST maturin-1.7.8.gh.tar.gz 526856 BLAKE2B 0fcd40dbf20cd961aa97e936b58ea79aceddfe6175ba4c1d1b413c224c889f393719dffe583859c35894173801cbd5303093802c5a4986038eb00a1f4ff3f3d4 SHA512 11dd229bc0a240fe915ae4aa69d5dd10032ea41782cb2bf76e77e58a8d474543b133a78d6b24a0383ef281f83122f34e1e0c332227720643b63226c18e318445 DIST memchr-2.7.2.crate 96220 BLAKE2B 2399064b6db21838d4aa0b25ed0bf04940ee3820741658cc6bf62e5ade08f41320df743ff13f99b2781da7b844e18deb1cfe25fe570f0e93f98ff03ca5d442e3 SHA512 cadcb4239c7f3aaab042592c5186770a225621e32f8583052fd3dbebb4a6d9b99be28f589b39b5ca36cb2d56fb3709e7d4ba91838ebb882e28e51280c02bbc40 DIST memchr-2.7.4.crate 96670 BLAKE2B da38114beca670467c3e1fbf4e415af6f22d52e3223715d52e181babb89b872b46511563985bcc16d7ff4e82f812c6e83ad904b0fe2501b14445119dfa8240e6 SHA512 8d0e8b9c30208897d4b1b920f1bdcccd0c2b75d92a06abe4a1b2407938768abb6487d63de56c6a80419798fe69517210643dfaf11f5f5540185f0eccf220adb2 @@ -485,6 +484,5 @@ DIST zip-0.6.6.crate 65789 BLAKE2B acefc076297468d72cb20d8c6234fe5406875056fbf78 DIST zip-2.1.6.crate 107876 BLAKE2B 2e1f3f5dd3ec3911361e0b32227a0622fc40e12a84d1eec51b1cc6ce8b402e6530fb7c3a3d5b4ebe19a975a698ef3acde895d009e660cddb27c4d87c2d01b777 SHA512 f0c7ca518faa8b353a83e485c1522247e1e2054ae2b480c188ae0b80192223b1ea89b3163efe87ee8cb2912f20748ea6e835c1abbe67ef426f1a7a31bb967f95 DIST zopfli-0.8.1.crate 50972 BLAKE2B 27cde48858dc65ec8082d4e0d81e2758f92d3dcc7a1c1f08aa6448e99f2995a865ac3259353b26e787f108c2f88ce3c7610413ea9d3daae6f864900d74565de6 SHA512 799e25c0cc9f0bf2119a7c03225b11ed94e7c3ac83f872a27da8ae15c90206245121c38f5e2b78fece131f5bb428f01fabbfd1b1e18ea456957940042d38f38d EBUILD maturin-1.7.4-r1.ebuild 12458 BLAKE2B 594759cd0026cc4e25b491729ef4b2b043f9ed8427bcee3ac308026319bac3537311a22168920d484a4b76314b94b61f14589c42dea0b9f86ca936efb90156c0 SHA512 32a83cde5975e60e1b873e73358936252e4f6b878553a2ececad5bb594ff49ceafb65f186f133238b78bf2fb812dfef11810550214275593a7f9c432c9e6090b -EBUILD maturin-1.7.7.ebuild 12832 BLAKE2B fd7b413db76002a0fa0e73e557b0a27c8b106f849dde821e5e5c02cdcba6cfe57a8f810a8bff4f7e6f12d359f8846afac5829fb065d4c29dfd6b9503f29f0665 SHA512 922c7b529f68b47ee0bf03e1540afb6f3c265828d5e1cbdd4a3504c99079105b2dc59250418797735cea3974a999bee06adc409a6c75a23e3f89b35690ce03eb EBUILD maturin-1.7.8.ebuild 12854 BLAKE2B 0e6e7efda37950e485e10730910724fe823ec1916df988c6721c258310a31139e325a577e6a50be1ca9c5821d9f30f13ac1a1fa5bc60d09c72c8386e025c7a9a SHA512 ebed9de6004f3b4447de1782507d0d68657431dc80534152d7a6f3c5d5d070bbc0071019093fc2df73ee15783340d5038cd06bbcafdf7ba2faf87ffbc3797d83 MISC metadata.xml 431 BLAKE2B 15731479f56d8b819c60e8e5541d3c4720462c5a90b199b803097b208432b18cc0143f8cbee471ce81ffeb8b54846fdb61fad083e7507f4f6c3630ac628546ed SHA512 7431db948fd5ab520fb6cae76c7e7dbb2c7aef907d7cde21189d1bb17c686cca7f69a0b84470b1c5d90f672e80d30fbb56f37beec1da04ebfdf025015c099ae7 diff --git a/dev-util/maturin/maturin-1.7.7.ebuild b/dev-util/maturin/maturin-1.7.7.ebuild deleted file mode 100644 index f77e80e1bf5a..000000000000 --- a/dev-util/maturin/maturin-1.7.7.ebuild +++ /dev/null @@ -1,600 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CRATES=" - adler2@2.0.0 - ahash@0.8.11 - aho-corasick@1.1.3 - allocator-api2@0.2.18 - anstream@0.6.14 - anstyle-parse@0.2.4 - anstyle-query@1.1.0 - anstyle-wincon@3.0.3 - anstyle@1.0.7 - anyhow@1.0.89 - arbitrary@1.4.1 - autocfg@1.3.0 - automod@1.0.14 - base64@0.21.7 - base64@0.22.1 - bitflags@1.3.2 - bitflags@2.5.0 - block-buffer@0.10.4 - bstr@1.10.0 - bumpalo@3.16.0 - byteorder@1.5.0 - bytesize@1.3.0 - bytes@1.7.1 - bzip2-sys@0.1.11+1.0.8 - bzip2@0.4.4 - cab@0.6.0 - camino@1.1.9 - cargo-config2@0.1.26 - cargo-options@0.7.4 - cargo-platform@0.1.8 - cargo-xwin@0.17.5 - cargo-zigbuild@0.19.5 - cargo_metadata@0.19.0 - cbindgen@0.27.0 - cc@1.1.21 - cfb@0.10.0 - cfg-if@1.0.0 - charset@0.1.5 - chumsky@0.9.3 - clap@4.5.7 - clap_builder@4.5.7 - clap_complete@4.5.5 - clap_complete_command@0.6.1 - clap_complete_nushell@4.5.2 - clap_derive@4.5.5 - clap_lex@0.7.1 - cli-table@0.4.7 - colorchoice@1.0.1 - configparser@3.1.0 - console@0.15.8 - content_inspector@0.2.4 - core-foundation-sys@0.8.6 - core-foundation@0.9.4 - cpufeatures@0.2.12 - crc32fast@1.4.2 - crc-catalog@2.4.0 - crc@3.2.1 - crossbeam-channel@0.5.13 - crossbeam-deque@0.8.5 - crossbeam-epoch@0.9.18 - crossbeam-utils@0.8.20 - crypto-common@0.1.6 - data-encoding@2.6.0 - deranged@0.3.11 - derivative@2.2.0 - derive_arbitrary@1.4.1 - dialoguer@0.11.0 - diff@0.1.13 - digest@0.10.7 - dirs-sys@0.4.1 - dirs@5.0.1 - displaydoc@0.2.5 - dissimilar@1.0.9 - dunce@1.0.5 - dyn-clone@1.0.17 - either@1.13.0 - encode_unicode@0.3.6 - encoding_rs@0.8.34 - equivalent@1.0.1 - errno@0.3.9 - expect-test@1.5.0 - fastrand@2.1.0 - fat-macho@0.4.9 - filetime@0.2.23 - flate2@1.0.33 - fnv@1.0.7 - foreign-types-shared@0.1.1 - foreign-types@0.3.2 - form_urlencoded@1.2.1 - fs4@0.11.1 - fs-err@2.11.0 - fs-err@3.0.0 - futures-channel@0.3.31 - futures-core@0.3.31 - futures-executor@0.3.30 - futures-io@0.3.31 - futures-macro@0.3.31 - futures-sink@0.3.31 - futures-task@0.3.31 - futures-timer@3.0.3 - futures-util@0.3.31 - futures@0.3.30 - generic-array@0.14.7 - getrandom@0.2.15 - globset@0.4.15 - glob@0.3.1 - goblin@0.9.2 - hashbrown@0.14.5 - heck@0.4.1 - heck@0.5.0 - home@0.5.9 - humantime-serde@1.1.1 - humantime@2.1.0 - idna@0.5.0 - ignore@0.4.23 - indexmap@2.5.0 - indicatif@0.17.8 - indoc@2.0.5 - instant@0.1.13 - is_terminal_polyfill@1.70.0 - itertools@0.12.1 - itoa@1.0.11 - keyring@2.3.3 - lazy_static@1.4.0 - lddtree@0.3.7 - libc@0.2.158 - libmimalloc-sys@0.1.38 - libredox@0.1.3 - linux-keyutils@0.2.4 - linux-raw-sys@0.4.14 - litemap@0.7.3 - lockfree-object-pool@0.1.6 - lock_api@0.4.12 - log@0.4.21 - lzxd@0.2.5 - mailparse@0.15.0 - matchers@0.1.0 - memchr@2.7.2 - mimalloc@0.1.42 - mime@0.3.17 - mime_guess@2.0.4 - minijinja@2.5.0 - minimal-lexical@0.2.1 - miniz_oxide@0.8.0 - msi@0.8.0 - multipart@0.18.0 - native-tls@0.2.12 - nom@7.1.3 - normalize-line-endings@0.3.0 - normpath@1.2.0 - number_prefix@0.4.0 - num-conv@0.1.0 - nu-ansi-term@0.46.0 - once_cell@1.19.0 - openssl-macros@0.1.1 - openssl-probe@0.1.5 - openssl-sys@0.9.103 - openssl@0.10.66 - option-ext@0.2.0 - os_pipe@1.2.0 - overload@0.1.1 - parking_lot@0.12.3 - parking_lot_core@0.9.10 - paste@1.0.15 - path-slash@0.2.1 - pep440_rs@0.6.6 - pep508_rs@0.6.1 - percent-encoding@2.3.1 - pin-project-lite@0.2.14 - pin-utils@0.1.0 - pkg-config@0.3.30 - plain@0.2.3 - platform-info@2.0.3 - portable-atomic@1.6.0 - powerfmt@0.2.0 - ppv-lite86@0.2.17 - pretty_assertions@1.4.1 - proc-macro2@1.0.85 - proc-macro-crate@3.1.0 - psm@0.1.21 - pyproject-toml@0.11.0 - python-pkginfo@0.6.3 - quoted_printable@0.5.0 - quote@1.0.36 - rand@0.8.5 - rand_chacha@0.3.1 - rand_core@0.6.4 - rayon-core@1.12.1 - rayon@1.10.0 - redox_syscall@0.4.1 - redox_syscall@0.5.1 - redox_users@0.4.5 - regex-automata@0.1.10 - regex-automata@0.4.7 - regex-syntax@0.6.29 - regex-syntax@0.8.4 - regex@1.10.6 - relative-path@1.9.3 - rfc2047-decoder@1.0.5 - ring@0.17.8 - rstest@0.22.0 - rstest_macros@0.22.0 - rustc_version@0.4.1 - rustflags@0.1.6 - rustix@0.38.34 - rustls-pemfile@2.1.3 - rustls-pki-types@1.10.0 - rustls-webpki@0.102.8 - rustls@0.23.19 - rustversion@1.0.17 - ryu@1.0.18 - same-file@1.0.6 - schannel@0.1.23 - schemars@0.8.21 - schemars_derive@0.8.21 - scopeguard@1.2.0 - scroll@0.12.0 - scroll_derive@0.12.0 - security-framework-sys@2.11.0 - security-framework@2.11.0 - semver@1.0.23 - serde@1.0.210 - serde_derive@1.0.210 - serde_derive_internals@0.29.1 - serde_json@1.0.128 - serde_spanned@0.6.6 - sha2@0.10.8 - sharded-slab@0.1.7 - shell-words@1.1.0 - shlex@1.3.0 - simd-adler32@0.3.7 - similar@2.5.0 - slab@0.4.9 - smallvec@1.13.2 - smawk@0.3.2 - snapbox-macros@0.3.10 - snapbox@0.6.16 - socks@0.3.4 - spin@0.9.8 - stable_deref_trait@1.2.0 - stacker@0.1.15 - static_assertions@1.1.0 - strsim@0.11.1 - subtle@2.5.0 - syn@1.0.109 - syn@2.0.87 - target-lexicon@0.12.16 - tar@0.4.42 - tempfile@3.11.0 - termcolor@1.4.1 - terminal_size@0.3.0 - textwrap@0.16.1 - thiserror-impl@1.0.64 - thiserror-impl@2.0.3 - thiserror@1.0.64 - thiserror@2.0.3 - thread_local@1.1.8 - time-core@0.1.2 - time-macros@0.2.18 - time@0.3.36 - tinyvec@1.7.0 - tinyvec_macros@0.1.1 - toml@0.8.15 - toml_datetime@0.6.6 - toml_edit@0.21.1 - toml_edit@0.22.16 - tracing-attributes@0.1.27 - tracing-core@0.1.32 - tracing-log@0.2.0 - tracing-serde@0.1.3 - tracing-subscriber@0.3.18 - tracing@0.1.40 - trycmd@0.15.6 - twox-hash@1.6.3 - typenum@1.17.0 - unicase@2.7.0 - unicode-bidi@0.3.15 - unicode-ident@1.0.12 - unicode-linebreak@0.1.5 - unicode-normalization@0.1.23 - unicode-width@0.1.13 - unicode-xid@0.2.6 - unscanny@0.1.0 - untrusted@0.9.0 - ureq@2.11.0 - urlencoding@2.1.3 - url@2.5.2 - utf8parse@0.2.2 - uuid@1.8.0 - valuable@0.1.0 - vcpkg@0.2.15 - versions@6.2.0 - version_check@0.9.4 - wait-timeout@0.2.0 - walkdir@2.5.0 - wasi@0.11.0+wasi-snapshot-preview1 - webpki-roots@0.26.2 - which@7.0.0 - wild@2.2.1 - winapi-i686-pc-windows-gnu@0.4.0 - winapi-util@0.1.8 - winapi-x86_64-pc-windows-gnu@0.4.0 - winapi@0.3.9 - windows-sys@0.48.0 - windows-sys@0.52.0 - windows-targets@0.48.5 - windows-targets@0.52.5 - windows_aarch64_gnullvm@0.48.5 - windows_aarch64_gnullvm@0.52.5 - windows_aarch64_msvc@0.48.5 - windows_aarch64_msvc@0.52.5 - windows_i686_gnullvm@0.52.5 - windows_i686_gnu@0.48.5 - windows_i686_gnu@0.52.5 - windows_i686_msvc@0.48.5 - windows_i686_msvc@0.52.5 - windows_x86_64_gnullvm@0.48.5 - windows_x86_64_gnullvm@0.52.5 - windows_x86_64_gnu@0.48.5 - windows_x86_64_gnu@0.52.5 - windows_x86_64_msvc@0.48.5 - windows_x86_64_msvc@0.52.5 - winnow@0.5.40 - winnow@0.6.13 - winsafe@0.0.19 - xattr@1.3.1 - xwin@0.6.5 - yansi@1.0.1 - yoke@0.7.4 - zerocopy-derive@0.7.34 - zerocopy@0.7.34 - zerofrom@0.1.4 - zeroize@1.8.1 - zip@0.6.6 - zip@2.1.6 - zopfli@0.8.1 -" -# additional crates used by test-crates/* test packages, -# `grep test-crates tests/run.rs` to see which are needed -CRATES_TEST=" - anstream@0.6.15 - anstyle-parse@0.2.5 - anstyle-query@1.1.1 - anstyle-wincon@3.0.4 - anstyle@1.0.8 - anyhow@1.0.86 - askama@0.12.1 - askama_derive@0.12.5 - askama_escape@0.10.3 - askama_parser@0.2.1 - autocfg@1.1.0 - autocfg@1.4.0 - basic-toml@0.1.9 - bincode@1.3.3 - bytes@1.6.0 - camino@1.1.7 - cargo_metadata@0.15.4 - cc@1.0.73 - cc@1.0.81 - cc@1.0.83 - clap@4.5.16 - clap_builder@4.5.15 - clap_derive@4.5.13 - clap_lex@0.7.2 - colorchoice@1.0.2 - getrandom@0.2.10 - goblin@0.8.2 - indoc@2.0.4 - is_terminal_polyfill@1.70.1 - libc@0.2.134 - libc@0.2.147 - libc@0.2.149 - libc@0.2.155 - libc@0.2.161 - log@0.4.22 - memchr@2.7.4 - memoffset@0.9.0 - memoffset@0.9.1 - mime_guess@2.0.5 - once_cell@1.15.0 - once_cell@1.18.0 - once_cell@1.20.2 - portable-atomic@1.7.0 - portable-atomic@1.9.0 - proc-macro2@1.0.86 - proc-macro2@1.0.88 - proc-macro2@1.0.92 - pyo3-build-config@0.18.3 - pyo3-build-config@0.23.1 - pyo3-ffi@0.18.3 - pyo3-ffi@0.23.1 - pyo3-macros-backend@0.23.1 - pyo3-macros@0.23.1 - pyo3@0.23.1 - python3-dll-a@0.2.6 - python3-dll-a@0.2.9 - quote@1.0.37 - serde@1.0.203 - serde@1.0.209 - serde_derive@1.0.203 - serde_derive@1.0.209 - serde_json@1.0.118 - serde_json@1.0.127 - siphasher@0.3.11 - syn@2.0.68 - syn@2.0.72 - syn@2.0.79 - syn@2.0.89 - target-lexicon@0.12.11 - target-lexicon@0.12.14 - thiserror-impl@1.0.61 - thiserror-impl@1.0.63 - thiserror@1.0.61 - thiserror@1.0.63 - toml@0.5.11 - unicode-ident@1.0.5 - unicode-ident@1.0.11 - unicode-ident@1.0.13 - unicode-ident@1.0.14 - uniffi@0.28.0 - uniffi@0.28.1 - uniffi_bindgen@0.28.0 - uniffi_bindgen@0.28.1 - uniffi_build@0.28.0 - uniffi_build@0.28.1 - uniffi_checksum_derive@0.28.0 - uniffi_checksum_derive@0.28.1 - uniffi_core@0.28.0 - uniffi_core@0.28.1 - uniffi_macros@0.28.0 - uniffi_macros@0.28.1 - uniffi_meta@0.28.0 - uniffi_meta@0.28.1 - uniffi_testing@0.28.0 - uniffi_testing@0.28.1 - uniffi_udl@0.28.0 - uniffi_udl@0.28.1 - unindent@0.2.3 - version_check@0.9.5 - weedle2@5.0.0 - windows-targets@0.52.6 - windows_aarch64_gnullvm@0.52.6 - windows_aarch64_msvc@0.52.6 - windows_i686_gnullvm@0.52.6 - windows_i686_gnu@0.52.6 - windows_i686_msvc@0.52.6 - windows_x86_64_gnullvm@0.52.6 - windows_x86_64_gnu@0.52.6 - windows_x86_64_msvc@0.52.6 -" -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( pypy3 python3_{10..13} ) -RUST_MIN_VER=1.74.0 -inherit cargo distutils-r1 flag-o-matic shell-completion toolchain-funcs - -DESCRIPTION="Build and publish crates with pyo3, rust-cpython and cffi bindings" -HOMEPAGE="https://www.maturin.rs/" -SRC_URI=" - https://github.com/PyO3/maturin/archive/refs/tags/v${PV}.tar.gz - -> ${P}.gh.tar.gz - ${CARGO_CRATE_URIS} - test? ( $(cargo_crate_uris ${CRATES_TEST}) ) -" - -# note: rustls+ring is unused, so openssl license can be skipped -LICENSE="|| ( Apache-2.0 MIT ) doc? ( CC-BY-4.0 OFL-1.1 )" -LICENSE+=" - 0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD Boost-1.0 ISC - MIT MPL-2.0 openssl Unicode-3.0 Unicode-DFS-2016 -" # crates -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="doc +ssl test" -RESTRICT="!test? ( test )" - -RDEPEND="$(python_gen_cond_dep 'dev-python/tomli[${PYTHON_USEDEP}]' 3.10)" -DEPEND="ssl? ( dev-libs/openssl:= )" -BDEPEND=" - virtual/pkgconfig - doc? ( app-text/mdbook ) - test? ( - ${RDEPEND} - $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 'python*') - dev-python/boltons[${PYTHON_USEDEP}] - dev-python/virtualenv[${PYTHON_USEDEP}] - dev-vcs/git - elibc_musl? ( dev-util/patchelf ) - ) -" -RDEPEND+=" ${DEPEND}" - -QA_FLAGS_IGNORED="usr/bin/${PN}" - -src_prepare() { - distutils-r1_src_prepare - - # we build the Rust executable (just once) via cargo_src_compile - sed -i -e '/setuptools_rust/d' -e '/rust_extensions/d' setup.py || die - - if use test; then - # used to prevent use of network during tests, and silence pip - # if it finds unrelated issues with system packages (bug #913613) - cat > "${T}"/pip.conf <<-EOF || die - [global] - quiet = 2 - - [install] - no-index = yes - no-dependencies = yes - EOF - - # used by *git_sdist_generator tests - git init -q || die - git config --global user.email "larry@gentoo.org" || die - git config --global user.name "Larry the Cow" || die - git add . || die - git commit -qm init || die - fi -} - -src_configure() { - export OPENSSL_NO_VENDOR=1 - - # bug #938847 (TODO?: should probably be an eclass default for musl) - use elibc_musl && RUSTFLAGS+=" -C target-feature=-crt-static" - - # https://github.com/rust-lang/stacker/issues/79 - use s390 && ! is-flagq '-march=*' && - append-cflags $(test-flags-CC -march=z10) - - local myfeatures=( - # like release.yml + native-tls for better platform support than rustls - full - password-storage - $(usev ssl native-tls) - ) - - cargo_src_configure --no-default-features -} - -python_compile_all() { - cargo_src_compile - - use !doc || mdbook build -d html guide || die - - if ! tc-is-cross-compiler; then - local maturin=$(cargo_target_dir)/maturin - "${maturin}" completions bash > "${T}"/${PN} || die - "${maturin}" completions fish > "${T}"/${PN}.fish || die - "${maturin}" completions zsh > "${T}"/_${PN} || die - else - ewarn "shell completion files were skipped due to cross-compilation" - fi -} - -python_test() { - local -x MATURIN_TEST_PYTHON=${EPYTHON} - local -x PIP_CONFIG_FILE=${T}/pip.conf - local -x VIRTUALENV_SYSTEM_SITE_PACKAGES=1 - - # need this for (new) python versions not yet recognized by pyo3 - local -x PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 - - local skip=( - # picky cli output test that easily benignly fail (bug #937992) - --skip cli_tests - # avoid need for wasm over a single hello world test - --skip integration_wasm_hello_world - # fragile depending on rust version, also wants libpypy*-c.so for pypy - --skip pyo3_no_extension_module - # unimportant tests that use uv, and it does not seem to be able - # to find the system's dev-python/uv (not worth the trouble) - --skip develop_hello_world::case_2 - --skip develop_pyo3_ffi_pure::case_2 - # fails on sparc since rust-1.74 (bug #934573), skip for now given - # should not affect the pep517 backend which is all we need on sparc - $(usev sparc '--skip build_context::test::test_macosx_deployment_target') - ) - - cargo_src_test -- "${skip[@]}" -} - -python_install_all() { - cargo_src_install - - dodoc Changelog.md README.md - use doc && dodoc -r guide/html - - if ! tc-is-cross-compiler; then - dobashcomp "${T}"/${PN} - dofishcomp "${T}"/${PN}.fish - dozshcomp "${T}"/_${PN} - fi -} |