diff --git a/0001-Upgrade-plist-to-0.3-and-take-advantage-of-serde-int.patch b/0001-Upgrade-plist-to-0.3-and-take-advantage-of-serde-int.patch deleted file mode 100644 index 19e2b23..0000000 --- a/0001-Upgrade-plist-to-0.3-and-take-advantage-of-serde-int.patch +++ /dev/null @@ -1,52 +0,0 @@ -From f4aa3a1421d4213f8611af8bc243f2dcdf86146f Mon Sep 17 00:00:00 2001 -From: Robin Stocker -Date: Thu, 28 Jun 2018 12:50:41 +1000 -Subject: [PATCH] Upgrade plist to 0.3 and take advantage of serde integration - ---- - src/highlighting/settings.rs | 24 ++++-------------------- - 1 file changed, 4 insertions(+), 20 deletions(-) - -diff --git a/src/highlighting/settings.rs b/src/highlighting/settings.rs -index d0e7be7..da64fcf 100644 ---- a/src/highlighting/settings.rs -+++ b/src/highlighting/settings.rs -@@ -2,8 +2,8 @@ - /// released under the MIT license by @defuz - - use std::io::{Read, Seek}; --use plist::{Plist, Error as PlistError}; --use serde_json::Number; -+use plist::{Error as PlistError}; -+use plist::serde::deserialize; - - pub use serde_json::Value as Settings; - pub use serde_json::Value::Array as SettingsArray; -@@ -33,22 +33,6 @@ impl From for SettingsError { - } - - pub fn read_plist(reader: R) -> Result { -- let plist = Plist::read(reader)?; -- Ok(to_json(plist)) --} -- --fn to_json(plist: Plist) -> Settings { -- match plist { -- Plist::Array(elements) => -- SettingsArray(elements.into_iter().map(to_json).collect()), -- Plist::Dictionary(entries) => -- SettingsObject(entries.into_iter().map(|(k, v)| (k, to_json(v))).collect()), -- Plist::Boolean(value) => Settings::Bool(value), -- Plist::Data(bytes) => Settings::Array(bytes.into_iter().map(|b| b.into()).collect()), -- Plist::Date(value) => Settings::String(value.to_string()), -- Plist::Real(value) => -- Settings::Number(Number::from_f64(value).expect("Error converting plist real value to JSON number")), -- Plist::Integer(value) => Settings::Number(value.into()), -- Plist::String(s) => Settings::String(s), -- } -+ let settings = deserialize(reader)?; -+ Ok(settings) - } --- -2.19.0.rc1 - diff --git a/rust-syntect.spec b/rust-syntect.spec index b1b0882..11b4d74 100644 --- a/rust-syntect.spec +++ b/rust-syntect.spec @@ -1,12 +1,12 @@ # Generated by rust2rpm -# criterion is not packaged yet +# * criterion is not packaged yet %bcond_with check %global debug_package %{nil} %global crate syntect Name: rust-%{crate} -Version: 2.1.0 +Version: 3.0.1 Release: 1%{?dist} Summary: Library for high quality syntax highlighting and code intelligence @@ -14,52 +14,235 @@ License: MIT URL: https://crates.io/crates/syntect Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata -# * Bump onig to 4.1, https://github.com/trishume/syntect/commit/6172cf925cbe87aa8984cb4362906808bd5cf437 -# * Bump regex-syntax to 0.6 and regex to 1.0, https://github.com/trishume/syntect/commit/5bd64c04aa236bfb0c03da9c101aa27ed63ed01e -# * Bump plist to 0.3, https://github.com/trishume/syntect/commit/f4aa3a1421d4213f8611af8bc243f2dcdf86146f +# * Exclude CI files, https://github.com/trishume/syntect/pull/224 Patch0: syntect-fix-metadata.diff -# Make it work with new plist -Patch0001: 0001-Upgrade-plist-to-0.3-and-take-advantage-of-serde-int.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(bincode) >= 1.0.0 with crate(bincode) < 2.0.0) -BuildRequires: (crate(bitflags) >= 1.0.0 with crate(bitflags) < 2.0.0) +BuildRequires: (crate(bincode/default) >= 1.0.0 with crate(bincode/default) < 2.0.0) +BuildRequires: (crate(bitflags/default) >= 1.0.0 with crate(bitflags/default) < 2.0.0) BuildRequires: (crate(flate2) >= 1.0.0 with crate(flate2) < 2.0.0) -BuildRequires: (crate(fnv) >= 1.0.0 with crate(fnv) < 2.0.0) -BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0) -BuildRequires: (crate(onig) >= 4.1.0 with crate(onig) < 5.0.0) -BuildRequires: (crate(plist) >= 0.3.0 with crate(plist) < 0.4.0) -BuildRequires: (crate(regex-syntax) >= 0.6.0 with crate(regex-syntax) < 0.7.0) -BuildRequires: ((crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) with crate(serde/rc)) -BuildRequires: (crate(serde_derive) >= 1.0.0 with crate(serde_derive) < 2.0.0) -BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0) -BuildRequires: (crate(walkdir) >= 2.0.0 with crate(walkdir) < 3.0.0) -BuildRequires: (crate(yaml-rust) >= 0.4.0 with crate(yaml-rust) < 0.5.0) +BuildRequires: (crate(flate2/default) >= 1.0.0 with crate(flate2/default) < 2.0.0) +BuildRequires: (crate(flate2/rust_backend) >= 1.0.0 with crate(flate2/rust_backend) < 2.0.0) +BuildRequires: (crate(fnv/default) >= 1.0.0 with crate(fnv/default) < 2.0.0) +BuildRequires: (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0) +BuildRequires: (crate(lazycell/default) >= 1.0.0 with crate(lazycell/default) < 2.0.0) +BuildRequires: (crate(onig/default) >= 4.1.0 with crate(onig/default) < 5.0.0) +BuildRequires: (crate(plist/default) >= 0.3.0 with crate(plist/default) < 0.4.0) +BuildRequires: (crate(regex-syntax/default) >= 0.6.0 with crate(regex-syntax/default) < 0.7.0) +BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0) +BuildRequires: (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0) +BuildRequires: (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0) +BuildRequires: (crate(walkdir/default) >= 2.0.0 with crate(walkdir/default) < 3.0.0) +BuildRequires: (crate(yaml-rust/default) >= 0.4.0 with crate(yaml-rust/default) < 0.5.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(criterion) >= 0.2.0 with crate(criterion) < 0.3.0) -BuildRequires: (crate(getopts) >= 0.2.0 with crate(getopts) < 0.3.0) -BuildRequires: (crate(pretty_assertions) >= 0.5.0 with crate(pretty_assertions) < 0.6.0) -BuildRequires: (crate(rayon) >= 1.0.0 with crate(rayon) < 2.0.0) -BuildRequires: (crate(regex) >= 1.0.0 with crate(regex) < 2.0.0) +BuildRequires: (crate(criterion/default) >= 0.2.0 with crate(criterion/default) < 0.3.0) +BuildRequires: (crate(getopts/default) >= 0.2.0 with crate(getopts/default) < 0.3.0) +BuildRequires: (crate(pretty_assertions/default) >= 0.5.0 with crate(pretty_assertions/default) < 0.6.0) +BuildRequires: (crate(rayon/default) >= 1.0.0 with crate(rayon/default) < 2.0.0) +BuildRequires: (crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0) %endif -%description -%{summary}. +%global _description \ +Library for high quality syntax highlighting and code intelligence using\ +Sublime Text's grammars. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -library for high quality syntax highlighting and code intelligence using -Sublime Text's grammars. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE.txt +%doc Readme.md DESIGN.md +%{cargo_registry}/%{crate}-%{version}/ + +%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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+assets-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+assets-devel %{_description} + +This package contains library source intended for building other packages +which use "assets" feature of "%{crate}" crate. + +%files -n %{name}+assets-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+bincode-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bincode-devel %{_description} + +This package contains library source intended for building other packages +which use "bincode" feature of "%{crate}" crate. + +%files -n %{name}+bincode-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+dump-create-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dump-create-devel %{_description} + +This package contains library source intended for building other packages +which use "dump-create" feature of "%{crate}" crate. + +%files -n %{name}+dump-create-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+dump-create-rs-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dump-create-rs-devel %{_description} + +This package contains library source intended for building other packages +which use "dump-create-rs" feature of "%{crate}" crate. + +%files -n %{name}+dump-create-rs-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+dump-load-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dump-load-devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "dump-load" feature of "%{crate}" crate. + +%files -n %{name}+dump-load-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+dump-load-rs-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dump-load-rs-devel %{_description} + +This package contains library source intended for building other packages +which use "dump-load-rs" feature of "%{crate}" crate. + +%files -n %{name}+dump-load-rs-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+flate2-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+flate2-devel %{_description} + +This package contains library source intended for building other packages +which use "flate2" feature of "%{crate}" crate. + +%files -n %{name}+flate2-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+fnv-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+fnv-devel %{_description} + +This package contains library source intended for building other packages +which use "fnv" feature of "%{crate}" crate. + +%files -n %{name}+fnv-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+html-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+html-devel %{_description} + +This package contains library source intended for building other packages +which use "html" feature of "%{crate}" crate. + +%files -n %{name}+html-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+onig-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+onig-devel %{_description} + +This package contains library source intended for building other packages +which use "onig" feature of "%{crate}" crate. + +%files -n %{name}+onig-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+parsing-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+parsing-devel %{_description} + +This package contains library source intended for building other packages +which use "parsing" feature of "%{crate}" crate. + +%files -n %{name}+parsing-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+regex-syntax-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+regex-syntax-devel %{_description} + +This package contains library source intended for building other packages +which use "regex-syntax" feature of "%{crate}" crate. + +%files -n %{name}+regex-syntax-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+yaml-load-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+yaml-load-devel %{_description} + +This package contains library source intended for building other packages +which use "yaml-load" feature of "%{crate}" crate. + +%files -n %{name}+yaml-load-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+yaml-rust-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+yaml-rust-devel %{_description} + +This package contains library source intended for building other packages +which use "yaml-rust" feature of "%{crate}" crate. + +%files -n %{name}+yaml-rust-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -76,12 +259,9 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE.txt -%doc Readme.md DESIGN.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/{codecov.yaml,Makefile,scripts} - %changelog +* Sun Nov 04 2018 Igor Gnatenko - 3.0.1-1 +- Update to 3.0.1 + * Mon Sep 03 2018 Igor Gnatenko - 2.1.0-1 - Initial package diff --git a/syntect-fix-metadata.diff b/syntect-fix-metadata.diff index 539dd50..cf583f5 100644 --- a/syntect-fix-metadata.diff +++ b/syntect-fix-metadata.diff @@ -1,29 +1,11 @@ ---- syntect-2.1.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ syntect-2.1.0/Cargo.toml 2018-09-03T08:43:04.539047+02:00 -@@ -54,14 +54,14 @@ - version = "1.0" - - [dependencies.onig] --version = "3.2.1" -+version = "4.1" - optional = true - - [dependencies.plist] --version = "0.2" -+version = "0.3" - - [dependencies.regex-syntax] --version = "0.4" -+version = "0.6" - optional = true - - [dependencies.serde] -@@ -93,7 +93,7 @@ - version = "1.0.0" - - [dev-dependencies.regex] --version = "0.2" -+version = "1.0" - - [features] - assets = [] +--- syntect-3.0.1/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ syntect-3.0.1/Cargo.toml 2018-11-04T17:14:16.621747+01:00 +@@ -14,7 +14,7 @@ + name = "syntect" + version = "3.0.1" + authors = ["Tristan Hume "] +-exclude = ["testdata/*"] ++exclude = ["testdata/*", "/scripts/*", "/Makefile", "/codecov.yml"] + description = "library for high quality syntax highlighting and code intelligence using Sublime Text's grammars" + documentation = "https://docs.rs/syntect" + readme = "Readme.md"