From 3c1ac5b1e6517507232b76c3938470900c00fc45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Thu, 8 Jun 2017 09:27:41 +0200
Subject: Respect Perl's ccflags

---
 perl-Cflow-ccflags.patch | 53 +++++++++++++++++++++++++++++++++++++++++++-----
 perl-Cflow.spec          |  9 ++++++--
 2 files changed, 55 insertions(+), 7 deletions(-)

diff --git a/perl-Cflow-ccflags.patch b/perl-Cflow-ccflags.patch
index f166e11..43cad6b 100644
--- a/perl-Cflow-ccflags.patch
+++ b/perl-Cflow-ccflags.patch
@@ -1,7 +1,47 @@
-diff -up Cflow-1.053/Makefile.PL.orig Cflow-1.053/Makefile.PL
---- Cflow-1.053/Makefile.PL.orig       2003-05-10 18:31:56.000000000 +0200
-+++ Cflow-1.053/Makefile.PL    2011-06-17 17:45:51.000000000 +0200
-@@ -49,7 +49,7 @@ sub find_flow_tools {
+From 7031255413eba696630582a4b82f53a086e6e515 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
+Date: Thu, 8 Jun 2017 09:21:50 +0200
+Subject: [PATCH] Do not loose $Config{ccflags} when setting CCFLAGS
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CCFLAGS must respect $Config{ccflags} to preserve ABI between XS
+modules and libperl.so. Otherwise the resulting Cflow.so can be
+incomaptible and tests fail like:
+
+Cflow.c: loadable library and perl binaries are mismatched (got handshake key 
0x7e00080, needed 0x7f00080)
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1459766
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628522
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ Makefile.PL | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 9bb312a..4863c5b 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -3,13 +3,16 @@
+ 
+ require 5.003; # for INSTALLSCRIPT
+ 
+-# use Config;
++use Config;
+ use ExtUtils::MakeMaker;
+ # See lib/ExtUtils/MakeMaker.pm for details of how to influence
+ # the contents of the Makefile that is written.
+ WriteMakefile(
+     # ABSTRACT_FROM  => 'Cflow.pm',
+     # AUTHOR         => 'Dave Plonka <plo...@doit.wisc.edu>',
++    CONFIGURE_REQUIRES => {
++             'Config'   => '0',
++              },
+     CONFIGURE      => \&find_argus_or_flow_tools,
+     EXE_FILES      => [ 'flowdumper' ],
+     NAME           => 'Cflow',
+@@ -49,7 +52,7 @@ sub find_flow_tools {
     }
     if ("$libdir") {
        print "Found flow-tools... using \"-DOSU $incdir $libdir -lft -lz\".\n";
@@ -10,7 +50,7 @@ diff -up Cflow-1.053/Makefile.PL.orig Cflow-1.053/Makefile.PL
               INC     => join(' ', $incdir),
               LIBS    => [ join(' ', $libdir, '-lnsl -lft -lz') ] }
     }
-@@ -66,7 +66,7 @@ sub find_argus {
+@@ -66,7 +69,7 @@ sub find_argus {
     }
     if ("$libdir") {
        print "Found argus... using \"-DARGUS $incdir $dir/argus_common.a 
$dir/argus_parse.a\".\n";
@@ -19,3 +59,6 @@ diff -up Cflow-1.053/Makefile.PL.orig Cflow-1.053/Makefile.PL
               INC     => join(' ', $incdir),
               LIBS    => [ join(' ', $libdir, '-lnsl', '-lm') ],
               LDFROM  => "\$(OBJECT) $dir/argus_common.a $dir/argus_parse.a" }
+-- 
+2.9.4
+
diff --git a/perl-Cflow.spec b/perl-Cflow.spec
index 139e17f..484c145 100644
--- a/perl-Cflow.spec
+++ b/perl-Cflow.spec
@@ -1,18 +1,20 @@
 Name:           perl-Cflow
 Version:        1.053
-Release:        34%{?dist}
+Release:        35%{?dist}
 Summary:        Find flows in raw IP flow files
 Group:          Development/Libraries
 License:        GPLv2+
 URL:            http://pages.cs.wisc.edu/~plonka/Cflow/
 Source0:        http://pages.cs.wisc.edu/~plonka/Cflow/Cflow-%{version}.tar.gz
-# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628522
+# Respect Perl's ccflags, bug #1459766,
+# <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628522>
 Patch0:         perl-Cflow-ccflags.patch
 # Use system flow-tools
 Patch1:         perl-Cflow-flow-tools.patch
 
 BuildRequires:  perl-devel
 BuildRequires:  perl-generators
+BuildRequires:  perl(Config)
 BuildRequires:  perl(ExtUtils::MakeMaker)
 BuildRequires:  flow-tools-devel
 Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
@@ -57,6 +59,9 @@ make test
 
 
 %changelog
+* Thu Jun 08 2017 Petr Pisar <ppi...@redhat.com> - 1.053-35
+- Respect Perl's ccflags (bug #1459766)
+
 * Sun Jun 04 2017 Jitka Plesnikova <jples...@redhat.com> - 1.053-34
 - Perl 5.26 rebuild
 
-- 
cgit v1.1


        
https://src.fedoraproject.org/cgit/perl-Cflow.git/commit/?h=master&id=3c1ac5b1e6517507232b76c3938470900c00fc45
_______________________________________________
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