Resolves: rhbz#426402 use system hunspell

This commit is contained in:
Caolan McNamara 2008-01-26 18:14:00 +00:00
parent 7786d49832
commit fa7e14269f
2 changed files with 91 additions and 3 deletions

View File

@ -0,0 +1,64 @@
diff -ru enchant-1.3.0.orig/configure.in enchant-1.3.0/configure.in
--- enchant-1.3.0.orig/configure.in 2006-07-22 18:34:46.000000000 +0100
+++ enchant-1.3.0/configure.in 2007-12-20 19:25:18.000000000 +0000
@@ -85,7 +85,6 @@
dnl ===========================================================================
dnl binreloc
-AM_BINRELOC
AM_CONDITIONAL(WITH_BINRELOC, test "x$br_cv_binreloc" = "xyes")
build_ispell=yes
@@ -123,11 +122,8 @@
myspell_dir=$with_myspell_dir
fi
+PKG_CHECK_MODULES(MYSPELL, hunspell)
MYSPELL_CFLAGS="$MYSPELL_CFLAGS -DENCHANT_MYSPELL_DICT_DIR='\"$myspell_dir\"'"
-if test "x$with_system_myspell" != "xno"; then
- MYSPELL_CFLAGS="$MYSPELL_CFLAGS -DWITH_SYSTEM_MYSPELL=1"
-fi
-
AC_SUBST(MYSPELL_CFLAGS)
AC_SUBST(MYSPELL_LIBS)
diff -ru enchant-1.3.0.orig/src/myspell/Makefile.am enchant-1.3.0/src/myspell/Makefile.am
--- enchant-1.3.0.orig/src/myspell/Makefile.am 2006-07-22 18:01:40.000000000 +0100
+++ enchant-1.3.0/src/myspell/Makefile.am 2007-12-20 19:17:02.000000000 +0000
@@ -10,35 +10,8 @@
myspelldir= $(libdir)/enchant
libenchant_myspell_lalibdir=$(libdir)/enchant
-libenchant_myspell_la_LIBADD= $(MYSPELL_LIBS) $(ENCHANT_LIBS) $(top_builddir)/src/libenchant.la
+libenchant_myspell_la_LIBADD=$(ENCHANT_LIBS) $(MYSPELL_LIBS) $(top_builddir)/src/libenchant.la
libenchant_myspell_la_LDFLAGS = -module -avoid-version -no-undefined
libenchant_myspell_la_SOURCES = \
- affentry.hxx \
- affixmgr.hxx \
- atypes.hxx \
- baseaffix.hxx \
- csutil.hxx \
- dictmgr.hxx \
- hashmgr.hxx \
- htypes.hxx \
- hunspell.hxx \
- langnum.hxx \
- suggestmgr.hxx \
- affentry.cxx \
- affixmgr.cxx \
- csutil.cxx \
- dictmgr.cxx \
- hashmgr.cxx \
- hunspell.cxx \
- suggestmgr.cxx \
myspell_checker.cpp
-
-EXTRA_DIST= \
- license.readme \
- utf_info.cxx \
- license.hunspell \
- license.myspell \
- license.readme \
- hunspell.dsp
-

View File

@ -1,20 +1,32 @@
Summary: An Enchanting Spell Checking Library
Name: enchant
Version: 1.3.0
Release: 2%{?dist}
Release: 3%{?dist}
Epoch: 1
Group: System Environment/Libraries
License: LGPL
License: LGPLv2+
Source: http://www.abisource.com/downloads/enchant/%{version}/enchant-%{version}.tar.gz
URL: http://www.abisource.com/
BuildRequires: glib2-devel >= 2.0.0
BuildRequires: aspell-devel
BuildRequires: hspell-devel
BuildRequires: hunspell-devel
BuildRequires: automake
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Patch0: enchant-1.3.0-systemhunspell.patch
%description
A library that wraps other spell checking backends.
%package aspell
Summary: Integration with aspell for libenchant
Group: System Environment/Libraries
Requires: enchant = %{epoch}:%{version}-%{release}
%description aspell
Libraries necessary to integrate applications using libenchant with aspell.
%package devel
Summary: Support files necessary to compile applications with libenchant.
Group: Development/Libraries
@ -26,6 +38,10 @@ Libraries, headers, and support files necessary to compile applications using li
%prep
%setup -q
%patch0 -p1 -b .enchant-1.3.0-systemhunspell.patch
aclocal
autoconf
automake --foreign
%build
%configure --disable-ispell --with-myspell-dir=/usr/share/myspell
@ -43,10 +59,14 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/enchant/*.la
%{_bindir}/*
%{_libdir}/lib*.so.*
%dir %{_libdir}/enchant
%{_libdir}/enchant/lib*.so*
%{_libdir}/enchant/lib*hspell.so*
%{_libdir}/enchant/lib*myspell.so*
%{_mandir}/man1/enchant.1.gz
%{_datadir}/enchant
%files aspell
%{_libdir}/enchant/lib*aspell.so*
%files devel
%defattr(-,root,root)
%{_libdir}/*.a
@ -63,6 +83,10 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/enchant/*.la
rm -r $RPM_BUILD_ROOT
%changelog
* Sat Jan 26 2008 Caolan McNamara <caolanm@redhat.com> 1:1.3.0-3.fc9
- Resolves: rhbz#426402 use system hunspell not internal one and
split out aspell backend.
* Wed Dec 19 2007 Caolan McNamara <caolanm@redhat.com> 1:1.3.0-2.fc9
- tell enchant where the myspell dictionaries are