From 2d0dcf93b902ce4b64a8420f2abd21a53b6ea5c394078382a3871ecf32d9c62c Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 1 Apr 2011 18:06:14 +0000 Subject: [PATCH] con OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Text-Hunspell?expand=0&rev=2 --- fix-makefile.diff | 33 +++++++++++++++++++++++++++++++++ perl-Text-Hunspell.spec | 3 +++ 2 files changed, 36 insertions(+) create mode 100644 fix-makefile.diff diff --git a/fix-makefile.diff b/fix-makefile.diff new file mode 100644 index 0000000..f3a8f5c --- /dev/null +++ b/fix-makefile.diff @@ -0,0 +1,33 @@ +Index: Text-Hunspell-2.02/Makefile.PL +=================================================================== +--- Text-Hunspell-2.02.orig/Makefile.PL 2010-10-24 13:23:11.000000000 +0200 ++++ Text-Hunspell-2.02/Makefile.PL 2011-04-01 20:04:27.688784790 +0200 +@@ -11,8 +11,8 @@ use Devel::CheckLib; + my $dlext = $Config{dlext} || 'so'; + my $candidate_lib; + for (split " " => $Config{libpth}) { +- my $lib_path = "$_/libhunspell.$dlext"; +- #warn "Checking $lib_path\n"; ++ my $lib_path = glob("$_/libhunspell*.$dlext"); ++ warn "Checking $lib_path\n"; + if (-e $lib_path) { + $candidate_lib++; + warn "Found '$lib_path'. Good.\n"; +@@ -33,7 +33,7 @@ if (0 == $candidate_lib) { + } + + check_lib_or_exit( +- lib => 'hunspell', ++ lib => 'hunspell-1.3', + header => 'hunspell/hunspell.h', + ); + +@@ -44,7 +44,7 @@ my $CC = $ENV{"CXX"} || 'g++'; + WriteMakefile( + NAME => 'Text::Hunspell', + VERSION_FROM => 'Hunspell.pm', +- LIBS => ['-lhunspell'], ++ LIBS => ['-lhunspell-1.3'], + CC => $CC, + LD => '$(CC)', + PREREQ_PM => {}, # e.g., Module::Name => 1.1 diff --git a/perl-Text-Hunspell.spec b/perl-Text-Hunspell.spec index 83d488b..a63d518 100644 --- a/perl-Text-Hunspell.spec +++ b/perl-Text-Hunspell.spec @@ -25,9 +25,11 @@ Url: http://search.cpan.org/dist/Text-Hunspell/ Group: Development/Libraries/Perl #Source: http://www.cpan.org/authors/id/C/CO/COSIMO/Text-Hunspell-%{version}.tar.gz Source: %{cpan_name}-%{version}.tar.bz2 +Patch0: fix-makefile.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros +BuildRequires: hunspell-devel %{perl_requires} %description @@ -39,6 +41,7 @@ The example code describes the interface on http://hunspell.sf.net %prep %setup -q -n %{cpan_name}-%{version} +%patch0 -p1 %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"