[mingw-libxml2] Throw off LDFLAGS and CFLAGS settings (#951472) and simplified static libraries installation

Erik van Pienbroek epienbro at fedoraproject.org
Sun Apr 14 14:46:59 UTC 2013


commit 53c2093a6b8477cd6509fddfa76297e978ef5346
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Sun Apr 14 16:46:42 2013 +0200

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

 mingw-libxml2.spec |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec
index 8dc233c..cb9e11c 100644
--- a/mingw-libxml2.spec
+++ b/mingw-libxml2.spec
@@ -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 at 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 at lists.fedoraproject.org> - 2.9.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the mingw mailing list