diff -Nru rust-fast-srgb8-1.0.0/debian/changelog rust-fast-srgb8-1.0.0/debian/changelog --- rust-fast-srgb8-1.0.0/debian/changelog 2023-08-14 11:30:00.000000000 +0000 +++ rust-fast-srgb8-1.0.0/debian/changelog 2023-09-02 08:57:34.000000000 +0000 @@ -1,3 +1,10 @@ +rust-fast-srgb8 (1.0.0-5) unstable; urgency=medium + + * add patch 1001 to ignore unstable test by default + * update dh-cargo fork + + -- Jonas Smedegaard Sat, 02 Sep 2023 10:57:34 +0200 + rust-fast-srgb8 (1.0.0-4) unstable; urgency=medium * update dh-cargo fork diff -Nru rust-fast-srgb8-1.0.0/debian/copyright_hints rust-fast-srgb8-1.0.0/debian/copyright_hints --- rust-fast-srgb8-1.0.0/debian/copyright_hints 2023-07-17 11:01:49.000000000 +0000 +++ rust-fast-srgb8-1.0.0/debian/copyright_hints 2023-09-02 08:57:29.000000000 +0000 @@ -10,6 +10,9 @@ debian/copyright-check debian/dh-cargo/README.md debian/gbp.conf + debian/patches/1001_unstable_test.patch + debian/patches/README + debian/patches/series debian/rules debian/source/format debian/source/lintian-overrides diff -Nru rust-fast-srgb8-1.0.0/debian/dh-cargo/lib/Debian/Debhelper/Buildsystem/cargo.pm rust-fast-srgb8-1.0.0/debian/dh-cargo/lib/Debian/Debhelper/Buildsystem/cargo.pm --- rust-fast-srgb8-1.0.0/debian/dh-cargo/lib/Debian/Debhelper/Buildsystem/cargo.pm 2023-08-14 08:58:49.000000000 +0000 +++ rust-fast-srgb8-1.0.0/debian/dh-cargo/lib/Debian/Debhelper/Buildsystem/cargo.pm 2023-08-24 10:50:01.000000000 +0000 @@ -37,7 +37,7 @@ use String::ShellQuote qw( shell_quote ); use base 'Debian::Debhelper::Buildsystem'; -use constant CARGO_SYSTEM_REGISTRY => '/usr/share/cargo/registry/'; +use constant CARGO_SYSTEM_REGISTRY => '/usr/share/cargo/registry'; sub DESCRIPTION { "Rust Cargo" @@ -75,6 +75,11 @@ $crates{_default} //= \%object if $key->{name} eq $default; } + # resolve amount of local dependencies + # TODO: use Graph to compute an always reliable order instead + for my $key ( @{ $manifest->{packages} } ) { + $crates{ $key->{name} =~ tr/_/-/r }{depcount} = grep { exists $crates{ $_->{name} =~ tr/_/-/r } } @{ $key->{dependencies} }; + } return \%crates; } @@ -248,7 +253,7 @@ "--remap-path-prefix", "$_->{cratespec}=$_->{systempath}", )} map { @{ $this->{libpkg}{$_}{crates} } } sort keys %{ $this->{libpkg} }; - push @rustflags, "--remap-path-prefix", "$registry_path=" . CARGO_SYSTEM_REGISTRY; + push @rustflags, "--remap-path-prefix", "$registry_path=" . CARGO_SYSTEM_REGISTRY . '/'; my $rustflags = shell_quote(@rustflags); $rustflags .= " $ENV{RUSTFLAGS}" if $ENV{RUSTFLAGS}; @@ -289,11 +294,13 @@ sub install { my $this=shift; my $destdir=shift; - foreach my $crate ( map { @{ $_->{crates} } } sort values %{ $this->{libpkg} } ) { + foreach my $crate ( sort { $a->{depcount} cmp $b->{depcount} } map { @{ $_->{crates} } } sort values %{ $this->{libpkg} } ) { my $target = tmpdir( $crate->{libpkg}{name} ) . $crate->{systempath}; install_dir($target); - $this->doit_in_sourcedir( - qw(cargo package --offline --allow-dirty --no-verify --package), $crate->{pkgid} ); + $this->doit_in_somedir( + $crate->{sourcepath}, + qw(cargo package --offline --allow-dirty --no-verify), + '--target-dir', cwd . '/target', '--package', $crate->{pkgid} ); $this->doit_in_somedir( "$target/..", 'tar', map( { ( '--exclude', $_ ) } qw(debian/* debian Cargo.toml.orig Cargo.lock COPYING* LICENSE*) ), '-xvf', @@ -306,6 +313,10 @@ ">", "$target/.cargo-checksum.json"); # prevent an ftpmaster auto-reject regarding files with old dates. doit("touch", "-d@" . $ENV{SOURCE_DATE_EPOCH}, "$target/Cargo.toml"); + # add crate to local registry, needed by some multi-crate workspaces + # maybe related: + complex_doit( + qw(ln --symbolic --relative --target-directory=debian/cargo_registry), $target ); } foreach my $featurepkg (@{$this->{featurepkg}}) { my $target = tmpdir( $featurepkg->{name} ) . "/usr/share/doc"; diff -Nru rust-fast-srgb8-1.0.0/debian/dh-cargo/README.md rust-fast-srgb8-1.0.0/debian/dh-cargo/README.md --- rust-fast-srgb8-1.0.0/debian/dh-cargo/README.md 2023-08-14 08:58:49.000000000 +0000 +++ rust-fast-srgb8-1.0.0/debian/dh-cargo/README.md 2023-08-24 10:50:01.000000000 +0000 @@ -62,4 +62,4 @@ ``` - -- Jonas Smedegaard Mon, 14 Aug 2023 10:43:00 +0200 + -- Jonas Smedegaard Sat, Thu, 24 Aug 2023 11:55:01 +0200 diff -Nru rust-fast-srgb8-1.0.0/debian/patches/1001_unstable_test.patch rust-fast-srgb8-1.0.0/debian/patches/1001_unstable_test.patch --- rust-fast-srgb8-1.0.0/debian/patches/1001_unstable_test.patch 1970-01-01 00:00:00.000000000 +0000 +++ rust-fast-srgb8-1.0.0/debian/patches/1001_unstable_test.patch 2023-09-02 08:55:53.000000000 +0000 @@ -0,0 +1,16 @@ +Description: ignore unstable test by default +Bug: https://github.com/thomcc/fast-srgb8/issues/2 +Author: Jonas Smedegaard +Last-Update: 2023-09-02 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -296,6 +296,7 @@ + } + } + #[test] ++ #[ignore] + fn test_from_srgb8() { + let wanted = (0..=255).map(srgb8_to_f32_ref).collect::>(); + assert_eq!(&FROM_SRGB8_TABLE[..], &wanted[..]); diff -Nru rust-fast-srgb8-1.0.0/debian/patches/README rust-fast-srgb8-1.0.0/debian/patches/README --- rust-fast-srgb8-1.0.0/debian/patches/README 1970-01-01 00:00:00.000000000 +0000 +++ rust-fast-srgb8-1.0.0/debian/patches/README 2022-06-25 19:39:40.000000000 +0000 @@ -0,0 +1,3 @@ +0xxx: Grabbed from upstream development. +1xxx: Possibly relevant for upstream adoption. +2xxx: Only relevant for official Debian release. \ No newline at end of file diff -Nru rust-fast-srgb8-1.0.0/debian/patches/series rust-fast-srgb8-1.0.0/debian/patches/series --- rust-fast-srgb8-1.0.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ rust-fast-srgb8-1.0.0/debian/patches/series 2023-09-02 08:53:58.000000000 +0000 @@ -0,0 +1 @@ +1001_unstable_test.patch