diff options
author | Roy Li <rongqing.li@windriver.com> | 2014-07-11 14:08:35 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-07-22 00:02:01 +0200 |
commit | 764c5c07165848a7821cf835925331dc3fa27384 (patch) | |
tree | c631fd8b81c3643a96ab066845ab2fce1b16d747 /meta-perl/recipes-perl/libnet | |
parent | ca5a74e816522dbac3f06ac6d89f2fc6f418fe43 (diff) | |
download | meta-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/recipes-perl/libnet')
-rw-r--r-- | meta-perl/recipes-perl/libnet/libnet-libidn-perl-0.12/libidn-wr-cross-compile.patch | 49 | ||||
-rw-r--r-- | meta-perl/recipes-perl/libnet/libnet-libidn-perl_0.12.bb | 34 |
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 @@ | |||
1 | perl-Net-LibIDN: cross-compile | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Add support for cross-compile allowing the compiler binary to be | ||
6 | specified into the perl Makefile instead of using the default 'gcc'. | ||
7 | |||
8 | Signed-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 @@ | |||
1 | SUMMARY = "Net::LibIDN - Perl bindings for GNU Libidn" | ||
2 | DESCRIPTION = "\ | ||
3 | Provides bindings for GNU Libidn, a C library for handling Internationalized \ | ||
4 | Domain Names according to IDNA (RFC 3490), in a way very much inspired by \ | ||
5 | Turbo Fredriksson's PHP-IDN. \ | ||
6 | " | ||
7 | SECTION = "libs" | ||
8 | LICENSE = "Artistic-1.0 | GPLv1+" | ||
9 | HOMEPAGE = "http://search.cpan.org/dist/Net-LibIDN/" | ||
10 | DEPENDS += "libidn" | ||
11 | # We must need eglibc-gconvs to enable charset related functions, | ||
12 | # such as Net::LibIDN::idn_to_ascii(). | ||
13 | RDEPENDS_${PN} += "eglibc-gconvs" | ||
14 | |||
15 | SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TH/THOR/Net-LibIDN-${PV}.tar.gz" | ||
16 | SRC_URI[md5sum] = "c3e4de2065009d67bcb1df0afb473e12" | ||
17 | SRC_URI[sha256sum] = "2f8acc9442b3866ec7dc63cd449fc693ae3e930d5d3e5e9430fbb6f393bdbb17" | ||
18 | |||
19 | SRC_URI += "file://libidn-wr-cross-compile.patch" | ||
20 | |||
21 | LIC_FILES_CHKSUM = "file://README;beginline=42;endline=92;md5=3374ea0369ca3ead6047520477a43147" | ||
22 | |||
23 | S = "${WORKDIR}/Net-LibIDN-${PV}" | ||
24 | |||
25 | EXTRA_CPANFLAGS = "--with-libidn=${STAGING_LIBDIR} --with-libidn-inc=${STAGING_INCDIR} --compiler='${CC}'" | ||
26 | EXTRA_CPANFLAGS += "--disable-tld" | ||
27 | |||
28 | inherit cpan | ||
29 | |||
30 | FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/Net/LibIDN/.debug/" | ||
31 | |||
32 | do_configure_prepend() { | ||
33 | rm -rf ${S}/.pc/ | ||
34 | } | ||