Skip to content

Commit

Permalink
Merge pull request #7934 from camlunity/termux-pr
Browse files Browse the repository at this point in the history
Termux patches
  • Loading branch information
avsm committed Jan 4, 2017
2 parents 5d29ce2 + 65a22ae commit d1b73d1
Show file tree
Hide file tree
Showing 16 changed files with 280 additions and 0 deletions.
16 changes: 16 additions & 0 deletions compilers/4.02.3/4.02.3+termux/4.02.3+termux.comp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
opam-version: "1"
version: "4.02.3"
src: "http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02.3.tar.gz"
build: [
["sh" "./configure" "-prefix" prefix "-with-debug-runtime"]
[make "world.opt"]
[make "install"]
]
patches: [ "http://ygrek.org.ua/files/ocaml-4.02.3+termux.patch" ]
packages: [
"base-unix"
"base-bigarray"
"base-threads"
"base-ocamlbuild"
]
env: [[CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"]]
1 change: 1 addition & 0 deletions compilers/4.02.3/4.02.3+termux/4.02.3+termux.descr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Official 4.02.3 release + termux patch
18 changes: 18 additions & 0 deletions compilers/4.03.0/4.03.0+termux/4.03.0+termux.comp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
opam-version: "1"
version: "4.03.0"
src: "https://github.com/ocaml/ocaml/archive/4.03.0.tar.gz"
build: [
["mkdir" "-p" "%{lib}%/ocaml/"]
["sh" "-exc" "echo \"* : g = 1\" > %{lib}%/ocaml/ocaml_compiler_internal_params"]
["sh" "./configure" "-prefix" prefix "-with-debug-runtime"]
[make "world"]
[make "world.opt"]
[make "install"]
]
patches: [ "http://ygrek.org.ua/files/ocaml-4.03.0+termux.patch" ]
packages: [
"base-unix"
"base-bigarray"
"base-threads"
]
env: [[CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"]]
2 changes: 2 additions & 0 deletions compilers/4.03.0/4.03.0+termux/4.03.0+termux.descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Official 4.03.0 release + termux patch

18 changes: 18 additions & 0 deletions compilers/4.04.0/4.04.0+termux/4.04.0+termux.comp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
opam-version: "1"
version: "4.04.0"
src: "https://github.com/ocaml/ocaml/archive/4.04.0.tar.gz"
build: [
["mkdir" "-p" "%{lib}%/ocaml/"]
["sh" "-exc" "echo \"* : g = 1\" > %{lib}%/ocaml/ocaml_compiler_internal_params"]
["sh" "./configure" "-prefix" prefix "-with-debug-runtime"]
[make "world"]
[make "world.opt"]
[make "install"]
]
patches: [ "http://ygrek.org.ua/files/ocaml-4.04.0+termux.patch" ]
packages: [
"base-unix"
"base-bigarray"
"base-threads"
]
env: [[CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"]]
1 change: 1 addition & 0 deletions compilers/4.04.0/4.04.0+termux/4.04.0+termux.descr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Official 4.04.0 release + termux patch
40 changes: 40 additions & 0 deletions packages/camlp4/camlp4.4.02+7/files/termux.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/Makefile b/Makefile
index 1210145..b9225f6 100644
--- a/Makefile
+++ b/Makefile
@@ -10,18 +10,18 @@ default: byte

.PHONY: byte
byte:
- $(OB) `./build/camlp4-byte-only.sh`
+ $(OB) `sh ./build/camlp4-byte-only.sh`

.PHONY: native
native:
- $(OB) `./build/camlp4-native-only.sh`
+ $(OB) `sh ./build/camlp4-native-only.sh`

.PHONY: all
all: byte native

.PHONY: install
install:
- env DESTDIR=$(DESTDIR) ./build/install.sh
+ env DESTDIR=$(DESTDIR) sh ./build/install.sh

.PHONY: install-META
install-META: camlp4/META
@@ -33,11 +33,11 @@ camlp4/META: camlp4/META.in

.PHONY: bootstrap
bootstrap:
- ./build/camlp4-bootstrap.sh
+ sh ./build/camlp4-bootstrap.sh

.PHONY: Camlp4Ast
Camlp4Ast:
- ./build/camlp4-mkCamlp4Ast.sh
+ sh ./build/camlp4-mkCamlp4Ast.sh

.PHONY: clean
clean:
1 change: 1 addition & 0 deletions packages/camlp4/camlp4.4.02+7/opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ remove: [
"%{bin}%/camlp4o.opt" "%{bin}%/camlp4oof.opt" "%{bin}%/camlp4r.opt"
]
]
patches: [ "termux.patch" ]
available: [ (!preinstalled) & (ocaml-version >= "4.02") & (ocaml-version < "4.03") ]
bug-reports: "https://github.com/ocaml/camlp4/issues"
dev-repo: "https://github.com/ocaml/camlp4.git"
40 changes: 40 additions & 0 deletions packages/camlp4/camlp4.4.03+1/files/termux.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/Makefile b/Makefile
index 1210145..b9225f6 100644
--- a/Makefile
+++ b/Makefile
@@ -10,18 +10,18 @@ default: byte

.PHONY: byte
byte:
- $(OB) `./build/camlp4-byte-only.sh`
+ $(OB) `sh ./build/camlp4-byte-only.sh`

.PHONY: native
native:
- $(OB) `./build/camlp4-native-only.sh`
+ $(OB) `sh ./build/camlp4-native-only.sh`

.PHONY: all
all: byte native

.PHONY: install
install:
- env DESTDIR=$(DESTDIR) ./build/install.sh
+ env DESTDIR=$(DESTDIR) sh ./build/install.sh

.PHONY: install-META
install-META: camlp4/META
@@ -33,11 +33,11 @@ camlp4/META: camlp4/META.in

.PHONY: bootstrap
bootstrap:
- ./build/camlp4-bootstrap.sh
+ sh ./build/camlp4-bootstrap.sh

.PHONY: Camlp4Ast
Camlp4Ast:
- ./build/camlp4-mkCamlp4Ast.sh
+ sh ./build/camlp4-mkCamlp4Ast.sh

.PHONY: clean
clean:
1 change: 1 addition & 0 deletions packages/camlp4/camlp4.4.03+1/opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ remove: [
"%{bin}%/camlp4o.opt" "%{bin}%/camlp4oof.opt" "%{bin}%/camlp4r.opt"
]
]
patches: [ "termux.patch" ]
available: [ (!preinstalled) & (ocaml-version >= "4.03") & (ocaml-version < "4.04") ]
bug-reports: "https://github.com/ocaml/camlp4/issues"
dev-repo: "https://github.com/ocaml/camlp4.git"
40 changes: 40 additions & 0 deletions packages/camlp4/camlp4.4.04+1/files/termux.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/Makefile b/Makefile
index 1210145..b9225f6 100644
--- a/Makefile
+++ b/Makefile
@@ -10,18 +10,18 @@ default: byte

.PHONY: byte
byte:
- $(OB) `./build/camlp4-byte-only.sh`
+ $(OB) `sh ./build/camlp4-byte-only.sh`

.PHONY: native
native:
- $(OB) `./build/camlp4-native-only.sh`
+ $(OB) `sh ./build/camlp4-native-only.sh`

.PHONY: all
all: byte native

.PHONY: install
install:
- env DESTDIR=$(DESTDIR) ./build/install.sh
+ env DESTDIR=$(DESTDIR) sh ./build/install.sh

.PHONY: install-META
install-META: camlp4/META
@@ -33,11 +33,11 @@ camlp4/META: camlp4/META.in

.PHONY: bootstrap
bootstrap:
- ./build/camlp4-bootstrap.sh
+ sh ./build/camlp4-bootstrap.sh

.PHONY: Camlp4Ast
Camlp4Ast:
- ./build/camlp4-mkCamlp4Ast.sh
+ sh ./build/camlp4-mkCamlp4Ast.sh

.PHONY: clean
clean:
2 changes: 2 additions & 0 deletions packages/camlp4/camlp4.4.04+1/opam
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ remove: [
"%{bin}%/camlp4o" "%{bin}%/camlp4of" "%{bin}%/camlp4oof"
"%{bin}%/camlp4prof"]
]

patches: [ "termux.patch" ]
available: [ (!preinstalled) & (ocaml-version >= "4.04") & (ocaml-version < "4.05") ]
bug-reports: "https://github.com/ocaml/camlp4/issues"
dev-repo: "https://github.com/ocaml/camlp4.git"
46 changes: 46 additions & 0 deletions packages/ocamlfind/ocamlfind.1.6.2/files/termux.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
diff --git a/Makefile b/Makefile
index bf3aabb..efc5b94 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@ findlib.conf: findlib.conf.in
USE_CYGPATH="$(USE_CYGPATH)"; \
export USE_CYGPATH; \
cat findlib.conf.in | \
- tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf
+ sh tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf
if ocamlc.opt >/dev/null 2>&1; then \
echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \
fi
diff --git a/src/findlib/Makefile b/src/findlib/Makefile
index 70dc74c..dcfc901 100644
--- a/src/findlib/Makefile
+++ b/src/findlib/Makefile
@@ -79,8 +79,8 @@ findlib_config.ml: findlib_config.mlp $(TOP)/Makefile.config
USE_CYGPATH="$(USE_CYGPATH)"; \
export USE_CYGPATH; \
cat findlib_config.mlp | \
- $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \
- $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \
+ sh $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \
+ sh $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \
sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \
-e 's;@SYSTEM@;$(SYSTEM);g' \
>findlib_config.ml
@@ -100,7 +100,7 @@ topfind: topfind_rd$(OCAML_REMOVE_DIRECTORY).p
USE_CYGPATH="$(USE_CYGPATH)"; \
export USE_CYGPATH; \
cat topfind_rd$(OCAML_REMOVE_DIRECTORY).p | \
- $(TOP)/tools/patch '@SITELIB@' '$(OCAML_SITELIB)' \
+ sh $(TOP)/tools/patch '@SITELIB@' '$(OCAML_SITELIB)' \
>topfind

num_top.cma: $(NUMTOP_OBJECTS)
@@ -115,7 +115,7 @@ install: all
mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)"
- files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
+ files=`sh $(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
cp $$f "$(prefix)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)"
1 change: 1 addition & 0 deletions packages/ocamlfind/ocamlfind.1.6.2/opam
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ remove: [
[make "uninstall"]
["rm" "-f" "%{bin}%/ocaml"] {preinstalled}
]
patches: [ "termux.patch" ]
available: [ocaml-version >= "3.12.0"] # ocamlfind refers to cmxs
depends: [
"conf-m4" {build}
Expand Down
52 changes: 52 additions & 0 deletions packages/ocamlfind/ocamlfind.1.7.1/files/termux.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
commit 933444d4638a804fed42a2a57310ebe31e49855f (HEAD -> master)
Author: ygrek <ygrek@autistici.org>
Date: Sat Nov 26 16:21:34 2016 -0800

do not assume /bin/sh exists

diff --git a/Makefile b/Makefile
index e2b46c2..3ecbedf 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@ findlib.conf: findlib.conf.in
USE_CYGPATH="$(USE_CYGPATH)"; \
export USE_CYGPATH; \
cat findlib.conf.in | \
- tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf
+ sh tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf
if ./tools/cmd_from_same_dir ocamlc; then \
echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \
fi
diff --git a/src/findlib/Makefile b/src/findlib/Makefile
index 1385a6a..602dc34 100644
--- a/src/findlib/Makefile
+++ b/src/findlib/Makefile
@@ -86,8 +86,8 @@ findlib_config.ml: findlib_config.mlp $(TOP)/Makefile.config
USE_CYGPATH="$(USE_CYGPATH)"; \
export USE_CYGPATH; \
cat findlib_config.mlp | \
- $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \
- $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \
+ sh $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \
+ sh $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \
sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \
-e 's;@SYSTEM@;$(SYSTEM);g' \
>findlib_config.ml
@@ -107,7 +107,7 @@ topfind: topfind_rd$(OCAML_REMOVE_DIRECTORY).p
USE_CYGPATH="$(USE_CYGPATH)"; \
export USE_CYGPATH; \
cat topfind_rd$(OCAML_REMOVE_DIRECTORY).p | \
- $(TOP)/tools/patch '@SITELIB@' '$(OCAML_SITELIB)' \
+ sh $(TOP)/tools/patch '@SITELIB@' '$(OCAML_SITELIB)' \
>topfind

num_top.cma: $(NUMTOP_OBJECTS)
@@ -122,7 +122,7 @@ install: all
mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)"
- files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib.a findlib.cmxs topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib_top.cmxa findlib_top.a findlib_top.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
+ files=`sh $(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib.a findlib.cmxs topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib_top.cmxa findlib_top.a findlib_top.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
cp $$f "$(prefix)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)"
1 change: 1 addition & 0 deletions packages/ocamlfind/ocamlfind.1.7.1/opam
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ remove: [
[make "uninstall"]
["rm" "-f" "%{bin}%/ocaml"] {preinstalled}
]
patches: [ "termux.patch" ]
available: [ocaml-version >= "3.12.0"] # ocamlfind refers to cmxs
depends: [
"conf-m4" {build}
Expand Down

0 comments on commit d1b73d1

Please sign in to comment.