- Use %global instead of %define

- Automatically generate debuginfo subpackage (F-12+)
- Fixed %defattr line
- Added -static subpackage
- Fixed linker error with C++ applications
epel9
epienbro 15 years ago
parent 3a00af7647
commit 0d62afb13e

@ -0,0 +1,20 @@
--- dlfcn.h.orig 2009-10-30 15:36:35.357902913 +0100
+++ dlfcn.h 2009-10-30 15:39:51.126664184 +0100
@@ -37,9 +37,17 @@
#define RTLD_DEFAULT 0
#define RTLD_NEXT 0
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void *dlopen ( const char *file, int mode );
int dlclose( void *handle );
void *dlsym ( void *handle, const char *name );
char *dlerror( void );
+#ifdef __cplusplus
+}
+#endif
+
#endif /* DLFCN_H */

@ -1,16 +1,17 @@
%define __strip %{_mingw32_strip} %global __strip %{_mingw32_strip}
%define __objdump %{_mingw32_objdump} %global __objdump %{_mingw32_objdump}
%define _use_internal_dependency_generator 0 %global _use_internal_dependency_generator 0
%define __find_requires %{_mingw32_findrequires} %global __find_requires %{_mingw32_findrequires}
%define __find_provides %{_mingw32_findprovides} %global __find_provides %{_mingw32_findprovides}
%define __debug_install_post %{_mingw32_debug_install_post}
%define realname dlfcn-win32 %global realname dlfcn-win32
%define alphatag r11 %global alphatag r11
Name: mingw32-dlfcn Name: mingw32-dlfcn
Version: 0 Version: 0
Release: 0.6.%{alphatag}%{?dist} Release: 0.7.%{alphatag}%{?dist}
Summary: Implements a wrapper for dlfcn (dlopen dlclose dlsym dlerror) Summary: Implements a wrapper for dlfcn (dlopen dlclose dlsym dlerror)
License: LGPLv2+ License: LGPLv2+
@ -21,12 +22,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
BuildRequires: mingw32-filesystem >= 49 BuildRequires: mingw32-filesystem >= 52
BuildRequires: mingw32-gcc BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils BuildRequires: mingw32-binutils
#BuildRequires: dos2unix #BuildRequires: dos2unix
Patch1: dlfcn_configure.patch Patch1: dlfcn_configure.patch
Patch2: dlfcn-fix-cplusplus-linkage.patch
%description %description
@ -34,6 +36,18 @@ This library implements a wrapper for dlfcn, as specified in POSIX and SUS,
around the dynamic link library functions found in the Windows API. around the dynamic link library functions found in the Windows API.
%package static
Summary: Static version of the MinGW Windows dlfcn library
Requires: %{name} = %{version}-%{release}
Group: Development/Libraries
%description static
Static version of the MinGW Windows dlfcn library.
%{_mingw32_debug_package}
%prep %prep
%setup -q -n %{realname}-%{alphatag} %setup -q -n %{realname}-%{alphatag}
@ -42,6 +56,7 @@ around the dynamic link library functions found in the Windows API.
%{__sed} -i 's/\r//' COPYING %{__sed} -i 's/\r//' COPYING
%patch1 -p1 %patch1 -p1
%patch2 -p0
%build %build
@ -49,7 +64,7 @@ around the dynamic link library functions found in the Windows API.
--incdir=%{_mingw32_includedir} \ --incdir=%{_mingw32_includedir} \
--cc=i686-pc-mingw32-gcc \ --cc=i686-pc-mingw32-gcc \
--enable-shared=yes \ --enable-shared=yes \
--enable-static=no \ --enable-static=yes \
--enable-strip=i686-pc-mingw32-strip --enable-strip=i686-pc-mingw32-strip
make %{?_smp_mflags} make %{?_smp_mflags}
@ -64,14 +79,25 @@ rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root) %defattr(-,root,root,-)
%doc README COPYING %doc README COPYING
%{_mingw32_bindir}/libdl.dll %{_mingw32_bindir}/libdl.dll
%{_mingw32_libdir}/libdl.dll.a %{_mingw32_libdir}/libdl.dll.a
%{_mingw32_includedir}/dlfcn.h %{_mingw32_includedir}/dlfcn.h
%files static
%defattr(-,root,root,-)
%{_mingw32_libdir}/libdl.a
%changelog %changelog
* Fri Oct 30 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 0-0.7.r11
- Use %%global instead of %%define
- Automatically generate debuginfo subpackage
- Fixed %%defattr line
- Added -static subpackage
- Fixed linker error with C++ applications
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.6.r11 * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.6.r11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

Loading…
Cancel
Save