summaryrefslogtreecommitdiffstats
path: root/meta-perl
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2014-07-11 14:08:35 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-07-22 00:02:01 +0200
commit764c5c07165848a7821cf835925331dc3fa27384 (patch)
treec631fd8b81c3643a96ab066845ab2fce1b16d747 /meta-perl
parentca5a74e816522dbac3f06ac6d89f2fc6f418fe43 (diff)
downloadmeta-openembedded-764c5c07165848a7821cf835925331dc3fa27384.tar.gz
libnet-libidn-perl: add recipe
Signed-off-by: Roy Li <rongqing.li@windriver.com> Acked-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-perl')
-rw-r--r--meta-perl/recipes-perl/libnet/libnet-libidn-perl-0.12/libidn-wr-cross-compile.patch49
-rw-r--r--meta-perl/recipes-perl/libnet/libnet-libidn-perl_0.12.bb34
2 files changed, 83 insertions, 0 deletions
diff --git a/meta-perl/recipes-perl/libnet/libnet-libidn-perl-0.12/libidn-wr-cross-compile.patch b/meta-perl/recipes-perl/libnet/libnet-libidn-perl-0.12/libidn-wr-cross-compile.patch
new file mode 100644
index 000000000..679caa36a
--- /dev/null
+++ b/meta-perl/recipes-perl/libnet/libnet-libidn-perl-0.12/libidn-wr-cross-compile.patch
@@ -0,0 +1,49 @@
1perl-Net-LibIDN: cross-compile
2
3Upstream-Status: Pending
4
5Add support for cross-compile allowing the compiler binary to be
6specified into the perl Makefile instead of using the default 'gcc'.
7
8Signed-off-by: Greg Moffatt <greg.moffatt@windriver.com>
9---
10
11--- perl-Net-LibIDN-0.12.orig/Makefile.PL 2009-02-26 07:09:45.000000000 -0500
12+++ perl-Net-LibIDN-0.12/Makefile.PL 2010-10-19 09:34:22.811173965 -0400
13@@ -9,6 +9,7 @@
14 my $options;
15 my $testno=1;
16 my %MakeParams = InitMakeParams();
17+my $compiler;
18
19 WriteMakefile(%MakeParams);
20
21@@ -44,7 +45,8 @@
22 (
23 "with-libidn=s" => \$libdir,
24 "with-libidn-inc=s" => \$incdir,
25- "disable-tld" => \$disable_tld
26+ "disable-tld" => \$disable_tld,
27+ "compiler=s" => \$compiler
28 );
29
30 if ($libdir)
31@@ -165,12 +167,17 @@
32 return 0;
33 }
34
35- foreach my $cc (qw/cc gcc/)
36+ foreach my $cc ($compiler, qw/cc gcc/)
37 {
38 unlink($test);
39 system "$cc $cflags -o $test $test.c $ldflags";
40 next if ($? >> 8);
41
42+ if ($compiler == $cc)
43+ {
44+ return 1;
45+ }
46+
47 if (open(FILE, "./$test|"))
48 {
49 my $match;
diff --git a/meta-perl/recipes-perl/libnet/libnet-libidn-perl_0.12.bb b/meta-perl/recipes-perl/libnet/libnet-libidn-perl_0.12.bb
new file mode 100644
index 000000000..42b213dbd
--- /dev/null
+++ b/meta-perl/recipes-perl/libnet/libnet-libidn-perl_0.12.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Net::LibIDN - Perl bindings for GNU Libidn"
2DESCRIPTION = "\
3Provides bindings for GNU Libidn, a C library for handling Internationalized \
4Domain Names according to IDNA (RFC 3490), in a way very much inspired by \
5Turbo Fredriksson's PHP-IDN. \
6"
7SECTION = "libs"
8LICENSE = "Artistic-1.0 | GPLv1+"
9HOMEPAGE = "http://search.cpan.org/dist/Net-LibIDN/"
10DEPENDS += "libidn"
11# We must need eglibc-gconvs to enable charset related functions,
12# such as Net::LibIDN::idn_to_ascii().
13RDEPENDS_${PN} += "eglibc-gconvs"
14
15SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TH/THOR/Net-LibIDN-${PV}.tar.gz"
16SRC_URI[md5sum] = "c3e4de2065009d67bcb1df0afb473e12"
17SRC_URI[sha256sum] = "2f8acc9442b3866ec7dc63cd449fc693ae3e930d5d3e5e9430fbb6f393bdbb17"
18
19SRC_URI += "file://libidn-wr-cross-compile.patch"
20
21LIC_FILES_CHKSUM = "file://README;beginline=42;endline=92;md5=3374ea0369ca3ead6047520477a43147"
22
23S = "${WORKDIR}/Net-LibIDN-${PV}"
24
25EXTRA_CPANFLAGS = "--with-libidn=${STAGING_LIBDIR} --with-libidn-inc=${STAGING_INCDIR} --compiler='${CC}'"
26EXTRA_CPANFLAGS += "--disable-tld"
27
28inherit cpan
29
30FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/Net/LibIDN/.debug/"
31
32do_configure_prepend() {
33 rm -rf ${S}/.pc/
34}