2
1

0001-Use-perl-module-JSON-PP-part-of-core-instead-of-JSON.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From f6fdb0a28e3bfcb3fd0aa1c81ad59c5411c0d660 Mon Sep 17 00:00:00 2001
  2. From: Andrew Sim <andrewsimz@gmail.com>
  3. Date: Sat, 10 Jun 2023 09:00:24 +0200
  4. Subject: [PATCH] Use perl module JSON:PP, part of core, instead of JSON
  5. package
  6. This patch removes the need for an external package.
  7. Ported from
  8. https://github.com/openwrt/packages/blob/master/net/samba4/patches/105-perl-json-pp.patch
  9. https://github.com/openwrt/packages/commit/402f4ba4eff65b80a9deaa6085256112bec4d67b#diff-208d4e0345c9d29fbec23d6f655ba794afd3052f5cb8dd73944db72ce81b847b
  10. Upstream: https://github.com/heimdal/heimdal/pull/1176
  11. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  12. ---
  13. cf/make-proto.pl | 4 ++--
  14. configure.ac | 1 -
  15. 2 files changed, 2 insertions(+), 3 deletions(-)
  16. diff --git a/cf/make-proto.pl b/cf/make-proto.pl
  17. index 36a040ce6..4af21916b 100644
  18. --- a/cf/make-proto.pl
  19. +++ b/cf/make-proto.pl
  20. @@ -4,7 +4,7 @@
  21. use Getopt::Std;
  22. use File::Compare;
  23. -use JSON;
  24. +use JSON::PP
  25. my $comment = 0;
  26. my $doxygen = 0;
  27. @@ -70,7 +70,7 @@ if($opt_x) {
  28. my $EXP;
  29. local $/;
  30. open(EXP, '<', $opt_x) || die "open ${opt_x}";
  31. - my $obj = JSON->new->utf8->decode(<EXP>);
  32. + my $obj = JSON::PP->new->utf8->decode(<EXP>);
  33. close $EXP;
  34. foreach my $x (keys %$obj) {
  35. diff --git a/configure.ac b/configure.ac
  36. index cedb4c01f..cecd030e6 100644
  37. --- a/configure.ac
  38. +++ b/configure.ac
  39. @@ -56,7 +56,6 @@ if ! test -f "$srcdir/lib/asn1/der-protos.h" ||
  40. AC_KRB_PROG_PERL
  41. AC_KRB_PERL_MOD(Getopt::Std)
  42. AC_KRB_PERL_MOD(File::Compare)
  43. - AC_KRB_PERL_MOD(JSON)
  44. fi
  45. AC_KRB_PROG_YACC
  46. --
  47. 2.39.2