[mingw-libxml2] Added win64 support
epienbro
epienbro at fedoraproject.org
Sat Mar 10 21:23:43 UTC 2012
commit 7467d92e08a06e5aa0317761ddd725c6fb81289b
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Sat Mar 10 22:23:39 2012 +0100
Added win64 support
mingw-libxml2.spec | 89 ++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 65 insertions(+), 24 deletions(-)
---
diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec
index e6edb82..c4be53b 100644
--- a/mingw-libxml2.spec
+++ b/mingw-libxml2.spec
@@ -1,10 +1,11 @@
-%global __strip %{mingw32_strip}
-%global __objdump %{mingw32_objdump}
-%define __debug_install_post %{mingw32_debug_install_post}
+%?mingw_package_header
+
+%global mingw_build_win32 1
+%global mingw_build_win64 1
Name: mingw-libxml2
Version: 2.7.8
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: MinGW Windows libxml2 XML processing library
License: MIT
@@ -24,20 +25,26 @@ Patch1002: libxml2-gnome-bug-561340-fix.patch
BuildArch: noarch
-BuildRequires: mingw32-filesystem
+BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
-
-BuildRequires: mingw32-dlfcn
BuildRequires: mingw32-gettext
BuildRequires: mingw32-win-iconv
BuildRequires: mingw32-zlib
+BuildRequires: mingw64-filesystem >= 95
+BuildRequires: mingw64-gcc
+BuildRequires: mingw64-binutils
+BuildRequires: mingw64-gettext
+BuildRequires: mingw64-win-iconv
+BuildRequires: mingw64-zlib
+
%description
MinGW Windows libxml2 XML processing library.
+# Win32
%package -n mingw32-libxml2
Summary: MinGW Windows libxml2 XML processing library
Requires: pkgconfig
@@ -45,7 +52,6 @@ Requires: pkgconfig
%description -n mingw32-libxml2
MinGW Windows libxml2 XML processing library.
-
%package -n mingw32-libxml2-static
Summary: Static version of the MinGW Windows XML processing library
Requires: mingw32-libxml2 = %{version}-%{release}
@@ -54,8 +60,24 @@ Group: Development/Libraries
%description -n mingw32-libxml2-static
Static version of the MinGW Windows XML processing library.
+# Win64
+%package -n mingw64-libxml2
+Summary: MinGW Windows libxml2 XML processing library
+Requires: pkgconfig
+
+%description -n mingw64-libxml2
+MinGW Windows libxml2 XML processing library.
+
+%package -n mingw64-libxml2-static
+Summary: Static version of the MinGW Windows XML processing library
+Requires: mingw64-libxml2 = %{version}-%{release}
+Group: Development/Libraries
+
+%description -n mingw64-libxml2-static
+Static version of the MinGW Windows XML processing library.
+
-%{?mingw32_debug_package}
+%?mingw_debug_package
%prep
@@ -69,29 +91,26 @@ Static version of the MinGW Windows XML processing library.
%build
# LibXML2 can't build static and shared libraries in one go, so we
# build LibXML2 twice here
-mkdir build_static
-pushd build_static
- LDFLAGS="-no-undefined" \
- %{mingw32_configure} --without-python --with-modules --enable-static --disable-shared --with-threads=win32 CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL"
- make %{?_smp_mflags}
-popd
+export LDFLAGS="-no-undefined"
+export CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL"
+MINGW_BUILDDIR_SUFFIX=static %mingw_configure --without-python --with-modules --enable-static --disable-shared --with-threads=win32
+unset CFLAGS
+MINGW_BUILDDIR_SUFFIX=shared %mingw_configure --without-python --with-modules --disable-static --enable-shared --with-threads=win32
-mkdir build_shared
-pushd build_shared
- LDFLAGS="-no-undefined" \
- %{mingw32_configure} --without-python --with-modules --disable-static --enable-shared --with-threads=win32
- make %{?_smp_mflags}
-popd
+MINGW_BUILDDIR_SUFFIX=static %mingw_make %{?_smp_mflags}
+MINGW_BUILDDIR_SUFFIX=shared %mingw_make %{?_smp_mflags}
%install
# First install all the files belonging to the shared build
-make -C build_shared DESTDIR=$RPM_BUILD_ROOT install
+MINGW_BUILDDIR_SUFFIX=shared %mingw_make_install DESTDIR=$RPM_BUILD_ROOT
# Install all the files from the static build in a seperate folder
# and move the static libraries to the right location
-make -C build_static DESTDIR=$RPM_BUILD_ROOT/build_static install
+MINGW_BUILDDIR_SUFFIX=static %mingw_make_install DESTDIR=$RPM_BUILD_ROOT/build_static
+
mv $RPM_BUILD_ROOT/build_static%{mingw32_libdir}/*.a $RPM_BUILD_ROOT%{mingw32_libdir}
+mv $RPM_BUILD_ROOT/build_static%{mingw64_libdir}/*.a $RPM_BUILD_ROOT%{mingw64_libdir}
# Drop the folder which was temporary used for installing the static bits
rm -rf $RPM_BUILD_ROOT/build_static
@@ -101,10 +120,15 @@ rm -rf $RPM_BUILD_ROOT%{mingw32_mandir}
rm -rf $RPM_BUILD_ROOT%{mingw32_docdir}
rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/
+rm -rf $RPM_BUILD_ROOT%{mingw64_mandir}
+rm -rf $RPM_BUILD_ROOT%{mingw64_docdir}
+rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc/
+
# Drop all .la files
find $RPM_BUILD_ROOT -name "*.la" -delete
+# Win32
%files -n mingw32-libxml2
%{mingw32_bindir}/libxml2-2.dll
%{mingw32_bindir}/xml2-config
@@ -116,12 +140,29 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
%{mingw32_includedir}/libxml2
%{mingw32_datadir}/aclocal/*
-
%files -n mingw32-libxml2-static
%{mingw32_libdir}/libxml2.a
+# Win64
+%files -n mingw64-libxml2
+%{mingw64_bindir}/libxml2-2.dll
+%{mingw64_bindir}/xml2-config
+%{mingw64_bindir}/xmlcatalog.exe
+%{mingw64_bindir}/xmllint.exe
+%{mingw64_libdir}/libxml2.dll.a
+%{mingw64_libdir}/pkgconfig/libxml-2.0.pc
+%{mingw64_libdir}/xml2Conf.sh
+%{mingw64_includedir}/libxml2
+%{mingw64_datadir}/aclocal/*
+
+%files -n mingw64-libxml2-static
+%{mingw64_libdir}/libxml2.a
+
%changelog
+* Sat Mar 10 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.7.8-7
+- Added win64 support
+
* Fri Mar 09 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.7.8-6
- Dropped .la files
More information about the mingw
mailing list