smock: substitute tab with 4 blanks for uniformity
[fedora-mingw.git] / darwinx-gcc / darwinx-gcc.spec
1 %define gcc_major 4
2 %define gcc_minor 2
3 %define apple_build 5566
4
5 Name:           darwinx-gcc
6 Version:        %{gcc_major}.%{gcc_minor}
7 Release:        0.%{apple_build}.1%{?dist}
8 Summary:        Darwin (Mac OS X) GCC cross-compiler
9
10 License:        GPLv2+
11 Group:          Development/Libraries
12
13 URL:            http://www.opensource.apple.com/darwinsource/
14 Source0:        http://www.opensource.apple.com/darwinsource/tarballs/other/gcc_%{gcc_major}%{gcc_minor}-%{apple_build}.tar.gz
15
16 Patch0:         darwinx-gcc-42-dlfcn.patch
17
18 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19 BuildArch:      noarch
20
21 BuildRequires:  darwinx-filesystem >= 1
22 BuildRequires:  darwinx-odcctools
23 BuildRequires:  darwinx-headers
24
25
26 %description
27 This is a GCC-based cross-compiler which creates Darwin (Mac OS X)
28 programs.  This is a port of Apple's GCC %{gcc_major}.%{gcc_minor} from Xcode
29 (build %{apple_build}).
30
31
32 %prep
33 %setup -q -n gcc_%{gcc_major}%{gcc_minor}-%{apple_build}
34
35 %patch0 -p1
36
37
38 %build
39
40 languages="c,c++,objc,obj-c++"
41
42 for arch in powerpc i386; do
43   mkdir build-$arch
44   pushd build-$arch
45
46   CC="%{__cc} ${RPM_OPT_FLAGS}" \
47   ../configure \
48     --prefix=%{_prefix} \
49     --bindir=%{_bindir} \
50     --includedir=%{_includedir} \
51     --libdir=%{_libdir} \
52     --mandir=%{_mandir} \
53     --infodir=%{_infodir} \
54     --datadir=%{_datadir} \
55     --build=%_build --host=%_host \
56     --target=$arch-apple-darwin8 \
57     --verbose \
58     --without-newlib \
59     --disable-multilib \
60     --with-system-zlib \
61     --disable-nls --without-included-gettext \
62     --disable-win32-registry \
63     --enable-languages="$languages" $optargs
64
65 #    --with-sysroot=%{_prefix}/$arch-apple-darwin8
66
67 #  make %{?_smp_mflags} configure-host maybe-all-gcc
68 #  pushd gcc
69 #  make cc1objplus
70 #  popd
71   make %{?_smp_mflags}
72
73   popd
74 done
75
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 # This is crap ...  Should just do 'make install'.
81 for arch in powerpc i386; do
82   for d in libiberty gcc; do
83     pushd build-$arch/$d
84     #mkdir -p $RPM_BUILD_ROOT%{_libdir}/gcc/$arch-apple-darwin8/%{version}/install-tools/include
85     make install DESTDIR=$RPM_BUILD_ROOT
86     popd
87   done
88 done
89
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94
95 %files
96 %defattr(-,root,root)
97 %doc LICENSE
98 %{_mingw32_bindir}/foo.dll
99 %{_mingw32_libdir}/foo.dll.a
100 # etc.
101
102
103 %changelog
104 * Sun Feb 15 2009 Richard W.M. Jones <rjones@redhat.com> - 4.2-0.5566.1
105 - Initial RPM release.
106
107 * Mon Jan 08 2007 Benjamin Reed <rangerrick@befunk.com> - 1:4.0.1-5363.1
108 - updated to xcode 2.4 GCC
109
110 * Tue Mar 28 2006 Benjamin Reed <rangerrick@befunk.com> - 1:4.0.1-5250.1
111 - initial release as a per-version package