Sync from SUSE:SLFO:Main rust-cbindgen revision 9b8c04684536a5fd5115eae13883b9e1

This commit is contained in:
Adrian Schröter 2024-05-04 00:23:59 +02:00
commit dda7dfb0cc
8 changed files with 429 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

11
UPDATING.md Normal file
View File

@ -0,0 +1,11 @@
## Updating with OBS Services
To do an update:
* Edit \_service and change `<param name="revision">v0.19.0</param>` to match the release tag version from upstream
* Optional: Change `<param name="changesauthor"></param>` to your email address
* Run `osc service ra` - this will download the git sources, tar it, and vendor the dependencies.
* osc rm the "old" source tar
* osc add the "new" source tar
* test build with osc build
* osc ci / osc sr as normal.

28
_service Normal file
View File

@ -0,0 +1,28 @@
<services>
<service mode="disabled" name="obs_scm">
<param name="url">https://github.com/eqrion/cbindgen.git</param>
<param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@</param>
<param name="scm">git</param>
<param name="revision">v0.24.3</param>
<param name="match-tag">*</param>
<param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param>
<param name="versionrewrite-replacement">\1</param>
<param name="changesgenerate">enable</param>
<param name="changesauthor">william.brown@suse.com</param>
</service>
<service mode="disabled" name="tar" />
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service mode="disabled" name="set_version"/>
<service name="cargo_vendor" mode="disabled">
<param name="srcdir">cbindgen</param>
<param name="compression">xz</param>
<param name="update">true</param>
</service>
<service name="cargo_audit" mode="disabled">
<param name="srcdir">cbindgen</param>
<param name="lockfile">Cargo.lock</param>
</service>
</services>

5
cargo_config Normal file
View File

@ -0,0 +1,5 @@
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"

BIN
cbindgen-0.24.3+git0.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

286
rust-cbindgen.changes Normal file
View File

@ -0,0 +1,286 @@
-------------------------------------------------------------------
Wed Jul 27 07:30:01 UTC 2022 - wolfgang@rosenauer.org
- Update to version 0.24.3+git0:
* Bump version.
* tests: Add a test for struct constants going through typedefs.
* bindings: Peel through typedefs for struct constant generation.
* Rustfmt recent changes.
* Version bump.
* bitflags: Be explicit in binary operators and such.
* Version bump.
* constant: Add support for unary negation.
* bitflags: Make more operations constexpr.
* Fix changelog typo.
-------------------------------------------------------------------
Wed Jun 08 04:11:38 UTC 2022 - william.brown@suse.com
- Update to version 0.24.2+git0:
* Version bump.
* bitflags: Be explicit in binary operators and such.
* Version bump.
* constant: Add support for unary negation.
* bitflags: Make more operations constexpr.
* Fix changelog typo.
* Version bump.
* constant: Support suffixes for integers that otherwise would be narrowed.
* Fix specialization of `SomeType<N>` when `N` is a const parameter.
* Minor refactor of ConstExpr::load().
-------------------------------------------------------------------
Thu Apr 21 22:18:35 UTC 2022 - william.brown@suse.com
- Update to version 0.23.0+git0:
* v0.23.0
* constant: Make const.allow_constexpr default to true.
* constant: Allow more constexpr constants.
* Update syn dependency to at least 1.0.88
* Fix #753
-------------------------------------------------------------------
Wed Apr 20 00:14:13 UTC 2022 - william.brown@suse.com
- Update to version 0.22.0+git0:
* v0.22.0
* Support rename rule for union body members.
* constant: Add support for other expressions WebRender uses.
* constant: Add support for associated constant expressions.
* Fix regression in CamelCase rename rule (should be lowerCamelCase)
* enumeration: simplify standard types in variants.
* Avoid generating and writing bindings when called recursively
* Cython: Omit per-variant tags in unions generated for Rust enums
* Update various dependencies.
* v0.21.0
-------------------------------------------------------------------
Tue Apr 5 05:36:24 UTC 2022 - William Brown <william.brown@suse.com>
- Automatic update of vendored dependencies
-------------------------------------------------------------------
Sun Mar 27 22:39:33 UTC 2022 - william.brown@suse.com
- Update to version 0.21.0+git0:
* v0.21.0
* Update MSRV to 1.54.0
* Update clap to 3.1
* Update heck to 0.4.0
* Remove etesync from readme.
* Update docs.md
* Remove wgpu-native from users.
* Address clippy lint.
* unraw the identifiers
* Silence some dead_code warnings.
-------------------------------------------------------------------
Fri Jul 30 02:55:28 UTC 2021 - william.brown@suse.com
- Update to version 0.20.0+git0:
* v0.20.0
* Don't use `check` profile when expanding code on a release build
* Update --pretty=expanded to -Zunpretty=expanded
* Fix some clippy lints.
* Simplify Pin<T> to T
* add `Builder::with_using_namespaces`
* Ignore PhantomPinned
* Move the target-guessing code from #676 to its own function.
* Only fetch dependencies for current platform by default (#676)
* v0.19.0
-------------------------------------------------------------------
Mon Jul 5 05:14:40 UTC 2021 - William Brown <william.brown@suse.com>
- Update vendored dependencies to resolve potential memory corruption
in dependency ( RUSTSEC-2021-0003 )
-------------------------------------------------------------------
Mon Jun 21 04:09:06 UTC 2021 - William Brown <william.brown@suse.com>
- Remove unnecessary dependency on rust-std-static (implied by rust)
-------------------------------------------------------------------
Wed Jun 9 01:55:17 UTC 2021 - William Brown <william.brown@suse.com>
- Resolve issue with UPDATING.md in submission
-------------------------------------------------------------------
Wed Jun 02 05:23:06 UTC 2021 - william.brown@suse.com
- Update to to build from _service with cargo-audit integration
-------------------------------------------------------------------
Mon Apr 19 12:16:37 UTC 2021 - Martin Sirringhaus <martin.sirringhaus@suse.com>
- Update to 0.19.0
* Simplify types in generics
* Use --profile=check for macro expansion
* Use exported name to prefix enum variants
* Fix path attribute handling in inline submodules
* Fix a stack overflow with some recursive typedefs
- Update to 0.18.0
* Simplify types in nested types such as pointed-to types and
function signatures
- Update to 0.17.0
* Add with_parse_extra_bindings to builder.
* Support NonZero and fix incorrect simplification of Option<ptr> into ptr.
* Deal with name conflicts correctly in declaration type resolution.
* Support pointers to ZSTs.
-------------------------------------------------------------------
Tue Jan 12 08:25:59 UTC 2021 - Martin Sirringhaus <martin.sirringhaus@suse.com>
- Update to 0.16.0
* Remove artificial restriction on lifetime parameters on enums
* Add an option for converting usize/isize into size_t/ptrdiff_t.
* Allow controlling the cargo profile used for expansion.
* Support wider range of expressions in enum discriminants
* Support generation of Cython bindings
* Fixed some issues with style=tag and recursive structs
* Default C style to Both (as specified in docs)
* Fix resolution of path dependencies from certain modules.
* Support inlined definitions for tuple variants with a single field in C
-------------------------------------------------------------------
Tue Oct 13 08:18:32 UTC 2020 - Martin Sirringhaus <martin.sirringhaus@suse.com>
- update to 0.15.0
* Allow customizing mangling of generic parameters in C
* Box<T> simplifies to T* in C
* ManuallyDrop<T> and MaubeUninit<T> simplify to T in C, and are opaque in C++
* C++ supports a derive-ostream annotation to derive serialization
of structs, unions and enums
* Large character constants have been fixed on Windows
* Constants are now generated for typedefs, etc
* The `sort_by` configuration option has been made to work for constants
* Default sort order is source order now (sort_by = "None"), and can
be changed by the above option
- update to 0.14.6
* Fixed the builds with older versions of rustc.
- update to 0.14.5
* Add support to specify line ending style
* Add cbindgen:ptrs-as-arrays annotation to allow making function
arguments C/C++ arrays.
- update to 0.14.4
* Allow to override the mangling separator
* cbindgen now handles better having ZSTs in template parameters, and
default template parameters.
* Support for annotating nonnull pointers
* Fixed bitflags that overflow a signed integer
* Support for wildcard argument names
* Support for the never return type, with configurable annotation
* Properly reject arrays as function arguments
-------------------------------------------------------------------
Thu Jul 23 14:26:02 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
- update to 0.14.3
* Introduce cbindgen:ignore comment annotation, to allow ignoring items or modules.
* Support for casts in constant expressions.
* Make a non-fatal error a warning message.
* Add a --metadata option to the CLI, to allow passing pre-computed cargo metadata.
0.14.2
* Fixed minimal dependency versions.
* Add an option to write pragma once.
* Fix submodule scanning for implicit Rust 2018 modules.
* Fix dependency parsing / scanning to handle target-specific versions.
* Use heck for case conversion.
* Add support for verbatim content after includes.
* Allow to add attributes to most generated functions.
-------------------------------------------------------------------
Wed May 27 07:39:14 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
- Update to version 0.14.1
0.14.1
* Handle mangling pointers.
* Unconditionally generate a return statement in partialeq implementations.
0.14.0
* Minor tweak at how [export.exclude] is handled to allow excluding
generic instantiations in C mode.
* Documented cpp_compat option.
* Fixed a panic when parsing associated constants for a built-in type.
0.13.2
* Constants now have suitable documentation.
* Fixed some C warnings by emitting void when there are no arguments.
* Avoids reading cargo.toml when not needed, which can cause panics
in workspace situations.
* Only write `default` cases if the switch is not exhaustive.
* Some warnings have been refined.
* Code generation for static arrays has been fixed.
* Opt-in support for constexpr in constants.
* Fix C code generation and some warnings when extremely large
constants are used.
* Proper escaping of enum variants and fields.
* Added support for RefCell (as an opaque type) and Cell.
- required for Firefox >= 77.0
-------------------------------------------------------------------
Mon Mar 30 20:12:18 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
- Update to version 0.13.1
* Support `#[cfg]` on individual enum variants
- required for Firefox >= 75
- remove more irrelevant build artefacts
-------------------------------------------------------------------
Sat Mar 7 09:05:08 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
- Update to version 0.13.0
* https://docs.rs/crate/cbindgen/0.13.0/source/CHANGES
- required for Firefox >= 74
-------------------------------------------------------------------
Sun Feb 9 07:54:07 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
- Update to version 0.12.0
* https://docs.rs/crate/cbindgen/0.12.0/source/CHANGES
- required for Firefox >= 73
-------------------------------------------------------------------
Fri Oct 18 20:27:55 UTC 2019 - Wolfgang Rosenauer <wr@rosenauer.org>
- Update to version 0.9.1
* Various improvements to comment output.
* Fixed expand when ran from build.rs.
* More debugging output for expansion.
* New option to add a default private constructor in C++ tagged enums.
* Syn and related dependencies updated to 1.0.
-------------------------------------------------------------------
Thu Aug 8 20:44:33 UTC 2019 - Luke Jones <luke@ljones.dev>
- Update to version 0.9.0
* Support to generate C headers with C++ compatibility
* Fix include guard generation when no_includes is set
* Fix crate parsing order so that types from the binding crate
are preferred in presence of conflicting names
* Add extra_bindings option to generate bindings for dependencies
* Clap dependency is optional now so it's feasible to avoid
building it if cbindgen is used as a library
-------------------------------------------------------------------
Tue May 14 11:57:41 UTC 2019 - Wolfgang Rosenauer <wr@rosenauer.org>
- update to version 0.8.7
* there is no upstream changelog provided
-------------------------------------------------------------------
Sun Mar 17 13:43:36 UTC 2019 - Wolfgang Rosenauer <wr@rosenauer.org>
- update to version 0.6.8 to satisfy Firefox 66.0 build requirements
-------------------------------------------------------------------
Mon Nov 19 15:00:09 UTC 2018 - astieger@suse.com
- use a source URL
-------------------------------------------------------------------
Wed Nov 14 00:34:16 UTC 2018 - Luke Jones <jones_ld@protonmail.com>
- Initial packaging - boo#1115645

70
rust-cbindgen.spec Normal file
View File

@ -0,0 +1,70 @@
#
# spec file
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# Use hardening ldflags.
%global crate_name cbindgen
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
Name: rust-%{crate_name}
Version: 0.24.3+git0
Release: 0
Summary: A tool for generating C bindings from Rust code
License: MPL-2.0
Group: Development/Languages/Rust
URL: https://crates.io/crates/cbindgen
Source0: %{crate_name}-%{version}.tar.xz
Source1: vendor.tar.xz
Source2: cargo_config
Source99: UPDATING.md
BuildRequires: cargo >= 1.30.0
BuildRequires: rust >= 1.30.0
%description
A tool for generating C bindings from Rust code.
%prep
%setup -q -T -b 0 -n %{crate_name}-%{version}
%setup -q -D -T -a 1 -n %{crate_name}-%{version}
mkdir cargo-home
cp %{SOURCE2} cargo-home/config
%build
# This should eventually migrate to distro policy
# Enable optimization, debuginfo, and link hardening.
export RUSTFLAGS="%{rustflags}"
export CARGO_HOME=`pwd`/cargo-home/
cargo build --release
%install
# rustflags must be exported again at install as cargo build will
# rebuild the project if it detects flags have changed (to none or other)
export RUSTFLAGS="%{rustflags}"
# install stage also requires re-export of 'cargo-home' or cargo
# will try to download source deps and rebuild
export CARGO_HOME=`pwd`/cargo-home/
# cargo install appends /bin to the path
cargo install --root=%{buildroot}%{_prefix} --path .
# remove spurious files
rm -f %{buildroot}%{_prefix}/.crates.toml
rm -f %{buildroot}%{_prefix}/.crates2.json
%files
%license LICENSE
%{_bindir}/cbindgen
%changelog

BIN
vendor.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.