Re-enable bandwidth throttling.
[fedora-mingw.git] / gmp / mingw32-gmp.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-gmp
12 Version:        4.2.4
13 Release:        1%{?dist}
14 Summary:        Windows port of GNU arbitrary precision library
15
16 License:        LGPLv3+
17 Group:          Development/Libraries
18
19 URL:            http://gmplib.org/
20 Source0:        ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.bz2
21
22 # Present in the Fedora native package, but shouldn't be needed for
23 # Windows since we are only building on a single architecture.
24 #Source2:        gmp.h
25 #Source3:        gmp-mparam.h
26
27 # S390 patch is not applicable for Windows.
28 #Patch0:         gmp-4.0.1-s390.patch
29
30 # Fix broken sscanf test (sent upstream 2009-01-28).
31 Patch1000:      mingw32-gmp-4.2.4-sscanf-test.patch
32
33 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
34 BuildArch:      noarch
35
36 BuildRequires:  mingw32-filesystem >= 41
37 BuildRequires:  mingw32-gcc
38 BuildRequires:  mingw32-gcc-c++
39 BuildRequires:  mingw32-binutils
40
41 BuildRequires:  mingw32-dlfcn
42 BuildRequires:  mingw32-readline
43
44 BuildRequires:  flex
45
46 %if %run_tests
47 BuildRequires:  wine
48 %endif
49
50
51 %description
52 The gmp package contains GNU MP, a library for arbitrary precision
53 arithmetic, signed integers operations, rational numbers and floating
54 point numbers. GNU MP is designed for speed, for both small and very
55 large operands. GNU MP is fast because it uses fullwords as the basic
56 arithmetic type, it uses fast algorithms, it carefully optimizes
57 assembly code for many CPUs' most common inner loops, and it generally
58 emphasizes speed over simplicity/elegance in its operations.
59
60 Install the gmp package if you need a fast arbitrary precision
61 library.
62
63 This is the development package for Windows cross-compilation.
64
65
66 %prep
67 %setup -q -n gmp-%{version}
68
69 %patch1000 -p1
70
71
72 %build
73 %{_mingw32_configure} \
74   --enable-mpbsd \
75   --enable-cxx \
76   --disable-static \
77   --enable-shared
78 make %{?_smp_mflags}
79
80
81 %check
82 %if %run_tests
83 make %{?_smp_mflags} check
84 %endif
85
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 make DESTDIR=$RPM_BUILD_ROOT install
91 install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_mingw32_includedir}
92
93 rm -rf $RPM_BUILD_ROOT%{_mingw32_infodir}
94
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99
100 %files
101 %defattr(-,root,root)
102 %doc COPYING.LIB README
103 %{_mingw32_bindir}/libgmp-3.dll
104 %{_mingw32_bindir}/libgmpxx-4.dll
105 %{_mingw32_bindir}/libmp-3.dll
106 %{_mingw32_libdir}/libgmp.dll.a
107 %{_mingw32_libdir}/libgmp.la
108 %{_mingw32_libdir}/libgmpxx.dll.a
109 %{_mingw32_libdir}/libgmpxx.la
110 %{_mingw32_libdir}/libmp.dll.a
111 %{_mingw32_libdir}/libmp.la
112 %{_mingw32_includedir}/*.h
113
114
115 %changelog
116 * Wed Jan 28 2009 Richard W.M. Jones <rjones@redhat.com> - 4.2.4-1
117 - Initial RPM release (on behalf of Ralf Corsepius).