Skip to content

Commit

Permalink
dev-rust/serde_json: 1.0.4 Enable tests and feature=indexmap
Browse files Browse the repository at this point in the history
Though currently, these tests are nothing more than an almost no-op
of "it compiles", as the entire test suite is stripped by upstream
during shipping, and subsequently, a whole bunch of unused
dev-dependencies are patched out to keep things simple.

Bug: serde-rs/json#578
Package-Manager: Portage-2.3.75, Repoman-2.3.16
Signed-off-by: Kent Fredric <kentnl@gentoo.org>
  • Loading branch information
kentfredric committed Jan 6, 2020
1 parent a7f8a37 commit b988f04
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
28 changes: 28 additions & 0 deletions dev-rust/serde_json/files/serde_json-1.0.41-unused-deps.patch
@@ -0,0 +1,28 @@
diff --git a/Cargo.toml.old b/Cargo.toml
index 5ce911b..46aba1c 100644
--- a/Cargo.toml.old
+++ b/Cargo.toml
@@ -39,23 +39,6 @@ version = "1.0"

[dependencies.serde]
version = "1.0.60"
-[dev-dependencies.automod]
-version = "0.1"
-
-[dev-dependencies.rustversion]
-version = "0.1"
-
-[dev-dependencies.serde_bytes]
-version = "0.11"
-
-[dev-dependencies.serde_derive]
-version = "1.0"
-
-[dev-dependencies.serde_stacker]
-version = "0.1"
-
-[dev-dependencies.trybuild]
-version = "1.0"

[features]
arbitrary_precision = []
3 changes: 3 additions & 0 deletions dev-rust/serde_json/metadata.xml
Expand Up @@ -6,4 +6,7 @@
</maintainer>
<longdescription lang="en">
</longdescription>
<use>
<flag name="indexmap">Require deps needed for 'indexmap' crate feature</flag>
</use>
</pkgmetadata>
13 changes: 11 additions & 2 deletions dev-rust/serde_json/serde_json-1.0.41.ebuild
Expand Up @@ -11,10 +11,19 @@ SRC_URI="https://crates.io/api/v1/crates/${PN}/${PV}/download -> ${P}.crate"

LICENSE="|| ( MIT Apache-2.0 )"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="test"
IUSE="indexmap test"

F_INDEXMAP="
=dev-rust/indexmap-1*:=
"
BDEPEND="
( =dev-rust/itoa-0.4*:= >=dev-rust/itoa-0.4.3 )
=dev-rust/ryu-1*:=
( =dev-rust/serde-1*:= >=dev-rust/serde-1.0.60 )
test? (
${F_INDEXMAP}
)
"
PATCHES=(
"${FILESDIR}/${P}-unused-deps.patch"
)

0 comments on commit b988f04

Please sign in to comment.