X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=ocaml%2Fmingw32-ocaml.spec;h=4f4b42f58bcf67d9caa7cb66a24a31127beb0f50;hb=879f74f5c909811e58a49c17db989ea0c65a7130;hp=5df8d0c7304254b1b9b54bafef8dcfb46292a809;hpb=1961efbf933f1e50a2b386c3668097b7a79be157;p=fedora-mingw.git diff --git a/ocaml/mingw32-ocaml.spec b/ocaml/mingw32-ocaml.spec index 5df8d0c..4f4b42f 100644 --- a/ocaml/mingw32-ocaml.spec +++ b/ocaml/mingw32-ocaml.spec @@ -10,7 +10,7 @@ Name: mingw32-ocaml Version: 3.11.0+beta1 -Release: 4%{?dist} +Release: 7%{?dist} Summary: Objective Caml MinGW cross-compiler and programming environment License: QPL and (LGPLv2+ with exceptions) @@ -48,6 +48,16 @@ BuildRequires: mingw32-flexdll # which is why this is commented out. #Requires: ocaml-runtime = %{version} +# The built program will try to run the cross-compiler and flexdll, so +# these must be runtime requires. +Requires: mingw32-gcc +Requires: mingw32-binutils +Requires: mingw32-flexdll + +# i686-pc-mingw32-ocamlmklib tries to run ocamlopt which is probably a +# bug, but requires this (XXX). +Requires: ocaml + %description Objective Caml is a high-level, strongly-typed, functional and @@ -70,6 +80,9 @@ and produces Windows native executables. %build +# Don't run out of memory. +ulimit -s unlimited + # Build native ocamlrun and ocamlc which contain the filename-win32-dirsep # patch. ./configure \ @@ -151,20 +164,30 @@ make %{makevars} -C stdlib install for i in %{otherlibraries}; do make %{makevars} -C otherlibs/$i install done +make %{makevars} -C tools install make %{makevars} installopt cp config/Makefile \ $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/Makefile.config -# Rename the binaries so they don't clash with base OCaml package. -mv $RPM_BUILD_ROOT%{_bindir}/ocamlrun \ - $RPM_BUILD_ROOT%{_bindir}/%{_mingw32_target}-ocamlrun -echo '#!%{_bindir}/%{_mingw32_target}-ocamlrun' \ - > $RPM_BUILD_ROOT%{_bindir}/%{_mingw32_target}-ocamlopt -tail -n +2 $RPM_BUILD_ROOT%{_bindir}/ocamlopt \ - >> $RPM_BUILD_ROOT%{_bindir}/%{_mingw32_target}-ocamlopt -chmod 0755 $RPM_BUILD_ROOT%{_bindir}/%{_mingw32_target}-ocamlopt -rm $RPM_BUILD_ROOT%{_bindir}/ocamlopt +# For bytecode binaries, change the bang-path to point to the locally +# installed ocamlrun. +pushd $RPM_BUILD_ROOT%{_bindir} +for f in 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 ocamlcp ocamldep ocamlmklib ocamlmktop ocamlopt ocamlprof ocamlrun; do + mv $f %{_mingw32_target}-$f +done +popd %clean @@ -173,11 +196,25 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%{_bindir}/%{_mingw32_target}-ocamlrun +%{_bindir}/%{_mingw32_target}-ocamlcp +%{_bindir}/%{_mingw32_target}-ocamldep +%{_bindir}/%{_mingw32_target}-ocamlmklib +%{_bindir}/%{_mingw32_target}-ocamlmktop +%{_bindir}/%{_mingw32_target}-ocamlprof %{_bindir}/%{_mingw32_target}-ocamlopt +%{_bindir}/%{_mingw32_target}-ocamlrun %{_libdir}/%{_mingw32_target}-ocaml/ %changelog +* Sat Nov 15 2008 Richard W.M. Jones - 3.11.0+beta1-7 +- Further requirements. + +* Sat Nov 15 2008 Richard W.M. Jones - 3.11.0+beta1-6 +- Install tools, particularly ocamlmklib. + +* Sat Nov 15 2008 Richard W.M. Jones - 3.11.0+beta1-5 +- +Requires mingw32-flexdll and the cross-compiler. + * Sat Nov 15 2008 Richard W.M. Jones - 3.11.0+beta1-4 - Initial RPM release.