[mingw32-dlfcn] Make sure the static lib is compiled correctly (RHBZ #791191)

epienbro epienbro at fedoraproject.org
Thu Feb 16 13:58:13 UTC 2012


commit c844bc6faf29bfa80d7e6bfe0146e1a6fecd13de
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Thu Feb 16 14:58:01 2012 +0100

    Make sure the static lib is compiled correctly (RHBZ #791191)
    
    and various cleanups

 dlfcn-fix-static-lib.patch |   13 +++++++++++++
 mingw32-dlfcn.spec         |   23 +++++++++--------------
 2 files changed, 22 insertions(+), 14 deletions(-)
---
diff --git a/dlfcn-fix-static-lib.patch b/dlfcn-fix-static-lib.patch
new file mode 100644
index 0000000..b7cdabb
--- /dev/null
+++ b/dlfcn-fix-static-lib.patch
@@ -0,0 +1,13 @@
+--- Makefile.orig	2012-02-16 14:38:27.110914820 +0100
++++ Makefile	2012-02-16 14:38:56.615439410 +0100
+@@ -31,8 +31,8 @@
+ 	$(CC) -o dlfcn.o -c dlfcn.c -Wall -O3 -fomit-frame-pointer
+ 
+ libdl.a: dlfcn.o
+-	ar cru libdl.a dlfcn.o
+-	ranlib libdl.a
++	i686-pc-mingw32-ar cru libdl.a dlfcn.o
++	i686-pc-mingw32-ranlib libdl.a
+ 
+ libdl.dll: dlfcn.o
+ 	$(CC) $(SHFLAGS) -shared -o libdl.dll dlfcn.o
diff --git a/mingw32-dlfcn.spec b/mingw32-dlfcn.spec
index 935b714..98898d9 100644
--- a/mingw32-dlfcn.spec
+++ b/mingw32-dlfcn.spec
@@ -1,8 +1,5 @@
 %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}
 
 %global realname dlfcn-win32
@@ -11,24 +8,24 @@
 
 Name:          mingw32-dlfcn
 Version:       0
-Release:       0.9.%{alphatag}%{?dist}
+Release:       0.10.%{alphatag}%{?dist}
 Summary:       Implements a wrapper for dlfcn (dlopen dlclose dlsym dlerror)
 
 License:       LGPLv2+
 Group:         Development/Libraries
 URL:           http://code.google.com/p/dlfcn-win32/
 Source0:       http://dlfcn-win32.googlecode.com/files/%{realname}-%{alphatag}.tar.bz2
-BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:     noarch
 
-BuildRequires: mingw32-filesystem >= 52
+BuildRequires: mingw32-filesystem >= 68
 BuildRequires: mingw32-gcc
 BuildRequires: mingw32-binutils
 #BuildRequires: dos2unix
 
 Patch1:        dlfcn_configure.patch
 Patch2:        dlfcn-fix-cplusplus-linkage.patch
+Patch3:        dlfcn-fix-static-lib.patch
 
 
 %description
@@ -45,7 +42,7 @@ Group:          Development/Libraries
 Static version of the MinGW Windows dlfcn library.
 
 
-%{_mingw32_debug_package}
+%{?_mingw32_debug_package}
 
 
 %prep
@@ -57,6 +54,7 @@ Static version of the MinGW Windows dlfcn library.
 
 %patch1 -p1
 %patch2 -p0
+%patch3 -p0
 
 
 %build
@@ -70,27 +68,24 @@ make %{?_smp_mflags}
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make DESTDIR=$RPM_BUILD_ROOT install
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %files
-%defattr(-,root,root,-)
 %doc README COPYING
 %{_mingw32_bindir}/libdl.dll
 %{_mingw32_libdir}/libdl.dll.a
 %{_mingw32_includedir}/dlfcn.h
 
 %files static
-%defattr(-,root,root,-)
 %{_mingw32_libdir}/libdl.a
 
 
 %changelog
+* Thu Feb 16 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 0-0.10.r11
+- Make sure the static lib is compiled correctly (RHBZ #791191)
+- Various cleanups
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0-0.9.r11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the mingw mailing list