From 5a836c1fd3a7f42fe94933d3fa137ca4249dfb82 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sat, 16 May 2020 20:03:41 +0200 Subject: [PATCH] Update to 69.5.0 Signed-off-by: Igor Raits --- .gitignore | 1 + 0001-Always-use-system-onig.patch | 71 ++++++++++++++++++++++++++++++ onig_sys-fix-metadata.diff | 11 ----- rust-onig_sys-use-system-onig.diff | 12 ----- rust-onig_sys.spec | 49 +++++++++++++++------ sources | 2 +- 6 files changed, 108 insertions(+), 38 deletions(-) create mode 100644 0001-Always-use-system-onig.patch delete mode 100644 onig_sys-fix-metadata.diff delete mode 100644 rust-onig_sys-use-system-onig.diff diff --git a/.gitignore b/.gitignore index da442c4..6789b5f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /onig_sys-69.0.0.crate /onig_sys-69.1.0.crate /onig_sys-69.2.0.crate +/onig_sys-69.5.0.crate diff --git a/0001-Always-use-system-onig.patch b/0001-Always-use-system-onig.patch new file mode 100644 index 0000000..062e784 --- /dev/null +++ b/0001-Always-use-system-onig.patch @@ -0,0 +1,71 @@ +From 5aabe30b197ae7d7c158065215855d8bd3274d75 Mon Sep 17 00:00:00 2001 +From: Igor Raits +Date: Sat, 16 May 2020 20:01:33 +0200 +Subject: [PATCH] Always use system onig + +Signed-off-by: Igor Raits +--- + build.rs | 6 ++---- + src/lib.rs | 12 ------------ + 2 files changed, 2 insertions(+), 16 deletions(-) + +diff --git a/build.rs b/build.rs +index c7cb1fa..2155fe2 100644 +--- a/build.rs ++++ b/build.rs +@@ -1,4 +1,3 @@ +-#[cfg(feature = "generate")] + extern crate bindgen; + extern crate cc; + extern crate pkg_config; +@@ -187,7 +186,6 @@ fn compile() { + } + + fn bindgen_headers(_path: &str) { +- #[cfg(feature = "generate")] + { + let bindings = bindgen::Builder::default() + .header(_path) +@@ -205,13 +203,13 @@ fn bindgen_headers(_path: &str) { + + pub fn main() { + let link_type = link_type_override(); +- let require_pkg_config = env_var_bool("RUSTONIG_SYSTEM_LIBONIG").unwrap_or(false); ++ let require_pkg_config = true; + + if require_pkg_config || link_type == Some(LinkType::Dynamic) { + let mut conf = Config::new(); + // dynamically-generated headers can work with an older version + // pre-generated headers are for the latest +- conf.atleast_version(if cfg!(feature = "generate") {"6.8.0"} else {"6.9.3"}); ++ conf.atleast_version("6.8.0"); + if link_type == Some(LinkType::Static) { + conf.statik(true); + } +diff --git a/src/lib.rs b/src/lib.rs +index 4d855ad..c9b6d20 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -1,19 +1,7 @@ +-#[cfg(feature = "generate")] + mod bindgened; + +-#[cfg(feature = "generate")] + pub use bindgened::*; + +-#[cfg(not(feature = "generate"))] +-#[allow(non_upper_case_globals)] +-#[allow(non_camel_case_types)] +-#[allow(non_snake_case)] +-#[allow(clippy::all)] +-mod ffi; +- +-#[cfg(not(feature = "generate"))] +-pub use self::ffi::*; +- + // backfill types from the old hand-written bindings: + + pub type OnigSyntaxBehavior = ::std::os::raw::c_uint; +-- +2.26.2 + diff --git a/onig_sys-fix-metadata.diff b/onig_sys-fix-metadata.diff deleted file mode 100644 index d2bebb8..0000000 --- a/onig_sys-fix-metadata.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- onig_sys-69.2.0/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ onig_sys-69.2.0/Cargo.toml 2020-02-27T23:05:59.827511+00:00 -@@ -23,7 +23,7 @@ - license = "MIT" - repository = "http://github.com/iwillspeak/rust-onig" - [build-dependencies.bindgen] --version = "0.50" -+version = "0.53" - - [build-dependencies.cc] - version = "1.0" diff --git a/rust-onig_sys-use-system-onig.diff b/rust-onig_sys-use-system-onig.diff deleted file mode 100644 index 60e6fa8..0000000 --- a/rust-onig_sys-use-system-onig.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr onig_sys-68.2.0.orig/build.rs onig_sys-68.2.0/build.rs ---- onig_sys-68.2.0.orig/build.rs 2018-07-29 18:29:19.000000000 +0200 -+++ onig_sys-68.2.0/build.rs 2018-09-03 08:36:08.969948474 +0200 -@@ -139,7 +139,7 @@ - - pub fn main() { - let link_type = link_type_override(); -- let require_pkg_config = env_var_bool("RUSTONIG_SYSTEM_LIBONIG").unwrap_or(false); -+ let require_pkg_config = env_var_bool("RUSTONIG_SYSTEM_LIBONIG").unwrap_or(true); - - if require_pkg_config || link_type == Some(LinkType::Dynamic) { - let mut conf = Config::new(); diff --git a/rust-onig_sys.spec b/rust-onig_sys.spec index 9e1128c..58bac02 100644 --- a/rust-onig_sys.spec +++ b/rust-onig_sys.spec @@ -1,23 +1,20 @@ -# Generated by rust2rpm 10 +# Generated by rust2rpm 13 %bcond_without check %global debug_package %{nil} %global crate onig_sys Name: rust-%{crate} -Version: 69.2.0 -Release: 4%{?dist} +Version: 69.5.0 +Release: 1%{?dist} Summary: Raw rust bindings to the oniguruma library # Upstream license specification: MIT License: MIT URL: https://crates.io/crates/onig_sys Source: %{crates_source} -# Initial patched metadata -# * Update bindgen to 0.53, https://github.com/rust-onig/rust-onig/pull/134 -Patch0: onig_sys-fix-metadata.diff -# Use system onig by default -Patch1: rust-onig_sys-use-system-onig.diff +# Always use system onig +Patch0001: 0001-Always-use-system-onig.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -30,8 +27,8 @@ BuildRequires: rust-packaging `onig_sys` crate contains raw rust bindings to the oniguruma library. This crate exposes a set of unsafe functions which can then be used by other crates to create safe wrappers around Oniguruma. -You probably don't want to link to -this crate directly; instead check out the `onig` crate.} +You probably don't want to link to this crate directly; instead check out the +`onig` crate.} %description %{_description} @@ -47,7 +44,7 @@ which use "%{crate}" crate. %files devel %license LICENSE.md -%{cargo_registry}/%{crate}-%{version}/ +%{cargo_registry}/%{crate}-%{version_no_tilde}/ %package -n %{name}+default-devel Summary: %{summary} @@ -59,7 +56,31 @@ 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}+bindgen-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bindgen-devel %{_description} + +This package contains library source intended for building other packages +which use "bindgen" feature of "%{crate}" crate. + +%files -n %{name}+bindgen-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+generate-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+generate-devel %{_description} + +This package contains library source intended for building other packages +which use "generate" feature of "%{crate}" crate. + +%files -n %{name}+generate-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+posix-api-devel Summary: %{summary} @@ -71,7 +92,7 @@ This package contains library source intended for building other packages which use "posix-api" feature of "%{crate}" crate. %files -n %{name}+posix-api-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+print-debug-devel Summary: %{summary} @@ -83,7 +104,7 @@ This package contains library source intended for building other packages which use "print-debug" feature of "%{crate}" crate. %files -n %{name}+print-debug-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 diff --git a/sources b/sources index 7616ea5..762f925 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (onig_sys-69.2.0.crate) = 279d08cbb6169f34f836812b44179a2efe12b7676ae424c27fee624d2b8d609c8015608c09e2d4adeaffe66308822263d9d0399ab2169dfa749ec73233eafdbc +SHA512 (onig_sys-69.5.0.crate) = 644019ca67a89790bab5cb173f5499bf3b0af5a4c39e027e79a63e5752f471c6bff86f679e1c86502b6c3cf795c23cd461a87c36b2eb687dfe21e9d232bcb7ac