From 5d2d9ae7aa9686234afdde11b61ee020d3f708b7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 27 Jan 2020 15:02:37 -0800 Subject: [PATCH] Update to 0.1.7 --- .gitignore | 1 + ...orce-the-dwarf-debug-for-elf-targets.patch | 74 ------------------- rust-nasm-rs.spec | 31 +++++--- sources | 2 +- 4 files changed, 21 insertions(+), 87 deletions(-) delete mode 100644 0001-nasm_rs-Force-the-dwarf-debug-for-elf-targets.patch diff --git a/.gitignore b/.gitignore index 9b0c522..f519620 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /nasm-rs-0.1.4.crate /nasm-rs-0.1.5.crate +/nasm-rs-0.1.7.crate diff --git a/0001-nasm_rs-Force-the-dwarf-debug-for-elf-targets.patch b/0001-nasm_rs-Force-the-dwarf-debug-for-elf-targets.patch deleted file mode 100644 index 740a0bf..0000000 --- a/0001-nasm_rs-Force-the-dwarf-debug-for-elf-targets.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 3f711947d749ecdfbbec5af236e97d5b760b7710 Mon Sep 17 00:00:00 2001 -From: Luca Barbato -Date: Tue, 10 Dec 2019 11:44:19 +0100 -Subject: [PATCH] nasm_rs: Force the dwarf debug for elf targets - ---- - src/lib.rs | 27 ++++++++++++++------------- - 1 file changed, 14 insertions(+), 13 deletions(-) - -diff --git a/src/lib.rs b/src/lib.rs -index eb032a0a0..c48a84efc 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -9,35 +9,35 @@ use std::process::Stdio; - use std::path::{Path, PathBuf}; - use std::ffi::OsString; - --fn x86_triple(os: &str) -> &'static str { -+fn x86_triple(os: &str) -> (&'static str, &'static str) { - match os { -- "darwin" | "ios" => "-fmacho32", -- "windows" => "-fwin32", -- _ => "-felf32" -+ "darwin" => ("-fmacho32", "-g"), -+ "windows" => ("-fwin32", "-g"), -+ _ => ("-felf32", "-gdwarf"), - } - } - --fn x86_64_triple(os: &str) -> &'static str { -+fn x86_64_triple(os: &str) -> (&'static str, &'static str) { - match os { -- "darwin" | "ios" => "-fmacho64", -- "windows" => "-fwin64", -- _ => "-felf64" -+ "darwin" => ("-fmacho64", "-g"), -+ "windows" => ("-fwin64", "-g"), -+ _ => ("-felf64", "-gdwarf"), - } - } - --fn parse_triple(trip: &str) -> &'static str { -+fn parse_triple(trip: &str) -> (&'static str, &'static str) { - let parts = trip.split('-').collect::>(); - // ARCH-VENDOR-OS-ENVIRONMENT - // or ARCH-VENDOR-OS - // we don't care about environ so doesn't matter if triple doesn't have it - if parts.len() < 3 { -- return "" -+ return ("", ""); - } - - match parts[0] { - "x86_64" => x86_64_triple(parts[2]), - "x86" | "i386" | "i586" | "i686" => x86_triple(parts[2]), -- _ => "" -+ _ => ("", ""), - } - } - -@@ -228,10 +228,11 @@ impl Build { - } - - fn get_args(&self, target: &str) -> Vec<&str> { -- let mut args = vec![parse_triple(&target)]; -+ let (arch_flag, debug_flag) = parse_triple(&target); -+ let mut args = vec![arch_flag]; - - if self.debug { -- args.push("-g"); -+ args.push(debug_flag); - } - - for arg in &self.flags { diff --git a/rust-nasm-rs.spec b/rust-nasm-rs.spec index 7099671..ae23c11 100644 --- a/rust-nasm-rs.spec +++ b/rust-nasm-rs.spec @@ -1,29 +1,29 @@ -# Generated by rust2rpm +# Generated by rust2rpm 13 %bcond_with check %global debug_package %{nil} %global crate nasm-rs Name: rust-%{crate} -Version: 0.1.5 -Release: 2%{?dist} +Version: 0.1.7 +Release: 1%{?dist} Summary: Run NASM during your Cargo build # Upstream license specification: MIT OR Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/nasm-rs Source: %{crates_source} -# Patch to generate DWARF debuginfo instead of STABS. Needed for Rav1e. -# https://github.com/xiph/rav1e/commit/3f711947d749ecdfbbec5af236e97d5b760b7710#diff-3374eb4653baa3be440910b43b58ca64.patch -Patch0: 0001-nasm_rs-Force-the-dwarf-debug-for-elf-targets.patch ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif BuildRequires: rust-packaging BuildRequires: nasm -%global _description \ -Run NASM during your Cargo build. +%global _description %{expand: +Run NASM during your Cargo build.} %description %{_description} @@ -40,7 +40,7 @@ which use "%{crate}" crate. %files devel %doc README.markdown %license LICENSE-APACHE LICENSE-MIT -%{cargo_registry}/%{crate}-%{version}/ +%{cargo_registry}/%{crate}-%{version_no_tilde}/ %package -n %{name}+default-devel Summary: %{summary} @@ -52,7 +52,7 @@ This package contains library source intended for building other packages which use "default" feature of "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+parallel-devel Summary: %{summary} @@ -64,7 +64,7 @@ This package contains library source intended for building other packages which use "parallel" feature of "%{crate}" crate. %files -n %{name}+parallel-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+rayon-devel Summary: %{summary} @@ -76,12 +76,16 @@ This package contains library source intended for building other packages which use "rayon" feature of "%{crate}" crate. %files -n %{name}+rayon-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep +%generate_buildrequires +%cargo_generate_buildrequires +echo 'nasm' + %build %cargo_build @@ -94,6 +98,9 @@ which use "rayon" feature of "%{crate}" crate. %endif %changelog +* Mon Jan 27 2020 Josh Stone - 0.1.7-1 +- Update to 0.1.7 + * Fri Dec 20 23:53:53 CET 2019 Robert-André Mauchin - 0.1.5-2 - Add patch to generate DWARF debuginfo instead of STAB diff --git a/sources b/sources index d5f13ec..174dc82 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nasm-rs-0.1.5.crate) = 689743711d07b59f84588782df5e504285457f76c2523ef56078538a7da72f5fe693a248c82221f1de5bc3b6905906af5a120e80bcf6087fd2f96be647cf2fc0 +SHA512 (nasm-rs-0.1.7.crate) = fcecde236dcfe4420f4c594461d2e8cacc5ef4cc5b26bf05cbc338ef106ef5b85deed2d8c8dacee7b9e238c74106335a806e3809c6ae56772d8d91780e60e8d6