These can build with mingw32-filesystem in F-10, provided that the
[fedora-mingw.git] / mpfr / mingw32-mpfr.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 # Define this to run tests (requires Wine, and won't work
8 # inside mock or Koji).
9 %define run_tests 0
10
11 Name:           mingw32-mpfr
12 Version:        2.3.2
13 Release:        1%{?dist}
14 Summary:        Windows port of multiple-precision floating-point computations
15
16 License:        LGPLv2+ and GPLv2+ and GFDL
17 Group:          Development/Libraries
18
19 URL:            http://www.mpfr.org/
20 Source0:        http://www.mpfr.org/mpfr-current/mpfr-%{version}.tar.bz2
21
22 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
23 BuildArch:      noarch
24
25 BuildRequires:  mingw32-filesystem >= 40
26 BuildRequires:  mingw32-gcc
27 BuildRequires:  mingw32-binutils
28
29 BuildRequires:  mingw32-dlfcn
30 BuildRequires:  mingw32-gmp >= 4.2.1
31
32 # Native package requires these, but I can't see how they are used.
33 #BuildRequires:  autoconf
34 #BuildRequires:  libtool
35
36 Requires:       mingw32-gmp >= 4.2.1
37
38
39 %description
40 The MPFR library is a C library for multiple-precision floating-point
41 computations with "correct rounding". The MPFR is efficient and 
42 also has a well-defined semantics. It copies the good ideas from the 
43 ANSI/IEEE-754 standard for double-precision floating-point arithmetic 
44 (53-bit mantissa). MPFR is based on the GMP multiple-precision library.
45
46 This is the development package for Windows cross-compilation.
47
48
49 %prep
50 %setup -q -n mpfr-%{version}
51
52
53 %build
54 %{_mingw32_configure} \
55   --disable-assert \
56   --disable-static \
57   --enable-shared
58 make %{?_smp_mflags}
59
60
61 %check
62 %if %run_tests
63 # Bloody Wine ...  'make check' doesn't work because Wine no longer
64 # looks on $PATH for libraries.  Instead we have to run the programs
65 # by hand from the .libs directory.
66 make %{?_smp_mflags} check
67 pushd .libs
68 for f in ../tests/.libs/*.exe; do
69   srcdir=$(pwd)/../tests/ wine $f
70 done
71 popd
72 %endif
73
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 make DESTDIR=$RPM_BUILD_ROOT install
78
79 # We don't want the documentation, since that is available
80 # in the native Fedora package.
81 rm -r $RPM_BUILD_ROOT%{_mingw32_infodir}
82
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87
88 %files
89 %defattr(-,root,root)
90 %doc COPYING COPYING.LIB README
91 %{_mingw32_bindir}/libmpfr-1.dll
92 %{_mingw32_libdir}/libmpfr.dll.a
93 %{_mingw32_libdir}/libmpfr.la
94 %{_mingw32_includedir}/mpf2mpfr.h
95 %{_mingw32_includedir}/mpfr.h
96
97
98 %changelog
99 * Wed Jan 28 2009 Richard W.M. Jones <rjones@redhat.com> - 2.3.2-1
100 - Initial RPM release (on behalf of Ralf Corsepius).