Merge git://pkgs.fedoraproject.org/mingw32-libxml2

epel9
Kalev Lember 13 years ago
commit 3b7deb52a0

2
.gitignore vendored

@ -0,0 +1,2 @@
libxml2-2.7.6.tar.gz
/libxml2-2.7.8.tar.gz

@ -0,0 +1,22 @@
--- a/xpath.c
+++ a/xpath.c
@@ -11763,11 +11763,16 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt,
if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) {
xmlXPathObjectPtr tmp;
- /* pop the result */
+ /* pop the result if any */
tmp = valuePop(ctxt);
- xmlXPathReleaseObject(xpctxt, tmp);
- /* then pop off contextObj, which will be freed later */
- valuePop(ctxt);
+ if (tmp != contextObj) {
+ /*
+ * Free up the result
+ * then pop off contextObj, which will be freed later
+ */
+ xmlXPathReleaseObject(xpctxt, tmp);
+ valuePop(ctxt);
+ }
goto evaluation_error;
}

@ -0,0 +1,11 @@
--- include/libxml/xmlexports.h.orig 2010-10-12 08:25:32.000000000 +0200
+++ include/libxml/xmlexports.h 2012-01-06 20:12:26.553304833 +0100
@@ -115,7 +115,7 @@
*/
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
- #define XMLPUBVAR __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport) extern
#else
#define XMLPUBFUN
#if !defined(LIBXML_STATIC)

@ -0,0 +1,11 @@
--- threads.c.orig 2009-09-10 17:03:39.000000000 +0200
+++ threads.c 2009-09-11 19:00:59.660192916 +0200
@@ -993,7 +993,7 @@
#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
#if defined(LIBXML_STATIC_FOR_DLL)
BOOL XMLCALL
-xmlDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved)
#else
BOOL WINAPI
DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)

@ -0,0 +1,235 @@
%global __strip %{_mingw32_strip}
%global __objdump %{_mingw32_objdump}
%global _use_internal_dependency_generator 0
%global __find_requires %{_mingw32_findrequires}
%global __find_provides %{_mingw32_findprovides}
%define __debug_install_post %{_mingw32_debug_install_post}
Name: mingw32-libxml2
Version: 2.7.8
Release: 4%{?dist}
Summary: MinGW Windows libxml2 XML processing library
License: MIT
Group: Development/Libraries
URL: http://xmlsoft.org/
Source0: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Not required for MinGW.
#Patch0: libxml2-multilib.patch
Patch2: libxml2-2.7.7-xpath-double-free.patch
# MinGW-specific patches.
Patch1001: mingw32-libxml2-static-build-compile-fix.patch
# Patch is needed to get DTD validation working (GNOME BZ #663588)
Patch1002: libxml2-gnome-bug-561340-fix.patch
BuildArch: noarch
BuildRequires: mingw32-filesystem >= 52
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
BuildRequires: mingw32-dlfcn
BuildRequires: mingw32-gettext
BuildRequires: mingw32-win-iconv
BuildRequires: mingw32-zlib
Requires: pkgconfig
%description
MinGW Windows libxml2 XML processing library.
%package static
Summary: Static version of the MinGW Windows XML processing library
Requires: %{name} = %{version}-%{release}
Group: Development/Libraries
%description static
Static version of the MinGW Windows XML processing library.
%{_mingw32_debug_package}
%prep
%setup -q -n libxml2-%{version}
%patch2 -p1 -b .CVE-2010-4494
%patch1001 -p0
%patch1002 -p0
%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
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
%install
rm -rf $RPM_BUILD_ROOT
# First install all the files belonging to the shared build
make -C build_shared DESTDIR=$RPM_BUILD_ROOT install
# 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
mv $RPM_BUILD_ROOT/build_static%{_mingw32_libdir}/*.a $RPM_BUILD_ROOT%{_mingw32_libdir}
# Manually merge the libtool files
sed -i s/"old_library=''"/"old_library='libxml2.a'"/ $RPM_BUILD_ROOT%{_mingw32_libdir}/libxml2.la
# Drop the folder which was temporary used for installing the static bits
rm -rf $RPM_BUILD_ROOT/build_static
# Remove documentation which duplicates Fedora native.
rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir}
rm -rf $RPM_BUILD_ROOT%{_mingw32_docdir}
rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_mingw32_bindir}/libxml2-2.dll
%{_mingw32_bindir}/xml2-config
%{_mingw32_bindir}/xmlcatalog.exe
%{_mingw32_bindir}/xmllint.exe
%{_mingw32_libdir}/libxml2.dll.a
%{_mingw32_libdir}/libxml2.la
%{_mingw32_libdir}/pkgconfig/libxml-2.0.pc
%{_mingw32_libdir}/xml2Conf.sh
%{_mingw32_includedir}/libxml2
%{_mingw32_datadir}/aclocal/*
%files static
%defattr(-,root,root,-)
%{_mingw32_libdir}/libxml2.a
%changelog
* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.7.8-4
- Rebuild against the mingw-w64 toolchain
* Fri Jan 6 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.7.8-3
- Re-added patch which was dropped in 2.7.8-1 as it is still needed
to get DTD validation working (GNOME BZ #561340, #663588)
* Wed Jul 06 2011 Kalev Lember <kalevlember@gmail.com> - 2.7.8-2
- Rebuilt against win-iconv
* Mon May 23 2011 Kalev Lember <kalev@smartlink.ee> - 2.7.8-1
- Update to 2.7.8
- Dropped upstreamed patches
- Use the CVE-2010-4494 patch from Fedora native libxml2 (#665965)
* Mon May 23 2011 Kalev Lember <kalev@smartlink.ee> - 2.7.6-3
- Don't install html documentation which duplicates what is in Fedora native
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Nov 20 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.7.6-1
- Update to 2.7.6
- Updated the configure arguments so that the native Win32 thread API
will be used instead of pthreads
* Fri Sep 25 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.7.5-2
- Added a patch to fix GNOME bug #561340
* Thu Sep 24 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.7.5-1
- Update to 2.7.5
* Fri Sep 18 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.7.4-3
- Rebuild because of broken mingw32-gcc/mingw32-binutils
* Sat Sep 12 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.7.4-2
- Always use the native win32 thread API even when pthreads is available
- Dropped a patch which isn't necessary anymore
* Fri Sep 11 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.7.4-1
- Update to 2.7.4
- Drop upstreamed libxml2-2.7.3-ficora-parse.patch patch
- Added a new patch to fix compatibility with the w32 port of pthreads
- Use %%global instead of %%define
- Automatically generate debuginfo subpackage
* Mon Aug 10 2009 Daniel Veillard <veillard@redhat.com> - 2.7.3-3
- two patches for parsing problems CVE-2009-2414 and CVE-2009-2416
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon May 4 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.7.3-1
- Update to 2.7.3
* Fri Apr 3 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.7.2-9
- Fixed %%defattr line
- Added -static subpackage. Applications which want to link
against this static library needs to add -DLIBXML_STATIC to the CFLAGS
- This package shouldn't own %%{_mingw32_libdir}/pkgconfig
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 2.7.2-7
- Rebuild for mingw32-gcc 4.4
* Mon Jan 26 2009 Richard W.M. Jones <rjones@redhat.com> - 2.7.2-6
- Rerun autoreconf after patching configure.in (Erik van Pienbroek).
- Rebuild libtool for Rawhide / libtool 2.
- Add BRs dlfcn and iconv.
* Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 2.7.2-5
- Use _smp_mflags.
- Disable static libraries.
* Tue Jan 13 2009 Richard W.M. Jones <rjones@redhat.com> - 2.7.2-4
- Requires pkgconfig.
* Sat Oct 25 2008 Richard W.M. Jones <rjones@redhat.com> - 2.7.2-3
- Enable modules support for libxslt.
* Fri Oct 17 2008 Richard W.M. Jones <rjones@redhat.com> - 2.7.2-1
- Resynch to native Fedora package + patch.
* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 2.7.1-2
- Rename mingw -> mingw32.
* Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 2.7.1-1
- Update to 2.7.1 release
* Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 2.6.32-5
- Remove manpages which duplicate Fedora native.
* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 2.6.32-4
- Remove static libraries.
- List libdir files explicitly.
* Fri Sep 5 2008 Richard W.M. Jones <rjones@redhat.com> - 2.6.32-3
- Use RPM macros from mingw-filesystem.
- BuildArch is noarch.
* Mon Jul 7 2008 Richard W.M. Jones <rjones@redhat.com> - 2.6.32-1
- Initial RPM release, largely based on earlier work from several sources.

@ -0,0 +1 @@
8127a65e8c3b08856093099b52599c86 libxml2-2.7.8.tar.gz
Loading…
Cancel
Save