parent
1ad308cfb4
commit
a69cd5a8f7
@ -0,0 +1 @@
|
||||
/combine-4.6.0.crate
|
@ -0,0 +1,46 @@
|
||||
diff -Naur a/tests/support/mod.rs b/tests/support/mod.rs
|
||||
--- a/tests/support/mod.rs 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ b/tests/support/mod.rs 2021-07-14 21:47:18.502065660 -0700
|
||||
@@ -61,42 +61,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-impl<R> tokio_03_dep::io::AsyncRead for PartialAsyncRead<R>
|
||||
-where
|
||||
- R: tokio_03_dep::io::AsyncRead + Unpin,
|
||||
-{
|
||||
- fn poll_read(
|
||||
- mut self: Pin<&mut Self>,
|
||||
- cx: &mut task::Context<'_>,
|
||||
- buf: &mut tokio_03_dep::io::ReadBuf<'_>,
|
||||
- ) -> Poll<io::Result<()>> {
|
||||
- match self.ops.next() {
|
||||
- Some(PartialOp::Limited(n)) => {
|
||||
- let len = std::cmp::min(n, buf.remaining());
|
||||
- buf.initialize_unfilled();
|
||||
- let mut sub_buf = buf.take(len);
|
||||
- ready!(Pin::new(&mut self.inner).poll_read(cx, &mut sub_buf))?;
|
||||
- let filled = sub_buf.filled().len();
|
||||
- buf.advance(filled);
|
||||
- Poll::Ready(Ok(()))
|
||||
- }
|
||||
- Some(PartialOp::Err(err)) => {
|
||||
- if err == io::ErrorKind::WouldBlock {
|
||||
- cx.waker().wake_by_ref();
|
||||
- Poll::Pending
|
||||
- } else {
|
||||
- Err(io::Error::new(
|
||||
- err,
|
||||
- "error during read, generated by partial-io",
|
||||
- ))
|
||||
- .into()
|
||||
- }
|
||||
- }
|
||||
- Some(PartialOp::Unlimited) | None => Pin::new(&mut self.inner).poll_read(cx, buf),
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
impl<R> tokio_dep::io::AsyncRead for PartialAsyncRead<R>
|
||||
where
|
||||
R: tokio_dep::io::AsyncRead + Unpin,
|
@ -0,0 +1,41 @@
|
||||
--- combine-4.6.0/Cargo.toml 1970-01-01T00:00:00+00:00
|
||||
+++ combine-4.6.0/Cargo.toml 2021-07-15T04:42:50.866403+00:00
|
||||
@@ -106,12 +106,6 @@
|
||||
default-features = false
|
||||
package = "tokio"
|
||||
|
||||
-[dependencies.tokio-03-dep]
|
||||
-version = "0.3"
|
||||
-optional = true
|
||||
-default-features = false
|
||||
-package = "tokio"
|
||||
-
|
||||
[dependencies.tokio-dep]
|
||||
version = "1"
|
||||
optional = true
|
||||
@@ -139,7 +133,7 @@
|
||||
version = "1.0"
|
||||
|
||||
[dev-dependencies.partial-io]
|
||||
-version = "0.3"
|
||||
+version = "0.5"
|
||||
features = ["tokio", "quickcheck"]
|
||||
|
||||
[dev-dependencies.quick-error]
|
||||
@@ -151,11 +145,6 @@
|
||||
[dev-dependencies.tokio-02-dep]
|
||||
version = "0.2"
|
||||
features = ["fs", "io-driver", "io-util", "macros"]
|
||||
-package = "tokio"
|
||||
-
|
||||
-[dev-dependencies.tokio-03-dep]
|
||||
-version = "0.3"
|
||||
-features = ["fs", "macros", "rt-multi-thread"]
|
||||
package = "tokio"
|
||||
|
||||
[dev-dependencies.tokio-dep]
|
||||
@@ -175,4 +164,3 @@
|
||||
std = ["memchr/use_std", "bytes"]
|
||||
tokio = ["tokio-dep", "futures-util-03", "pin-project-lite"]
|
||||
tokio-02 = ["pin-project", "std", "tokio-02-dep", "futures-util-03", "pin-project-lite", "bytes_05"]
|
||||
-tokio-03 = ["pin-project", "std", "tokio-03-dep", "futures-util-03", "pin-project-lite"]
|
@ -0,0 +1,246 @@
|
||||
# Generated by rust2rpm 18
|
||||
%bcond_without check
|
||||
%global debug_package %{nil}
|
||||
|
||||
%global crate combine
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 4.6.0
|
||||
Release: %autorelease
|
||||
Summary: Fast parser combinators on arbitrary streams with zero-copy support
|
||||
|
||||
# Upstream license specification: MIT
|
||||
License: MIT
|
||||
URL: https://crates.io/crates/combine
|
||||
Source: %{crates_source}
|
||||
# Bump partial-io to 0.5, drop tokio-03 feature and its dependencies
|
||||
Patch0: combine-fix-metadata.diff
|
||||
# Drop logic for tokio-03 in a test
|
||||
Patch1: combine-drop-tokio-03.patch
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
%if %{__cargo_skip_build}
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
BuildRequires: rust-packaging
|
||||
|
||||
%global _description %{expand:
|
||||
Fast parser combinators on arbitrary streams with zero-copy support.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "%{crate}" crate.
|
||||
|
||||
%files devel
|
||||
%license LICENSE
|
||||
%doc examples README.md CHANGELOG.md examples/readme.rs benches/http-requests.txt
|
||||
%{cargo_registry}/%{crate}-%{version_no_tilde}/
|
||||
|
||||
%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_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+bytes-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+bytes-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "bytes" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+bytes-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+bytes_05-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+bytes_05-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "bytes_05" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+bytes_05-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+futures-03-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+futures-03-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "futures-03" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+futures-03-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+futures-io-03-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+futures-io-03-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "futures-io-03" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+futures-io-03-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+futures-util-03-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+futures-util-03-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "futures-util-03" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+futures-util-03-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+mp4-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+mp4-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "mp4" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+mp4-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+pin-project-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+pin-project-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "pin-project" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+pin-project-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+pin-project-lite-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+pin-project-lite-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "pin-project-lite" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+pin-project-lite-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+regex-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+regex-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "regex" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+regex-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+std-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+std-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "std" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+std-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+tokio-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+tokio-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "tokio" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+tokio-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+tokio-02-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+tokio-02-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "tokio-02" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+tokio-02-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+tokio-02-dep-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+tokio-02-dep-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "tokio-02-dep" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+tokio-02-dep-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%package -n %{name}+tokio-dep-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+tokio-dep-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "tokio-dep" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+tokio-dep-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||
%cargo_prep
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
|
||||
%install
|
||||
%cargo_install
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
Loading…
Reference in new issue