Add patch to avoid unnecessary linking of libenchant against libaspell (#1574893)

This commit is contained in:
Sandro Mani 2018-06-15 00:29:37 +02:00
parent 8092d40375
commit 862f4e5086
2 changed files with 36 additions and 1 deletions

View File

@ -1,12 +1,18 @@
Name: enchant2
Version: 2.2.3
Release: 3%{?snap}%{?dist}
Release: 4%{?snap}%{?dist}
Summary: An Enchanting Spell Checking Library
License: LGPLv2+
URL: https://github.com/AbiWord/enchant
Source0: https://github.com/AbiWord/enchant/releases/download/v%{version}/enchant-%{version}.tar.gz
# Look for aspell using pkg-config, instead of AC_CHECK_LIB which adds -laspell
# to the global LIBS and over-links libenchant (#1574893)
Patch0: enchant_aspell.patch
BuildRequires: automake autoconf libtool
BuildRequires: glib2-devel
BuildRequires: aspell-devel
BuildRequires: hunspell-devel
@ -48,6 +54,9 @@ developing applications that use %{name}.
%prep
%autosetup -p1 -n enchant-%{version}
# Needed for Patch0
autoreconf -ifv
%build
%configure \
@ -93,6 +102,9 @@ find %{buildroot} -name '*.la' -delete
%changelog
* Fri Jun 15 2018 Sandro Mani <manisandro@gmail.com> - 2.2.3-4
- Add patch to avoid unnecessary linking of libenchant against libaspell (#1574893)
* Wed May 16 2018 Parag Nemade <pnemade AT redhat DOT com> - 2.2.3-3
- Make enchant2-voikko installed by langpacks-fi package (#1578352)

23
enchant_aspell.patch Normal file
View File

@ -0,0 +1,23 @@
diff -rupN enchant-2.2.3/configure.ac enchant-2.2.3-new/configure.ac
--- enchant-2.2.3/configure.ac 2018-02-04 18:01:08.000000000 +0100
+++ enchant-2.2.3-new/configure.ac 2018-06-15 00:20:14.000000000 +0200
@@ -268,7 +268,7 @@ build_providers=
dnl Standard providers
ENCHANT_CHECK_PKG_CONFIG_PROVIDER([hunspell], [HUNSPELL])
-ENCHANT_CHECK_LIB_PROVIDER([aspell], [ASPELL], [get_aspell_dict_info_list])
+ENCHANT_CHECK_PKG_CONFIG_PROVIDER([aspell], [ASPELL])
ENCHANT_CHECK_LIB_PROVIDER([hspell], [HSPELL], [hspell_get_dictionary_path],, [-lz])
ENCHANT_CHECK_PKG_CONFIG_PROVIDER([voikko], [VOIKKO], [libvoikko])
dnl FIXME: The test below assumes GCC(-compatible) ObjC++ compiler, but
diff -rupN enchant-2.2.3/providers/Makefile.am enchant-2.2.3-new/providers/Makefile.am
--- enchant-2.2.3/providers/Makefile.am 2017-12-12 13:22:28.000000000 +0100
+++ enchant-2.2.3-new/providers/Makefile.am 2018-06-15 00:20:11.000000000 +0200
@@ -12,6 +12,7 @@ AM_LDFLAGS = -module -avoid-version -no-
if WITH_ASPELL
provider_LTLIBRARIES += enchant_aspell.la
endif
+enchant_aspell_la_LIBADD = $(ASPELL_LIBS)
if WITH_HSPELL
provider_LTLIBRARIES += enchant_hspell.la