Ignore qt-win tarball.
[fedora-mingw.git] / gc / mingw32-gc.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 Name:           mingw32-gc
8 Version:        7.1
9 Release:        4%{?dist}
10 Summary:        MinGW Windows port of GC garbage collector for C and C++
11
12 License:        BSD
13 Group:          Development/Libraries
14 URL:            http://www.hpl.hp.com/personal/Hans_Boehm/gc/
15 Source0:        http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-%{version}.tar.gz
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
18 BuildArch:      noarch
19
20 # To be more backward-compatible abi-wise, TODO: upstream ml reference
21 Patch1:         gc-7.1-gcinit.patch
22 Patch3:         gc-7.1-sparc.patch
23 ## upstream patches
24 # http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2008-May/002206.html
25 Patch100:       gc-7.1-dont_add_byte.patch
26
27 # MinGW-specific patches.
28 Patch1000:      mingw32-gc-7.1-set-win32-threads.patch
29
30 BuildRequires:  mingw32-filesystem >= 30
31 BuildRequires:  mingw32-gcc
32 BuildRequires:  mingw32-gcc-c++
33 BuildRequires:  mingw32-binutils
34
35 # XXX Native package uses a separate libatomic_ops library.
36 # We don't have this for MinGW yet, so gc will use its own
37 # copy of this library during the build.
38
39 BuildRequires:  automake, libtool
40
41 Requires:       pkgconfig
42
43
44 %description
45 The Boehm-Demers-Weiser conservative garbage collector can be 
46 used as a garbage collecting replacement for C malloc or C++ new.
47
48
49 %prep
50 %setup -q -n gc-%{version}
51
52 # FIXME? -- Rex
53 %if 0%{?rhel} < 6 && 0%{?fedora} < 10
54 %patch1 -p1 -b .gcinit
55 %endif
56 %patch3 -p1 -b .sparc
57
58 %patch100 -p1 -b .dont_add_byte
59
60 %patch1000 -p1 -b .set_win32_threads
61
62 # refresh auto*/libtool to purge rpaths
63 rm -f libtool libtool.m4
64 libtoolize --force
65 autoreconf -i
66
67
68 %build
69 %{_mingw32_configure} \
70   --disable-dependency-tracking \
71   --disable-static \
72   --enable-cplusplus \
73   --enable-large-config \
74   --enable-parallel-mark \
75   --enable-threads=win32
76 make %{?_smp_mflags}
77
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 make DESTDIR=$RPM_BUILD_ROOT install
82
83 # The docs duplicate what is already in the native gc-devel
84 # package, except for README.win32 which is not in that
85 # package but useful for Windows developers.
86 mkdir -p $RPM_BUILD_ROOT%{_mingw32_docdir}/%{name}-%{version}
87 mv $RPM_BUILD_ROOT%{_mingw32_datadir}/gc/README.win* \
88   $RPM_BUILD_ROOT%{_mingw32_docdir}/%{name}-%{version}/
89 rm -r $RPM_BUILD_ROOT%{_mingw32_datadir}/gc
90
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95
96 %files
97 %defattr(-,root,root)
98 %doc doc/README
99 %{_mingw32_bindir}/libcord-1.dll
100 %{_mingw32_bindir}/libgc-1.dll
101 %{_mingw32_bindir}/libgccpp-1.dll
102 %{_mingw32_libdir}/libcord.dll.a
103 %{_mingw32_libdir}/libgc.dll.a
104 %{_mingw32_libdir}/libgccpp.dll.a
105 %{_mingw32_libdir}/libcord.la
106 %{_mingw32_libdir}/libgc.la
107 %{_mingw32_libdir}/libgccpp.la
108 %{_mingw32_libdir}/pkgconfig/bdw-gc.pc
109 %{_mingw32_docdir}/%{name}-%{version}
110 %{_mingw32_includedir}/gc.h
111 %{_mingw32_includedir}/gc_cpp.h
112 %{_mingw32_includedir}/gc/
113
114
115 %changelog
116 * Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 7.1-4
117 - Rebuild for mingw32-gcc 4.4
118
119 * Fri Feb  6 2009 Richard W.M. Jones <rjones@redhat.com> - 7.1-3
120 - Include license (summarised by doc/README)
121
122 * Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 7.1-2
123 - Use _smp_mflags.
124
125 * Fri Oct 24 2008 Richard W.M. Jones <rjones@redhat.com> - 7.1-1
126 - Initial RPM release.