summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Fredric <kentnl@gentoo.org>2017-10-10 08:38:16 +1300
committerKent Fredric <kentnl@gentoo.org>2017-10-10 08:43:59 +1300
commit96f33ef7d17bdbb464892f283a6fb5c9b9357c29 (patch)
tree360cf06d59385901835ba835f40ebe4c8161f459 /dev-perl/Data-HexDump
parentdev-ruby/rbst: New package (diff)
downloadgentoo-96f33ef7d17bdbb464892f283a6fb5c9b9357c29.tar.gz
gentoo-96f33ef7d17bdbb464892f283a6fb5c9b9357c29.tar.bz2
gentoo-96f33ef7d17bdbb464892f283a6fb5c9b9357c29.zip
dev-perl/Data-HexDump: Fix duplicate binscript installation
- EAPI6 - Normalize version - Fix installing twice ( once to bin/, once to @INC ) - Fix possibly harmful `use lib` line - Fix test warnings - Enable tests Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'dev-perl/Data-HexDump')
-rw-r--r--dev-perl/Data-HexDump/Data-HexDump-0.20.0.ebuild20
-rw-r--r--dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-hexdump-pl.patch59
-rw-r--r--dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-lib-pm.patch28
-rw-r--r--dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-signed-c.patch28
4 files changed, 135 insertions, 0 deletions
diff --git a/dev-perl/Data-HexDump/Data-HexDump-0.20.0.ebuild b/dev-perl/Data-HexDump/Data-HexDump-0.20.0.ebuild
new file mode 100644
index 000000000000..1ea1bc94e1b8
--- /dev/null
+++ b/dev-perl/Data-HexDump/Data-HexDump-0.20.0.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=FTASSIN
+DIST_VERSION=0.02
+inherit perl-module
+
+DESCRIPTION="A Simple Hexadecial Dumper"
+
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~sparc ~x86"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}/${P}-hexdump-pl.patch"
+ "${FILESDIR}/${P}-lib-pm.patch"
+ "${FILESDIR}/${P}-signed-c.patch"
+)
diff --git a/dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-hexdump-pl.patch b/dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-hexdump-pl.patch
new file mode 100644
index 000000000000..b44b5b0b24e2
--- /dev/null
+++ b/dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-hexdump-pl.patch
@@ -0,0 +1,59 @@
+From 7b70e4169faf4e2ec0fe570b02190e71bc168377 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Tue, 10 Oct 2017 08:15:54 +1300
+Subject: Rename installed script to '.pl'
+
+Note: this must not happen in dist-root, or EUMM will also install this
+as $INC[0]/Data/hexdump.pl
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=123224
+---
+ MANIFEST | 2 +-
+ Makefile.PL | 2 +-
+ hexdump => bin/hexdump.pl | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+ rename hexdump => bin/hexdump.pl (95%)
+
+diff --git a/MANIFEST b/MANIFEST
+index 2e0843a..2f0c98b 100644
+--- a/MANIFEST
++++ b/MANIFEST
+@@ -2,7 +2,7 @@ MANIFEST
+ MANIFEST.SKIP
+ Makefile.PL
+ README
+-hexdump
++bin/hexdump.pl
+ lib/Data/HexDump.pm
+ t/compare.t
+ t/data.t
+diff --git a/Makefile.PL b/Makefile.PL
+index 0ee62bf..091fa9d 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -6,5 +6,5 @@ WriteMakefile(NAME => "Data::HexDump",
+ VERSION_FROM => "lib/Data/HexDump.pm",
+ dist => { COMPRESS => "gzip", SUFFIX => "gz" },
+ clean => { FILES => '*.bak *.old mibs/*.dump lib/*/*~' },
+- EXE_FILES => [ qw(hexdump) ],
++ EXE_FILES => [ qw(bin/hexdump.pl) ],
+ );
+diff --git a/hexdump b/bin/hexdump.pl
+similarity index 95%
+rename from hexdump
+rename to bin/hexdump.pl
+index a2e28a1..9f86cd8 100755
+--- a/hexdump
++++ b/bin/hexdump.pl
+@@ -5,7 +5,7 @@ use strict;
+ use Data::HexDump;
+ use FileHandle;
+
+-my $prgname = "hexdump";
++my $prgname = "hexdump.pl";
+ my $file = shift;
+ my $fh;
+
+--
+2.14.1
+
diff --git a/dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-lib-pm.patch b/dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-lib-pm.patch
new file mode 100644
index 000000000000..7e7606ebc9f0
--- /dev/null
+++ b/dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-lib-pm.patch
@@ -0,0 +1,28 @@
+From 36f61caaa95340817098b8b9f6631c9f2060a292 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Tue, 10 Oct 2017 08:17:01 +1300
+Subject: Remove 'use lib lib'
+
+There's no sense in blindly adding lib based on wherever you currently
+are to an installed program, its just a security problem asking to be
+invented.
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=123225
+---
+ bin/hexdump.pl | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/bin/hexdump.pl b/bin/hexdump.pl
+index 9f86cd8..1ce8962 100755
+--- a/bin/hexdump.pl
++++ b/bin/hexdump.pl
+@@ -1,6 +1,5 @@
+ #!/usr/bin/perl -w
+
+-use lib "lib";
+ use strict;
+ use Data::HexDump;
+ use FileHandle;
+--
+2.14.1
+
diff --git a/dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-signed-c.patch b/dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-signed-c.patch
new file mode 100644
index 000000000000..6c117334cf97
--- /dev/null
+++ b/dev-perl/Data-HexDump/files/Data-HexDump-0.20.0-signed-c.patch
@@ -0,0 +1,28 @@
+From 1eec10393fbf1123327858d127e1f6d9e50f5a85 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Tue, 10 Oct 2017 08:17:59 +1300
+Subject: Don't use signed characters for 0-255
+
+'c' == -127 to 127
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=123226
+---
+ t/compare.t | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/t/compare.t b/t/compare.t
+index f03d73d..3c25803 100644
+--- a/t/compare.t
++++ b/t/compare.t
+@@ -11,7 +11,7 @@ print "1..2\n";
+ # data
+ my $org = "";
+ for (my $i = 0; $i <= 255; $i++) {
+- $org .= pack 'c', $i;
++ $org .= pack 'C', $i;
+ }
+ $org = $org x 17 . "more data";
+
+--
+2.14.1
+