add package ocaml-xml-light

This commit is contained in:
William 2012-12-13 15:37:59 +01:00
parent 25f1d75294
commit 893ee41daf
3 changed files with 138 additions and 0 deletions

View File

@ -1713,6 +1713,11 @@ USE_OSGPLUGIN(<plugin2>)
<td id="ocaml-lablgtk2-version">2.16.0</td>
<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>

View File

@ -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

32
src/ocaml-xml-light.mk Normal file
View File

@ -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