From b6e805ec1fbfa131e0ac4860d22364ea77bee83f Mon Sep 17 00:00:00 2001
From: Iain Arnell <iarn...@gmail.com>
Date: Fri, 17 Jun 2011 18:06:03 +0200
Subject: patch to workaround ExtUtils::CBuilder behavior change

---
 perl-5.14-ccflags.patch | 21 +++++++++++++++++++++
 perl-Cflow.spec         | 25 +++++++++++++------------
 2 files changed, 34 insertions(+), 12 deletions(-)
 create mode 100644 perl-5.14-ccflags.patch

diff --git a/perl-5.14-ccflags.patch b/perl-5.14-ccflags.patch
new file mode 100644
index 0000000..f166e11
--- /dev/null
+++ b/perl-5.14-ccflags.patch
@@ -0,0 +1,21 @@
+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 {
+    }
+    if ("$libdir") {
+       print "Found flow-tools... using \"-DOSU $incdir $libdir -lft -lz\".\n";
+-      return { CCFLAGS => '-DOSU',
++      return { CCFLAGS => $Config{ccflags} . ' -DOSU',
+              INC     => join(' ', $incdir),
+              LIBS    => [ join(' ', $libdir, '-lnsl -lft -lz') ] }
+    }
+@@ -66,7 +66,7 @@ sub find_argus {
+    }
+    if ("$libdir") {
+       print "Found argus... using \"-DARGUS $incdir $dir/argus_common.a 
$dir/argus_parse.a\".\n";
+-      return { CCFLAGS => '-DARGUS',
++      return { CCFLAGS => $Config{ccflags} . ' -DARGUS',
+              INC     => join(' ', $incdir),
+              LIBS    => [ join(' ', $libdir, '-lnsl', '-lm') ],
+              LDFROM  => "\$(OBJECT) $dir/argus_common.a $dir/argus_parse.a" }
diff --git a/perl-Cflow.spec b/perl-Cflow.spec
index 0b0c06c..fc22caa 100644
--- a/perl-Cflow.spec
+++ b/perl-Cflow.spec
@@ -1,17 +1,20 @@
 Name:           perl-Cflow
 Version:        1.053
-Release:        16%{?dist}
+Release:        17%{?dist}
 Summary:        Find flows in raw IP flow files
 Group:          Development/Libraries
 License:        GPLv2+
 URL:            http://net.doit.wisc.edu/~plonka/Cflow/
 Source0:        http://net.doit.wisc.edu/~plonka/Cflow/Cflow-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# see http://rt.perl.org/rt3/Public/Bug/Display.html?id=89478
+Patch0:         perl-5.14-ccflags.patch
 
 BuildRequires:  perl(ExtUtils::MakeMaker)
 BuildRequires:  flow-tools-devel
 Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 
+%{?perl_default_filter}
+
 %description
 Cflow with flow-tools support.  This module implements an API for
 processing IP flow accounting information which as been collected from
@@ -19,17 +22,15 @@ routers and written into flow files.
 
 %prep
 %setup -q -n Cflow-%{version}
-
+%patch0 -p1
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" \
-   CCFLAGS='-DOSU' LIBS='-lft'
+%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
 
 make %{?_smp_mflags}
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
 find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
 find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
@@ -40,13 +41,7 @@ chmod -R u+w $RPM_BUILD_ROOT/*
 %check
 make test
 
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %files
-%defattr(-,root,root,-)
 %doc COPYING README Changes
 %{_bindir}/flowdumper
 %{perl_vendorarch}/auto/*
@@ -56,6 +51,12 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Jun 17 2011 Iain Arnell <iarn...@gmail.com> 1.053-17
+- patch to workaround ExtUtils::CBuilder behavior change
+  see http://rt.perl.org/rt3/Public/Bug/Display.html?id=89478
+- clean up spec for modern rpmbuild
+- use perl_default_filter
+
 * Fri Jun 17 2011 Marcela Mašláňová <mmasl...@redhat.com> - 1.053-16
 - Perl mass rebuild
 
-- 
cgit v1.1


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