From d454e151c3c85edf8a4cc1e9d247ac1bd497db80 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 21 May 2015 19:10:09 +0800 Subject: [PATCH 1/2] libjson: Make the pure-perl version work Depend on two more modules to have the following code emit something: #use JSON::XS; use JSON; my %rec_hash = ('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5); my $json = encode_json \%rec_hash; print "$json\n"; --- recipes-extra/perl-json/libjson-perl_2.90.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-extra/perl-json/libjson-perl_2.90.bb b/recipes-extra/perl-json/libjson-perl_2.90.bb index a3f59eeda8..3c90261c6b 100644 --- a/recipes-extra/perl-json/libjson-perl_2.90.bb +++ b/recipes-extra/perl-json/libjson-perl_2.90.bb @@ -4,6 +4,8 @@ HOMEPAGE = "http://search.cpan.org/~makamaka/JSON-2.90/lib/JSON.pm" SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0+" RDEPENDS_${PN} = " perl-module-carp \ + perl-module-overload \ + perl-module-constant \ libjson-xs-perl \ " From b792b649e4cd2b7376af52642610b6bb5f489d5f Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 21 May 2015 19:37:00 +0800 Subject: [PATCH 2/2] libjson-xs-perl: Add needed dependency by the same author libjson-xs requires another module that is normally not packaged. --- .../perl-json/libcommon-sense-perl_3.73.bb | 17 +++++++++++++++++ recipes-extra/perl-json/libjson-xs-perl_3.01.bb | 1 + 2 files changed, 18 insertions(+) create mode 100644 recipes-extra/perl-json/libcommon-sense-perl_3.73.bb diff --git a/recipes-extra/perl-json/libcommon-sense-perl_3.73.bb b/recipes-extra/perl-json/libcommon-sense-perl_3.73.bb new file mode 100644 index 0000000000..aae2cdacde --- /dev/null +++ b/recipes-extra/perl-json/libcommon-sense-perl_3.73.bb @@ -0,0 +1,17 @@ +SUMMARY = "Module needed by libjson-xs-perl" +DESCRIPTION = "" +HOMEPAGE = "http://search.cpan.org/~mlehmann/common-sense-3.73/sense.pod" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0+" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=043dba8b278e1db1b0ef93f30140b02b" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/common-sense-${PV}.tar.gz" +SRC_URI[md5sum] = "6da7455a43ab60ed21c2a5e3b3ddeda8" +SRC_URI[sha256sum] = "8110c5e472641e0c218f8e023cecc1612ef66f9a1b313261fe219862efe3fd10" + +S = "${WORKDIR}/common-sense-${PV}" + +inherit cpan + +BBCLASSEXTEND = "native" diff --git a/recipes-extra/perl-json/libjson-xs-perl_3.01.bb b/recipes-extra/perl-json/libjson-xs-perl_3.01.bb index a7b905acbc..ff33b2630a 100644 --- a/recipes-extra/perl-json/libjson-xs-perl_3.01.bb +++ b/recipes-extra/perl-json/libjson-xs-perl_3.01.bb @@ -4,6 +4,7 @@ HOMEPAGE = "http://search.cpan.org/~makamaka/JSON-2.90/lib/JSON.pm" SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0+" RDEPENDS_${PN} = " perl-module-encoding \ + libcommon-sense-perl \ " LIC_FILES_CHKSUM = "file://COPYING;md5=043dba8b278e1db1b0ef93f30140b02b"