[oe-commits] Roman I Khimov : libnet-pcap-perl: add Net::Pcap Perl module

git version control git at git.openembedded.org
Wed Mar 24 17:24:14 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 3157d6d6cb9f87d6086126b5e7b42c4dc87ebb81
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=3157d6d6cb9f87d6086126b5e7b42c4dc87ebb81

Author: Roman I Khimov <khimov at altell.ru>
Date:   Thu Mar 18 13:54:08 2010 +0300

libnet-pcap-perl: add Net::Pcap Perl module

Signed-off-by: Roman I Khimov <khimov at altell.ru>

---

 ...l-runtime-pcap-check-fake-functions-check.patch |   32 ++++++++++++++++++++
 recipes/perl/libnet-pcap-perl_0.16.bb              |   24 +++++++++++++++
 2 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/recipes/perl/libnet-pcap-perl/kill-runtime-pcap-check-fake-functions-check.patch b/recipes/perl/libnet-pcap-perl/kill-runtime-pcap-check-fake-functions-check.patch
new file mode 100644
index 0000000..72b3eb7
--- /dev/null
+++ b/recipes/perl/libnet-pcap-perl/kill-runtime-pcap-check-fake-functions-check.patch
@@ -0,0 +1,32 @@
+Index: Net-Pcap-0.16/Makefile.PL
+===================================================================
+--- Net-Pcap-0.16.orig/Makefile.PL	2010-02-02 16:50:32.000000000 +0300
++++ Net-Pcap-0.16/Makefile.PL	2010-02-02 18:14:50.000000000 +0300
+@@ -444,7 +444,7 @@
+     close($cfile);
+     my $quote = $is_Win32 ? '"' : "'";
+     xsystem("$^X Makefile.PL " . join(' ', map { "${quote}$_=$options{$_}${quote}" } keys %options));
+-    xsystem("$Config{make} test ${quote}OTHERLDFLAGS=${opt}${quote}");
++#    xsystem("$Config{make} test ${quote}OTHERLDFLAGS=${opt}${quote}");
+ } # end try_link0
+ 
+ sub try_link {
+@@ -530,14 +530,11 @@
+     my @funcs = ();
+     print "detecting available functions... ";
+ 
+-    my @paths = DynaLoader::dl_findfile(qw(-lpcap));
+-    my $libref = DynaLoader::dl_load_file($paths[0]);
+-
+-    for my $func (@_) {
+-        my $symref = DynaLoader::dl_find_symbol($libref, $func);
+-        push @funcs, $func if defined $symref
+-    }
++    my $objdump = $ENV{'OBJDUMP'};
++    my $st_libdir = $ENV{'STAGING_LIBDIR'};
++    @funcs=`$objdump -t $st_libdir/libpcap.so | grep F | grep ".text" | awk '{print \$6}' | grep "^pcap_"`;
+ 
++    chomp(@funcs);
+     print "ok\n";
+     return @funcs
+ }
diff --git a/recipes/perl/libnet-pcap-perl_0.16.bb b/recipes/perl/libnet-pcap-perl_0.16.bb
new file mode 100644
index 0000000..ed5ec97
--- /dev/null
+++ b/recipes/perl/libnet-pcap-perl_0.16.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Interface to pcap(3) LBL packet capture library"
+SECTION = "libs"
+LICENSE = "Artistic|GPL"
+DEPENDS = "libpcap"
+RDEPENDS_${PN} += " \
+	perl-module-socket \
+	perl-module-test-more \
+	perl-module-xsloader \
+	"
+
+PR = "r0"
+
+export STAGING_LIBDIR
+
+SRC_URI = " \
+	http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/Net-Pcap-${PV}.tar.gz;name=net-pcap-perl-${PV} \
+	file://kill-runtime-pcap-check-fake-functions-check.patch;patch=1 \
+	"
+SRC_URI[net-pcap-perl-0.16.md5sum] = "b150d8e0a40137fad2a7df792d80cab4"
+SRC_URI[net-pcap-perl-0.16.sha256sum] = "9311d0d4043ea1f8b855dd1f2dc3312436064f4291c74127eb7c3f79b14677aa"
+
+S = "${WORKDIR}/Net-Pcap-${PV}"
+
+inherit cpan





More information about the Openembedded-commits mailing list