From a52ba762d67f57b6636c09af82f06e6b1d670863 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Thu, 29 Sep 2016 12:57:48 +0200
Subject: 0.6.0 bump

---
 .gitignore                                         |  1 +
 ...sh-CFC-0.5.0-Use-system-lemon-if-possible.patch | 52 ------------
 ...CFC-0.5.0-Use-system-libcmark-if-possible.patch | 93 ----------------------
 ...sh-CFC-0.6.0-Use-system-lemon-if-possible.patch | 52 ++++++++++++
 perl-Clownfish-CFC.spec                            | 22 ++---
 sources                                            |  2 +-
 6 files changed, 65 insertions(+), 157 deletions(-)
 delete mode 100644 Clownfish-CFC-0.5.0-Use-system-lemon-if-possible.patch
 delete mode 100644 Clownfish-CFC-0.5.0-Use-system-libcmark-if-possible.patch
 create mode 100644 Clownfish-CFC-0.6.0-Use-system-lemon-if-possible.patch

diff --git a/.gitignore b/.gitignore
index 761daf1..315e120 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 /Clownfish-CFC-0.4.4.tar.gz
 /Clownfish-CFC-0.5.0.tar.gz
 /Clownfish-CFC-0.5.1.tar.gz
+/Clownfish-CFC-0.6.0.tar.gz
diff --git a/Clownfish-CFC-0.5.0-Use-system-lemon-if-possible.patch 
b/Clownfish-CFC-0.5.0-Use-system-lemon-if-possible.patch
deleted file mode 100644
index 6216780..0000000
--- a/Clownfish-CFC-0.5.0-Use-system-lemon-if-possible.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 22e7ab7e16c8c00c08a7a45c7b31dce6bf573869 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
-Date: Thu, 17 Sep 2015 17:14:52 +0200
-Subject: [PATCH] Use system lemon if possible
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If lemon tool is already available on the system, use that instead of
-building it from bundled code.
-
-Signed-off-by: Petr Písař <ppi...@redhat.com>
----
- buildlib/Clownfish/CFC/Build.pm | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/buildlib/Clownfish/CFC/Build.pm b/buildlib/Clownfish/CFC/Build.pm
-index dd67a0b..69a7603 100644
---- a/buildlib/Clownfish/CFC/Build.pm
-+++ b/buildlib/Clownfish/CFC/Build.pm
-@@ -59,9 +59,16 @@ else {
-     $MODULES_DIR    = catdir( updir(), 'modules' );
- }
- my $CMARK_SOURCE_DIR = catdir( $MODULES_DIR, 'CommonMark', 'src' );
--my $LEMON_EXE_PATH   = catfile( $LEMON_DIR, "lemon$Config{_exe}" );
- my $PPPORT_H_PATH    = catfile( $INCLUDE,   'ppport.h' );
- 
-+# Prefer lemon from system
-+my $LEMON_EXE_PATH = "lemon$Config{_exe}";
-+if (system( $LEMON_EXE_PATH, '-x')) {
-+    $LEMON_EXE_PATH = catfile( $LEMON_DIR, "lemon$Config{_exe}" );
-+} else {
-+    $LEMON_DIR = undef;
-+}
-+
- sub new {
-     my ( $class, %args ) = @_;
-     $args{c_source} = [ $CFC_SOURCE_DIR, $CMARK_SOURCE_DIR ];
-@@ -119,6 +126,10 @@ sub ACTION_ppport {
- # Build the Lemon parser generator.
- sub ACTION_lemon {
-     my $self = shift;
-+    if (!defined $LEMON_DIR) {
-+        print "Using system Lemon parser generator...\n\n";
-+        return;
-+    }
-     print "Building the Lemon parser generator...\n\n";
-     $self->_run_make(
-         dir  => $LEMON_DIR,
--- 
-2.5.5
-
diff --git a/Clownfish-CFC-0.5.0-Use-system-libcmark-if-possible.patch 
b/Clownfish-CFC-0.5.0-Use-system-libcmark-if-possible.patch
deleted file mode 100644
index 170b4c0..0000000
--- a/Clownfish-CFC-0.5.0-Use-system-libcmark-if-possible.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 2482a33f6871f5e561ed8171b6727699a824f93f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
-Date: Mon, 4 Apr 2016 17:00:29 +0200
-Subject: [PATCH] Use system libcmark if possible
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If system has libcmark available, link CFC to it instead of building
-bundled libcmark code.
-
-Signed-off-by: Petr Písař <ppi...@redhat.com>
----
- Build.PL                        |  1 +
- buildlib/Clownfish/CFC/Build.pm | 28 +++++++++++++++++++++++++---
- 2 files changed, 26 insertions(+), 3 deletions(-)
-
-diff --git a/Build.PL b/Build.PL
-index 783971f..ae572be 100644
---- a/Build.PL
-+++ b/Build.PL
-@@ -32,6 +32,7 @@ my $builder = Clownfish::CFC::Build->new(
-         'Module::Build'      => 0.280801,
-         'ExtUtils::CBuilder' => 0.18,
-         'ExtUtils::ParseXS'  => 2.16,
-+        'ExtUtils::PkgConfig'=> 0,
-         'Devel::PPPort'      => 3.14,
-     },
-     meta_merge => { keywords => [qw( clownfish )], },
-diff --git a/buildlib/Clownfish/CFC/Build.pm b/buildlib/Clownfish/CFC/Build.pm
-index 69a7603..ba2d3a2 100644
---- a/buildlib/Clownfish/CFC/Build.pm
-+++ b/buildlib/Clownfish/CFC/Build.pm
-@@ -34,6 +34,7 @@ use File::Find qw( find );
- use Config;
- use Cwd qw( getcwd );
- use Carp;
-+use ExtUtils::PkgConfig;
- 
- # Establish the filepaths for various assets.  If the file `LICENSE` is found
- # in the current working directory, this is a CPAN distribution rather than a
-@@ -58,9 +59,17 @@ else {
-     $CFC_SOURCE_DIR = catdir( updir(), 'src' );
-     $MODULES_DIR    = catdir( updir(), 'modules' );
- }
--my $CMARK_SOURCE_DIR = catdir( $MODULES_DIR, 'CommonMark', 'src' );
- my $PPPORT_H_PATH    = catfile( $INCLUDE,   'ppport.h' );
- 
-+# Prefer cmark from system
-+my %CMARK = eval { ExtUtils::PkgConfig->find('libcmark') };
-+if ($@) {
-+    $CMARK{source_dir} = catdir( $MODULES_DIR, 'CommonMark', 'src' );
-+    print "Using bundled CommonMark library...\n";
-+} else {
-+    print "Using system CommonMark library...\n";
-+}
-+
- # Prefer lemon from system
- my $LEMON_EXE_PATH = "lemon$Config{_exe}";
- if (system( $LEMON_EXE_PATH, '-x')) {
-@@ -71,14 +80,27 @@ if (system( $LEMON_EXE_PATH, '-x')) {
- 
- sub new {
-     my ( $class, %args ) = @_;
--    $args{c_source} = [ $CFC_SOURCE_DIR, $CMARK_SOURCE_DIR ];
-+    if (defined $CMARK{cflags}) {
-+        $args{extra_compiler_flags} ||= [];
-+        push @{ $args{extra_compiler_flags} }, $CMARK{cflags};
-+    }
-+    if (defined $CMARK{libs}) {
-+        $args{extra_linker_flags} ||= [];
-+        push @{ $args{extra_linker_flags} }, $CMARK{libs};
-+    }
-+    $args{c_source} = [ $CFC_SOURCE_DIR ];
-+    if (defined $CMARK{soure_dir}) {
-+        push @{ $args{c_source} }, $CMARK{source_dir};
-+    }
-     $args{include_dirs} ||= [];
-     my @aux_include = (
-         $INCLUDE,
-         $CFC_SOURCE_DIR,
--        $CMARK_SOURCE_DIR,
-         curdir(),    # for charmony.h
-     );
-+    if (defined $CMARK{source_dir}) {
-+       push @aux_include, $CMARK{source_dir};
-+    }
-     push @{ $args{include_dirs} }, @aux_include;
-     return $class->SUPER::new(
-         %args,
--- 
-2.5.5
-
diff --git a/Clownfish-CFC-0.6.0-Use-system-lemon-if-possible.patch 
b/Clownfish-CFC-0.6.0-Use-system-lemon-if-possible.patch
new file mode 100644
index 0000000..12e93fb
--- /dev/null
+++ b/Clownfish-CFC-0.6.0-Use-system-lemon-if-possible.patch
@@ -0,0 +1,52 @@
+From 38ae145430e95b939ea6f07c3f5656c9721fda98 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
+Date: Thu, 17 Sep 2015 17:14:52 +0200
+Subject: [PATCH] Use system lemon if possible
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If lemon tool is already available on the system, use that instead of
+building it from bundled code.
+
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ buildlib/Clownfish/CFC/Build.pm | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/buildlib/Clownfish/CFC/Build.pm b/buildlib/Clownfish/CFC/Build.pm
+index 87f906f..0f38d63 100644
+--- a/buildlib/Clownfish/CFC/Build.pm
++++ b/buildlib/Clownfish/CFC/Build.pm
+@@ -59,9 +59,16 @@ else {
+     $MODULES_DIR    = catdir( updir(), 'modules' );
+ }
+ my $CMARK_SOURCE_DIR = catdir( $MODULES_DIR, 'CommonMark', 'src' );
+-my $LEMON_EXE_PATH   = catfile( $LEMON_DIR, "lemon$Config{_exe}" );
+ my $PPPORT_H_PATH    = catfile( $INCLUDE,   'ppport.h' );
+ 
++# Prefer lemon from system
++my $LEMON_EXE_PATH = "lemon$Config{_exe}";
++if (system( $LEMON_EXE_PATH, '-x')) {
++    $LEMON_EXE_PATH = catfile( $LEMON_DIR, "lemon$Config{_exe}" );
++} else {
++    $LEMON_DIR = undef;
++}
++
+ __PACKAGE__->add_property('with_system_cmark');
+ 
+ sub new {
+@@ -140,6 +147,10 @@ sub ACTION_ppport {
+ # Build the Lemon parser generator.
+ sub ACTION_lemon {
+     my $self = shift;
++    if (!defined $LEMON_DIR) {
++        print "Using system Lemon parser generator...\n\n";
++        return;
++    }
+     print "Building the Lemon parser generator...\n\n";
+     $self->_run_make(
+         dir  => $LEMON_DIR,
+-- 
+2.7.4
+
diff --git a/perl-Clownfish-CFC.spec b/perl-Clownfish-CFC.spec
index e5d16b1..5a02c94 100644
--- a/perl-Clownfish-CFC.spec
+++ b/perl-Clownfish-CFC.spec
@@ -1,6 +1,6 @@
 Name:           perl-Clownfish-CFC
-Version:        0.5.1
-Release:        3%{?dist}
+Version:        0.6.0
+Release:        1%{?dist}
 Summary:        Compiler for Apache Clownfish
 # other files:          ASL 2.0
 ## Unbundled
@@ -11,9 +11,7 @@ Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Clownfish-CFC/
 Source0:        
http://www.cpan.org/authors/id/N/NW/NWELLNHOF/Clownfish-CFC-%{version}.tar.gz
 # Use system lemon, <https://issues.apache.org/jira/browse/CLOWNFISH-60>
-Patch0:         Clownfish-CFC-0.5.0-Use-system-lemon-if-possible.patch
-# Use system libcmark, <https://issues.apache.org/jira/browse/CLOWNFISH-87>
-Patch1:         Clownfish-CFC-0.5.0-Use-system-libcmark-if-possible.patch
+Patch0:         Clownfish-CFC-0.6.0-Use-system-lemon-if-possible.patch
 # There is charmonizer.c which is becoming a separate project
 # <git://git.apache.org/lucy-charmonizer.git>. However, lucy-charmonizer has
 # not yet been released <http://lucy.apache.org/download.html>. Also
@@ -23,7 +21,6 @@ Patch1:         
Clownfish-CFC-0.5.0-Use-system-libcmark-if-possible.patch
 BuildRequires:  cmark-devel
 BuildRequires:  coreutils
 BuildRequires:  findutils
-# gcc for standard library headers
 BuildRequires:  gcc
 BuildRequires:  lemon
 BuildRequires:  perl
@@ -53,7 +50,7 @@ BuildRequires:  perl(ExtUtils::CBuilder) >= 0.18
 # Yes, ExtUtils::CBuilder::Platform::Windows::GCC is required
 BuildRequires:  perl(ExtUtils::CBuilder::Platform::Windows::GCC)
 BuildRequires:  perl(ExtUtils::Mkbootstrap)
-BuildRequires:  perl(ExtUtils::ParseXS) >= 2.16
+BuildRequires:  perl(ExtUtils::ParseXS) >= 3.00
 BuildRequires:  perl(Fcntl)
 BuildRequires:  perl(Scalar::Util)
 BuildRequires:  perl(XSLoader)
@@ -70,7 +67,7 @@ Requires:       perl(ExtUtils::CBuilder) >= 0.18
 # Yes, ExtUtils::CBuilder::Platform::Windows::GCC is required
 Requires:       perl(ExtUtils::CBuilder::Platform::Windows::GCC)
 Requires:       perl(ExtUtils::Mkbootstrap)
-Requires:       perl(ExtUtils::ParseXS) >= 2.16
+Requires:       perl(ExtUtils::ParseXS) >= 3.00
 
 # Filter non-versioned provides. Clownfish/CFC.pm extends name spaces of all
 # the other modules that are defined with version in their respective files.
@@ -82,7 +79,6 @@ This is a compiler for Apache Clownfish.
 %prep
 %setup -q -n Clownfish-CFC-%{version}
 %patch0 -p1
-%patch1 -p1
 # Unbundle lemon
 rm -rf lemon
 sed -i -e '/^lemon\//d' MANIFEST
@@ -91,12 +87,13 @@ rm -rf modules/CommonMark
 sed -i -e '/^modules\/CommonMark\//d' MANIFEST
 
 %build
-perl Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
+perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS" \
+    --with_system_cmark=1
 ./Build
 
 %install
 ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
-find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
 %{_fixperms} $RPM_BUILD_ROOT/*
 
 %check
@@ -110,6 +107,9 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm 
-f {} \;
 %{_mandir}/man3/*
 
 %changelog
+* Thu Sep 29 2016 Petr Pisar <ppi...@redhat.com> - 0.6.0-1
+- 0.6.0 bump
+
 * Sun May 15 2016 Jitka Plesnikova <jples...@redhat.com> - 0.5.1-3
 - Perl 5.24 rebuild
 
diff --git a/sources b/sources
index 2e81b85..91f12d0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-309b178f0d407e5bdf6155b304d9b4c1  Clownfish-CFC-0.5.1.tar.gz
+f32e96936d83e4ad8878073d575b7e6a  Clownfish-CFC-0.6.0.tar.gz
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-Clownfish-CFC.git/commit/?h=master&id=a52ba762d67f57b6636c09af82f06e6b1d670863
_______________________________________________
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