Throw off LDFLAGS and CFLAGS settings (#951472) and simplified static libraries installation

epel9
Erik van Pienbroek 12 years ago
parent 6cb5bdef89
commit 53c2093a6b

@ -2,7 +2,7 @@
Name: mingw-libxml2
Version: 2.9.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: MinGW Windows libxml2 XML processing library
License: MIT
@ -79,10 +79,11 @@ 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
export LDFLAGS="-no-undefined"
export CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL"
MINGW32_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL"
MINGW64_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL"
MINGW_BUILDDIR_SUFFIX=static %mingw_configure --without-python --with-modules --enable-static --disable-shared --with-threads=win32
unset CFLAGS
MINGW32_CPPFLAGS=
MINGW64_CPPFLAGS=
MINGW_BUILDDIR_SUFFIX=shared %mingw_configure --without-python --with-modules --disable-static --enable-shared --with-threads=win32
MINGW_BUILDDIR_SUFFIX=static %mingw_make %{?_smp_mflags}
@ -93,15 +94,9 @@ MINGW_BUILDDIR_SUFFIX=shared %mingw_make %{?_smp_mflags}
# First install all the files belonging to the shared build
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
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
# Then manually install the static libraries to the right location
install -m 0644 build_win32static/.libs/libxml2.a $RPM_BUILD_ROOT%{mingw32_libdir}/
install -m 0644 build_win64static/.libs/libxml2.a $RPM_BUILD_ROOT%{mingw64_libdir}/
# Remove documentation which duplicates Fedora native.
rm -rf $RPM_BUILD_ROOT%{mingw32_mandir}
@ -148,6 +143,10 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
%changelog
* Fri Apr 12 2013 Nicola Fontana <ntd@entidi.it> - 2.9.0-3
- Throw off LDFLAGS and CFLAGS settings (#951472)
- Simplified static libraries installation
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

Loading…
Cancel
Save