summaryrefslogtreecommitdiff
path: root/perl/perl-Net-Pcap
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackware-id.org>2013-11-07 21:48:18 +0700
committerRobby Workman <rworkman@slackbuilds.org>2013-11-09 01:34:46 -0600
commit108ccc0af3a84144c4b12569653b70665509c3fc (patch)
treeadcbd2eff8a240cfeddb36724cdf2ca2145c63ea /perl/perl-Net-Pcap
parent937b948c0c8dc69f5884e9654124e05c6e50cb18 (diff)
downloadslackbuilds-108ccc0af3a84144c4b12569653b70665509c3fc.tar.gz
perl/perl-Net-Pcap: Updated for version 0.17.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackware-id.org> Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'perl/perl-Net-Pcap')
-rw-r--r--perl/perl-Net-Pcap/listdatalinks.patch14
-rw-r--r--perl/perl-Net-Pcap/makefile.patch43
-rw-r--r--perl/perl-Net-Pcap/perl-Net-Pcap.SlackBuild22
-rw-r--r--perl/perl-Net-Pcap/perl-Net-Pcap.info6
4 files changed, 73 insertions, 12 deletions
diff --git a/perl/perl-Net-Pcap/listdatalinks.patch b/perl/perl-Net-Pcap/listdatalinks.patch
new file mode 100644
index 0000000000..a0f22c32c3
--- /dev/null
+++ b/perl/perl-Net-Pcap/listdatalinks.patch
@@ -0,0 +1,14 @@
+diff -up Net-Pcap-0.17/Pcap.pm.orig Net-Pcap-0.17/Pcap.pm
+--- Net-Pcap-0.17/Pcap.pm.orig 2013-03-15 23:19:38.000000000 -0600
++++ Net-Pcap-0.17/Pcap.pm 2013-03-15 23:21:32.000000000 -0600
+@@ -704,6 +704,10 @@ Close the savefile associated with the d
+
+ =over
+
++=item B<pcap_list_datalinks($pcap)>
++
++Returns a list of link layer types supported by the given pcap descriptor.
++
+
+ =item B<pcap_datalink($pcap)>
+
diff --git a/perl/perl-Net-Pcap/makefile.patch b/perl/perl-Net-Pcap/makefile.patch
new file mode 100644
index 0000000000..4825457cde
--- /dev/null
+++ b/perl/perl-Net-Pcap/makefile.patch
@@ -0,0 +1,43 @@
+diff -up Net-Pcap-0.17/Makefile.PL.orig Net-Pcap-0.17/Makefile.PL
+--- Net-Pcap-0.17/Makefile.PL.orig 2013-03-15 21:00:34.000000000 -0600
++++ Net-Pcap-0.17/Makefile.PL 2013-03-15 21:00:47.000000000 -0600
+@@ -63,39 +63,6 @@ Or get and install the WinPcap developer
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ REASON
+
+-} else { # other systems (Unix)
+- warn <<"REASON" and exit unless have_library('pcap');
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+-You appear to lack the pcap(3) library. \a
+-
+-If it is installed in a non-standard location, please try setting the LIBS
+-and INC values on the command line.
+-
+-Or get the sources and install the pcap library from http://www.tcpdump.org/
+-
+-If you install the pcap library using a system package, make sure to also
+-install the corresponding -devel package, which contains the C headers needed
+-to compile this module.
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+-REASON
+-
+- warn <<"REASON" unless have_library('pcap', 'pcap_lib_version');
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+-You appear to have an old version of the pcap library. \a
+-
+-This module need a recent version of the pcap library in order to provide
+-access to all its features. You can still compile it with your old pcap
+-library but some functions won't be available, and trying to use them in
+-Perl programs will generate errors. Programs only using the old functions
+-should perform as previously. If not, don't hesitate to fill a bug.
+-
+-You can get the latest sources of the pcap library at http://www.tcpdump.org/
+-
+-If you install the pcap library using a system package, make sure to also
+-install the corresponding -devel package, which contains the C headers needed
+-to compile this module.
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+-REASON
+ }
+
+ # Now trying to detect which functions are actually available.
diff --git a/perl/perl-Net-Pcap/perl-Net-Pcap.SlackBuild b/perl/perl-Net-Pcap/perl-Net-Pcap.SlackBuild
index 6ceafc7695..816adbd2e8 100644
--- a/perl/perl-Net-Pcap/perl-Net-Pcap.SlackBuild
+++ b/perl/perl-Net-Pcap/perl-Net-Pcap.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=perl-Net-Pcap
-VERSION=${VERSION:-0.16}
+VERSION=${VERSION:-0.17}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -66,20 +66,24 @@ rm -rf $SRC_PRGNAM-$VERSION
tar xvf $CWD/$SRC_PRGNAM-$VERSION.tar.gz
cd $SRC_PRGNAM-$VERSION
chown -R root:root .
-find . \
+find -L . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-perl Makefile.PL INSTALLDIRS=perl
+patch -p1 < $CWD/makefile.patch
+patch -p1 < $CWD/listdatalinks.patch
+
+PERL_MM_USE_DEFAULT=1 perl Makefile.PL \
+ PREFIX=/usr \
+ INSTALLDIRS=vendor \
+ INSTALLVENDORMAN3DIR=/usr/man/man3
make
-# some of the tests are broken, since they expect an oldier libpcap
-#make test
+make test
make install DESTDIR=$PKG
-# Move man pages
-mv $PKG/usr/share/man $PKG/usr/
+mv $PKG/usr/share/man/man1 $PKG/usr/man/
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
diff --git a/perl/perl-Net-Pcap/perl-Net-Pcap.info b/perl/perl-Net-Pcap/perl-Net-Pcap.info
index c3acac186b..a7f5f76ecb 100644
--- a/perl/perl-Net-Pcap/perl-Net-Pcap.info
+++ b/perl/perl-Net-Pcap/perl-Net-Pcap.info
@@ -1,8 +1,8 @@
PRGNAM="perl-Net-Pcap"
-VERSION="0.16"
+VERSION="0.17"
HOMEPAGE="http://search.cpan.org/dist/Net-Pcap/"
-DOWNLOAD="http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/Net-Pcap-0.16.tar.gz"
-MD5SUM="b150d8e0a40137fad2a7df792d80cab4"
+DOWNLOAD="http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/Net-Pcap-0.17.tar.gz"
+MD5SUM="fbe911ba5f57d5ba43494434ffb828a0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="perl-IO-Interface"