diff options
author | William <r.3@libertysurf.fr> | 2012-12-13 14:37:59 (GMT) |
---|---|---|
committer | William <r.3@libertysurf.fr> | 2012-12-13 14:56:18 (GMT) |
commit | 893ee41daf3467582f3342423631e4ad89950771 (patch) | |
tree | 9d1388ee952a41cd80319ed72d2c57a06d959ba2 | |
parent | 25f1d752940b4ea5b4b5b103fb6b58a117d22e13 (diff) | |
download | mxe-893ee41daf3467582f3342423631e4ad89950771.zip mxe-893ee41daf3467582f3342423631e4ad89950771.tar.gz mxe-893ee41daf3467582f3342423631e4ad89950771.tar.bz2 |
add package ocaml-xml-light
-rw-r--r-- | index.html | 5 | ||||
-rw-r--r-- | src/ocaml-xml-light-1-fixes.patch | 101 | ||||
-rw-r--r-- | src/ocaml-xml-light.mk | 32 |
3 files changed, 138 insertions, 0 deletions
@@ -1714,6 +1714,11 @@ USE_OSGPLUGIN(<plugin2>) <td id="ocaml-lablgtk2-website"><a href="http://forge.ocamlcore.org/">lablgtk2</a></td> </tr> <tr> + <td id="ocaml-xml-light-package">xml-light</td> + <td id="ocaml-xml-light-version">2.2</td> + <td id="ocaml-xml-light-website"><a href="http://tech.motion-twin.com/xmllight/">xml-light</a></td> + </tr> + <tr> <td id="ogg-package">ogg</td> <td id="ogg-version">1.3.0</td> <td id="ogg-website"><a href="http://www.xiph.org/ogg/">OGG</a></td> diff --git a/src/ocaml-xml-light-1-fixes.patch b/src/ocaml-xml-light-1-fixes.patch new file mode 100644 index 0000000..f9a7b33 --- /dev/null +++ b/src/ocaml-xml-light-1-fixes.patch @@ -0,0 +1,101 @@ +This file is part of MXE. +See index.html for further information. + +Contains ad hoc patches for cross building. + +From 8f7239bcdd0f1c3879d548ddfb34c8befa70c9fb Mon Sep 17 00:00:00 2001 +From: MXE +Date: Fri, 11 May 2012 00:50:32 +0200 +Subject: [PATCH 1/2] allows use of ocaml tools for cross-compilation + + +diff --git a/Makefile b/Makefile +index c978890..5c15ace 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,11 @@ + # Makefile generated by OCamake
+ # http://tech.motion-twin.com
+ .SUFFIXES : .ml .mli .cmo .cmx .cmi .mll .mly
++OCAMLC=@target@-ocamlc
++OCAMLOPT=@target@-ocamlopt
+
+-INSTALLDIR=`ocamlc -where`
++
++INSTALLDIR=@installdir@
+ CFLAGS=
+ LFLAGS= -a
+ LIBS=
+@@ -19,16 +22,16 @@ doc: + ocamldoc -sort -html -d doc xml.mli dtd.mli xmlParser.mli
+
+ test.exe: xml-light.cma
+- ocamlc xml-light.cma test.ml -o test.exe
+-
++ $(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
++ $(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
++ $(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
++ $(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
+
+@@ -68,13 +71,13 @@ wclean: +
+ # SUFFIXES
+ .ml.cmo:
+- ocamlc $(CFLAGS) -c $<
++ $(OCAMLC) $(CFLAGS) -c $<
+
+ .ml.cmx:
+- ocamlopt $(CFLAGS) -c $<
++ $(OCAMLOPT) $(CFLAGS) -c $<
+
+ .mli.cmi:
+- ocamlc $(CFLAGS) $<
++ $(OCAMLC) $(CFLAGS) $<
+
+ .mll.ml:
+ ocamllex $<
+-- +1.7.9.5 + + +From 4ec44e9cba7be6abfe9c121b753f8d6bd5b3ee8b Mon Sep 17 00:00:00 2001 +From: MXE +Date: Sun, 30 Sep 2012 21:38:52 +0200 +Subject: [PATCH 2/2] use prefixed ocamldoc + + +diff --git a/Makefile b/Makefile +index 5c15ace..0e60588 100644 +--- a/Makefile ++++ b/Makefile +@@ -3,6 +3,7 @@ + .SUFFIXES : .ml .mli .cmo .cmx .cmi .mll .mly
+ OCAMLC=@target@-ocamlc
+ OCAMLOPT=@target@-ocamlopt
++OCAMLDOC=@target@-ocamldoc
+
+
+ INSTALLDIR=@installdir@
+@@ -19,7 +20,7 @@ install: all opt +
+ doc:
+ mkdir doc
+- ocamldoc -sort -html -d doc xml.mli dtd.mli xmlParser.mli
++ $(OCAMLDOC) -sort -html -d doc xml.mli dtd.mli xmlParser.mli
+
+ test.exe: xml-light.cma
+ $(OCAMLC) xml-light.cma test.ml -o test.exe
+-- +1.7.9.5 + diff --git a/src/ocaml-xml-light.mk b/src/ocaml-xml-light.mk new file mode 100644 index 0000000..5951ba9 --- /dev/null +++ b/src/ocaml-xml-light.mk @@ -0,0 +1,32 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +PKG := ocaml-xml-light +$(PKG)_IGNORE := +$(PKG)_CHECKSUM := e524aa20c34bf45a839363b61bb2cbbf8fcdc6bc +$(PKG)_SUBDIR := xml-light +$(PKG)_FILE := xml-light-$($(PKG)_VERSION).zip +$(PKG)_URL := http://tech.motion-twin.com/zip/$($(PKG)_FILE) +$(PKG)_DEPS := ocaml-findlib + +define $(PKG)_UPDATE + wget -q -O- 'http://tech.motion-twin.com/xmllight' | \ + $(SED) -n 's,.*xml-light-\(.*\)\.zip.*,\1,ip' | \ + head -1 +endef + +define $(PKG)_BUILD + $(SED) -i "s,@target@,$(TARGET),g" '$(1)/Makefile' + $(SED) -i 's/ocamllex/$(TARGET)-ocamllex/g' '$(1)/Makefile' + $(SED) -i "s,@installdir@,$(PREFIX)/$(TARGET)/lib/ocaml/xml-light,g" $(1)/Makefile + $(MAKE) -C '$(1)' xml_parser.ml + $(MAKE) -C '$(1)' -j '$(JOBS)' # without seperated previous step, does not work + mkdir -p $(PREFIX)/$(TARGET)/lib/ocaml/xml-light + # install.. + $(MAKE) -C '$(1)' -j '$(JOBS)' install + (echo 'version="$($(PKG)_VERSION)"'; \ + echo 'directory="+xml-light"'; \ + echo 'archive(byte) = "xml-light.cma"'; \ + echo 'archive(native) = "xml-light.cmxa"') \ + > $(PREFIX)/$(TARGET)/lib/ocaml/xml-light/META +endef |