Patchwork [4/6] libnet-ssleay-perl: add recipe

login
register
mail settings
Submitter Kang Kai
Date Aug. 14, 2014, 7:49 a.m.
Message ID <1408002596-9778-4-git-send-email-kai.kang@windriver.com>
Download mbox | patch
Permalink /patch/78137/
State Accepted, archived
Headers show

Comments

Kang Kai - Aug. 14, 2014, 7:49 a.m.
Add recipe for libnet-ssleay-perl. Inherit ptest to enable build
-ptest sub-package and add file 'run-ptest'.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta-perl/recipes-perl/libnet/files/run-ptest      | 16 ++++++++
 .../recipes-perl/libnet/libnet-ssleay-perl_1.65.bb | 43 ++++++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 meta-perl/recipes-perl/libnet/files/run-ptest
 create mode 100644 meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.65.bb

Patch

diff --git a/meta-perl/recipes-perl/libnet/files/run-ptest b/meta-perl/recipes-perl/libnet/files/run-ptest
new file mode 100644
index 0000000..1c008b5
--- /dev/null
+++ b/meta-perl/recipes-perl/libnet/files/run-ptest
@@ -0,0 +1,16 @@ 
+#!/bin/sh
+
+for case in `find t -type f -name '*.t'`; do
+	perl $case >$case.output 2>&1
+	ret=$?
+	cat $case.output
+	if [ $ret -ne 0 ]; then
+		echo "FAIL: ${case%.t}"
+	elif grep -i 'SKIP' $case.output; then
+		echo "SKIP: ${case%.t}"
+	else
+		echo "PASS: ${case%.t}"
+	fi
+
+	rm -f $case.output
+done
diff --git a/meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.65.bb b/meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.65.bb
new file mode 100644
index 0000000..8e4ba2a
--- /dev/null
+++ b/meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.65.bb
@@ -0,0 +1,43 @@ 
+SUMMARY = "Net::SSLeay - Perl extension for using OpenSSL"
+DESCRIPTION = "This module offers some high level convenience functions for accessing \
+web pages on SSL servers (for symmetry, same API is offered for \
+accessing http servers, too), a sslcat() function for writing your own \
+clients, and finally access to the SSL api of SSLeay/OpenSSL package \
+so you can write servers or clients for more complicated applications."
+HOMEPAGE = "http://search.cpan.org/dist/Net-SSLeay/"
+SECTION = "libs"
+
+LICENSE = "OpenSSL"
+LIC_FILES_CHKSUM = "file://README;beginline=274;endline=294;md5=49f415984b387be999ee2ad0e5c692fe"
+
+DEPENDS = "openssl zlib"
+RDEPENDS_${PN} += " \
+	perl-module-carp \
+	perl-module-errno \
+	perl-module-extutils-makemaker \
+	perl-module-mime-base64 \
+	perl-module-socket \
+	"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MI/MIKEM/Net-SSLeay-${PV}.tar.gz \
+           file://run-ptest \
+          "
+SRC_URI[md5sum] = "19600c036e9e0bbfbf9157f083e40755"
+SRC_URI[sha256sum] = "2fb1371120b85f018944d95736c107163f04ba56b6029c0709a2c3d6247b9c06"
+
+S = "${WORKDIR}/Net-SSLeay-${PV}"
+
+inherit cpan ptest
+
+EXTRA_CPANFLAGS = "LIBS='-L=${libdir} -L=${base_libdir}' \
+              INC=-I=${includedir} \
+              'EXTRALIBS=-lssl -lcrypto -lz' \
+              'LDLOADLIBS=-lssl -lcrypto -lz'"
+
+do_install_ptest() {
+	cp -r ${B}/t ${D}${PTEST_PATH}
+}
+
+BBCLASSEXTEND = "native"
+
+FILES_${PN}-dbg =+ "${libdir}/perl/vendor_perl/*/auto/Net/SSLeay/.debug/"