File mingw64-abiword.spec of Package mingw64-abiword

#
# spec file for package mingw64-abiword
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           mingw64-abiword
Version:        3.0.2
Release:        0
Summary:        A Multiplatform Word Processor
License:        GPL-2.0-only
Group:          Productivity/Office/Word Processor
Url:            http://www.abisource.com/
Source0:        http://www.abisource.com/downloads/abiword/%{version}/source/abiword-%{version}.tar.gz
Patch0:         abiword-3.0.1-missing_files.patch
Patch1:         abiword-3.0.1-librevenge.patch
Patch2:         abiword-3.0.2-string.patch
Patch3:         abiword-3.0.2-build-fix.patch
Patch4:         abiword-3.0.2-fix-build-with-gcc13.patch
#!BuildIgnore: post-build-checks
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  mingw64-asio-devel
BuildRequires:  mingw64-boost-devel
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-enchant-devel
BuildRequires:  mingw64-filesystem >= 23
BuildRequires:  mingw64-gtkmathview-devel
BuildRequires:  mingw64-libfribidi-devel
BuildRequires:  mingw64-libgcrypt-devel
BuildRequires:  mingw64-libgnutls-devel
BuildRequires:  mingw64-libgsf-devel
BuildRequires:  mingw64-libjpeg-devel
BuildRequires:  mingw64-libpng-devel
BuildRequires:  mingw64-librevenge-devel >= 0.0.0
BuildRequires:  mingw64-libsoup-devel
BuildRequires:  mingw64-libwmf-devel
BuildRequires:  mingw64-libwpd-devel >= 0.10.0
BuildRequires:  mingw64-libwpg-devel >= 0.3.0
BuildRequires:  mingw64-libwps-devel >= 0.3.0
BuildRequires:  mingw64-libwv-devel
BuildRequires:  mingw64-libxslt-devel
BuildRequires:  mingw64-link-grammar-devel
BuildRequires:  mingw64-ots-devel
BuildRequires:  mingw64-psiconv-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
AbiWord is an award winning, small, fast, featureful and crossplatform word processor.

%_mingw64_debug_package

%prep
%autosetup -p1 -n abiword-%{version}

%build
#We modified plugin configuration and thus we need to regenerate the whole build system
find plugins -name Makefile.am | sed  's|.am$||g' > plugin-makefiles.m4
(cd ./plugins && find . -maxdepth 1 -type d | grep -v '^\.$' | grep -v '\./\.' | sed 's|\./||g' | xargs echo) > plugin-list.m4
(for plugin in `cat plugin-list.m4`; do
	u=`echo $plugin | tr '[:lower:]' '[:upper:]'`
	echo 'AM_CONDITIONAL(['$u'_BUILTIN], test "$enable_'$plugin'_builtin" = "yes")'
done) > plugin-builtin.m4
find plugins -name plugin.m4 | xargs cat > plugin-configure.m4
for f in ` find ./plugins -name '*.m4' | grep -v 'plugin\.m4'`; do
    ln -sf $f
done
libtoolize --force --copy --install
autoreconf -fi

echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}

export WINDRES=%{_bindir}/%{_mingw64_target}-windres
PATH="%{_mingw64_bindir}:$PATH" \
MINGW64_CFLAGS="-Drestrict=__restrict__ %{_mingw64_cflags}  -DWIN32" \
MINGW64_CXXFLAGS="-Drestrict=__restrict__ %{_mingw64_cflags} -std=c++11 -DWIN32" \
%{_mingw64_configure} \
	--enable-plugins \
	--disable-collab-backend-xmpp \
	--disable-collab-backend-sugar \
	--disable-collab-backend-service
%{_mingw64_make} %{?_smp_mflags} || %{_mingw64_make}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}

rm -f %{buildroot}%{_mingw64_libdir}/abiword-*/plugins/*.a
rm -f %{buildroot}%{_mingw64_libdir}/*.a

%files
%defattr(-,root,root)
%{_mingw64_bindir}/abiword.exe
%{_mingw64_bindir}/libabiword-*.dll
%{_mingw64_libdir}/abiword-*/plugins/openxml.dll
%{_mingw64_libdir}/abiword-*/plugins/iscii.dll
%{_mingw64_libdir}/abiword-*/plugins/t602.dll
%{_mingw64_libdir}/abiword-*/plugins/pdf.dll
%{_mingw64_libdir}/abiword-*/plugins/gimp.dll
%{_mingw64_libdir}/abiword-*/plugins/wordperfect.dll
%{_mingw64_libdir}/abiword-*/plugins/pdb.dll
%{_mingw64_libdir}/abiword-*/plugins/opml.dll
%{_mingw64_libdir}/abiword-*/plugins/wpg.dll
%{_mingw64_libdir}/abiword-*/plugins/latex.dll
%{_mingw64_libdir}/abiword-*/plugins/passepartout.dll
%{_mingw64_libdir}/abiword-*/plugins/sdw.dll
%{_mingw64_libdir}/abiword-*/plugins/freetranslation.dll
%{_mingw64_libdir}/abiword-*/plugins/collab.dll
%{_mingw64_libdir}/abiword-*/plugins/grammar.dll
%{_mingw64_libdir}/abiword-*/plugins/wikipedia.dll
%{_mingw64_libdir}/abiword-*/plugins/s5.dll
%{_mingw64_libdir}/abiword-*/plugins/mif.dll
%{_mingw64_libdir}/abiword-*/plugins/mathview.dll
%{_mingw64_libdir}/abiword-*/plugins/wml.dll
%{_mingw64_libdir}/abiword-*/plugins/mht.dll
%{_mingw64_libdir}/abiword-*/plugins/urldict.dll
%{_mingw64_libdir}/abiword-*/plugins/google.dll
%{_mingw64_libdir}/abiword-*/plugins/paint.dll
%{_mingw64_libdir}/abiword-*/plugins/openwriter.dll
%{_mingw64_libdir}/abiword-*/plugins/wmf.dll
%{_mingw64_libdir}/abiword-*/plugins/babelfish.dll
%{_mingw64_libdir}/abiword-*/plugins/clarisworks.dll
%{_mingw64_libdir}/abiword-*/plugins/loadbindings.dll
%{_mingw64_libdir}/abiword-*/plugins/mswrite.dll
%{_mingw64_libdir}/abiword-*/plugins/garble.dll
%{_mingw64_libdir}/abiword-*/plugins/kword.dll
%{_mingw64_libdir}/abiword-*/plugins/hrtext.dll
%{_mingw64_libdir}/abiword-*/plugins/docbook.dll
%{_mingw64_libdir}/abiword-*/plugins/presentation.dll
%{_mingw64_libdir}/abiword-*/plugins/applix.dll
%{_mingw64_libdir}/abiword-*/plugins/opendocument.dll
%{_mingw64_libdir}/abiword-*/plugins/bmp.dll
%{_mingw64_libdir}/abiword-*/plugins/eml.dll
%{_mingw64_libdir}/abiword-*/plugins/xslfo.dll
%{_mingw64_libdir}/abiword-*/plugins/hancom.dll
%{_mingw64_libdir}/abiword-*/plugins/ots.dll
%{_mingw64_libdir}/abiword-*/plugins/psion.dll
%{_mingw64_libdir}/abiword-*/plugins/epub.dll
%{_mingw64_datadir}/icons/hicolor/*/apps/abiword.png
%{_mingw64_datadir}/icons/hicolor/scalable/apps/abiword.svg
%{_mingw64_datadir}/abiword-*/system.profile*
%{_mingw64_datadir}/abiword-*/Presentation.xml
#%%{_mingw64_datadir}/abiword-*/certs/cacert.pem
%{_mingw64_datadir}/abiword-*/strings/*.strings
%{_mingw64_datadir}/abiword-*/readme.abw
%{_mingw64_datadir}/abiword-*/readme.txt
%{_mingw64_datadir}/abiword-*/xsltml/cmarkup.xsl
%{_mingw64_datadir}/abiword-*/xsltml/tokens.xsl
%{_mingw64_datadir}/abiword-*/xsltml/entities.xsl
%{_mingw64_datadir}/abiword-*/xsltml/README
%{_mingw64_datadir}/abiword-*/xsltml/scripts.xsl
%{_mingw64_datadir}/abiword-*/xsltml/glayout.xsl
%{_mingw64_datadir}/abiword-*/xsltml/tables.xsl
%{_mingw64_datadir}/abiword-*/xsltml/mmltex.xsl
%{_mingw64_datadir}/abiword-*/templates/normal.awt*
%{_mingw64_datadir}/abiword-*/ui/ots.ui
%{_mingw64_datadir}/abiword-*/omml_xslt/*.xsl

%changelog
openSUSE Build Service is sponsored by