1 # Note about the source for these tools:
3 # Apple distributes a set of tools called cctools under the APSL2.0
4 # license. You can get it from
5 # http://www.opensource.apple.com/darwinsource/Current/
6 # but you will need an Apple ID (although it's still open source).
8 # These are the OpenDarwin odcctools, which are an enhanced version of
9 # an older version of cctools.
11 # OpenDarwin is dead. It was replaced first by DarwinPorts, which has
12 # not released anything for more than two years.
14 # There are various other potential upstreams for these tools. Most
15 # promising is: http://code.google.com/p/iphone-dev/
17 # odcctools version based on cctools source
18 # -----------------------------------------------------------
19 # 20060413 590.36 OpenDarwin (dead)
21 # 20070629 ? Shipped by Gentoo
22 # up to 2008 622.3 or 667.8.0 Google code: iphone-dev
24 # odcctools DOES NOT compile on 64 bit platforms. The code contains
25 # fundamental 32 bit assumptions, for example that the return value
26 # from calloc can fit into a 32 bit integer. Therefore on 64 bit
27 # platforms we have to compile with 'gcc -m32'.
29 %define odcc_version 590.36
30 %define odcc_stamp 20060413
32 Name: darwinx-odcctools
33 Version: %{odcc_version}
34 Release: 0.%{odcc_stamp}.6%{?dist}
35 Summary: Darwin (Mac OS X) cross-compiler tools
38 Group: Development/Libraries
40 URL: http://odcctools.darwinports.com/
41 Source0: odcctools-%{odcc_stamp}.tar.bz2
43 Patch1: odcctools-headers.patch
44 Patch2: odcctools-ofile.patch
46 # These two patches were an attempt to get the code to compile
47 # on 64 bit architectures. However the 32 bit assumptions in the
48 # code run much deeper than this.
49 #Patch3: odcctools-lp64.patch
50 #Patch4: odcctools-x86-64.patch
52 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
54 BuildRequires: darwinx-filesystem >= 1
56 BuildRequires: elfutils, kernel-headers, libstdc++-devel
58 # Temporary hack for smock on x86_64.
59 BuildRequires: /usr/include/gnu/stubs-32.h
60 BuildRequires: /usr/lib/gcc/i586-redhat-linux
62 Requires: darwinx-filesystem >= 1
66 The odcctools project is geared towards improving the Darwin
67 cctools build system and code base to support Darwin development.
71 %setup -q -n odcctools-%{odcc_stamp}
81 for arch in powerpc i386; do
85 #%if %{__isa_bits} 64 <-- how to write this with RPM? XXX
86 CFLAGS="-m32" LDFLAGS="-m32" \
88 --target=$arch-apple-darwin8 \
91 --datadir=%{_datadir} \
93 --libexecdir=%{_libexecdir}
101 rm -rf $RPM_BUILD_ROOT
103 for arch in powerpc i386; do
104 make -C build-$arch DESTDIR=$RPM_BUILD_ROOT install
107 # Rename the manual pages so they don't conflict with the
108 # ones for the native tools.
109 for f in $RPM_BUILD_ROOT%{_mandir}/*/*; do
110 d=$(dirname $f); b=$(basename $f)
111 mv $f $d/i386-apple-darwin8-$b
112 ln $d/i386-apple-darwin8-$b $d/powerpc-apple-darwin8-$b
117 rm -rf $RPM_BUILD_ROOT
121 %defattr(-,root,root)
123 %{_bindir}/i386-apple-darwin8-*
124 %{_bindir}/powerpc-apple-darwin8-*
125 %{_includedir}/mach-o/
127 %{_libdir}/libmacho.a
128 %{_mandir}/man1/i386-apple-darwin8-*.1*
129 %{_mandir}/man1/powerpc-apple-darwin8-*.1*
130 %{_mandir}/man3/i386-apple-darwin8-*.3*
131 %{_mandir}/man3/powerpc-apple-darwin8-*.3*
132 %{_mandir}/man5/i386-apple-darwin8-*.5*
133 %{_mandir}/man5/powerpc-apple-darwin8-*.5*
137 * Sat Feb 21 2009 Richard W.M. Jones <rjones@redhat.com> - 590.36-0.20060413.6
138 - Fedora Rawhide now uses 'i586' as arch for 32-bit gcc.
140 * Sun Feb 15 2009 Richard W.M. Jones <rjones@redhat.com> - 590.36-0.20060413.5
141 - Build as a 32 bit binary.
142 - Add note about upstream versions.
144 * Sun Feb 8 2009 Richard W.M. Jones <rjones@redhat.com> - 590.36-0.20060413.4
145 - Initial RPM release for Fedora.
147 * Tue Mar 28 2006 Benjamin Reed <rangerrick@befunk.com> - 590.36-1
148 - fixed build to just use srcdir != builddir, changed to 10.3/10.4-specific
150 * Sun Feb 26 2006 Benjamin Reed <rangerrick@befunk.com> - 590.23.2od12-1