Boehm garbage collector.
[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:        1%{?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-binutils
33
34 # XXX Native package uses a separate libatomic_ops library.
35 # We don't have this for MinGW yet, so gc will use its own
36 # copy of this library during the build.
37
38 BuildRequires:  automake, libtool
39
40 Requires:       pkgconfig
41
42
43 %description
44 The Boehm-Demers-Weiser conservative garbage collector can be 
45 used as a garbage collecting replacement for C malloc or C++ new.
46
47
48 %prep
49 %setup -q -n gc-%{version}
50
51 # FIXME? -- Rex
52 %if 0%{?rhel} < 6 && 0%{?fedora} < 10
53 %patch1 -p1 -b .gcinit
54 %endif
55 %patch3 -p1 -b .sparc
56
57 %patch100 -p1 -b .dont_add_byte
58
59 %patch1000 -p1 -b .set_win32_threads
60
61 # refresh auto*/libtool to purge rpaths
62 rm -f libtool libtool.m4
63 libtoolize --force
64 autoreconf -i
65
66
67 %build
68 %{_mingw32_configure} \
69   --disable-dependency-tracking \
70   --disable-static \
71   --enable-cplusplus \
72   --enable-large-config \
73   --enable-parallel-mark \
74   --enable-threads=win32
75 make
76
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 make DESTDIR=$RPM_BUILD_ROOT install
81
82 # The docs duplicate what is already in the native gc-devel
83 # package, except for README.win32 which is not in that
84 # package but useful for Windows developers.
85 mkdir -p $RPM_BUILD_ROOT%{_mingw32_docdir}/%{name}-%{version}
86 mv $RPM_BUILD_ROOT%{_mingw32_datadir}/gc/README.win* \
87   $RPM_BUILD_ROOT%{_mingw32_docdir}/%{name}-%{version}/
88 rm -r $RPM_BUILD_ROOT%{_mingw32_datadir}/gc
89
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94
95 %files
96 %defattr(-,root,root)
97 %{_mingw32_bindir}/libcord-1.dll
98 %{_mingw32_bindir}/libgc-1.dll
99 %{_mingw32_bindir}/libgccpp-1.dll
100 %{_mingw32_libdir}/libcord.dll.a
101 %{_mingw32_libdir}/libgc.dll.a
102 %{_mingw32_libdir}/libgccpp.dll.a
103 %{_mingw32_libdir}/libcord.la
104 %{_mingw32_libdir}/libgc.la
105 %{_mingw32_libdir}/libgccpp.la
106 %{_mingw32_libdir}/pkgconfig/bdw-gc.pc
107 %{_mingw32_docdir}/%{name}-%{version}
108 %{_mingw32_includedir}/gc.h
109 %{_mingw32_includedir}/gc_cpp.h
110 %{_mingw32_includedir}/gc/
111
112
113 %changelog
114 * Fri Oct 24 2008 Richard W.M. Jones <rjones@redhat.com> - 7.1-1
115 - Initial RPM release.