X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=ocaml%2Fmingw32-ocaml.spec;h=e2e93d7180dc6cc844c3123a96db852938461f7c;hb=e3e47afc4b3fd9505c83bff0710a5f907bfc0a3d;hp=fdde5345f29139f6ae045eab5d64b70b4eb65c34;hpb=d786460d6cc1861cbb55f2ccde1d41ac610196cb;p=fedora-mingw.git diff --git a/ocaml/mingw32-ocaml.spec b/ocaml/mingw32-ocaml.spec index fdde534..e2e93d7 100644 --- a/ocaml/mingw32-ocaml.spec +++ b/ocaml/mingw32-ocaml.spec @@ -1,20 +1,25 @@ +# Built-in strip corrupts binaries, so use the mingw32 strip instead: +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} + %define debug_package %{nil} %define otherlibraries win32unix str num dynlink bigarray systhreads win32graph Name: mingw32-ocaml -Version: 3.11.0+beta1 -Release: 12%{?dist} +Version: 3.11.0 +Release: 0.16.beta1%{?dist} Summary: Objective Caml MinGW cross-compiler and programming environment License: QPL and (LGPLv2+ with exceptions) Group: Development/Libraries URL: http://caml.inria.fr/ -Source0: http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-%{version}.tar.bz2 +Source0: http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-%{version}+beta1.tar.bz2 # 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. @@ -46,10 +51,16 @@ 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 -# the _identical_ native package. We don't have that at the moment, -# which is why this is commented out. -#Requires: ocaml-runtime = %{version} +# We need the native Fedora OCaml package (of the precise matching +# version) for several reasons: +# (a) We need /usr/bin/ocamlrun (the bytecode interpreter) in order +# to run our bytecodes such as i686-pc-mingw32-ocamlopt. Eventually +# shipping native versions of the cross-compiler binaries should +# resolve this. +# (b) We need camlp4 preprocessor, and because of the way this works +# it has to be the camlp4 from the identical version. +Requires: ocaml-runtime = %{version} +Requires: ocaml-camlp4-devel = %{version} # The built program will try to run the cross-compiler and flexdll, so # these must be runtime requires. @@ -71,7 +82,7 @@ and produces Windows native executables. %prep -%setup -q -n ocaml-%{version} +%setup -q -n ocaml-%{version}+beta1 %patch1000 -p1 %patch1001 -p1 @@ -154,6 +165,8 @@ make -C tools ocamlmklib # Build ocamlopt make opt +cp %{SOURCE1001} . + %install rm -rf $RPM_BUILD_ROOT @@ -181,25 +194,16 @@ install -m 0755 ocamlc $RPM_BUILD_ROOT%{_bindir} cp config/Makefile \ $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/Makefile.config -# For bytecode binaries, change the bang-path to point to the locally -# installed ocamlrun. -pushd $RPM_BUILD_ROOT%{_bindir} -for f in ocamlc ocamlcp ocamldep ocamlmklib ocamlopt ocamlprof; do - mv $f $f.old - echo '#!%{_bindir}/%{_mingw32_target}-ocamlrun' > $f - tail -n +2 $f.old >> $f - chmod +x $f - rm $f.old -done -popd - # Rename all the binaries to target-binary. pushd $RPM_BUILD_ROOT%{_bindir} -for f in ocamlc ocamlcp ocamldep ocamlmklib ocamlmktop ocamlopt ocamlprof ocamlrun; do +for f in ocamlc ocamlcp ocamldep ocamlmklib ocamlmktop ocamlopt ocamlprof; do mv $f %{_mingw32_target}-$f done popd +# Don't install ocamlrun, use native one. +rm $RPM_BUILD_ROOT%{_bindir}/ocamlrun + %clean rm -rf $RPM_BUILD_ROOT @@ -207,6 +211,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 @@ -214,12 +219,26 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/%{_mingw32_target}-ocamlmktop %{_bindir}/%{_mingw32_target}-ocamlprof %{_bindir}/%{_mingw32_target}-ocamlopt -%{_bindir}/%{_mingw32_target}-ocamlrun %{_libdir}/%{_mingw32_target}-ocaml/ %changelog -* Sun Nov 16 2008 Richard W.M. Jones - 3.11.0+beta1-12 +* Fri Feb 20 2009 Richard W.M. Jones - 3.11.0-0.16.beta1 +- Rebuild for mingw32-gcc 4.4 + +* Sun Nov 23 2008 Richard W.M. Jones - 3.11.0-0.15.beta1 +- Use the proper package naming convention, since '+' etc shouldn't be + in the name, as per Fedora packaging guidelines. Note that this won't + upgrade smoothly, but we don't care because these packages aren't + officially released yet. You'll just have to uninstall the old + package and install the new one. +- Don't ship our own ocamlrun, use the native one instead. +- Require camlp4 utilities. + +* 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 @@ -227,6 +246,7 @@ rm -rf $RPM_BUILD_ROOT - 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.