[mingw-enchant] Added win64 support
epienbro
epienbro at fedoraproject.org
Sun Mar 18 23:22:05 UTC 2012
commit e1bb1b91e96ffcf2cafddc6cb3f419d8f4edf4e5
Author: Erik van Pienbroek <erik at vanpienbroek.nl>
Date: Mon Mar 19 00:21:58 2012 +0100
Added win64 support
mingw-enchant.spec | 93 ++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 73 insertions(+), 20 deletions(-)
---
diff --git a/mingw-enchant.spec b/mingw-enchant.spec
index e2bc1a2..29c7cc1 100644
--- a/mingw-enchant.spec
+++ b/mingw-enchant.spec
@@ -1,26 +1,32 @@
-%global __strip %{mingw32_strip}
-%global __objdump %{mingw32_objdump}
-%define __debug_install_post %{mingw32_debug_install_post}
+%?mingw_package_header
Summary: MinGW Windows Enchanting Spell Checking Library
Name: mingw-enchant
Version: 1.6.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Group: System Environment/Libraries
License: LGPLv2+
Source0: http://www.abisource.com/downloads/enchant/%{version}/enchant-%{version}.tar.gz
URL: http://www.abisource.com/
-BuildRequires: mingw32-filesystem
+BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-binutils
-BuildRequires: mingw32-glib2 >= 2.6.0
+BuildRequires: mingw32-glib2
BuildRequires: mingw32-hunspell
+
+BuildRequires: mingw64-filesystem >= 95
+BuildRequires: mingw64-gcc
+BuildRequires: mingw64-gcc-c++
+BuildRequires: mingw64-binutils
+BuildRequires: mingw64-glib2
+BuildRequires: mingw64-hunspell
+
BuildRequires: m4
+
BuildArch: noarch
-Requires: pkgconfig
%description
A library that wraps other spell checking backends.
@@ -28,8 +34,10 @@ A library that wraps other spell checking backends.
This is the MinGW build of enchant
+# Win32
%package -n mingw32-enchant
-Summary: MinGW Windows Enchanting Spell Checking Library
+Summary: MinGW Windows Enchanting Spell Checking Library
+Requires: pkgconfig
%description -n mingw32-enchant
A library that wraps other spell checking backends.
@@ -37,15 +45,33 @@ A library that wraps other spell checking backends.
This is the MinGW build of enchant
%package -n mingw32-enchant-static
-Summary: Static version of the MinGW Windows enchant library
-Requires: mingw32-enchant = %{version}-%{release}
-Group: Development/Libraries
+Summary: Static version of the MinGW Windows enchant library
+Requires: mingw32-enchant = %{version}-%{release}
+Group: Development/Libraries
%description -n mingw32-enchant-static
Static version of the MinGW Windows enchant spell checking library.
+# Win64
+%package -n mingw64-enchant
+Summary: MinGW Windows Enchanting Spell Checking Library
+Requires: pkgconfig
-%{?mingw32_debug_package}
+%description -n mingw64-enchant
+A library that wraps other spell checking backends.
+
+This is the MinGW build of enchant
+
+%package -n mingw64-enchant-static
+Summary: Static version of the MinGW Windows enchant library
+Requires: mingw64-enchant = %{version}-%{release}
+Group: Development/Libraries
+
+%description -n mingw64-enchant-static
+Static version of the MinGW Windows enchant spell checking library.
+
+
+%?mingw_debug_package
%prep
@@ -53,30 +79,36 @@ Static version of the MinGW Windows enchant spell checking library.
%build
-%{mingw32_configure} \
+%mingw_configure \
--disable-ispell \
--disable-hspell \
--disable-aspell \
--enable-static \
--enable-shared
-make
-# When using make -j4 (which is the case with Koji) the following compile error occurs:
-# /bin/sh ../libtool --tag=CC --mode=link i686-pc-mingw32-gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -mms-bitfields -no-undefined -export-dynamic -avoid-version -o libenchant.la -rpath /usr/i686-pc-mingw32/sys-root/mingw/lib prefix.lo enchant.lo pwl.lo -L/usr/i686-pc-mingw32/sys-root/mingw/lib -lgmodule-2.0 -lglib-2.0 -lintl enchant-win32res.lo
-# libtool: link: `enchant-win32res.lo' is not a valid libtool object
-#
-# I haven't been able to find the exact cause yet so 'make %{?_smp_mflags}' has been disabled for now
+
+# Work around a build issue
+pushd build_win32/src
+WINDRES=%{mingw32_windres} ../../compile-resource libenchant.rc enchant-win32res.o
+popd
+pushd build_win64/src
+WINDRES=%{mingw64_windres} ../../compile-resource libenchant.rc enchant-win32res.o
+popd
+
+%mingw_make %{?_smp_mflags}
%install
-make DESTDIR=$RPM_BUILD_ROOT install
+%mingw_make DESTDIR=$RPM_BUILD_ROOT install
# Drop the man-pages
rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/man
+rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/man
# Drop all .la files
find $RPM_BUILD_ROOT -name "*.la" -delete
+# Win32
%files -n mingw32-enchant
%doc AUTHORS COPYING.LIB README
%{mingw32_bindir}/enchant-lsmod.exe
@@ -94,8 +126,29 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
%{mingw32_libdir}/libenchant.a
%{mingw32_libdir}/enchant/libenchant_myspell.a
+# Win64
+%files -n mingw64-enchant
+%doc AUTHORS COPYING.LIB README
+%{mingw64_bindir}/enchant-lsmod.exe
+%{mingw64_bindir}/enchant.exe
+%{mingw64_bindir}/libenchant.dll
+%{mingw64_includedir}/enchant/
+%dir %{mingw64_libdir}/enchant/
+%{mingw64_libdir}/enchant/libenchant_myspell.dll
+%{mingw64_libdir}/enchant/libenchant_myspell.dll.a
+%{mingw64_libdir}/libenchant.dll.a
+%{mingw64_libdir}/pkgconfig/enchant.pc
+%{mingw64_datadir}/enchant/
+
+%files -n mingw64-enchant-static
+%{mingw64_libdir}/libenchant.a
+%{mingw64_libdir}/enchant/libenchant_myspell.a
+
%changelog
+* Sun Mar 18 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.6.0-5
+- Added win64 support
+
* Wed Mar 07 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.6.0-4
- Renamed the source package to mingw-enchant (RHBZ #800863)
- Use mingw macros without leading underscore
More information about the scm-commits
mailing list