Added win64 support

epel9
Erik van Pienbroek 13 years ago
parent 54770ec39a
commit d179d64f67

@ -1,6 +1,4 @@
%global __strip %{mingw32_strip} %?mingw_package_header
%global __objdump %{mingw32_objdump}
%define __debug_install_post %{mingw32_debug_install_post}
%global realname dlfcn-win32 %global realname dlfcn-win32
@ -8,7 +6,7 @@
Name: mingw-dlfcn Name: mingw-dlfcn
Version: 0 Version: 0
Release: 0.12.%{alphatag}%{?dist} Release: 0.13.%{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+
@ -18,9 +16,14 @@ Source0: http://dlfcn-win32.googlecode.com/files/%{realname}-%{alphatag}.t
BuildArch: noarch BuildArch: noarch
BuildRequires: mingw32-filesystem >= 68 BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils BuildRequires: mingw32-binutils
BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc
BuildRequires: mingw64-binutils
#BuildRequires: dos2unix #BuildRequires: dos2unix
Patch1: dlfcn_configure.patch Patch1: dlfcn_configure.patch
@ -33,6 +36,7 @@ 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.
# Win32
%package -n mingw32-dlfcn %package -n mingw32-dlfcn
Summary: Implements a wrapper for dlfcn (dlopen dlclose dlsym dlerror) Summary: Implements a wrapper for dlfcn (dlopen dlclose dlsym dlerror)
@ -48,8 +52,24 @@ Group: Development/Libraries
%description -n mingw32-dlfcn-static %description -n mingw32-dlfcn-static
Static version of the MinGW Windows dlfcn library. Static version of the MinGW Windows dlfcn library.
# Win64
%package -n mingw64-dlfcn
Summary: Implements a wrapper for dlfcn (dlopen dlclose dlsym dlerror)
%description -n mingw64-dlfcn
This library implements a wrapper for dlfcn, as specified in POSIX and SUS,
around the dynamic link library functions found in the Windows API.
%package -n mingw64-dlfcn-static
Summary: Static version of the MinGW Windows dlfcn library
Requires: mingw64-dlfcn = %{version}-%{release}
Group: Development/Libraries
%description -n mingw64-dlfcn-static
Static version of the MinGW Windows dlfcn library.
%{?mingw32_debug_package} %?mingw_debug_package
%prep %prep
@ -65,19 +85,27 @@ Static version of the MinGW Windows dlfcn library.
%build %build
%{mingw32_configure} \ export MINGW32_CONFIGURE_ARGS="--incdir=%{mingw32_includedir} --cc=%{mingw32_cc} --enable-strip=%{mingw32_strip}"
--incdir=%{mingw32_includedir} \ export MINGW64_CONFIGURE_ARGS="--incdir=%{mingw64_includedir} --cc=%{mingw64_cc} --enable-strip=%{mingw64_strip}"
--cc=i686-w64-mingw32-gcc \ %mingw_configure --enable-shared --enable-static
--enable-shared=yes \
--enable-static=yes \ # This package doesn't support out of source compilation by default
--enable-strip=i686-w64-mingw32-strip # Fix this manually
make %{?_smp_mflags} sed -i s@'dlfcn.c'@'../dlfcn.c'@ Makefile
sed -i s@'dlfcn.h'@'../dlfcn.h'@ Makefile
sed -i s@'test.c'@'../test.c'@ Makefile
sed -i s@'testdll.c'@'../testdll.c'@ Makefile
cp Makefile build_win32
cp Makefile build_win64
%mingw_make %{?_smp_mflags}
%install %install
make DESTDIR=$RPM_BUILD_ROOT install %mingw_make DESTDIR=$RPM_BUILD_ROOT install
# Win32
%files -n mingw32-dlfcn %files -n mingw32-dlfcn
%doc README COPYING %doc README COPYING
%{mingw32_bindir}/libdl.dll %{mingw32_bindir}/libdl.dll
@ -87,8 +115,21 @@ make DESTDIR=$RPM_BUILD_ROOT install
%files -n mingw32-dlfcn-static %files -n mingw32-dlfcn-static
%{mingw32_libdir}/libdl.a %{mingw32_libdir}/libdl.a
# Win64
%files -n mingw64-dlfcn
%doc README COPYING
%{mingw64_bindir}/libdl.dll
%{mingw64_libdir}/libdl.dll.a
%{mingw64_includedir}/dlfcn.h
%files -n mingw64-dlfcn-static
%{mingw64_libdir}/libdl.a
%changelog %changelog
* Sat Apr 14 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 0-0.13.r11
- Added win64 support
* Wed Mar 07 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 0-0.12.r11 * Wed Mar 07 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 0-0.12.r11
- Renamed the source package to mingw-dlfcn (RHBZ #800861) - Renamed the source package to mingw-dlfcn (RHBZ #800861)
- Use mingw macros without leading underscore - Use mingw macros without leading underscore

Loading…
Cancel
Save