commit acad6d0f34144587d14c34ebe8e13feef22b4398 Author: dogsheng <960055655@qq.com> Date: Tue Nov 19 11:44:49 2019 +0800 Package init diff --git a/enchant-2.2.3.tar.gz b/enchant-2.2.3.tar.gz new file mode 100644 index 0000000..97100fd Binary files /dev/null and b/enchant-2.2.3.tar.gz differ diff --git a/enchant2.spec b/enchant2.spec new file mode 100644 index 0000000..49fe922 --- /dev/null +++ b/enchant2.spec @@ -0,0 +1,76 @@ +Name: enchant2 +Version: 2.2.3 +Release: 6 +Summary: Generic 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 + +Patch0000: enchant_aspell.patch + +BuildRequires: automake autoconf libtool gcc-c++ glib2-devel aspell-devel hunspell-devel libvoikko-devel + +Provides: bundled(gnulib) %{name}-aspell = %{version}-%{release} %{name}-voikko = %{version}-%{release} +Obsoletes: %{name}-aspell < %{version}-%{release} %{name}-voikko < %{version}-%{release} + +%description +Enchant aims to provide a simple but comprehensive abstraction for dealing +with different spell checking libraries in a consistent way. A client, such +as a text editor or word processor, need not know anything about a specific +spell-checker, and since all back-ends are plugins, new spell-checkers can +be added without needing any change to the program using Enchant. + +%package devel +Summary: Development package for %{name} +Requires: %{name} = %{version}-%{release} glib2-devel + +%description devel +This package contains some libraries and header files for +development of %{name}. + +%package help +Summary: Help package for %{name} +Requires: %{name} = %{version}-%{release} + +%description help +This package contains some man help files for %{name}. + +%prep +%autosetup -p1 -n enchant-%{version} + +autoreconf -ifv + +%build +%configure --with-aspell --with-hunspell-dir=%{_datadir}/myspell --disable-static +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g; + s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +%make_build pkgdatadir=%{_datadir}/enchant-2 + +%install +%make_install pkgdatadir=%{_datadir}/enchant-2 +%{delete_la} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%doc AUTHORS NEWS README +%license COPYING.LIB +%{_bindir}/{enchant-2,enchant-lsmod-2} +%{_libdir}/libenchant-2.so.* +%{_libdir}/enchant-2/* +%{_datadir}/enchant-2 + +%files devel +%{_libdir}/libenchant-2.so +%{_libdir}/pkgconfig/enchant-2.pc +%{_includedir}/enchant-2 + +%files help +%{_mandir}/man1/* + +%changelog +* Mon Nov 04 2019 huzhiyu - 2.2.3-6 +- Package init diff --git a/enchant_aspell.patch b/enchant_aspell.patch new file mode 100644 index 0000000..9dc5394 --- /dev/null +++ b/enchant_aspell.patch @@ -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