From 76cf08fe2527cf23b8e6b9bf49b2e3adf298ba60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Thu, 18 May 2017 09:04:01 +0200
Subject: Fix building on Perl without "." in @INC

---
 ....01-Fix-building-on-Perl-without-.-in-INC.patch | 73 ++++++++++++++++++++++
 perl-ZMQ-LibZMQ4.spec                              |  8 ++-
 2 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 ZMQ-LibZMQ4-0.01-Fix-building-on-Perl-without-.-in-INC.patch

diff --git a/ZMQ-LibZMQ4-0.01-Fix-building-on-Perl-without-.-in-INC.patch 
b/ZMQ-LibZMQ4-0.01-Fix-building-on-Perl-without-.-in-INC.patch
new file mode 100644
index 0000000..5694f03
--- /dev/null
+++ b/ZMQ-LibZMQ4-0.01-Fix-building-on-Perl-without-.-in-INC.patch
@@ -0,0 +1,73 @@
+From 4ade4249526f15b4c88e630a9217e9c7a04c0dc9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
+Date: Thu, 18 May 2017 08:45:11 +0200
+Subject: [PATCH] Fix building on Perl without "." in @INC
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ Makefile.PL   | 8 ++++----
+ xt/999_leak.t | 6 +++---
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index a567204..8f1ab89 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -4,9 +4,9 @@
+ # Otherwise, do the usual.
+ BEGIN {
+     if (-e '../.git') {
+-        do 'tools/check_mi_mods.pl';
++        do './tools/check_mi_mods.pl';
+     } else {
+-        unshift @INC, 'inc';
++        unshift @INC, 'inc', '.';
+         require inc::Module::Install;
+         Module::Install->import;
+     }
+@@ -17,7 +17,7 @@ name 'ZMQ-LibZMQ4';
+ all_from 'lib/ZMQ/LibZMQ4.pm';
+ 
+ # Detect libzmq, and display it for sanity
+-do 'tools/detect_zmq.pl';
++do './tools/detect_zmq.pl';
+ print "Detected the following ZMQ settings:\n";
+ foreach my $env (qw(ZMQ_HOME ZMQ_H ZMQ_INCLUDES ZMQ_LIBS ZMQ_TRACE)) {
+     printf " + %s = %s\n", $env, exists $ENV{$env} ? $ENV{$env} : "(null)";
+@@ -192,7 +192,7 @@ repository "git://github.com/lestrrat/p5-ZMQ.git";
+ homepage "https://github.com/lestrrat/p5-ZMQ";;
+ bugtracker "https://github.com/lestrrat/p5-ZMQ/issues";;
+ 
+-do 'tools/genfiles.pl';
++do './tools/genfiles.pl';
+ WriteAll;
+ 
+ if ($^O eq 'darwin' && -f "Makefile") {
+diff --git a/xt/999_leak.t b/xt/999_leak.t
+index d4e43b2..cfae51b 100644
+--- a/xt/999_leak.t
++++ b/xt/999_leak.t
+@@ -12,13 +12,13 @@ use Test::Requires
+ ;
+ 
+ while ( my $f = <t/*.t> ) {
+-    subtest $f => sub { do $f };
++    subtest $f => sub { do "./$f" };
+ }
+ 
+ while ( my $f = <t/*.t> ) {
+     for my $i (1..10) {
+-        subtest $f => sub { do $f };
++        subtest $f => sub { do "./$f" };
+     }
+ }
+ 
+-done_testing;
+\ No newline at end of file
++done_testing;
+-- 
+2.9.4
+
diff --git a/perl-ZMQ-LibZMQ4.spec b/perl-ZMQ-LibZMQ4.spec
index 23c2b33..a4316cc 100644
--- a/perl-ZMQ-LibZMQ4.spec
+++ b/perl-ZMQ-LibZMQ4.spec
@@ -1,11 +1,13 @@
 Name:           perl-ZMQ-LibZMQ4
 Version:        0.01
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Libzmq 4.x wrapper for Perl
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/ZMQ-LibZMQ4/
 Source0:        
http://www.cpan.org/authors/id/M/MO/MOSCONI/ZMQ-LibZMQ4-%{version}.tar.gz
+# Fix building on Perl without "." in @INC, CPAN RT#121753
+Patch0:         ZMQ-LibZMQ4-0.01-Fix-building-on-Perl-without-.-in-INC.patch
 BuildRequires:  coreutils
 BuildRequires:  findutils
 BuildRequires:  make
@@ -54,6 +56,7 @@ passing library for Perl.
 
 %prep
 %setup -q -n ZMQ-LibZMQ4-%{version}
+%patch0 -p1
 # Remove bundled modules, keep inc directory to skip xt tests
 rm -r inc/*
 sed -i -e '/%inc\//d' MANIFEST
@@ -78,6 +81,9 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Thu May 18 2017 Petr Pisar <ppi...@redhat.com> - 0.01-3
+- Fix building on Perl without "." in @INC (CPAN RT#121753)
+
 * Sat Feb 11 2017 Fedora Release Engineering <rel...@fedoraproject.org> - 
0.01-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
 
-- 
cgit v1.1


        
https://src.fedoraproject.org/cgit/perl-ZMQ-LibZMQ4.git/commit/?h=master&id=76cf08fe2527cf23b8e6b9bf49b2e3adf298ba60
_______________________________________________
perl-devel mailing list -- perl-devel@lists.fedoraproject.org
To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org

Reply via email to