All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer
@ 2013-08-12  8:00 Hongxu Jia
  2013-08-12  8:00 ` [meta-perl][PATCH 1/3] meta-perl creation Hongxu Jia
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Hongxu Jia @ 2013-08-12  8:00 UTC (permalink / raw)
  To: openembedded-devel

Change in V2: Use 'meta-perl' instead of 'meta-cpan' to name the layer

The following changes are available in the git repository at:

  git://git.pokylinux.org/poky-contrib hongxu/meta-perl
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=hongxu/meta-perl

Hongxu Jia (3):
  meta-perl creation
  libdbi-perl: add version 1.628
  libdbd-sqlite-perl: add version 1.40



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [meta-perl][PATCH 1/3] meta-perl creation
  2013-08-12  8:00 [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer Hongxu Jia
@ 2013-08-12  8:00 ` Hongxu Jia
  2013-08-12  8:00 ` [meta-perl][PATCH 2/3] libdbi-perl: add version 1.628 Hongxu Jia
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Hongxu Jia @ 2013-08-12  8:00 UTC (permalink / raw)
  To: openembedded-devel

---
 COPYING.MIT     | 17 +++++++++++
 README          | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 conf/layer.conf | 10 +++++++
 3 files changed, 118 insertions(+)
 create mode 100644 COPYING.MIT
 create mode 100644 README
 create mode 100644 conf/layer.conf

diff --git a/COPYING.MIT b/COPYING.MIT
new file mode 100644
index 0000000..89de354
--- /dev/null
+++ b/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README b/README
new file mode 100644
index 0000000..68160a6
--- /dev/null
+++ b/README
@@ -0,0 +1,91 @@
+meta-perl
+=========
+This layer provides commonly-used perl related recipes such as perl libraries
+in the Comprehensive Perl Archive Network.
+
+Contents and Help
+-----------------
+
+In this section the contents of the layer is listed, along with a short
+help for each package.
+
+         -- libdbi-perl --
+         The DBI is a database access module for the Perl programming language.
+         It defines a set of methods, variables, and conventions that provide
+         a consistent database interface, independent of the actual database
+         being used.
+                      |<- Scope of DBI ->|
+                           .-.   .--------------.   .-------------.
+           .-------.       | |---| XYZ Driver   |---| XYZ Engine  |
+           | Perl  |       | |   `--------------'   `-------------'
+           | script|  |A|  |D|   .--------------.   .-------------.
+           | using |--|P|--|B|---|Oracle Driver |---|Oracle Engine|
+           | DBI   |  |I|  |I|   `--------------'   `-------------'
+           | API   |       | |...
+           |methods|       | |... Other drivers
+           `-------'       | |...
+                           `-'
+
+        -- libdbd-sqlite-perl --
+        DBD::SQLite is a Perl DBI driver for SQLite, that includes the entire
+        thing in the distribution. So in order to get a fast transaction capable
+        RDBMS working for your perl project you simply have to install this
+        module, and nothing else.
+
+        usage: there is a test case to show you how it works
+
+        1) vim local.conf:
+        ...
+        IMAGE_INSTALL_append = " libdbd-sqlite-perl"
+        PERL_DBM_TEST = "1"
+        ...
+        2) build core-image-sato and boot the target
+
+        3) run "sqlite-perl-test.pl" on target. This script includes five
+           operations create/insert/update/delete/select to do with a table.
+
+        More information can be found in the recipe's git log.
+
+Dependencies
+------------
+
+This layer depends on:
+
+  URI: git://git.openembedded.org/openembedded-core
+  branch: master
+  revision: HEAD
+  prio: default
+
+Adding the meta-perl layer to your build
+---------------------------------------
+
+In order to use this layer, you need to make the build system aware of
+it.
+
+Assuming the meta-perl layer exists at the top-level of your
+yocto build tree, you can add it to the build system by adding the
+location of the meta-perl layer to bblayers.conf, along with any
+other layers needed. e.g.:
+
+  BBLAYERS ?= " \
+    /path/to/oe-core/meta \
+    /path/to/layer/meta-perl \
+
+Maintenance
+-----------
+
+Send patches / pull requests to openembedded-devel@lists.openembedded.org with
+'[meta-perl]' in the subject.
+
+When sending single patches, please using something like:
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-perl][PATCH'
+
+Layer maintainer: Hongxu Jia <hongxu.jia@windriver.com>
+
+License
+-------
+
+All metadata is MIT licensed unless otherwise stated. Source code included
+in tree for individual recipes is under the LICENSE stated in each recipe
+(.bb file) unless otherwise stated.
+
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..09ed0e5
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,10 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+	${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "perl-layer"
+BBFILE_PATTERN_perl-layer := "^${LAYERDIR}/"
+BBFILE_PRIORITY_perl-layer = "6"
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-perl][PATCH 2/3] libdbi-perl: add version 1.628
  2013-08-12  8:00 [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer Hongxu Jia
  2013-08-12  8:00 ` [meta-perl][PATCH 1/3] meta-perl creation Hongxu Jia
@ 2013-08-12  8:00 ` Hongxu Jia
  2013-08-12  8:00 ` [meta-perl][PATCH 3/3] libdbd-sqlite-perl: add version 1.40 Hongxu Jia
  2013-08-14 11:52 ` [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer Martin Jansa
  3 siblings, 0 replies; 6+ messages in thread
From: Hongxu Jia @ 2013-08-12  8:00 UTC (permalink / raw)
  To: openembedded-devel

The DBI is a database access module for the Perl programming language.
It defines a set of methods, variables, and conventions that provide
a consistent database interface, independent of the actual database
being used.
             |<- Scope of DBI ->|
                  .-.   .--------------.   .-------------.
  .-------.       | |---| XYZ Driver   |---| XYZ Engine  |
  | Perl  |       | |   `--------------'   `-------------'
  | script|  |A|  |D|   .--------------.   .-------------.
  | using |--|P|--|B|---|Oracle Driver |---|Oracle Engine|
  | DBI   |  |I|  |I|   `--------------'   `-------------'
  | API   |       | |...
  |methods|       | |... Other drivers
  `-------'       | |...
                  `-'

[YOCTO #4128]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 recipes-perl/libdb/libdbi-perl_1.628.bb | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 recipes-perl/libdb/libdbi-perl_1.628.bb

diff --git a/recipes-perl/libdb/libdbi-perl_1.628.bb b/recipes-perl/libdb/libdbi-perl_1.628.bb
new file mode 100644
index 0000000..38bdf61
--- /dev/null
+++ b/recipes-perl/libdb/libdbi-perl_1.628.bb
@@ -0,0 +1,26 @@
+SUMMARY = "The Perl Database Interface"
+DESCRIPTION = "DBI is a database access Application Programming Interface \
+(API) for the Perl Language. The DBI API Specification defines a set \
+of functions, variables and conventions that provide a consistent \
+database interface independent of the actual database being used. \
+"
+HOMEPAGE = "http://search.cpan.org/dist/DBI/"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+RDEPENDS_${PN} = " perl-module-carp \
+                   perl-module-exporter \
+                   perl-module-exporter-heavy \
+                   perl-module-dynaloader \
+"
+
+LIC_FILES_CHKSUM = "file://DBI.pm;beginline=8147;endline=8151;md5=7d9e154a9ca3c093d2422f7c692d5861"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-${PV}.tar.gz"
+SRC_URI[md5sum] = "4273f8cc6ee3979ce448c7eb3f8a6a5a"
+SRC_URI[sha256sum] = "46c834f4ba1b28c8d8a2db8095835a67fc69a9585761523aea3a74437a969b52"
+
+S = "${WORKDIR}/DBI-${PV}"
+
+inherit cpan
+
+BBCLASSEXTEND = "native"
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-perl][PATCH 3/3] libdbd-sqlite-perl: add version 1.40
  2013-08-12  8:00 [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer Hongxu Jia
  2013-08-12  8:00 ` [meta-perl][PATCH 1/3] meta-perl creation Hongxu Jia
  2013-08-12  8:00 ` [meta-perl][PATCH 2/3] libdbi-perl: add version 1.628 Hongxu Jia
@ 2013-08-12  8:00 ` Hongxu Jia
  2013-08-14 11:52 ` [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer Martin Jansa
  3 siblings, 0 replies; 6+ messages in thread
From: Hongxu Jia @ 2013-08-12  8:00 UTC (permalink / raw)
  To: openembedded-devel

DBD::SQLite is a Perl DBI driver for SQLite, that includes the entire
thing in the distribution. So in order to get a fast transaction capable
RDBMS working for your perl project you simply have to install this
module, and nothing else.

There is a perl script for test, while variable PERL_DBM_TEST is assigned
the value '1', the script will be added, and you could run the script to
test whether DBD::SQLite is working properly.

[YOCTO #4128]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 recipes-perl/libdb/files/sqlite-perl-test.pl  | 69 +++++++++++++++++++++++++++
 recipes-perl/libdb/libdbd-sqlite-perl_1.40.bb | 39 +++++++++++++++
 2 files changed, 108 insertions(+)
 create mode 100755 recipes-perl/libdb/files/sqlite-perl-test.pl
 create mode 100644 recipes-perl/libdb/libdbd-sqlite-perl_1.40.bb

diff --git a/recipes-perl/libdb/files/sqlite-perl-test.pl b/recipes-perl/libdb/files/sqlite-perl-test.pl
new file mode 100755
index 0000000..40f5916
--- /dev/null
+++ b/recipes-perl/libdb/files/sqlite-perl-test.pl
@@ -0,0 +1,69 @@
+#! /usr/bin/env perl
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation.
+#
+# Copyright (C) 2013 Wind River Systems, Inc.
+#
+# - It tests DBI and DBD::SQLite could work correctly which means one could
+#   manipulate sqlite database in perl
+# - The test includes create/insert/update/delete/select, the five important
+#   things one can do with a table
+use DBI;
+
+sub execute_sql {
+    my $dbh = $_[0];
+    my $sql = $_[1];
+    my $sth = $dbh->prepare($sql)
+        or die "Couldn't prepare statement: " . $dbh->errstr;
+    $sth->execute();
+    print "$sql\n";
+    return $sth;
+}
+
+sub select_all {
+    my $dbh = $_[0];
+    my $table = $_[1];
+    my $sth = &execute_sql($dbh, "Select * from $table");
+
+    print "-----------------------------------\n";
+    while (@data = $sth->fetchrow_array()) {
+        my $name = $data[0];
+        my $id = $data[1];
+        print "$name: $id\n";
+    }
+    print "\n";
+
+    $sth->finish;
+    return $sth;
+}
+
+# A private, temporary in-memory database is created for the connection.
+# This in-memory database will vanish when the database connection is
+# closed. It is handy for your library tests.
+my $dbfile = ":memory:";
+my $dbh = DBI->connect("DBI:SQLite:dbname=$dbfile","","")
+        or die "Couldn't connect to database: " . DBI->errstr;
+print "Connect to SQLite's in-memory database\n";
+
+&execute_sql($dbh, "Create table tbl1(name varchar(10), id smallint)");
+&execute_sql($dbh, "Insert into tbl1 values('yocto',10)");
+&execute_sql($dbh, "Insert into tbl1 values('windriver', 20)");
+&select_all($dbh, "tbl1");
+
+&execute_sql($dbh, "Update tbl1 set name = 'oe-core' where id = 10");
+&execute_sql($dbh, "Delete from tbl1 where id = 20");
+&select_all($dbh, "tbl1");
+
+$dbh->disconnect;
+print "Test Success\n"
diff --git a/recipes-perl/libdb/libdbd-sqlite-perl_1.40.bb b/recipes-perl/libdb/libdbd-sqlite-perl_1.40.bb
new file mode 100644
index 0000000..fad03d8
--- /dev/null
+++ b/recipes-perl/libdb/libdbd-sqlite-perl_1.40.bb
@@ -0,0 +1,39 @@
+SUMMARY = "A Perl DBI driver for SQLite"
+DESCRIPTION = "DBD::SQLite is a Perl DBI driver for SQLite, that includes the entire \
+thing in the distribution. So in order to get a fast transaction capable \
+RDBMS working for your perl project you simply have to install this \
+module, and nothing else. \
+"
+HOMEPAGE = "http://search.cpan.org/~ishigaki/DBD-SQLite/"
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+DEPENDS += "libdbi-perl-native"
+RDEPENDS_${PN} += "libdbi-perl \
+                   sqlite3 \
+                   perl-module-constant \
+                   perl-module-locale \
+                   perl-module-tie-hash \
+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1726e2117494ba3e13e1c3d93f795360"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/I/IS/ISHIGAKI/DBD-SQLite-${PV}.tar.gz \
+           file://sqlite-perl-test.pl \
+"
+
+SRC_URI[md5sum] = "b9876882186499583428b14cf5c0e29c"
+SRC_URI[sha256sum] = "21fb65e740b6265512c82232b4ad8f75c19ac84c216830112656274eb8e375fb"
+
+S = "${WORKDIR}/DBD-SQLite-${PV}"
+
+inherit cpan
+
+BBCLASSEXTEND = "native"
+
+do_install_append() {
+    if [ ${PERL_DBM_TEST} = "1" ]; then
+        install -m 755 -D ${WORKDIR}/sqlite-perl-test.pl ${D}/${bindir}/sqlite-perl-test.pl
+    fi
+}
+
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer
  2013-08-12  8:00 [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer Hongxu Jia
                   ` (2 preceding siblings ...)
  2013-08-12  8:00 ` [meta-perl][PATCH 3/3] libdbd-sqlite-perl: add version 1.40 Hongxu Jia
@ 2013-08-14 11:52 ` Martin Jansa
  2013-08-15  2:07   ` Hongxu Jia
  3 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2013-08-14 11:52 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

On Mon, Aug 12, 2013 at 04:00:18PM +0800, Hongxu Jia wrote:
> Change in V2: Use 'meta-perl' instead of 'meta-cpan' to name the layer

All patches are misssing 'meta-perl/' prefix so I had to apply them
manually.

Now they are in jansa/in-test so you don't need to resend them.

> 
> The following changes are available in the git repository at:
> 
>   git://git.pokylinux.org/poky-contrib hongxu/meta-perl
>   http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=hongxu/meta-perl
> 
> Hongxu Jia (3):
>   meta-perl creation
>   libdbi-perl: add version 1.628
>   libdbd-sqlite-perl: add version 1.40
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer
  2013-08-14 11:52 ` [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer Martin Jansa
@ 2013-08-15  2:07   ` Hongxu Jia
  0 siblings, 0 replies; 6+ messages in thread
From: Hongxu Jia @ 2013-08-15  2:07 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

On 08/14/2013 07:52 PM, Martin Jansa wrote:
> On Mon, Aug 12, 2013 at 04:00:18PM +0800, Hongxu Jia wrote:
>> Change in V2: Use 'meta-perl' instead of 'meta-cpan' to name the layer
> All patches are misssing 'meta-perl/' prefix so I had to apply them
> manually.
>
> Now they are in jansa/in-test so you don't need to resend them.
Sorry for the missing, I will update the branch and not resend the pull 
request again.
git://git.pokylinux.org/poky-contrib hongxu/meta-perl

Thanks,
Hongxu
>> The following changes are available in the git repository at:
>>
>>    git://git.pokylinux.org/poky-contrib hongxu/meta-perl
>>    http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=hongxu/meta-perl
>>
>> Hongxu Jia (3):
>>    meta-perl creation
>>    libdbi-perl: add version 1.628
>>    libdbd-sqlite-perl: add version 1.40
>>
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-15  2:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-12  8:00 [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer Hongxu Jia
2013-08-12  8:00 ` [meta-perl][PATCH 1/3] meta-perl creation Hongxu Jia
2013-08-12  8:00 ` [meta-perl][PATCH 2/3] libdbi-perl: add version 1.628 Hongxu Jia
2013-08-12  8:00 ` [meta-perl][PATCH 3/3] libdbd-sqlite-perl: add version 1.40 Hongxu Jia
2013-08-14 11:52 ` [meta-perl][PATCH V2 0/3] add perl database library to create meta-perl layer Martin Jansa
2013-08-15  2:07   ` Hongxu Jia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.