summaryrefslogtreecommitdiffstats
path: root/meta-perl
diff options
context:
space:
mode:
Diffstat (limited to 'meta-perl')
-rw-r--r--meta-perl/COPYING.MIT17
-rw-r--r--meta-perl/README91
-rw-r--r--meta-perl/conf/layer.conf10
-rw-r--r--meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.04.bb15
-rw-r--r--meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.28.bb24
-rwxr-xr-xmeta-perl/recipes-perl/libdb/libdbd-sqlite-perl/sqlite-perl-test.pl69
-rw-r--r--meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.40.bb39
-rw-r--r--meta-perl/recipes-perl/libdb/libdbi-perl_1.628.bb26
8 files changed, 291 insertions, 0 deletions
diff --git a/meta-perl/COPYING.MIT b/meta-perl/COPYING.MIT
new file mode 100644
index 0000000000..89de354795
--- /dev/null
+++ b/meta-perl/COPYING.MIT
@@ -0,0 +1,17 @@
1Permission is hereby granted, free of charge, to any person obtaining a copy
2of this software and associated documentation files (the "Software"), to deal
3in the Software without restriction, including without limitation the rights
4to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5copies of the Software, and to permit persons to whom the Software is
6furnished to do so, subject to the following conditions:
7
8The above copyright notice and this permission notice shall be included in
9all copies or substantial portions of the Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17THE SOFTWARE.
diff --git a/meta-perl/README b/meta-perl/README
new file mode 100644
index 0000000000..68160a628c
--- /dev/null
+++ b/meta-perl/README
@@ -0,0 +1,91 @@
1meta-perl
2=========
3This layer provides commonly-used perl related recipes such as perl libraries
4in the Comprehensive Perl Archive Network.
5
6Contents and Help
7-----------------
8
9In this section the contents of the layer is listed, along with a short
10help for each package.
11
12 -- libdbi-perl --
13 The DBI is a database access module for the Perl programming language.
14 It defines a set of methods, variables, and conventions that provide
15 a consistent database interface, independent of the actual database
16 being used.
17 |<- Scope of DBI ->|
18 .-. .--------------. .-------------.
19 .-------. | |---| XYZ Driver |---| XYZ Engine |
20 | Perl | | | `--------------' `-------------'
21 | script| |A| |D| .--------------. .-------------.
22 | using |--|P|--|B|---|Oracle Driver |---|Oracle Engine|
23 | DBI | |I| |I| `--------------' `-------------'
24 | API | | |...
25 |methods| | |... Other drivers
26 `-------' | |...
27 `-'
28
29 -- libdbd-sqlite-perl --
30 DBD::SQLite is a Perl DBI driver for SQLite, that includes the entire
31 thing in the distribution. So in order to get a fast transaction capable
32 RDBMS working for your perl project you simply have to install this
33 module, and nothing else.
34
35 usage: there is a test case to show you how it works
36
37 1) vim local.conf:
38 ...
39 IMAGE_INSTALL_append = " libdbd-sqlite-perl"
40 PERL_DBM_TEST = "1"
41 ...
42 2) build core-image-sato and boot the target
43
44 3) run "sqlite-perl-test.pl" on target. This script includes five
45 operations create/insert/update/delete/select to do with a table.
46
47 More information can be found in the recipe's git log.
48
49Dependencies
50------------
51
52This layer depends on:
53
54 URI: git://git.openembedded.org/openembedded-core
55 branch: master
56 revision: HEAD
57 prio: default
58
59Adding the meta-perl layer to your build
60---------------------------------------
61
62In order to use this layer, you need to make the build system aware of
63it.
64
65Assuming the meta-perl layer exists at the top-level of your
66yocto build tree, you can add it to the build system by adding the
67location of the meta-perl layer to bblayers.conf, along with any
68other layers needed. e.g.:
69
70 BBLAYERS ?= " \
71 /path/to/oe-core/meta \
72 /path/to/layer/meta-perl \
73
74Maintenance
75-----------
76
77Send patches / pull requests to openembedded-devel@lists.openembedded.org with
78'[meta-perl]' in the subject.
79
80When sending single patches, please using something like:
81'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-perl][PATCH'
82
83Layer maintainer: Hongxu Jia <hongxu.jia@windriver.com>
84
85License
86-------
87
88All metadata is MIT licensed unless otherwise stated. Source code included
89in tree for individual recipes is under the LICENSE stated in each recipe
90(.bb file) unless otherwise stated.
91
diff --git a/meta-perl/conf/layer.conf b/meta-perl/conf/layer.conf
new file mode 100644
index 0000000000..09ed0e572f
--- /dev/null
+++ b/meta-perl/conf/layer.conf
@@ -0,0 +1,10 @@
1# We have a conf and classes directory, add to BBPATH
2BBPATH .= ":${LAYERDIR}"
3
4# We have recipes-* directories, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
6 ${LAYERDIR}/recipes-*/*/*.bbappend"
7
8BBFILE_COLLECTIONS += "perl-layer"
9BBFILE_PATTERN_perl-layer := "^${LAYERDIR}/"
10BBFILE_PRIORITY_perl-layer = "6"
diff --git a/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.04.bb b/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.04.bb
new file mode 100644
index 0000000000..1f99be036f
--- /dev/null
+++ b/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.04.bb
@@ -0,0 +1,15 @@
1SUMMARY = "Crypt Openssl Random cpan module"
2SECTION = "libs"
3LICENSE = "Artistic-1.0 | GPL-1.0+"
4
5LIC_FILES_CHKSUM = "file://LICENSE;md5=385c55653886acac3821999a3ccd17b3"
6
7SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-Random-${PV}.tar.gz "
8SRC_URI[md5sum] = "c56ac5dbdd46122eb9b8da59613b7b0a"
9SRC_URI[sha256sum] = "acf7eb81023cd1f40d8c60b893096d041513df2be2aefe145cc7ae1a3dcc78c7"
10
11S = "${WORKDIR}/Crypt-OpenSSL-Random-${PV}"
12
13DEPENDS += " openssl \
14"
15inherit cpan
diff --git a/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.28.bb b/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.28.bb
new file mode 100644
index 0000000000..f0c610f3ae
--- /dev/null
+++ b/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.28.bb
@@ -0,0 +1,24 @@
1SUMMARY = "Crypt Openssl RSA cpan module"
2SECTION = "libs"
3LICENSE = "Artistic-1.0 | GPL-1.0+"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=385c55653886acac3821999a3ccd17b3"
5
6SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-RSA-${PV}.tar.gz "
7
8SRC_URI[md5sum] = "86217a5036fc63779c30420b5fd84129"
9SRC_URI[sha256sum] = "5357f977464bb3a8184cf2d3341851a10d5515b4b2b0dfb88bf78995c0ded7be"
10
11DEPENDS += "openssl"
12
13RDEPENDS_${PN}="libcrypt-openssl-random-perl"
14
15EXTRA_CPANFLAGS = "INC='-I${STAGING_INCDIR}' LIBS='-L${STAGING_LIBDIR} -lssl -L${STAGING_DIR_TARGET}${base_libdir} -lcrypto'"
16
17S = "${WORKDIR}/Crypt-OpenSSL-RSA-${PV}"
18
19inherit cpan
20
21do_compile() {
22 export OTHERLDFLAGS='-Wl,-rpath'
23 cpan_do_compile
24}
diff --git a/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl/sqlite-perl-test.pl b/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl/sqlite-perl-test.pl
new file mode 100755
index 0000000000..40f5916f58
--- /dev/null
+++ b/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl/sqlite-perl-test.pl
@@ -0,0 +1,69 @@
1#! /usr/bin/env perl
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software Foundation.
15#
16# Copyright (C) 2013 Wind River Systems, Inc.
17#
18# - It tests DBI and DBD::SQLite could work correctly which means one could
19# manipulate sqlite database in perl
20# - The test includes create/insert/update/delete/select, the five important
21# things one can do with a table
22use DBI;
23
24sub execute_sql {
25 my $dbh = $_[0];
26 my $sql = $_[1];
27 my $sth = $dbh->prepare($sql)
28 or die "Couldn't prepare statement: " . $dbh->errstr;
29 $sth->execute();
30 print "$sql\n";
31 return $sth;
32}
33
34sub select_all {
35 my $dbh = $_[0];
36 my $table = $_[1];
37 my $sth = &execute_sql($dbh, "Select * from $table");
38
39 print "-----------------------------------\n";
40 while (@data = $sth->fetchrow_array()) {
41 my $name = $data[0];
42 my $id = $data[1];
43 print "$name: $id\n";
44 }
45 print "\n";
46
47 $sth->finish;
48 return $sth;
49}
50
51# A private, temporary in-memory database is created for the connection.
52# This in-memory database will vanish when the database connection is
53# closed. It is handy for your library tests.
54my $dbfile = ":memory:";
55my $dbh = DBI->connect("DBI:SQLite:dbname=$dbfile","","")
56 or die "Couldn't connect to database: " . DBI->errstr;
57print "Connect to SQLite's in-memory database\n";
58
59&execute_sql($dbh, "Create table tbl1(name varchar(10), id smallint)");
60&execute_sql($dbh, "Insert into tbl1 values('yocto',10)");
61&execute_sql($dbh, "Insert into tbl1 values('windriver', 20)");
62&select_all($dbh, "tbl1");
63
64&execute_sql($dbh, "Update tbl1 set name = 'oe-core' where id = 10");
65&execute_sql($dbh, "Delete from tbl1 where id = 20");
66&select_all($dbh, "tbl1");
67
68$dbh->disconnect;
69print "Test Success\n"
diff --git a/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.40.bb b/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.40.bb
new file mode 100644
index 0000000000..fad03d8178
--- /dev/null
+++ b/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.40.bb
@@ -0,0 +1,39 @@
1SUMMARY = "A Perl DBI driver for SQLite"
2DESCRIPTION = "DBD::SQLite is a Perl DBI driver for SQLite, that includes the entire \
3thing in the distribution. So in order to get a fast transaction capable \
4RDBMS working for your perl project you simply have to install this \
5module, and nothing else. \
6"
7HOMEPAGE = "http://search.cpan.org/~ishigaki/DBD-SQLite/"
8
9SECTION = "libs"
10LICENSE = "Artistic-1.0 | GPL-1.0+"
11DEPENDS += "libdbi-perl-native"
12RDEPENDS_${PN} += "libdbi-perl \
13 sqlite3 \
14 perl-module-constant \
15 perl-module-locale \
16 perl-module-tie-hash \
17"
18
19LIC_FILES_CHKSUM = "file://LICENSE;md5=1726e2117494ba3e13e1c3d93f795360"
20
21SRC_URI = "http://search.cpan.org/CPAN/authors/id/I/IS/ISHIGAKI/DBD-SQLite-${PV}.tar.gz \
22 file://sqlite-perl-test.pl \
23"
24
25SRC_URI[md5sum] = "b9876882186499583428b14cf5c0e29c"
26SRC_URI[sha256sum] = "21fb65e740b6265512c82232b4ad8f75c19ac84c216830112656274eb8e375fb"
27
28S = "${WORKDIR}/DBD-SQLite-${PV}"
29
30inherit cpan
31
32BBCLASSEXTEND = "native"
33
34do_install_append() {
35 if [ ${PERL_DBM_TEST} = "1" ]; then
36 install -m 755 -D ${WORKDIR}/sqlite-perl-test.pl ${D}/${bindir}/sqlite-perl-test.pl
37 fi
38}
39
diff --git a/meta-perl/recipes-perl/libdb/libdbi-perl_1.628.bb b/meta-perl/recipes-perl/libdb/libdbi-perl_1.628.bb
new file mode 100644
index 0000000000..38bdf614bb
--- /dev/null
+++ b/meta-perl/recipes-perl/libdb/libdbi-perl_1.628.bb
@@ -0,0 +1,26 @@
1SUMMARY = "The Perl Database Interface"
2DESCRIPTION = "DBI is a database access Application Programming Interface \
3(API) for the Perl Language. The DBI API Specification defines a set \
4of functions, variables and conventions that provide a consistent \
5database interface independent of the actual database being used. \
6"
7HOMEPAGE = "http://search.cpan.org/dist/DBI/"
8SECTION = "libs"
9LICENSE = "Artistic-1.0 | GPL-1.0+"
10RDEPENDS_${PN} = " perl-module-carp \
11 perl-module-exporter \
12 perl-module-exporter-heavy \
13 perl-module-dynaloader \
14"
15
16LIC_FILES_CHKSUM = "file://DBI.pm;beginline=8147;endline=8151;md5=7d9e154a9ca3c093d2422f7c692d5861"
17
18SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-${PV}.tar.gz"
19SRC_URI[md5sum] = "4273f8cc6ee3979ce448c7eb3f8a6a5a"
20SRC_URI[sha256sum] = "46c834f4ba1b28c8d8a2db8095835a67fc69a9585761523aea3a74437a969b52"
21
22S = "${WORKDIR}/DBI-${PV}"
23
24inherit cpan
25
26BBCLASSEXTEND = "native"