mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 14:49:30 -07:00
dev-build/corrosion: fix regression with cxxbridge-cmd
Closes: https://bugs.gentoo.org/975121 Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/46266 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
ec94a30948
commit
8406c57765
62
dev-build/corrosion/corrosion-0.6.1-r1.ebuild
Normal file
62
dev-build/corrosion/corrosion-0.6.1-r1.ebuild
Normal file
@@ -0,0 +1,62 @@
|
||||
# Copyright 2025-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
bitflags@1.3.2
|
||||
cc@1.0.73
|
||||
"
|
||||
|
||||
RUST_MIN_VERSION="1.77.4"
|
||||
|
||||
inherit cargo cmake
|
||||
|
||||
DESCRIPTION="Marrying Rust and CMake - Easy Rust and C/C++ Integration!"
|
||||
HOMEPAGE="https://github.com/corrosion-rs/corrosion"
|
||||
SRC_URI="
|
||||
https://github.com/corrosion-rs/corrosion/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
test? ( ${CARGO_CRATE_URIS} )
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="
|
||||
test? ( dev-util/cbindgen )
|
||||
>=dev-build/cmake-3.22
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/corrosion-0.6.1_cxxbridge-cmd_no_locked.patch"
|
||||
)
|
||||
|
||||
CMAKE_SKIP_TESTS=(
|
||||
# requires extensive rust-src cargo packages
|
||||
custom_target_build
|
||||
custom_target_run_test-exe
|
||||
custom_target_run_rust-bin
|
||||
install_lib_build
|
||||
install_lib_run_main-static
|
||||
install_lib_run_main-shared
|
||||
# error[E0425]: cannot find function `print_line` in this scope
|
||||
cargo_config_rustflags_build
|
||||
# must be run but gets skipped sometimes?
|
||||
cargo_config_rustflags_run_cargo_config_rustflags
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCORROSION_BUILD_TESTS=$(usex test)
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Some RUSTFLAGS like disabling debuginfo can mess with the tests
|
||||
local -x RUSTFLAGS=
|
||||
cmake_src_test
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
From https://github.com/corrosion-rs/corrosion/commit/4b954fa5a238d78a80aacf85a667f4b426926e71
|
||||
From: Jonathan Schwender <schwenderjonathan@gmail.com>
|
||||
Date: Sat, 16 May 2026 16:25:49 +0200
|
||||
Subject: [PATCH] Install cxxbridge-cmd without --locked
|
||||
|
||||
cxxbridge-cmd does not have a lockfile,
|
||||
and adding --locked caused issues for users
|
||||
using offline mode.
|
||||
|
||||
Fixes #672
|
||||
--- a/cmake/Corrosion.cmake
|
||||
+++ b/cmake/Corrosion.cmake
|
||||
@@ -1862,7 +1862,6 @@ function(corrosion_add_cxxbridge cxx_target)
|
||||
$CACHE{CORROSION_TOOLS_CARGO} install
|
||||
cxxbridge-cmd
|
||||
--version "${cxx_required_version}"
|
||||
- --locked
|
||||
--root "${CMAKE_BINARY_DIR}/corrosion/cxxbridge_v${cxx_required_version}"
|
||||
--quiet
|
||||
# todo: use --target-dir to potentially reuse artifacts
|
||||
Reference in New Issue
Block a user