Squashed 'import-layers/meta-security/' content from commit 4d139b9

Subtree from git://git.yoctoproject.org/meta-security

Change-Id: I14bb13faa3f2b2dc1f5d81b339dd48ffedf8562f
git-subtree-dir: import-layers/meta-security
git-subtree-split: 4d139b95c4f152d132592f515c5151f4dd6269c1
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
diff --git a/import-layers/meta-security/recipes-perl/perl/files/libwhisker2.patch b/import-layers/meta-security/recipes-perl/perl/files/libwhisker2.patch
new file mode 100644
index 0000000..c066366
--- /dev/null
+++ b/import-layers/meta-security/recipes-perl/perl/files/libwhisker2.patch
@@ -0,0 +1,73 @@
+From 34698c7f561fb575293a1c991a71e1b4ddc5ae73 Mon Sep 17 00:00:00 2001
+From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
+Date: Fri, 5 Jul 2013 11:56:58 +0300
+Subject: [PATCH] Mandir and perl install dir were overwritten with faulty
+ information in the Makefile. Now the Mandir and perl
+ install dir are sent via paramters from the recipe.
+
+Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
+---
+ Makefile.pl |   12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.pl b/Makefile.pl
+index 9ca5602..8776e18 100644
+--- a/Makefile.pl
++++ b/Makefile.pl
+@@ -131,6 +131,8 @@ foreach (keys %MODULES){
+ 
+ # adjust DESTDIR, if needed
+ $DESTDIR = $ENV{DESTDIR} if(defined $ENV{DESTDIR});
++$MANDIR = $ENV{MANDIR} if(defined $ENV{MANDIR});
++$INSTALLDIR = $ENV{INSTALLDIR} if(defined $ENV{INSTALLDIR});
+ 
+ # parse command line build options
+ while($COMMAND = shift @ARGV){
+@@ -171,7 +173,7 @@ sub command_install_pod {
+ 	command_build() if(!-e $TARGET);
+ 	die("Can not install without Config.pm") if($MODULES{Config}==0);
+ 	$CWD=&cwd if($MODULES{Cwd}>0);
+-	my $where=$DESTDIR . $Config{'man3direxp'};
++	my $where=$DESTDIR . $MANDIR;
+ 	my $t = $TARGET;
+ 	if($LIBRARY){
+ 		$t="$PACKAGE.3pm";
+@@ -219,7 +221,7 @@ sub command_install_pod {
+ sub command_uninstall_pod {
+ 	die("Can not uninstall without Config.pm") if($MODULES{Config}==0);
+ 	$CWD=&cwd if($MODULES{Cwd}>0);
+-	my $where=$DESTDIR . $Config{'man3direxp'};
++	my $where=$DESTDIR . $MANDIR;
+ 	my $t = $TARGET;
+ 	if($LIBRARY){
+ 		$t="$PACKAGE.3pm";
+@@ -243,7 +245,7 @@ sub command_install_library {
+ 	command_build() if(!-e $TARGET);
+ 	die("Can not install without Config.pm") if($MODULES{Config}==0);
+ 	$CWD=&cwd if($MODULES{Cwd}>0);
+-	my $where=$DESTDIR . $Config{'installsitelib'};
++	my $where=$DESTDIR . $INSTALLDIR;
+ 	if(!-e $where){
+ 	  print STDOUT "WARNING!\n\n",
+ 		"The local perl site directory does not exist:\n",
+@@ -271,7 +273,7 @@ sub command_install_library {
+ sub command_uninstall_library {
+ 	die("Can not uninstall without Config.pm") if($MODULES{Config}==0);
+ 	$CWD=&cwd if($MODULES{Cwd}>0);
+-	my $where=$DESTDIR . $Config{'installsitelib'};
++	my $where=$DESTDIR . $INSTALLDIR;
+ 	chdir($where);
+ 	if(-e $TARGET){
+ 		unlink $TARGET;
+@@ -401,7 +403,7 @@ sub command_socket_diag {
+ sub command_install_compat {
+ 	die("Can not install without Config.pm") if($MODULES{Config}==0);
+ 	$CWD=&cwd if($MODULES{Cwd}>0);
+-	my $where=$DESTDIR . $Config{'installsitelib'};
++	my $where=$DESTDIR . $INSTALLDIR;
+ 	if(!-e $where){
+ 	  print STDOUT "WARNING!\n\n",
+ 		"The local perl site directory does not exist:\n",
+-- 
+1.7.9.5
+
diff --git a/import-layers/meta-security/recipes-perl/perl/lib-perl_0.63.bb b/import-layers/meta-security/recipes-perl/perl/lib-perl_0.63.bb
new file mode 100644
index 0000000..7895864
--- /dev/null
+++ b/import-layers/meta-security/recipes-perl/perl/lib-perl_0.63.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "This is a small simple module which simplifies the \
+manipulation of @INC at compile time. It is typically used to add extra \
+directories to Perl's search path so that later 'use' or 'require' statements \
+will find modules which are not located in the default search path."
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+PR = "r0"
+
+LIC_FILES_CHKSUM = "file://README;beginline=26;endline=30;md5=94b119f1a7b8d611efc89b5d562a1a50"
+
+DEPENDS += "perl"
+
+SRC_URI = "http://www.cpan.org/authors/id/S/SM/SMUELLER/lib-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "8607ac4e0d9d43585ec28312f52df67c"
+SRC_URI[sha256sum] = "72f63db9220098e834d7a38231626bd0c9b802c1ec54a628e2df35f3818e5a00"
+
+S = "${WORKDIR}/lib-${PV}"
+
+EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
+
+inherit cpan
+
+do_compile() {
+	export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
+	cpan_do_compile
+}
diff --git a/import-layers/meta-security/recipes-perl/perl/libenv-perl_1.04.bb b/import-layers/meta-security/recipes-perl/perl/libenv-perl_1.04.bb
new file mode 100644
index 0000000..dd8e115
--- /dev/null
+++ b/import-layers/meta-security/recipes-perl/perl/libenv-perl_1.04.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Perl module that imports environment variables as scalars or arrays"
+DESCRIPTION = "Perl maintains environment variables in a special hash named %ENV. \
+For when this access method is inconvenient, the Perl module Env allows environment \
+variables to be treated as scalar or array variables."
+
+HOMEPAGE = "http://search.cpan.org/~flora/Env/"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76c1cbf18db56b3340d91cb947943bd3"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Env-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "fdba5c0690e66972c96fee112cf5f25c"
+SRC_URI[sha256sum] = "d94a3d412df246afdc31a2199cbd8ae915167a3f4684f7b7014ce1200251ebb0"
+
+S = "${WORKDIR}/Env-${PV}"
+
+inherit cpan
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-security/recipes-perl/perl/libwhisker2-perl_2.5.bb b/import-layers/meta-security/recipes-perl/perl/libwhisker2-perl_2.5.bb
new file mode 100644
index 0000000..d9af430
--- /dev/null
+++ b/import-layers/meta-security/recipes-perl/perl/libwhisker2-perl_2.5.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "Libwhisker is a Perl module geared specificly for HTTP testing."
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=254b8e29606fce6d1c1a4c9e32354573"
+
+SRC_URI = "http://sourceforge.net/projects/whisker/files/libwhisker/${PV}/libwhisker2-${PV}.tar.gz \
+           file://libwhisker2.patch"
+
+SRC_URI[md5sum] = "7cc1718dddde8f9a439d5622ae2f37eb"
+SRC_URI[sha256sum] = "f45a1cf2ad2637b29dd1b13d7221ea12e3923ea09d107ced446400f19070a42f"
+
+S = "${WORKDIR}/libwhisker2-2.5"
+
+inherit cpan-base
+
+PACKAGEGROUP ??=""
+PACKAGEGROUP[ssl] = ", , libnet-ssleay-perl, libnet-ssleay-perl"
+
+do_install() {
+    install -d 755 ${D}${PERLLIBDIRS}/vendor_perl/${PERLVERSION}
+    install -d 755 ${D}${datadir}/perl/${PERLVERSION}
+    oe_runmake install DESTDIR=${D} INSTALLDIR=${PERLLIBDIRS}/vendor_perl/${PERLVERSION} MANDIR=${datadir}/perl/${PERLVERSION}
+}
+
+BBCLASSEXTEND = "native"