From 4c30c5ac46f11368deeab1b48be6fa8b28e6d904 Mon Sep 17 00:00:00 2001 From: Celeste <20312-Celeste@users.gitlab.alpinelinux.org> Date: Thu, 18 Jan 2024 03:54:13 +0000 Subject: [PATCH] testing/perl-json-path: new aport https://metacpan.org/release/JSON-Path/ Search nested hashref/arrayref structures using JSONPath --- testing/perl-json-path/APKBUILD | 45 ++++++++++++++++++++++ testing/perl-json-path/no-tie-ixhash.patch | 36 +++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 testing/perl-json-path/APKBUILD create mode 100644 testing/perl-json-path/no-tie-ixhash.patch diff --git a/testing/perl-json-path/APKBUILD b/testing/perl-json-path/APKBUILD new file mode 100644 index 00000000000..16a1ad84c1b --- /dev/null +++ b/testing/perl-json-path/APKBUILD @@ -0,0 +1,45 @@ +# Automatically generated by apkbuild-cpan, template 4 +# Contributor: Celeste +# Maintainer: Celeste +pkgname=perl-json-path +#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan +_pkgreal=JSON-Path +pkgver=1.0.4 +pkgrel=0 +pkgdesc="Search nested hashref/arrayref structures using JSONPath" +url="https://metacpan.org/release/JSON-Path/" +arch="noarch" +license="GPL-1.0-or-later OR Artistic-1.0-Perl" +depends=" + perl perl-carp-assert perl-exporter-tiny perl-json-maybexs + perl-lv perl-readonly perl-try-tiny + " +checkdepends="perl-test2-suite" +subpackages="$pkgname-doc" +source="https://cpan.metacpan.org/authors/id/P/PO/POPEFELIX/JSON-Path-$pkgver.tar.gz + no-tie-ixhash.patch + " +builddir="$srcdir/$_pkgreal-$pkgver" + +build() { + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL \ + INSTALLDIRS=vendor \ + NO_PACKLIST=1 \ + NO_PERLLOCAL=1 + make +} + +check() { + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + make test +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums=" +89819d9afb8302f1b07d5d8376614f406c6e47017aef42fa0a4064a2d843d21d5aec83451f05ef66e62cd9118ebed12761d601c498efe43fcf1fce60308ff15f JSON-Path-1.0.4.tar.gz +77471715204552bd6c49b8ce0e7082b4cc4ea94a7d6c23bb9d32a04453a541de76ca7a40df82f3b2325bcb60e3ff05a5f0f79123184706b269bb6cb2f92e8358 no-tie-ixhash.patch +" diff --git a/testing/perl-json-path/no-tie-ixhash.patch b/testing/perl-json-path/no-tie-ixhash.patch new file mode 100644 index 00000000000..f943faeb3af --- /dev/null +++ b/testing/perl-json-path/no-tie-ixhash.patch @@ -0,0 +1,36 @@ +Patch-Source: https://github.com/PopeFelix/p5-json-path/commit/a042749fb2e0103c3fa58fc02b70992fe34be7a9.patch +-- +From a042749fb2e0103c3fa58fc02b70992fe34be7a9 Mon Sep 17 00:00:00 2001 +From: bernhard +Date: Mon, 11 Dec 2023 21:03:21 +0100 +Subject: [PATCH] Do not require Tie::IxHash + +--- + cpanfile | 1 - + t/evaluator/paths.t | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/cpanfile b/cpanfile +index b1e5ff8..85eb5be 100644 +--- a/cpanfile ++++ b/cpanfile +@@ -6,7 +6,6 @@ requires 'List::Util' => '1.45'; # For uniq. + requires 'Readonly'; + requires 'Try::Tiny'; + requires 'perl' => '5.010'; +-requires 'Tie::IxHash'; + + on test => sub { + requires 'Test2::V0'; +diff --git a/t/evaluator/paths.t b/t/evaluator/paths.t +index 6db78ae..3e301af 100644 +--- a/t/evaluator/paths.t ++++ b/t/evaluator/paths.t +@@ -2,7 +2,6 @@ use Test2::V0; + use JSON::MaybeXS qw/encode_json decode_json/; + use JSON::Path::Evaluator; + use Storable qw(dclone); +-use Tie::IxHash; + + my $json = sample_json(); + my %data = %{ decode_json($json) };