ppisar pushed to perl-Lucy (master). "0.4.2 bump"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Sep 22 07:15:07 UTC 2015


From e9e8970b90ec06de0c3e412d96847c4e30202fd1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Thu, 17 Sep 2015 15:21:19 +0200
Subject: 0.4.2 bump


diff --git a/.gitignore b/.gitignore
index 4002d4f..00b3c76 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ KinoSearch-0.165.tar.gz
 /KinoSearch-0.31.tar.gz
 /KinoSearch-0.315.tar.gz
 /Lucy-0.3.3.tar.gz
+/Lucy-0.4.2.tar.gz
diff --git a/Lucy-0.4.2-Use-system-lemon-if-possible.patch b/Lucy-0.4.2-Use-system-lemon-if-possible.patch
new file mode 100644
index 0000000..a5590c4
--- /dev/null
+++ b/Lucy-0.4.2-Use-system-lemon-if-possible.patch
@@ -0,0 +1,55 @@
+From 0bdda93e388862c13d1b32583cc8106dd0c18305 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Fri, 18 Sep 2015 16:22:51 +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ř <ppisar at redhat.com>
+---
+ buildlib/Lucy/Build.pm | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/buildlib/Lucy/Build.pm b/buildlib/Lucy/Build.pm
+index be54997..5e6baad 100644
+--- a/buildlib/Lucy/Build.pm
++++ b/buildlib/Lucy/Build.pm
+@@ -35,11 +35,18 @@ use Cwd qw( getcwd );
+ my @BASE_PATH = __PACKAGE__->cf_base_path;
+ 
+ my $COMMON_SOURCE_DIR = catdir( @BASE_PATH, 'common' );
+-my $LEMON_DIR         = catdir( @BASE_PATH, 'lemon' );
+-my $LEMON_EXE_PATH = catfile( $LEMON_DIR, "lemon$Config{_exe}" );
+ my $CORE_SOURCE_DIR = catdir( @BASE_PATH, 'core' );
+ my $LIB_DIR         = 'lib';
+ my $IS_CPAN_DIST    = !@BASE_PATH;
++
++# Prefer lemon from system
++my $LEMON_DIR;
++my $LEMON_EXE_PATH = "lemon$Config{_exe}";
++if (system( $LEMON_EXE_PATH, '-x')) {
++    $LEMON_DIR      = catdir( @BASE_PATH, 'lemon' );
++    $LEMON_EXE_PATH = catfile( $LEMON_DIR, $LEMON_EXE_PATH );
++}
++
+ my $CHARMONIZER_C;
+ if ($IS_CPAN_DIST) {
+     $CHARMONIZER_C = 'charmonizer.c';
+@@ -96,6 +103,10 @@ sub _run_make {
+ # 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.4.3
+
diff --git a/perl-Lucy.spec b/perl-Lucy.spec
index c221802..3fdcbc9 100644
--- a/perl-Lucy.spec
+++ b/perl-Lucy.spec
@@ -1,50 +1,80 @@
 Name:           perl-Lucy
-Version:        0.3.3
-Release:        6%{?dist}
+Version:        0.4.2
+Release:        1%{?dist}
 Summary:        Search engine library
+# other files:              ASL 2.0
+## Not distributed in binary package
+# sample/us_constitution:   Public domain
 License:        ASL 2.0
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Lucy/
+# 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>.
+# Provided charmonizer.c is used only at build time and upstream code is not
+# ready for external lucy-charmonizer (upstream treats it like a build-time
+# only copy library) I'm not going to unbudle the charmonizer.c now.
 Source0:        http://search.cpan.org/CPAN/authors/id/C/CR/CREAMYG/Lucy-%{version}.tar.gz
+# Use system lemon instead of bundled one. See
+# <https://issues.apache.org/jira/browse/CLOWNFISH-60> for the same
+# perl-Clownfish-CFC issue and upstream reaction.
+Patch0:         Lucy-0.4.2-Use-system-lemon-if-possible.patch
+BuildRequires:  coreutils
+BuildRequires:  findutils
+# gcc for standard library headers
+BuildRequires:  gcc
+BuildRequires:  lemon
+BuildRequires:  perl
 BuildRequires:  perl(base)
 BuildRequires:  perl(Carp)
-BuildRequires:  perl(Devel::PPPort) >= 3.13
-BuildRequires:  perl(Env)
+BuildRequires:  perl(Clownfish::CFC::Perl::Build)
+BuildRequires:  perl(Clownfish::CFC::Perl::Build::Charmonic)
+BuildRequires:  perl(Config)
+# CPAN::Meta not used
+BuildRequires:  perl(Cwd)
+# Data::Dumper not used
+BuildRequires:  perl(Devel::PPPort) >= 3.14
+BuildRequires:  perl(Encode)
 BuildRequires:  perl(Exporter)
-BuildRequires:  perl(ExtUtils::CBuilder) >= 0.18
-BuildRequires:  perl(ExtUtils::ParseXS) >= 2.16
+BuildRequires:  perl(ExtUtils::CBuilder) >= 0.21
+BuildRequires:  perl(ExtUtils::ParseXS) >= 2.18
+BuildRequires:  perl(File::Copy)
 BuildRequires:  perl(File::Path)
 BuildRequires:  perl(File::Spec::Functions)
 BuildRequires:  perl(lib)
-BuildRequires:  perl(Module::Build)
-BuildRequires:  perl(Scalar::Util)
+# Module::Build not used
+BuildRequires:  perl(strict)
+BuildRequires:  perl(warnings)
+BuildRequires:  sed
 # Run-time
+BuildRequires:  perl(bytes)
+BuildRequires:  perl(Clownfish)
+BuildRequires:  perl(Clownfish::Util::StringHelper)
 BuildRequires:  perl(Compress::Zlib)
-BuildRequires:  perl(Data::Dumper)
+BuildRequires:  perl(DynaLoader)
 BuildRequires:  perl(IO::Select)
 BuildRequires:  perl(IO::Socket::INET)
-BuildRequires:  perl(JSON::XS) >= 1.53
-BuildRequires:  perl(Lingua::Stem::Snowball) >= 0.952
-BuildRequires:  perl(Lingua::StopWords) >= 0.09
-BuildRequires:  perl(XSLoader)
+BuildRequires:  perl(overload)
+BuildRequires:  perl(Scalar::Util)
+BuildRequires:  perl(Storable)
 # Tests
 BuildRequires:  perl(CGI)
-BuildRequires:  perl(constant)
-BuildRequires:  perl(Encode)
+BuildRequires:  perl(Clownfish::Err)
+BuildRequires:  perl(Clownfish::Hash)
+BuildRequires:  perl(Clownfish::Obj)
+BuildRequires:  perl(Clownfish::Test)
+BuildRequires:  perl(Fcntl)
+BuildRequires:  perl(File::Find)
 BuildRequires:  perl(List::Util)
-BuildRequires:  perl(Parse::RecDescent)
-BuildRequires:  perl(Storable)
 BuildRequires:  perl(Test::More)
 BuildRequires:  perl(Time::HiRes)
+BuildRequires:  perl(utf8)
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-Requires:       perl(Data::Dumper)
-Requires:       perl(JSON::XS) >= 1.53
-Requires:       perl(Lingua::Stem::Snowball) >= 0.952
-Requires:       perl(Lingua::StopWords) >= 0.09
 
 %{?perl_default_filter}
-# Remove under-specified dependencies
-%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(JSON::XS\\)$
+
+# Remove unversioned provides
+%global __provides_exclude %{?__provides_exclude:%{__provides_exclude}|}^perl\\(Lucy::Object::Obj\\)$
 
 %description
 Lucy is a loose port of the Java search engine library Apache Lucene,
@@ -53,6 +83,16 @@ can be put to many different uses.
 
 %prep
 %setup -q -n Lucy-%{version}
+%patch0 -p1
+# Unbundle lemon
+rm -rf lemon
+sed -i -e '/^lemon\//d' MANIFEST
+# Correct shellbangs
+for F in sample/indexer.pl sample/search.cgi; do
+    sed -i -e \
+    's|^#!/usr/local/bin/perl|%(perl -MConfig -e 'print $Config{startperl}')|' \
+    "$F"
+ done
 
 %build
 %{__perl} Build.PL installdirs=vendor
@@ -63,9 +103,11 @@ rm -rf $RPM_BUILD_ROOT
 
 ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
 find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
-
-rm -f $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/KinoSearch/KinoSearch.bs
-
+# Remove empty files
+rm -f $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Lucy/Lucy.bs
+# %%{perl_vendorarch}/Clownfish files are needed for building third-party
+# extension against perl-Lucy. They could be moved into a subpackage.
+# <https://issues.apache.org/jira/browse/LUCY-283>
 %{_fixperms} $RPM_BUILD_ROOT/*
 
 
@@ -76,12 +118,15 @@ rm -f $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/KinoSearch/KinoSearch.bs
 rm -rf $RPM_BUILD_ROOT
 
 %files
-%defattr(-,root,root,-)
-%doc CHANGES README LICENSE
+%license LICENSE
+%doc CHANGES CONTRIBUTING README sample
 %{perl_vendorarch}/*
 %{_mandir}/man3/*
 
 %changelog
+* Thu Sep 17 2015 Petr Pisar <ppisar at redhat.com> - 0.4.2-1
+- 0.4.2 bump
+
 * Thu Jun 18 2015 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.3-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
 
diff --git a/sources b/sources
index a825512..2b6ccd7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b43bae463f9a7f8283ea3e7ad2ca3b25  Lucy-0.3.3.tar.gz
+0aea7e386e987548b720467aeb862b61  Lucy-0.4.2.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/perl-Lucy.git/commit/?h=master&id=e9e8970b90ec06de0c3e412d96847c4e30202fd1


More information about the perl-devel mailing list