From 21c601eba0d927c24ad2d746c7105b7f6d44859c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Added ocaml-extlib --- .hgignore | 1 + ocaml-extlib/mingw32-ocaml-extlib.spec | 87 ++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 ocaml-extlib/mingw32-ocaml-extlib.spec diff --git a/.hgignore b/.hgignore index 3b02a59..4f9dd21 100644 --- a/.hgignore +++ b/.hgignore @@ -80,6 +80,7 @@ ocaml/*.exe ocaml/*.cmi ocaml/*.cmx ocaml/*.o +ocaml-extlib/extlib-1.5.1.tar.gz openssl/openssl-0.9.8g-usa.tar.bz2 pango/pango-1.21.6.tar.bz2 pango/pango-1.22.1.tar.bz2 diff --git a/ocaml-extlib/mingw32-ocaml-extlib.spec b/ocaml-extlib/mingw32-ocaml-extlib.spec new file mode 100644 index 0000000..447b279 --- /dev/null +++ b/ocaml-extlib/mingw32-ocaml-extlib.spec @@ -0,0 +1,87 @@ +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw32_findrequires} +%define __find_provides %{_mingw32_findprovides} + +Name: mingw32-ocaml-extlib +Version: 1.5.1 +Release: 1%{?dist} +Summary: MinGW Windows port of OCaml ExtLib + +License: LGPLv2+ with exceptions +Group: Development/Libraries + +URL: http://code.google.com/p/ocaml-extlib/ +Source0: http://ocaml-extlib.googlecode.com/files/extlib-%{version}.tar.gz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +BuildRequires: mingw32-filesystem >= 35 +BuildRequires: mingw32-gcc +BuildRequires: mingw32-binutils +BuildRequires: mingw32-ocaml + + +%description +ExtLib is a project aiming at providing a complete - yet small - +standard library for the OCaml programming language. The purpose of +this library is to add new functions to OCaml Standard Library +modules, to modify some functions in order to get better performances +or more safety (tail-recursive) but also to provide new modules which +should be useful for the average OCaml programmer. + + +%prep +%setup -q -n extlib-%{version} + +# Files in the archive have spurious +x mode. +chmod 0644 * + +# and DOS line endings. +for f in *.ml *.mli README.txt LICENSE; do \ + %{__sed} -i 's/\r//' $f; +done + + +%build +# Extlib build system is on crack and unusable for cross-compiling. +# We ignore it completely and do the build steps by hand. This +# list of modules should match the list in 'install.ml'. +%define modules enum bitSet dynArray extArray extHashtbl extList extString global IO option pMap std uChar uTF8 base64 unzip refList optParse dllist + +i686-pc-mingw32-ocamlopt -c \ + $(for f in %{modules}; do echo $f.mli; done) +i686-pc-mingw32-ocamlopt -c \ + $(for f in %{modules}; do echo $f.ml; done) +i686-pc-mingw32-ocamlopt -a -o extLib.cmxa \ + $(for f in %{modules}; do echo $f.cmx; done) + + +%install +rm -rf $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/extlib + +install $(for f in %{modules}; do echo $f.mli $f.cmx $f.cmi; done) \ + $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/extlib +install extLib.cmxa extLib.a \ + $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/extlib +install META.txt \ + $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/extlib/META + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%{_libdir}/%{_mingw32_target}-ocaml/extlib + + +%changelog +* Sat Nov 15 2008 Richard W.M. Jones - 1.5.1-1 +- Initial RPM release. -- 1.8.3.1