X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=ocaml%2Fmingw32-ocaml.spec;h=1cf78745466033cb9811921305d29535ab124301;hb=e40fc6b6d65ae3bbdd712161f19d00d3c2e35fd5;hp=1f64c740f1e077da685118a12298d457867cba16;hpb=241c77b05e84e8576f7fc834e83206118b77fbbe;p=fedora-mingw.git diff --git a/ocaml/mingw32-ocaml.spec b/ocaml/mingw32-ocaml.spec index 1f64c74..1cf7874 100644 --- a/ocaml/mingw32-ocaml.spec +++ b/ocaml/mingw32-ocaml.spec @@ -1,10 +1,6 @@ -#%define __strip %{_mingw32_strip} -#%define __objdump %{_mingw32_objdump} -%define __strip : -%define __objdump : -%define _use_internal_dependency_generator 0 -%define __find_requires %{_mingw32_findrequires} -%define __find_provides %{_mingw32_findprovides} +# Built-in strip corrupts binaries, so use the mingw32 strip instead: +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} %define debug_package %{nil} @@ -12,7 +8,7 @@ Name: mingw32-ocaml Version: 3.11.0+beta1 -Release: 9%{?dist} +Release: 14%{?dist} Summary: Objective Caml MinGW cross-compiler and programming environment License: QPL and (LGPLv2+ with exceptions) @@ -23,6 +19,7 @@ Source0: http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-%{version}.tar # This is installed as config/Makefile when we cross-compile. Source1000: Makefile-fedora-mingw.in +Source1001: README.Fedora # XXX We should apply any Fedora native patches here. @@ -38,6 +35,10 @@ Patch1006: mingw32-ocaml-3.11.0+beta1-win32unix-path.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Is it noarch? (XXX) +# Answer: yes and no. In theory it should be, but because we install +# Windows binaries in %{_libdir}, the path is different if built on +# 32 and 64 bit platforms. We should probably install the binaries +# in /usr/share. BuildArch: noarch BuildRequires: mingw32-filesystem >= 30 @@ -45,6 +46,9 @@ BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils BuildRequires: mingw32-flexdll +# These are required so we can use gcc -m32 and link to 32 bit X11: +BuildRequires: /lib/libgcc_s.so.1 +BuildRequires: /usr/lib/crt1.o BuildRequires: /usr/lib/libX11.so # While we still ship bytecode, this requires a /usr/bin/ocamlrun from @@ -99,7 +103,7 @@ ulimit -s unlimited -bindir %{_bindir} \ -libdir %{_libdir}/ocaml \ -mandir %{_mandir}/man1 \ - -cc "gcc -m32" -host i386-pc-linux -x11lib /usr/lib + -cc "gcc -m32" -host i386-pc-linux -x11lib /usr/lib -verbose make world # Now move the working ocamlrun, ocamlc into the boot/ directory, @@ -155,6 +159,8 @@ make -C tools ocamlmklib # Build ocamlopt make opt +cp %{SOURCE1001} . + %install rm -rf $RPM_BUILD_ROOT @@ -208,6 +214,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) +%doc README.Fedora %{_bindir}/%{_mingw32_target}-ocamlc %{_bindir}/%{_mingw32_target}-ocamlcp %{_bindir}/%{_mingw32_target}-ocamldep @@ -220,11 +227,18 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Sun Nov 16 2008 Richard W.M. Jones - 3.11.0+beta1-9 +* Mon Nov 17 2008 Richard W.M. Jones - 3.11.0+beta1-14 +- Added README.Fedora. + +* Sun Nov 16 2008 Richard W.M. Jones - 3.11.0+beta1-13 - Build the native compiler as 32 bits even on a 64 bit build architecture (because the target, Windows, is 32 bit). The compiler does strength reduction and other optimizations internally so we must ensure it uses the same int type. +- Requires libX11-devel.i386 and libgcc.i386. +- Allow the normal dependency generators to run because this + is a native package. +- Use mingw32 strip to avoid corrupting binaries. * Sun Nov 16 2008 Richard W.M. Jones - 3.11.0+beta1-8 - Install ocamlc.