diff --git a/lyx-2.0.0-hunspell_pkgconfig.patch b/lyx-2.0.0-hunspell_pkgconfig.patch new file mode 100644 index 0000000..e42db02 --- /dev/null +++ b/lyx-2.0.0-hunspell_pkgconfig.patch @@ -0,0 +1,48 @@ +diff -up lyx-2.0.0/config/spell.m4.hunspell_pkgconfig lyx-2.0.0/config/spell.m4 +--- lyx-2.0.0/config/spell.m4.hunspell_pkgconfig 2011-03-27 16:25:24.000000000 -0500 ++++ lyx-2.0.0/config/spell.m4 2011-05-26 10:48:17.539534155 -0500 +@@ -51,11 +51,7 @@ AC_DEFUN([CHECK_WITH_HUNSPELL], + test "$with_hunspell" = "no" && lyx_use_hunspell=false + + if $lyx_use_hunspell ; then +- AC_CHECK_HEADERS(hunspell/hunspell.hxx, +- [AC_SEARCH_LIBS(Hunspell_spell, +- [hunspell hunspell-1.2],, [lyx_use_hunspell=false])], +- [lyx_use_hunspell=false]) +- fi ++ PKG_CHECK_MODULES([HUNSPELL], [hunspell], [], [lyx_use_hunspell=false]) + AC_MSG_CHECKING([whether to use hunspell]) + if $lyx_use_hunspell ; then + AC_MSG_RESULT(yes) +@@ -64,7 +60,8 @@ AC_DEFUN([CHECK_WITH_HUNSPELL], + else + AC_MSG_RESULT(no) + fi +- ]) ++ fi ++ ]) + + + ### Check if we want spell libraries, prefer new aspell or hunspell +diff -up lyx-2.0.0/src/HunspellChecker.cpp.hunspell_pkgconfig lyx-2.0.0/src/HunspellChecker.cpp +diff -up lyx-2.0.0/src/Makefile.am.hunspell_pkgconfig lyx-2.0.0/src/Makefile.am +--- lyx-2.0.0/src/Makefile.am.hunspell_pkgconfig 2011-02-10 18:02:05.000000000 -0600 ++++ lyx-2.0.0/src/Makefile.am 2011-05-26 10:51:37.282467840 -0500 +@@ -4,7 +4,7 @@ include $(top_srcdir)/config/common.am + + DISTCLEANFILES += libintl.h + +-AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES) $(ENCHANT_CFLAGS) ++AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES) $(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS) + AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES) + + if BUILD_CLIENT_SUBDIR +@@ -16,7 +16,7 @@ SUBDIRS = support frontends . $(CLIENT) + EXTRA_DIST = pch.h + + OTHERLIBS = $(BOOST_LIBS) $(INTLLIBS) $(MYTHES_LIBS) \ +- $(ENCHANT_LIBS) @LIBS@ $(SOCKET_LIBS) $(LIBSHLWAPI) $(LIBPSAPI) ++ $(ENCHANT_LIBS) $(HUNSPELL_LIBS) @LIBS@ $(SOCKET_LIBS) $(LIBSHLWAPI) $(LIBPSAPI) + + noinst_LIBRARIES = liblyxcore.a + bin_PROGRAMS = lyx diff --git a/lyx.changes b/lyx.changes index 43d8ac7..979f0da 100644 --- a/lyx.changes +++ b/lyx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 31 12:13:08 UTC 2011 - cornelis@solcon.nl + +- Added patch from fedora to fix build with hunspell 1.3 + ------------------------------------------------------------------- Thu May 5 19:12:11 UTC 2011 - cornelis@solcon.nl diff --git a/lyx.spec b/lyx.spec index 61bd830..d87daa4 100644 --- a/lyx.spec +++ b/lyx.spec @@ -26,13 +26,16 @@ Group: Productivity/Publishing/TeX/Frontends Requires: texlive-latex ImageMagick AutoReqProv: on Version: 2.0.0 -Release: 1 +Release: 5 Summary: LaTeX-Based WYSIWYG Editor Url: http://www.lyx.org/ Source: ftp://ftp.lyx.org/pub/lyx/stable/2.0.x/lyx-2.0.0.tar.gz Source1: lyx.desktop Source2: lyx.png Source3: lyxrc.dist +# hunspell pkgconfig support +# see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg169351.html +Patch0: lyx-2.0.0-hunspell_pkgconfig.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Recommends: texlive-xetex xindy @@ -46,10 +49,11 @@ each paragraph. Of course, low level formatting is still possible. %prep %setup -q -n %{name}-%{version} +%patch0 -p1 %build #%{?suse_update_config:%{suse_update_config -f config}} -#./autogen.sh +./autogen.sh export CFLAGS="$RPM_OPT_FLAGS -DHAVE_STRERROR" export CXXFLAGS="$RPM_OPT_FLAGS -DHAVE_STRERROR" TEXMF=%{_datadir}/texmf