From ea0e28f21db0424e38b19be2761fbec89600789d 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 XML Light --- .hgignore | 1 + .../mingw32-ocaml-xml-light-2.2-build.patch | 40 +++++++++++++ ocaml-xml-light/mingw32-ocaml-xml-light.spec | 70 ++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 ocaml-xml-light/mingw32-ocaml-xml-light-2.2-build.patch create mode 100644 ocaml-xml-light/mingw32-ocaml-xml-light.spec diff --git a/.hgignore b/.hgignore index 63c8b53..2d5aca2 100644 --- a/.hgignore +++ b/.hgignore @@ -88,6 +88,7 @@ ocaml-extlib/*.exe ocaml-extlib/*.cmi ocaml-extlib/*.cmx ocaml-extlib/*.o +ocaml-xml-light/xml-light-2.2.cvs20070817.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-xml-light/mingw32-ocaml-xml-light-2.2-build.patch b/ocaml-xml-light/mingw32-ocaml-xml-light-2.2-build.patch new file mode 100644 index 0000000..ab8bc3f --- /dev/null +++ b/ocaml-xml-light/mingw32-ocaml-xml-light-2.2-build.patch @@ -0,0 +1,40 @@ +--- Makefile.orig 2008-11-15 22:09:17.000000000 +0000 ++++ Makefile 2008-11-15 22:10:32.000000000 +0000 +@@ -2,7 +2,7 @@ + # http://tech.motion-twin.com + .SUFFIXES : .ml .mli .cmo .cmx .cmi .mll .mly + +-INSTALLDIR=`ocamlc -where` ++INSTALLDIR=`ocamlopt -where` + CFLAGS= + LFLAGS= -a + LIBS= +@@ -33,13 +33,13 @@ + ocamlc xml-light.cma test.ml -o test.exe + + test_opt.exe: xml-light.cmxa +- ocamlopt xml-light.cmxa test.ml -o test_opt.exe ++ i686-pc-mingw32-ocamlopt xml-light.cmxa test.ml -o test_opt.exe + + xml-light.cma: xml_parser.cmo xml_lexer.cmo dtd.cmo xmlParser.cmo xml.cmo + ocamlc -o xml-light.cma $(LFLAGS) $(LIBS) xml_parser.cmo xml_lexer.cmo dtd.cmo xmlParser.cmo xml.cmo + + xml-light.cmxa: xml_parser.cmx xml_lexer.cmx dtd.cmx xmlParser.cmx xml.cmx +- ocamlopt -o xml-light.cmxa $(LFLAGS) $(LIBS) xml_parser.cmx xml_lexer.cmx dtd.cmx xmlParser.cmx xml.cmx ++ i686-pc-mingw32-ocamlopt -o xml-light.cmxa $(LFLAGS) $(LIBS) xml_parser.cmx xml_lexer.cmx dtd.cmx xmlParser.cmx xml.cmx + + dtd.cmo: xml.cmi xml_lexer.cmi dtd.cmi + +@@ -84,10 +84,10 @@ + ocamlc $(CFLAGS) -c $< + + .ml.cmx: +- ocamlopt $(CFLAGS) -c $< ++ i686-pc-mingw32-ocamlopt $(CFLAGS) -c $< + + .mli.cmi: +- ocamlc $(CFLAGS) $< ++ i686-pc-mingw32-ocamlopt $(CFLAGS) $< + + .mll.ml: + ocamllex $< diff --git a/ocaml-xml-light/mingw32-ocaml-xml-light.spec b/ocaml-xml-light/mingw32-ocaml-xml-light.spec new file mode 100644 index 0000000..494600c --- /dev/null +++ b/ocaml-xml-light/mingw32-ocaml-xml-light.spec @@ -0,0 +1,70 @@ +%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-xml-light +Version: 2.2.cvs20070817 +Release: 1%{?dist} +Summary: MinGW Windows minimal XML parser and printer for OCaml + +License: LGPLv2+ +Group: Development/Libraries + +URL: http://tech.motion-twin.com/xmllight.html +Source0: xml-light-%{version}.tar.gz + +# Patches for MinGW: +Patch1000: mingw32-ocaml-xml-light-2.2-build.patch + +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 +Xml-Light is a minimal XML parser & printer for OCaml. It provides +functions to parse an XML document into an OCaml data structure, work +with it, and print it back to an XML document. It support also DTD +parsing and checking, and is entirely written in OCaml, hence it does +not require additional C library. + + +%prep +%setup -q -c -n %{name}-%{version} + +%patch1000 -p0 + + +%build +make opt +sed -e 's/@VERSION@/%{VERSION}/' < META.in > META + + +%install +rm -rf $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/xml-light + +install xml-light.cmxa xml-light.a *.mli *.cmi *.cmx \ + $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/xml-light +install META $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/xml-light + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%{_libdir}/%{_mingw32_target}-ocaml/xml-light/ + + +%changelog +* Sat Nov 15 2008 Richard W.M. Jones - 2.2cvs20070817-1 +- Initial RPM release. -- 1.8.3.1