diff options
Diffstat (limited to 'meta-perl')
-rw-r--r-- | meta-perl/COPYING.MIT | 17 | ||||
-rw-r--r-- | meta-perl/README | 91 | ||||
-rw-r--r-- | meta-perl/conf/layer.conf | 10 | ||||
-rw-r--r-- | meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.04.bb | 15 | ||||
-rw-r--r-- | meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.28.bb | 24 | ||||
-rwxr-xr-x | meta-perl/recipes-perl/libdb/libdbd-sqlite-perl/sqlite-perl-test.pl | 69 | ||||
-rw-r--r-- | meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.40.bb | 39 | ||||
-rw-r--r-- | meta-perl/recipes-perl/libdb/libdbi-perl_1.628.bb | 26 |
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 @@ | |||
1 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
2 | of this software and associated documentation files (the "Software"), to deal | ||
3 | in the Software without restriction, including without limitation the rights | ||
4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
5 | copies of the Software, and to permit persons to whom the Software is | ||
6 | furnished to do so, subject to the following conditions: | ||
7 | |||
8 | The above copyright notice and this permission notice shall be included in | ||
9 | all copies or substantial portions of the Software. | ||
10 | |||
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
17 | THE 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 @@ | |||
1 | meta-perl | ||
2 | ========= | ||
3 | This layer provides commonly-used perl related recipes such as perl libraries | ||
4 | in the Comprehensive Perl Archive Network. | ||
5 | |||
6 | Contents and Help | ||
7 | ----------------- | ||
8 | |||
9 | In this section the contents of the layer is listed, along with a short | ||
10 | help 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 | |||
49 | Dependencies | ||
50 | ------------ | ||
51 | |||
52 | This layer depends on: | ||
53 | |||
54 | URI: git://git.openembedded.org/openembedded-core | ||
55 | branch: master | ||
56 | revision: HEAD | ||
57 | prio: default | ||
58 | |||
59 | Adding the meta-perl layer to your build | ||
60 | --------------------------------------- | ||
61 | |||
62 | In order to use this layer, you need to make the build system aware of | ||
63 | it. | ||
64 | |||
65 | Assuming the meta-perl layer exists at the top-level of your | ||
66 | yocto build tree, you can add it to the build system by adding the | ||
67 | location of the meta-perl layer to bblayers.conf, along with any | ||
68 | other layers needed. e.g.: | ||
69 | |||
70 | BBLAYERS ?= " \ | ||
71 | /path/to/oe-core/meta \ | ||
72 | /path/to/layer/meta-perl \ | ||
73 | |||
74 | Maintenance | ||
75 | ----------- | ||
76 | |||
77 | Send patches / pull requests to openembedded-devel@lists.openembedded.org with | ||
78 | '[meta-perl]' in the subject. | ||
79 | |||
80 | When 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 | |||
83 | Layer maintainer: Hongxu Jia <hongxu.jia@windriver.com> | ||
84 | |||
85 | License | ||
86 | ------- | ||
87 | |||
88 | All metadata is MIT licensed unless otherwise stated. Source code included | ||
89 | in 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 | ||
2 | BBPATH .= ":${LAYERDIR}" | ||
3 | |||
4 | # We have recipes-* directories, add to BBFILES | ||
5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
6 | ${LAYERDIR}/recipes-*/*/*.bbappend" | ||
7 | |||
8 | BBFILE_COLLECTIONS += "perl-layer" | ||
9 | BBFILE_PATTERN_perl-layer := "^${LAYERDIR}/" | ||
10 | BBFILE_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 @@ | |||
1 | SUMMARY = "Crypt Openssl Random cpan module" | ||
2 | SECTION = "libs" | ||
3 | LICENSE = "Artistic-1.0 | GPL-1.0+" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=385c55653886acac3821999a3ccd17b3" | ||
6 | |||
7 | SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-Random-${PV}.tar.gz " | ||
8 | SRC_URI[md5sum] = "c56ac5dbdd46122eb9b8da59613b7b0a" | ||
9 | SRC_URI[sha256sum] = "acf7eb81023cd1f40d8c60b893096d041513df2be2aefe145cc7ae1a3dcc78c7" | ||
10 | |||
11 | S = "${WORKDIR}/Crypt-OpenSSL-Random-${PV}" | ||
12 | |||
13 | DEPENDS += " openssl \ | ||
14 | " | ||
15 | inherit 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 @@ | |||
1 | SUMMARY = "Crypt Openssl RSA cpan module" | ||
2 | SECTION = "libs" | ||
3 | LICENSE = "Artistic-1.0 | GPL-1.0+" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=385c55653886acac3821999a3ccd17b3" | ||
5 | |||
6 | SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-RSA-${PV}.tar.gz " | ||
7 | |||
8 | SRC_URI[md5sum] = "86217a5036fc63779c30420b5fd84129" | ||
9 | SRC_URI[sha256sum] = "5357f977464bb3a8184cf2d3341851a10d5515b4b2b0dfb88bf78995c0ded7be" | ||
10 | |||
11 | DEPENDS += "openssl" | ||
12 | |||
13 | RDEPENDS_${PN}="libcrypt-openssl-random-perl" | ||
14 | |||
15 | EXTRA_CPANFLAGS = "INC='-I${STAGING_INCDIR}' LIBS='-L${STAGING_LIBDIR} -lssl -L${STAGING_DIR_TARGET}${base_libdir} -lcrypto'" | ||
16 | |||
17 | S = "${WORKDIR}/Crypt-OpenSSL-RSA-${PV}" | ||
18 | |||
19 | inherit cpan | ||
20 | |||
21 | do_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 | ||
22 | use DBI; | ||
23 | |||
24 | sub 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 | |||
34 | sub 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. | ||
54 | my $dbfile = ":memory:"; | ||
55 | my $dbh = DBI->connect("DBI:SQLite:dbname=$dbfile","","") | ||
56 | or die "Couldn't connect to database: " . DBI->errstr; | ||
57 | print "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; | ||
69 | print "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 @@ | |||
1 | SUMMARY = "A Perl DBI driver for SQLite" | ||
2 | DESCRIPTION = "DBD::SQLite is a Perl DBI driver for SQLite, that includes the entire \ | ||
3 | thing in the distribution. So in order to get a fast transaction capable \ | ||
4 | RDBMS working for your perl project you simply have to install this \ | ||
5 | module, and nothing else. \ | ||
6 | " | ||
7 | HOMEPAGE = "http://search.cpan.org/~ishigaki/DBD-SQLite/" | ||
8 | |||
9 | SECTION = "libs" | ||
10 | LICENSE = "Artistic-1.0 | GPL-1.0+" | ||
11 | DEPENDS += "libdbi-perl-native" | ||
12 | RDEPENDS_${PN} += "libdbi-perl \ | ||
13 | sqlite3 \ | ||
14 | perl-module-constant \ | ||
15 | perl-module-locale \ | ||
16 | perl-module-tie-hash \ | ||
17 | " | ||
18 | |||
19 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1726e2117494ba3e13e1c3d93f795360" | ||
20 | |||
21 | SRC_URI = "http://search.cpan.org/CPAN/authors/id/I/IS/ISHIGAKI/DBD-SQLite-${PV}.tar.gz \ | ||
22 | file://sqlite-perl-test.pl \ | ||
23 | " | ||
24 | |||
25 | SRC_URI[md5sum] = "b9876882186499583428b14cf5c0e29c" | ||
26 | SRC_URI[sha256sum] = "21fb65e740b6265512c82232b4ad8f75c19ac84c216830112656274eb8e375fb" | ||
27 | |||
28 | S = "${WORKDIR}/DBD-SQLite-${PV}" | ||
29 | |||
30 | inherit cpan | ||
31 | |||
32 | BBCLASSEXTEND = "native" | ||
33 | |||
34 | do_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 @@ | |||
1 | SUMMARY = "The Perl Database Interface" | ||
2 | DESCRIPTION = "DBI is a database access Application Programming Interface \ | ||
3 | (API) for the Perl Language. The DBI API Specification defines a set \ | ||
4 | of functions, variables and conventions that provide a consistent \ | ||
5 | database interface independent of the actual database being used. \ | ||
6 | " | ||
7 | HOMEPAGE = "http://search.cpan.org/dist/DBI/" | ||
8 | SECTION = "libs" | ||
9 | LICENSE = "Artistic-1.0 | GPL-1.0+" | ||
10 | RDEPENDS_${PN} = " perl-module-carp \ | ||
11 | perl-module-exporter \ | ||
12 | perl-module-exporter-heavy \ | ||
13 | perl-module-dynaloader \ | ||
14 | " | ||
15 | |||
16 | LIC_FILES_CHKSUM = "file://DBI.pm;beginline=8147;endline=8151;md5=7d9e154a9ca3c093d2422f7c692d5861" | ||
17 | |||
18 | SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-${PV}.tar.gz" | ||
19 | SRC_URI[md5sum] = "4273f8cc6ee3979ce448c7eb3f8a6a5a" | ||
20 | SRC_URI[sha256sum] = "46c834f4ba1b28c8d8a2db8095835a67fc69a9585761523aea3a74437a969b52" | ||
21 | |||
22 | S = "${WORKDIR}/DBI-${PV}" | ||
23 | |||
24 | inherit cpan | ||
25 | |||
26 | BBCLASSEXTEND = "native" | ||