Compare commits
No commits in common. 'i9' and 'epel9' have entirely different histories.
@ -0,0 +1,18 @@
|
||||
/cargo-c-0.5.1.crate
|
||||
/cargo-c-0.5.2.crate
|
||||
/cargo-c-0.5.3.crate
|
||||
/cargo-c-0.6.2.crate
|
||||
/cargo-c-0.6.3.crate
|
||||
/cargo-c-0.6.4.crate
|
||||
/cargo-c-0.6.5.crate
|
||||
/cargo-c-0.6.7.crate
|
||||
/cargo-c-0.6.8.crate
|
||||
/cargo-c-0.6.10.crate
|
||||
/cargo-c-0.6.13.crate
|
||||
/cargo-c-0.6.18+cargo-0.49.crate
|
||||
/cargo-c-0.7.3+cargo-0.51.crate
|
||||
/cargo-c-0.9.2+cargo-0.55.crate
|
||||
/cargo-c-0.9.7+cargo-0.59.crate
|
||||
/cargo-c-0.9.12+cargo-0.64.crate
|
||||
/cargo-c-0.9.19+cargo-0.70.crate
|
||||
/cargo-c-0.9.27+cargo-0.74.0.crate
|
@ -0,0 +1,574 @@
|
||||
From d50a978efb8e538db90dad7128cc74f19ec2bc8d Mon Sep 17 00:00:00 2001
|
||||
From: kpcyrd <git@rxv.cc>
|
||||
Date: Sat, 11 Nov 2023 19:45:00 +0100
|
||||
Subject: [PATCH 1/2] Add version_suffix_components setting
|
||||
|
||||
---
|
||||
README.md | 4 ++
|
||||
src/build.rs | 102 +++++++++++++++++++++++++++++++++++++++++-
|
||||
src/install.rs | 25 ++++++-----
|
||||
src/lib.rs | 15 -------
|
||||
src/pkg_config_gen.rs | 1 +
|
||||
src/target.rs | 7 ++-
|
||||
6 files changed, 122 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/README.md b/README.md
|
||||
index e53231b..5a651d0 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -135,6 +135,10 @@ version = "1.2.3"
|
||||
install_subdir = "gstreamer-1.0"
|
||||
# Used to disable versioning links when installing the dynamic library
|
||||
versioning = false
|
||||
+# Instead of using semver, select a fixed number of version components for your SONAME version suffix:
|
||||
+# Setting this to 1 with a version of 0.0.0 allows a suffix of `.so.0`
|
||||
+# Setting this to 3 always includes the full version in the SONAME (indicate any update is ABI breaking)
|
||||
+#version_suffix_components = 2
|
||||
# Add `-Cpanic=abort` to the RUSTFLAGS automatically, it may be useful in case
|
||||
# something might panic in the crates used by the library.
|
||||
rustflags = "-Cpanic=abort"
|
||||
diff --git a/src/build.rs b/src/build.rs
|
||||
index 4e8279f..45c4538 100644
|
||||
--- a/src/build.rs
|
||||
+++ b/src/build.rs
|
||||
@@ -14,6 +14,7 @@ use cargo::util::command_prelude::{ArgMatches, ArgMatchesExt, CompileMode, Profi
|
||||
use cargo::util::interning::InternedString;
|
||||
use cargo::{CliResult, Config};
|
||||
|
||||
+use anyhow::Context as _;
|
||||
use cargo_util::paths::{copy, create, create_dir_all, open, read, read_bytes, write};
|
||||
use semver::Version;
|
||||
|
||||
@@ -406,10 +407,33 @@ pub struct LibraryCApiConfig {
|
||||
pub version: Version,
|
||||
pub install_subdir: Option<String>,
|
||||
pub versioning: bool,
|
||||
+ pub version_suffix_components: Option<u8>,
|
||||
pub import_library: bool,
|
||||
pub rustflags: Vec<String>,
|
||||
}
|
||||
|
||||
+impl LibraryCApiConfig {
|
||||
+ pub fn sover(&self) -> anyhow::Result<String> {
|
||||
+ let major = self.version.major;
|
||||
+ let minor = self.version.minor;
|
||||
+ let patch = self.version.patch;
|
||||
+
|
||||
+ let sover = match self.version_suffix_components {
|
||||
+ None => match (major, minor, patch) {
|
||||
+ (0, 0, patch) => format!("0.0.{patch}"),
|
||||
+ (0, minor, _) => format!("0.{minor}"),
|
||||
+ (major, _, _) => format!("{major}"),
|
||||
+ },
|
||||
+ Some(1) => format!("{major}"),
|
||||
+ Some(2) => format!("{major}.{minor}"),
|
||||
+ Some(3) => format!("{major}.{minor}.{patch}"),
|
||||
+ Some(num) => anyhow::bail!("Unexpected number of suffix components: {num}"),
|
||||
+ };
|
||||
+
|
||||
+ Ok(sover)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
#[derive(Debug, Default)]
|
||||
pub struct InstallCApiConfig {
|
||||
pub include: Vec<InstallTarget>,
|
||||
@@ -619,6 +643,7 @@ fn load_manifest_capi_config(pkg: &Package) -> anyhow::Result<CApiConfig> {
|
||||
let mut version = pkg.version().clone();
|
||||
let mut install_subdir = None;
|
||||
let mut versioning = true;
|
||||
+ let mut version_suffix_components = None;
|
||||
let mut import_library = true;
|
||||
let mut rustflags = Vec::new();
|
||||
|
||||
@@ -636,6 +661,17 @@ fn load_manifest_capi_config(pkg: &Package) -> anyhow::Result<CApiConfig> {
|
||||
.get("versioning")
|
||||
.and_then(|v| v.as_bool())
|
||||
.unwrap_or(true);
|
||||
+
|
||||
+ if let Some(value) = library.get("version_suffix_components") {
|
||||
+ let value = value.as_integer().with_context(|| {
|
||||
+ format!("Value for `version_suffix_components` is not an integer: {value:?}")
|
||||
+ })?;
|
||||
+ let value = value
|
||||
+ .try_into()
|
||||
+ .with_context(|| format!("Value is too large: {value:?}"))?;
|
||||
+ version_suffix_components = Some(value);
|
||||
+ }
|
||||
+
|
||||
import_library = library
|
||||
.get("import_library")
|
||||
.and_then(|v| v.as_bool())
|
||||
@@ -655,6 +691,7 @@ fn load_manifest_capi_config(pkg: &Package) -> anyhow::Result<CApiConfig> {
|
||||
version,
|
||||
install_subdir,
|
||||
versioning,
|
||||
+ version_suffix_components,
|
||||
import_library,
|
||||
rustflags,
|
||||
};
|
||||
@@ -886,7 +923,7 @@ fn compile_with_exec(
|
||||
let pkg_rustflags = &capi_config.library.rustflags;
|
||||
|
||||
let mut leaf_args: Vec<String> = rustc_target
|
||||
- .shared_object_link_args(&capi_config, &install_paths.libdir, root_output)
|
||||
+ .shared_object_link_args(&capi_config, &install_paths.libdir, root_output)?
|
||||
.into_iter()
|
||||
.flat_map(|l| vec!["-C".to_string(), format!("link-arg={l}")])
|
||||
.collect();
|
||||
@@ -1246,3 +1283,66 @@ pub fn ctest(
|
||||
|
||||
ops::run_tests(ws, &ops, &test_args)
|
||||
}
|
||||
+
|
||||
+#[cfg(test)]
|
||||
+mod tests {
|
||||
+ use super::*;
|
||||
+ use semver::Version;
|
||||
+
|
||||
+ fn make_test_library_config(version: &str) -> LibraryCApiConfig {
|
||||
+ LibraryCApiConfig {
|
||||
+ name: "example".to_string(),
|
||||
+ version: Version::parse(version).unwrap(),
|
||||
+ install_subdir: None,
|
||||
+ versioning: true,
|
||||
+ version_suffix_components: None,
|
||||
+ import_library: true,
|
||||
+ rustflags: vec![],
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ pub fn test_semver_zero_zero_zero() {
|
||||
+ let library = make_test_library_config("0.0.0");
|
||||
+ let sover = library.sover().unwrap();
|
||||
+ assert_eq!(sover, "0.0.0");
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ pub fn test_semver_zero_one_zero() {
|
||||
+ let library = make_test_library_config("0.1.0");
|
||||
+ let sover = library.sover().unwrap();
|
||||
+ assert_eq!(sover, "0.1");
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ pub fn test_semver_one_zero_zero() {
|
||||
+ let library = make_test_library_config("1.0.0");
|
||||
+ let sover = library.sover().unwrap();
|
||||
+ assert_eq!(sover, "1");
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ pub fn text_one_fixed_zero_zero_zero() {
|
||||
+ let mut library = make_test_library_config("0.0.0");
|
||||
+ library.version_suffix_components = Some(1);
|
||||
+ let sover = library.sover().unwrap();
|
||||
+ assert_eq!(sover, "0");
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ pub fn text_two_fixed_one_zero_zero() {
|
||||
+ let mut library = make_test_library_config("1.0.0");
|
||||
+ library.version_suffix_components = Some(2);
|
||||
+ let sover = library.sover().unwrap();
|
||||
+ assert_eq!(sover, "1.0");
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ pub fn text_three_fixed_one_zero_zero() {
|
||||
+ let mut library = make_test_library_config("1.0.0");
|
||||
+ library.version_suffix_components = Some(3);
|
||||
+ let sover = library.sover().unwrap();
|
||||
+ assert_eq!(sover, "1.0.0");
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/install.rs b/src/install.rs
|
||||
index d0725b9..9ad4104 100644
|
||||
--- a/src/install.rs
|
||||
+++ b/src/install.rs
|
||||
@@ -3,11 +3,9 @@ use std::path::{Component, Path, PathBuf};
|
||||
|
||||
use cargo::core::Workspace;
|
||||
use cargo_util::paths::{copy, create_dir_all};
|
||||
-use semver::Version;
|
||||
|
||||
use crate::build::*;
|
||||
use crate::build_targets::BuildTargets;
|
||||
-use crate::VersionExt;
|
||||
|
||||
fn append_to_destdir(destdir: Option<&Path>, path: &Path) -> PathBuf {
|
||||
if let Some(destdir) = destdir {
|
||||
@@ -107,8 +105,13 @@ pub(crate) struct UnixLibNames {
|
||||
}
|
||||
|
||||
impl UnixLibNames {
|
||||
- pub(crate) fn new(lib_type: LibType, lib_name: &str, lib_version: &Version) -> Option<Self> {
|
||||
- let main_version = lib_version.main_version();
|
||||
+ pub(crate) fn new(
|
||||
+ lib_type: LibType,
|
||||
+ library: &LibraryCApiConfig,
|
||||
+ ) -> anyhow::Result<Option<Self>> {
|
||||
+ let lib_name = &library.name;
|
||||
+ let lib_version = &library.version;
|
||||
+ let main_version = library.sover()?;
|
||||
|
||||
match lib_type {
|
||||
LibType::So => {
|
||||
@@ -119,11 +122,11 @@ impl UnixLibNames {
|
||||
);
|
||||
let lib_with_main_ver = format!("{}.{}", lib, main_version);
|
||||
|
||||
- Some(Self {
|
||||
+ Ok(Some(Self {
|
||||
canonical: lib,
|
||||
with_main_ver: lib_with_main_ver,
|
||||
with_full_ver: lib_with_full_ver,
|
||||
- })
|
||||
+ }))
|
||||
}
|
||||
LibType::Dylib => {
|
||||
let lib = format!("lib{lib_name}.dylib");
|
||||
@@ -133,13 +136,13 @@ impl UnixLibNames {
|
||||
"lib{}.{}.{}.{}.dylib",
|
||||
lib_name, lib_version.major, lib_version.minor, lib_version.patch
|
||||
);
|
||||
- Some(Self {
|
||||
+ Ok(Some(Self {
|
||||
canonical: lib,
|
||||
with_main_ver: lib_with_main_ver,
|
||||
with_full_ver: lib_with_full_ver,
|
||||
- })
|
||||
+ }))
|
||||
}
|
||||
- LibType::Windows => None,
|
||||
+ LibType::Windows => Ok(None),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,12 +239,10 @@ pub fn cinstall(ws: &Workspace, packages: &[CPackage]) -> anyhow::Result<()> {
|
||||
if let Some(ref shared_lib) = build_targets.shared_lib {
|
||||
ws.config().shell().status("Installing", "shared library")?;
|
||||
|
||||
- let lib_name = &capi_config.library.name;
|
||||
let lib_type = LibType::from_build_targets(build_targets);
|
||||
match lib_type {
|
||||
LibType::So | LibType::Dylib => {
|
||||
- let lib = UnixLibNames::new(lib_type, lib_name, &capi_config.library.version)
|
||||
- .unwrap();
|
||||
+ let lib = UnixLibNames::new(lib_type, &capi_config.library)?.unwrap();
|
||||
lib.install(capi_config, shared_lib, &install_path_lib)?;
|
||||
}
|
||||
LibType::Windows => {
|
||||
diff --git a/src/lib.rs b/src/lib.rs
|
||||
index 66d7b9b..c63a297 100644
|
||||
--- a/src/lib.rs
|
||||
+++ b/src/lib.rs
|
||||
@@ -5,18 +5,3 @@ pub mod config;
|
||||
pub mod install;
|
||||
pub mod pkg_config_gen;
|
||||
pub mod target;
|
||||
-
|
||||
-trait VersionExt {
|
||||
- /// build the main version string
|
||||
- fn main_version(&self) -> String;
|
||||
-}
|
||||
-
|
||||
-impl VersionExt for semver::Version {
|
||||
- fn main_version(&self) -> String {
|
||||
- match (self.major, self.minor, self.patch) {
|
||||
- (0, 0, patch) => format!("0.0.{patch}"),
|
||||
- (0, minor, _) => format!("0.{minor}"),
|
||||
- (major, _, _) => format!("{major}"),
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/pkg_config_gen.rs b/src/pkg_config_gen.rs
|
||||
index 91d8b4d..c825d95 100644
|
||||
--- a/src/pkg_config_gen.rs
|
||||
+++ b/src/pkg_config_gen.rs
|
||||
@@ -298,6 +298,7 @@ mod test {
|
||||
version: Version::parse("0.1.0").unwrap(),
|
||||
install_subdir: None,
|
||||
versioning: true,
|
||||
+ version_suffix_components: None,
|
||||
import_library: true,
|
||||
rustflags: Vec::default(),
|
||||
},
|
||||
diff --git a/src/target.rs b/src/target.rs
|
||||
index 136cf54..7ada1be 100644
|
||||
--- a/src/target.rs
|
||||
+++ b/src/target.rs
|
||||
@@ -3,7 +3,6 @@ use std::path::Path;
|
||||
use anyhow::*;
|
||||
|
||||
use crate::build::CApiConfig;
|
||||
-use crate::VersionExt;
|
||||
|
||||
/// Split a target string to its components
|
||||
///
|
||||
@@ -57,7 +56,7 @@ impl Target {
|
||||
capi_config: &CApiConfig,
|
||||
libdir: &Path,
|
||||
target_dir: &Path,
|
||||
- ) -> Vec<String> {
|
||||
+ ) -> anyhow::Result<Vec<String>> {
|
||||
let mut lines = Vec::new();
|
||||
|
||||
let lib_name = &capi_config.library.name;
|
||||
@@ -70,7 +69,7 @@ impl Target {
|
||||
let os = &self.os;
|
||||
let env = &self.env;
|
||||
|
||||
- let sover = version.main_version();
|
||||
+ let sover = capi_config.library.sover()?;
|
||||
|
||||
if os == "android" {
|
||||
lines.push(format!("-Wl,-soname,lib{lib_name}.so"));
|
||||
@@ -112,6 +111,6 @@ impl Target {
|
||||
// See: https://github.com/emscripten-core/emscripten/blob/3.1.39/emcc.py#L92-L94
|
||||
// else if os == "emscripten"
|
||||
|
||||
- lines
|
||||
+ Ok(lines)
|
||||
}
|
||||
}
|
||||
|
||||
From 3f9e452500b37204efce3091c9d0fd9366393e5b Mon Sep 17 00:00:00 2001
|
||||
From: kpcyrd <git@rxv.cc>
|
||||
Date: Sun, 12 Nov 2023 14:47:40 +0100
|
||||
Subject: [PATCH 2/2] Refactor to validate version_suffix_components while
|
||||
parsing
|
||||
|
||||
---
|
||||
src/build.rs | 54 ++++++++++++++++++++++++++++----------------------
|
||||
src/install.rs | 19 ++++++++----------
|
||||
src/target.rs | 6 +++---
|
||||
3 files changed, 41 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/src/build.rs b/src/build.rs
|
||||
index 45c4538..33b77f2 100644
|
||||
--- a/src/build.rs
|
||||
+++ b/src/build.rs
|
||||
@@ -401,36 +401,40 @@ pub struct PkgConfigCApiConfig {
|
||||
pub strip_include_path_components: usize,
|
||||
}
|
||||
|
||||
+#[derive(Debug)]
|
||||
+pub enum VersionSuffix {
|
||||
+ Major,
|
||||
+ MajorMinor,
|
||||
+ MajorMinorPatch,
|
||||
+}
|
||||
+
|
||||
#[derive(Debug)]
|
||||
pub struct LibraryCApiConfig {
|
||||
pub name: String,
|
||||
pub version: Version,
|
||||
pub install_subdir: Option<String>,
|
||||
pub versioning: bool,
|
||||
- pub version_suffix_components: Option<u8>,
|
||||
+ pub version_suffix_components: Option<VersionSuffix>,
|
||||
pub import_library: bool,
|
||||
pub rustflags: Vec<String>,
|
||||
}
|
||||
|
||||
impl LibraryCApiConfig {
|
||||
- pub fn sover(&self) -> anyhow::Result<String> {
|
||||
+ pub fn sover(&self) -> String {
|
||||
let major = self.version.major;
|
||||
let minor = self.version.minor;
|
||||
let patch = self.version.patch;
|
||||
|
||||
- let sover = match self.version_suffix_components {
|
||||
+ match self.version_suffix_components {
|
||||
None => match (major, minor, patch) {
|
||||
(0, 0, patch) => format!("0.0.{patch}"),
|
||||
(0, minor, _) => format!("0.{minor}"),
|
||||
(major, _, _) => format!("{major}"),
|
||||
},
|
||||
- Some(1) => format!("{major}"),
|
||||
- Some(2) => format!("{major}.{minor}"),
|
||||
- Some(3) => format!("{major}.{minor}.{patch}"),
|
||||
- Some(num) => anyhow::bail!("Unexpected number of suffix components: {num}"),
|
||||
- };
|
||||
-
|
||||
- Ok(sover)
|
||||
+ Some(VersionSuffix::Major) => format!("{major}"),
|
||||
+ Some(VersionSuffix::MajorMinor) => format!("{major}.{minor}"),
|
||||
+ Some(VersionSuffix::MajorMinorPatch) => format!("{major}.{minor}.{patch}"),
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -666,10 +670,12 @@ fn load_manifest_capi_config(pkg: &Package) -> anyhow::Result<CApiConfig> {
|
||||
let value = value.as_integer().with_context(|| {
|
||||
format!("Value for `version_suffix_components` is not an integer: {value:?}")
|
||||
})?;
|
||||
- let value = value
|
||||
- .try_into()
|
||||
- .with_context(|| format!("Value is too large: {value:?}"))?;
|
||||
- version_suffix_components = Some(value);
|
||||
+ version_suffix_components = Some(match value {
|
||||
+ 1 => VersionSuffix::Major,
|
||||
+ 2 => VersionSuffix::MajorMinor,
|
||||
+ 3 => VersionSuffix::MajorMinorPatch,
|
||||
+ _ => anyhow::bail!("Out of range value for version suffix components: {value}"),
|
||||
+ });
|
||||
}
|
||||
|
||||
import_library = library
|
||||
@@ -923,7 +929,7 @@ fn compile_with_exec(
|
||||
let pkg_rustflags = &capi_config.library.rustflags;
|
||||
|
||||
let mut leaf_args: Vec<String> = rustc_target
|
||||
- .shared_object_link_args(&capi_config, &install_paths.libdir, root_output)?
|
||||
+ .shared_object_link_args(&capi_config, &install_paths.libdir, root_output)
|
||||
.into_iter()
|
||||
.flat_map(|l| vec!["-C".to_string(), format!("link-arg={l}")])
|
||||
.collect();
|
||||
@@ -1304,45 +1310,45 @@ mod tests {
|
||||
#[test]
|
||||
pub fn test_semver_zero_zero_zero() {
|
||||
let library = make_test_library_config("0.0.0");
|
||||
- let sover = library.sover().unwrap();
|
||||
+ let sover = library.sover();
|
||||
assert_eq!(sover, "0.0.0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn test_semver_zero_one_zero() {
|
||||
let library = make_test_library_config("0.1.0");
|
||||
- let sover = library.sover().unwrap();
|
||||
+ let sover = library.sover();
|
||||
assert_eq!(sover, "0.1");
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn test_semver_one_zero_zero() {
|
||||
let library = make_test_library_config("1.0.0");
|
||||
- let sover = library.sover().unwrap();
|
||||
+ let sover = library.sover();
|
||||
assert_eq!(sover, "1");
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn text_one_fixed_zero_zero_zero() {
|
||||
let mut library = make_test_library_config("0.0.0");
|
||||
- library.version_suffix_components = Some(1);
|
||||
- let sover = library.sover().unwrap();
|
||||
+ library.version_suffix_components = Some(VersionSuffix::Major);
|
||||
+ let sover = library.sover();
|
||||
assert_eq!(sover, "0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn text_two_fixed_one_zero_zero() {
|
||||
let mut library = make_test_library_config("1.0.0");
|
||||
- library.version_suffix_components = Some(2);
|
||||
- let sover = library.sover().unwrap();
|
||||
+ library.version_suffix_components = Some(VersionSuffix::MajorMinor);
|
||||
+ let sover = library.sover();
|
||||
assert_eq!(sover, "1.0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn text_three_fixed_one_zero_zero() {
|
||||
let mut library = make_test_library_config("1.0.0");
|
||||
- library.version_suffix_components = Some(3);
|
||||
- let sover = library.sover().unwrap();
|
||||
+ library.version_suffix_components = Some(VersionSuffix::MajorMinorPatch);
|
||||
+ let sover = library.sover();
|
||||
assert_eq!(sover, "1.0.0");
|
||||
}
|
||||
}
|
||||
diff --git a/src/install.rs b/src/install.rs
|
||||
index 9ad4104..c087e74 100644
|
||||
--- a/src/install.rs
|
||||
+++ b/src/install.rs
|
||||
@@ -105,13 +105,10 @@ pub(crate) struct UnixLibNames {
|
||||
}
|
||||
|
||||
impl UnixLibNames {
|
||||
- pub(crate) fn new(
|
||||
- lib_type: LibType,
|
||||
- library: &LibraryCApiConfig,
|
||||
- ) -> anyhow::Result<Option<Self>> {
|
||||
+ pub(crate) fn new(lib_type: LibType, library: &LibraryCApiConfig) -> Option<Self> {
|
||||
let lib_name = &library.name;
|
||||
let lib_version = &library.version;
|
||||
- let main_version = library.sover()?;
|
||||
+ let main_version = library.sover();
|
||||
|
||||
match lib_type {
|
||||
LibType::So => {
|
||||
@@ -122,11 +119,11 @@ impl UnixLibNames {
|
||||
);
|
||||
let lib_with_main_ver = format!("{}.{}", lib, main_version);
|
||||
|
||||
- Ok(Some(Self {
|
||||
+ Some(Self {
|
||||
canonical: lib,
|
||||
with_main_ver: lib_with_main_ver,
|
||||
with_full_ver: lib_with_full_ver,
|
||||
- }))
|
||||
+ })
|
||||
}
|
||||
LibType::Dylib => {
|
||||
let lib = format!("lib{lib_name}.dylib");
|
||||
@@ -136,13 +133,13 @@ impl UnixLibNames {
|
||||
"lib{}.{}.{}.{}.dylib",
|
||||
lib_name, lib_version.major, lib_version.minor, lib_version.patch
|
||||
);
|
||||
- Ok(Some(Self {
|
||||
+ Some(Self {
|
||||
canonical: lib,
|
||||
with_main_ver: lib_with_main_ver,
|
||||
with_full_ver: lib_with_full_ver,
|
||||
- }))
|
||||
+ })
|
||||
}
|
||||
- LibType::Windows => Ok(None),
|
||||
+ LibType::Windows => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +239,7 @@ pub fn cinstall(ws: &Workspace, packages: &[CPackage]) -> anyhow::Result<()> {
|
||||
let lib_type = LibType::from_build_targets(build_targets);
|
||||
match lib_type {
|
||||
LibType::So | LibType::Dylib => {
|
||||
- let lib = UnixLibNames::new(lib_type, &capi_config.library)?.unwrap();
|
||||
+ let lib = UnixLibNames::new(lib_type, &capi_config.library).unwrap();
|
||||
lib.install(capi_config, shared_lib, &install_path_lib)?;
|
||||
}
|
||||
LibType::Windows => {
|
||||
diff --git a/src/target.rs b/src/target.rs
|
||||
index 7ada1be..1cbdef4 100644
|
||||
--- a/src/target.rs
|
||||
+++ b/src/target.rs
|
||||
@@ -56,7 +56,7 @@ impl Target {
|
||||
capi_config: &CApiConfig,
|
||||
libdir: &Path,
|
||||
target_dir: &Path,
|
||||
- ) -> anyhow::Result<Vec<String>> {
|
||||
+ ) -> Vec<String> {
|
||||
let mut lines = Vec::new();
|
||||
|
||||
let lib_name = &capi_config.library.name;
|
||||
@@ -69,7 +69,7 @@ impl Target {
|
||||
let os = &self.os;
|
||||
let env = &self.env;
|
||||
|
||||
- let sover = capi_config.library.sover()?;
|
||||
+ let sover = capi_config.library.sover();
|
||||
|
||||
if os == "android" {
|
||||
lines.push(format!("-Wl,-soname,lib{lib_name}.so"));
|
||||
@@ -111,6 +111,6 @@ impl Target {
|
||||
// See: https://github.com/emscripten-core/emscripten/blob/3.1.39/emcc.py#L92-L94
|
||||
// else if os == "emscripten"
|
||||
|
||||
- Ok(lines)
|
||||
+ lines
|
||||
}
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
(MIT OR Apache-2.0) AND Unicode-DFS-2016: unicode-ident v1.0.3
|
||||
Apache-2.0 OR BSL-1.0: ryu v1.0.11
|
||||
Apache-2.0 OR MIT: fastrand v1.8.0
|
||||
Apache-2.0 OR MIT: fnv v1.0.7
|
||||
Apache-2.0 OR MIT: indexmap v1.9.1
|
||||
Apache-2.0 OR MIT: rustfix v0.6.1
|
||||
Apache-2.0 OR MIT: strip-ansi-escapes v0.1.1
|
||||
Apache-2.0 OR MIT: thread_local v1.1.4
|
||||
Apache-2.0 OR MIT: utf8parse v0.2.0
|
||||
Apache-2.0 OR MIT: vte v0.10.1
|
||||
Apache-2.0: bytesize v1.1.0
|
||||
Apache-2.0: openssl v0.10.41
|
||||
MIT AND GPL-2.0-only WITH GCC-exception-2.0 AND BSD-3-Clause: libgit2-sys v0.13.4
|
||||
MIT OR Apache-2.0 OR Zlib: tinyvec_macros v0.1.0
|
||||
MIT OR Apache-2.0: anyhow v1.0.61
|
||||
MIT OR Apache-2.0: arrayvec v0.5.2
|
||||
MIT OR Apache-2.0: bitflags v1.3.2
|
||||
MIT OR Apache-2.0: bstr v0.2.17
|
||||
MIT OR Apache-2.0: cargo v0.64.0
|
||||
MIT OR Apache-2.0: cargo-platform v0.1.2
|
||||
MIT OR Apache-2.0: cargo-util v0.2.1
|
||||
MIT OR Apache-2.0: cc v1.0.73
|
||||
MIT OR Apache-2.0: cfg-if v1.0.0
|
||||
MIT OR Apache-2.0: clap v3.2.17
|
||||
MIT OR Apache-2.0: clap_lex v0.2.4
|
||||
MIT OR Apache-2.0: crates-io v0.34.0
|
||||
MIT OR Apache-2.0: crc32fast v1.3.2
|
||||
MIT OR Apache-2.0: crossbeam-utils v0.8.11
|
||||
MIT OR Apache-2.0: either v1.8.0
|
||||
MIT OR Apache-2.0: env_logger v0.9.0
|
||||
MIT OR Apache-2.0: filetime v0.2.17
|
||||
MIT OR Apache-2.0: flate2 v1.0.24
|
||||
MIT OR Apache-2.0: foreign-types v0.3.2
|
||||
MIT OR Apache-2.0: foreign-types-shared v0.1.1
|
||||
MIT OR Apache-2.0: form_urlencoded v1.0.1
|
||||
MIT OR Apache-2.0: git2 v0.14.4
|
||||
MIT OR Apache-2.0: git2-curl v0.15.0
|
||||
MIT OR Apache-2.0: glob v0.3.0
|
||||
MIT OR Apache-2.0: hashbrown v0.12.3
|
||||
MIT OR Apache-2.0: heck v0.4.0
|
||||
MIT OR Apache-2.0: hex v0.4.3
|
||||
MIT OR Apache-2.0: home v0.5.3
|
||||
MIT OR Apache-2.0: humantime v2.1.0
|
||||
MIT OR Apache-2.0: idna v0.2.3
|
||||
MIT OR Apache-2.0: itertools v0.10.3
|
||||
MIT OR Apache-2.0: itoa v1.0.3
|
||||
MIT OR Apache-2.0: jobserver v0.1.24
|
||||
MIT OR Apache-2.0: kstring v2.0.0
|
||||
MIT OR Apache-2.0: lazy_static v1.4.0
|
||||
MIT OR Apache-2.0: lazycell v1.3.0
|
||||
MIT OR Apache-2.0: libc v0.2.131
|
||||
MIT OR Apache-2.0: libssh2-sys v0.2.23
|
||||
MIT OR Apache-2.0: libz-sys v1.1.8
|
||||
MIT OR Apache-2.0: log v0.4.17
|
||||
MIT OR Apache-2.0: num_cpus v1.13.1
|
||||
MIT OR Apache-2.0: once_cell v1.13.1
|
||||
MIT OR Apache-2.0: opener v0.5.0
|
||||
MIT OR Apache-2.0: openssl-probe v0.1.5
|
||||
MIT OR Apache-2.0: os_str_bytes v6.3.0
|
||||
MIT OR Apache-2.0: pathdiff v0.2.1
|
||||
MIT OR Apache-2.0: percent-encoding v2.1.0
|
||||
MIT OR Apache-2.0: proc-macro2 v1.0.43
|
||||
MIT OR Apache-2.0: quote v1.0.21
|
||||
MIT OR Apache-2.0: rand_core v0.6.3
|
||||
MIT OR Apache-2.0: rand_xoshiro v0.6.0
|
||||
MIT OR Apache-2.0: regex v1.6.0
|
||||
MIT OR Apache-2.0: regex-syntax v0.6.27
|
||||
MIT OR Apache-2.0: remove_dir_all v0.7.0
|
||||
MIT OR Apache-2.0: semver v1.0.13
|
||||
MIT OR Apache-2.0: serde v1.0.144
|
||||
MIT OR Apache-2.0: serde_ignored v0.1.5
|
||||
MIT OR Apache-2.0: serde_json v1.0.85
|
||||
MIT OR Apache-2.0: shell-escape v0.1.5
|
||||
MIT OR Apache-2.0: socket2 v0.4.4
|
||||
MIT OR Apache-2.0: static_assertions v1.1.0
|
||||
MIT OR Apache-2.0: syn v1.0.99
|
||||
MIT OR Apache-2.0: tar v0.4.38
|
||||
MIT OR Apache-2.0: tempfile v3.3.0
|
||||
MIT OR Apache-2.0: toml v0.5.9
|
||||
MIT OR Apache-2.0: toml_edit v0.14.4
|
||||
MIT OR Apache-2.0: typenum v1.15.0
|
||||
MIT OR Apache-2.0: unicode-bidi v0.3.8
|
||||
MIT OR Apache-2.0: unicode-normalization v0.1.21
|
||||
MIT OR Apache-2.0: unicode-width v0.1.9
|
||||
MIT OR Apache-2.0: unicode-xid v0.2.3
|
||||
MIT OR Apache-2.0: url v2.2.2
|
||||
MIT: atty v0.2.14
|
||||
MIT: bytes v1.2.1
|
||||
MIT: cargo-c v0.9.12
|
||||
MIT: combine v4.6.6
|
||||
MIT: crypto-hash v0.3.4
|
||||
MIT: curl v0.4.44
|
||||
MIT: curl-sys v0.4.56
|
||||
MIT: matches v0.1.9
|
||||
MIT: openssl-sys v0.9.75
|
||||
MIT: os_info v3.5.0
|
||||
MIT: strsim v0.10.0
|
||||
MIT: textwrap v0.15.0
|
||||
MPL-2.0+: bitmaps v2.1.0
|
||||
MPL-2.0+: im-rc v15.1.0
|
||||
MPL-2.0+: sized-chunks v0.6.5
|
||||
MPL-2.0: cbindgen v0.24.3
|
||||
Unlicense OR MIT: aho-corasick v0.7.18
|
||||
Unlicense OR MIT: globset v0.4.9
|
||||
Unlicense OR MIT: ignore v0.4.18
|
||||
Unlicense OR MIT: memchr v2.5.0
|
||||
Unlicense OR MIT: regex-automata v0.1.10
|
||||
Unlicense OR MIT: same-file v1.0.6
|
||||
Unlicense OR MIT: termcolor v1.1.3
|
||||
Unlicense OR MIT: walkdir v2.3.2
|
||||
Zlib OR Apache-2.0 OR MIT: tinyvec v1.6.0
|
Binary file not shown.
@ -1,16 +0,0 @@
|
||||
--- cargo-c-0.9.12+cargo-0.64/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||
+++ cargo-c-0.9.12+cargo-0.64/Cargo.toml 2022-08-25T10:44:01.925899+00:00
|
||||
@@ -12,7 +12,7 @@
|
||||
[package]
|
||||
edition = "2021"
|
||||
name = "cargo-c"
|
||||
-version = "0.9.12+cargo-0.64"
|
||||
+version = "0.9.12"
|
||||
authors = ["Luca Barbato <lu_zero@gentoo.org>"]
|
||||
description = "Helper program to build and install c-like libraries"
|
||||
readme = "README.md"
|
||||
@@ -96,4 +96,3 @@
|
||||
|
||||
[features]
|
||||
default = []
|
||||
-vendored-openssl = ["cargo/vendored-openssl"]
|
@ -1,237 +0,0 @@
|
||||
## START: Set by rpmautospec
|
||||
## (rpmautospec version 0.3.5)
|
||||
## RPMAUTOSPEC: autorelease, autochangelog
|
||||
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
||||
release_number = 4;
|
||||
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
||||
print(release_number + base_release_number - 1);
|
||||
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
||||
## END: Set by rpmautospec
|
||||
|
||||
# Generated by rust2rpm 22
|
||||
%bcond_without check
|
||||
|
||||
# reduce debuginfo verbosity to work around OOM problems on 32-bit arches
|
||||
%global rustflags_debuginfo 1
|
||||
|
||||
%global crate cargo-c
|
||||
%global upstream_version 0.9.12+cargo-0.64
|
||||
|
||||
Name: rust-cargo-c
|
||||
Version: 0.9.12
|
||||
Release: %autorelease
|
||||
Summary: Helper program to build and install c-like libraries
|
||||
|
||||
License: MIT
|
||||
URL: https://crates.io/crates/cargo-c
|
||||
Source0: %{crates_source %{crate} %{upstream_version}}
|
||||
Source1: LICENSE.dependencies
|
||||
# Manually created patch for downstream crate metadata changes
|
||||
# * drop +cargo version suffix from crate version
|
||||
# * remove vendored OpenSSL feature
|
||||
Patch: cargo-c-fix-metadata.diff
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
BuildRequires: rust-packaging >= 21
|
||||
|
||||
%global _description %{expand:
|
||||
Helper program to build and install c-like libraries.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package -n %{crate}
|
||||
Summary: %{summary}
|
||||
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
|
||||
# Apache-2.0
|
||||
# Apache-2.0 OR BSL-1.0
|
||||
# Apache-2.0 OR MIT
|
||||
# MIT
|
||||
# MIT AND GPL-2.0-only WITH GCC-exception-2.0 AND BSD-3-Clause
|
||||
# MIT OR Apache-2.0
|
||||
# MIT OR Apache-2.0 OR Zlib
|
||||
# MPL-2.0
|
||||
# MPL-2.0+
|
||||
# Unlicense OR MIT
|
||||
# Zlib OR Apache-2.0 OR MIT
|
||||
License: MIT AND Apache-2.0 AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MPL-2.0 AND Unicode-DFS-2016
|
||||
# LICENSE.dependencies contains a full license breakdown
|
||||
|
||||
%description -n %{crate} %{_description}
|
||||
|
||||
%files -n %{crate}
|
||||
%license LICENSE
|
||||
%license LICENSE.dependencies
|
||||
%doc README.md
|
||||
%{_bindir}/cargo-capi
|
||||
%{_bindir}/cargo-cbuild
|
||||
%{_bindir}/cargo-cinstall
|
||||
%{_bindir}/cargo-ctest
|
||||
|
||||
%package devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "%{crate}" crate.
|
||||
|
||||
%files devel
|
||||
%license %{crate_instdir}/LICENSE
|
||||
%doc %{crate_instdir}/README.md
|
||||
%{crate_instdir}/
|
||||
|
||||
%package -n %{name}+default-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+default-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "default" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+default-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{upstream_version} -p1
|
||||
cp -pav %{SOURCE1} .
|
||||
%cargo_prep
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
|
||||
%install
|
||||
%cargo_install
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Oct 13 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.9.12-4
|
||||
- Rebuilt for MSVSphere 9.2
|
||||
|
||||
* Wed May 03 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.12-4
|
||||
- Rebuild for openssl crate >= v0.10.48 (RUSTSEC-2023-{0022,0023,0024})
|
||||
|
||||
* Sat Jan 28 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.12-3
|
||||
- Rebuild for CVE-2022-24765 and CVE-2022-29187 in libgit2
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Thu Aug 25 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.12-1
|
||||
- Update to version 0.9.12+cargo-0.64; Fixes RHBZ#2058792
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Tue Feb 22 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.9.7-4
|
||||
- Use the new way to set debuginfo level during build
|
||||
|
||||
* Tue Feb 22 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.7-3
|
||||
- More workarounds for rust-packaging 21 issues
|
||||
|
||||
* Tue Feb 22 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.7-2
|
||||
- Work around RUSTFLAGS no longer being set in .cargo/config
|
||||
|
||||
* Mon Feb 21 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.7-1
|
||||
- Update to version 0.9.7+cargo-0.59; Fixes RHBZ#2005017
|
||||
|
||||
* Tue Feb 15 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.9.2-8
|
||||
- Rebuild with package notes
|
||||
|
||||
* Tue Feb 15 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.9.2-7
|
||||
- Rebuild with package notes
|
||||
|
||||
* Tue Jan 25 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.2-6
|
||||
- Rebuild with thread_local 1.1.4 for RUSTSEC-2022-0006
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Sun Nov 28 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.9.2-4
|
||||
- Rebuild for libgit2 1.3.x
|
||||
|
||||
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 0.9.2-3
|
||||
- Rebuilt with OpenSSL 3.0.0
|
||||
|
||||
* Thu Aug 26 2021 Fabio Valentini <decathorpe@gmail.com> - 0.9.2-2
|
||||
- Drop debuginfo verbosity in an attempt to fix armv7hl OOM problems
|
||||
|
||||
* Thu Aug 26 2021 Fabio Valentini <decathorpe@gmail.com> - 0.9.2-1
|
||||
- Update to version 0.9.2+cargo-0.55; Fixes RHBZ#1945899
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Mon Mar 29 2021 Fabio Valentini <decathorpe@gmail.com> - 0.7.3-2
|
||||
- Update to version 0.7.3+cargo-0.51.
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.18-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Dec 29 14:21:55 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.18-2
|
||||
- Rebuild against libgit2 1.1.x
|
||||
|
||||
* Sun Nov 29 2020 Fabio Valentini <decathorpe@gmail.com> - 0.6.18-1
|
||||
- Update to version 0.6.18+cargo-0.49.
|
||||
- Fixes RHBZ#1887871
|
||||
|
||||
* Mon Sep 21 2020 Fabio Valentini <decathorpe@gmail.com> - 0.6.13-1
|
||||
- Update to version 0.6.13.
|
||||
|
||||
* Sun Aug 23 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.10-2
|
||||
- Rebuild
|
||||
|
||||
* Wed Jul 29 2020 Josh Stone <jistone@redhat.com> - 0.6.10-1
|
||||
- Update to 0.6.10
|
||||
|
||||
* Fri Jul 10 2020 Josh Stone <jistone@redhat.com> - 0.6.8-1
|
||||
- Update to 0.6.8
|
||||
|
||||
* Wed Jun 10 2020 Josh Stone <jistone@redhat.com> - 0.6.7-1
|
||||
- Update to 0.6.7
|
||||
|
||||
* Tue May 05 2020 Josh Stone <jistone@redhat.com> - 0.6.5-1
|
||||
- Update to 0.6.5
|
||||
|
||||
* Fri Apr 24 2020 Josh Stone <jistone@redhat.com> - 0.6.4-1
|
||||
- Update to 0.6.4
|
||||
|
||||
* Thu Apr 23 2020 Josh Stone <jistone@redhat.com> - 0.6.3-2
|
||||
- Bump to cargo 0.44
|
||||
|
||||
* Fri Apr 17 2020 Josh Stone <jistone@redhat.com> - 0.6.3-1
|
||||
- Update to 0.6.3
|
||||
|
||||
* Wed Apr 15 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.2-2
|
||||
- Rebuild for libgit2 1.0.0
|
||||
|
||||
* Wed Apr 01 2020 Josh Stone <jistone@redhat.com> - 0.6.2-1
|
||||
- Update to 0.6.2
|
||||
|
||||
* Tue Mar 17 2020 Josh Stone <jistone@redhat.com> - 0.5.3-1
|
||||
- Update to 0.5.3
|
||||
|
||||
* Wed Feb 26 2020 Josh Stone <jistone@redhat.com> - 0.5.2-4
|
||||
- Update cbindgen to 0.13
|
||||
|
||||
* Tue Feb 11 13:41:07 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.5.2-3
|
||||
- Update pretty_env_logger to 0.4
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Jan 23 2020 Josh Stone <jistone@redhat.com> - 0.5.2-1
|
||||
- Update to 0.5.2
|
||||
|
||||
* Thu Dec 19 19:13:31 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.5.1-1
|
||||
- Initial package
|
||||
|
@ -0,0 +1,28 @@
|
||||
--- cargo-c-0.9.27+cargo-0.74.0/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||
+++ cargo-c-0.9.27+cargo-0.74.0/Cargo.toml 2023-11-11T11:12:03.277637+00:00
|
||||
@@ -13,7 +13,7 @@
|
||||
edition = "2021"
|
||||
rust-version = "1.70"
|
||||
name = "cargo-c"
|
||||
-version = "0.9.27+cargo-0.74.0"
|
||||
+version = "0.9.27"
|
||||
authors = ["Luca Barbato <lu_zero@gentoo.org>"]
|
||||
description = "Helper program to build and install c-like libraries"
|
||||
readme = "README.md"
|
||||
@@ -103,15 +103,4 @@
|
||||
default = []
|
||||
vendored-openssl = ["cargo/vendored-openssl"]
|
||||
|
||||
-[target."cfg(windows)".dependencies.windows-sys]
|
||||
-version = "0.48"
|
||||
-features = [
|
||||
- "Win32_Foundation",
|
||||
- "Win32_Storage_FileSystem",
|
||||
- "Win32_System_IO",
|
||||
- "Win32_System_Console",
|
||||
- "Win32_System_Threading",
|
||||
- "Win32_System_JobObjects",
|
||||
- "Win32_Security",
|
||||
- "Win32_System_SystemServices",
|
||||
-]
|
||||
+
|
@ -0,0 +1,9 @@
|
||||
--- cargo-c-0.9.27+cargo-0.74.0/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||
+++ cargo-c-0.9.27+cargo-0.74.0/Cargo.toml 2023-11-11T11:12:10.373660+00:00
|
||||
@@ -101,6 +101,5 @@
|
||||
|
||||
[features]
|
||||
default = []
|
||||
-vendored-openssl = ["cargo/vendored-openssl"]
|
||||
|
||||
|
@ -0,0 +1,66 @@
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Mon Mar 29 2021 Fabio Valentini <decathorpe@gmail.com> - 0.7.3-2
|
||||
- Update to version 0.7.3+cargo-0.51.
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.18-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Dec 29 14:21:55 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.18-2
|
||||
- Rebuild against libgit2 1.1.x
|
||||
|
||||
* Sun Nov 29 2020 Fabio Valentini <decathorpe@gmail.com> - 0.6.18-1
|
||||
- Update to version 0.6.18+cargo-0.49.
|
||||
- Fixes RHBZ#1887871
|
||||
|
||||
* Mon Sep 21 2020 Fabio Valentini <decathorpe@gmail.com> - 0.6.13-1
|
||||
- Update to version 0.6.13.
|
||||
|
||||
* Sun Aug 23 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.10-2
|
||||
- Rebuild
|
||||
|
||||
* Wed Jul 29 2020 Josh Stone <jistone@redhat.com> - 0.6.10-1
|
||||
- Update to 0.6.10
|
||||
|
||||
* Fri Jul 10 2020 Josh Stone <jistone@redhat.com> - 0.6.8-1
|
||||
- Update to 0.6.8
|
||||
|
||||
* Wed Jun 10 2020 Josh Stone <jistone@redhat.com> - 0.6.7-1
|
||||
- Update to 0.6.7
|
||||
|
||||
* Tue May 05 2020 Josh Stone <jistone@redhat.com> - 0.6.5-1
|
||||
- Update to 0.6.5
|
||||
|
||||
* Fri Apr 24 2020 Josh Stone <jistone@redhat.com> - 0.6.4-1
|
||||
- Update to 0.6.4
|
||||
|
||||
* Thu Apr 23 2020 Josh Stone <jistone@redhat.com> - 0.6.3-2
|
||||
- Bump to cargo 0.44
|
||||
|
||||
* Fri Apr 17 2020 Josh Stone <jistone@redhat.com> - 0.6.3-1
|
||||
- Update to 0.6.3
|
||||
|
||||
* Wed Apr 15 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.2-2
|
||||
- Rebuild for libgit2 1.0.0
|
||||
|
||||
* Wed Apr 01 2020 Josh Stone <jistone@redhat.com> - 0.6.2-1
|
||||
- Update to 0.6.2
|
||||
|
||||
* Tue Mar 17 2020 Josh Stone <jistone@redhat.com> - 0.5.3-1
|
||||
- Update to 0.5.3
|
||||
|
||||
* Wed Feb 26 2020 Josh Stone <jistone@redhat.com> - 0.5.2-4
|
||||
- Update cbindgen to 0.13
|
||||
|
||||
* Tue Feb 11 13:41:07 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.5.2-3
|
||||
- Update pretty_env_logger to 0.4
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Jan 23 2020 Josh Stone <jistone@redhat.com> - 0.5.2-1
|
||||
- Update to 0.5.2
|
||||
|
||||
* Thu Dec 19 19:13:31 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.5.1-1
|
||||
- Initial package
|
@ -0,0 +1,26 @@
|
||||
%cargo_cbuild(naf:)\
|
||||
%{shrink: \
|
||||
%{__cargo} cbuild \
|
||||
%{__cargo_common_opts} \
|
||||
--profile rpm \
|
||||
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
|
||||
--destdir=%{buildroot} \
|
||||
--prefix=%{_prefix} \
|
||||
--libdir=%{_libdir} \
|
||||
--includedir=%{_includedir} \
|
||||
--pkgconfigdir=%{_libdir}/pkgconfig \
|
||||
}
|
||||
|
||||
%cargo_cinstall(naf:)\
|
||||
%{shrink: \
|
||||
%{__cargo} cinstall \
|
||||
%{__cargo_common_opts} \
|
||||
--profile rpm \
|
||||
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
|
||||
--destdir=%{buildroot} \
|
||||
--prefix=%{_prefix} \
|
||||
--libdir=%{_libdir} \
|
||||
--includedir=%{_includedir} \
|
||||
--pkgconfigdir=%{_libdir}/pkgconfig \
|
||||
}
|
||||
|
@ -0,0 +1,121 @@
|
||||
# Generated by rust2rpm 25
|
||||
%bcond_without check
|
||||
|
||||
# reduce debuginfo verbosity to work around OOM problems on 32-bit arches
|
||||
%global rustflags_debuginfo 1
|
||||
|
||||
%global crate cargo-c
|
||||
%global upstream_version 0.9.27+cargo-0.74.0
|
||||
|
||||
Name: rust-cargo-c
|
||||
Version: 0.9.27
|
||||
Release: %autorelease
|
||||
Summary: Helper program to build and install c-like libraries
|
||||
|
||||
License: MIT
|
||||
URL: https://crates.io/crates/cargo-c
|
||||
Source0: %{crates_source %{crate} %{upstream_version}}
|
||||
Source1: macros.cargo-c
|
||||
# Automatically generated patch to strip dependencies and normalize metadata
|
||||
Patch: cargo-c-fix-metadata-auto.diff
|
||||
# Manually created patch for downstream crate metadata changes
|
||||
# * drop +cargo version suffix from crate version
|
||||
# * remove vendored OpenSSL feature
|
||||
Patch: cargo-c-fix-metadata.diff
|
||||
# * backport upstream change: Add version_suffix_components setting
|
||||
# This is required to work around breaking changes in the default
|
||||
# behaviour of cargo-c v0.9.26 and newer (using "0.<minor>" as the soname
|
||||
# for versions < 1.0.0 instead of just "0").
|
||||
Patch: https://github.com/lu-zero/cargo-c/pull/352.patch
|
||||
|
||||
BuildRequires: cargo-rpm-macros >= 24
|
||||
|
||||
%global _description %{expand:
|
||||
Helper program to build and install c-like libraries.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package -n %{crate}
|
||||
Summary: %{summary}
|
||||
# (Apache-2.0 OR MIT) AND BSD-3-Clause
|
||||
# (MIT OR Apache-2.0) AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT
|
||||
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
|
||||
# 0BSD OR MIT OR Apache-2.0
|
||||
# Apache-2.0
|
||||
# Apache-2.0 OR BSL-1.0
|
||||
# Apache-2.0 OR MIT
|
||||
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
|
||||
# BSD-3-Clause
|
||||
# ISC
|
||||
# MIT
|
||||
# MIT OR Apache-2.0
|
||||
# MIT OR Apache-2.0 OR BSD-1-Clause
|
||||
# MIT OR Apache-2.0 OR Zlib
|
||||
# MIT OR Zlib OR Apache-2.0
|
||||
# MPL-2.0
|
||||
# Unlicense OR MIT
|
||||
# Zlib OR Apache-2.0 OR MIT
|
||||
License: MIT AND Apache-2.0 AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND ISC AND MPL-2.0 AND Unicode-DFS-2016 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR BSD-1-Clause) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
|
||||
# LICENSE.dependencies contains a full license breakdown
|
||||
|
||||
%description -n %{crate} %{_description}
|
||||
|
||||
%files -n %{crate}
|
||||
%license LICENSE
|
||||
%license LICENSE.dependencies
|
||||
%doc README.md
|
||||
%{_bindir}/cargo-capi
|
||||
%{_bindir}/cargo-cbuild
|
||||
%{_bindir}/cargo-cinstall
|
||||
%{_bindir}/cargo-ctest
|
||||
%{_rpmmacrodir}/macros.cargo-c
|
||||
|
||||
%package devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "%{crate}" crate.
|
||||
|
||||
%files devel
|
||||
%license %{crate_instdir}/LICENSE
|
||||
%doc %{crate_instdir}/README.md
|
||||
%{crate_instdir}/
|
||||
|
||||
%package -n %{name}+default-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+default-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "default" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+default-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{upstream_version} -p1
|
||||
%cargo_prep
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
%{cargo_license_summary}
|
||||
%{cargo_license} > LICENSE.dependencies
|
||||
|
||||
%install
|
||||
%cargo_install
|
||||
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} %{SOURCE1}
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
Loading…
Reference in new issue