Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Automatically determine text files and normalise endings in the repository.
* text=auto

# Shell scripts, etc. must have LF endings, even on Windows
*.sh text eol=lf

# All generated by layout.sh
/packages/oxcaml-**/*/opam text linguist-generated
100 changes: 100 additions & 0 deletions layout.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/usr/bin/env bash

if [[ $(basename "$PWD") != 'packages' ]]; then
echo 'Expect to be run from within a packages directory?'>&2
exit 1
elif [[ ! -d ocaml-variants/ocaml-variants.5.2.0+ox ]]; then
echo 'Expect to be run in an OxCaml opam-repository?'>&2
exit 1
fi

rm -rf oxcaml-*
last_guard=''
for entry in *; do
if [[ -d $entry ]]; then
[[ $entry != 'ocaml-variants' ]] || continue
for package in "$entry/"*; do
if [[ -e $package/opam ]]; then
package="${package#"$entry"/}"
case $package in
*~preview.*)
# Ignore JS 0.18 preview packages
;;
*)
if [[ -z $last_guard ]]; then
mkdir -p oxcaml-patch-guards/oxcaml-patch-guards.ox
cat > oxcaml-patch-guards/oxcaml-patch-guards.ox/opam <<EOF
opam-version: "2.0"
synopsis: "OxCaml patched upstream packages"
description: """
oxcaml-patch-guards and the associated oxcaml-* packages ensure that when a
non-Jane Street package in opam-repository has to be patched to work with OxCaml
that only those patched versions can be used in a switch with OxCaml."""
maintainer: "David Allsopp <david@tarides.com>"
authors: "David Allsopp"
license: "CC0-1.0+"
homepage: "https://oxcaml.org"
bug-reports: "https://github.com/oxcaml/opam-repository/issues"
depends: "oxcaml-$entry" {post} | "oxcaml-$entry-patches" {post}
EOF
fi
if [[ ! -e oxcaml-$entry/oxcaml-$entry.guard/opam ]]; then
mkdir -p "oxcaml-$entry/oxcaml-$entry.guard"
cat > "oxcaml-$entry/oxcaml-$entry.guard/opam" <<EOF
opam-version: "2.0"
synopsis: "OxCaml patched $entry (not installed)"
description: "OxCaml meta-package indicating this package is not installed"
maintainer: "David Allsopp <david@tarides.com>"
authors: "David Allsopp"
license: "CC0-1.0+"
homepage: "https://oxcaml.org"
bug-reports: "https://github.com/oxcaml/opam-repository/issues"
conflicts: [ "oxcaml-$entry-patches" "$entry" ]
EOF
if [[ -n $last_guard ]]; then
cat >> "oxcaml-$last_guard/oxcaml-$last_guard.guard/opam" <<EOF
depends: "oxcaml-$entry" {post} | "oxcaml-$entry-patches" {post}
EOF
fi
mkdir -p "oxcaml-$entry-patches/oxcaml-$entry-patches.enabled"
cat > "oxcaml-$entry-patches/oxcaml-$entry-patches.enabled/opam" <<EOF
opam-version: "2.0"
synopsis: "OxCaml patched $entry"
description: "OxCaml meta-package indicating this library is installed"
maintainer: "David Allsopp <david@tarides.com>"
authors: "David Allsopp"
license: "CC0-1.0+"
homepage: "https://oxcaml.org"
bug-reports: "https://github.com/oxcaml/opam-repository/issues"
conflicts: "oxcaml-$entry"
depends: [
"$entry" {build & (
${entry//?/ } = "${package#"$entry".}"
EOF
if [[ -n $last_guard ]]; then
sed -i -e '/depends:/a\ ("oxcaml-'"$entry"'" {post} | "oxcaml-'"$entry"'-patches" {post})' "oxcaml-$last_guard-patches/oxcaml-$last_guard-patches.enabled/opam"
fi
last_guard="$entry"
else
cat >> "oxcaml-$entry-patches/oxcaml-$entry-patches.enabled/opam" <<EOF
${entry//?/ } | = "${package#"$entry".}"
EOF
fi;;
esac
fi
done
fi
done

for entry in oxcaml-*; do
case $entry in
oxcaml-*-patches)
package="${entry#oxcaml-}"
package="${package%-patches}"
cat >> "$entry/"*"/opam" <<EOF
${package//?/ } )}
]
EOF
;;
esac
done
4 changes: 2 additions & 2 deletions packages/alcotest/alcotest.1.9.0+ox/opam
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ depends: [
"astring"
"cmdliner" {>= "1.2.0"}
"cmdliner" {with-test & < "2.0.0"}
"re" {= "1.14.0+ox"}
"re" {>= "1.7.2"}
"stdlib-shims"
"uutf" {= "1.0.3+ox"}
"uutf" {>= "1.0.1"}
"ocaml-syntax-shims"
"odoc" {with-doc}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ depends: [
"core" {= "v0.18~preview.130.76+222"}
"ppx_jane" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"js_of_ocaml" {= "6.0.1+ox"}
"js_of_ocaml-ppx" {= "6.0.1+ox"}
"js_of_ocaml" {>= "6.0.1"}
"js_of_ocaml-ppx" {>= "6.0.1"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ depends: [
"core_unix" {= "v0.18~preview.130.76+222"}
"ppx_jane" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"spawn" {= "v0.15.1+ox"}
"spawn" {>= "v0.15"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis: "Utilities for building simple command-line based user interfaces"
Expand Down
4 changes: 2 additions & 2 deletions packages/async_js/async_js.v0.18~preview.130.76+222/opam
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ depends: [
"ppx_expect" {= "v0.18~preview.130.76+222"}
"ppx_jane" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"js_of_ocaml" {= "6.0.1+ox"}
"js_of_ocaml-ppx" {= "6.0.1+ox"}
"js_of_ocaml" {>= "6.0.1"}
"js_of_ocaml-ppx" {>= "6.0.1"}
"uri" {>= "3.0.0"}
"uri-sexp" {>= "3.0.0"}
]
Expand Down
4 changes: 2 additions & 2 deletions packages/async_ssl/async_ssl.v0.18~preview.130.76+222/opam
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ depends: [
"ppx_optcomp" {= "v0.18~preview.130.76+222"}
"stdio" {= "v0.18~preview.130.76+222"}
"conf-libssl"
"ctypes" {= "0.23.0+ox"}
"ctypes-foreign" {= "0.23.0+ox"}
"ctypes" {>= "0.23.0"}
"ctypes-foreign" {>= "0.23.0"}
"dune" {>= "3.17.0"}
"dune-configurator"
"integers"
Expand Down
2 changes: 1 addition & 1 deletion packages/backoff/backoff.0.1.1+ox/opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bug-reports: "https://github.com/ocaml-multicore/backoff/issues"
depends: [
"dune" {>= "3.3"}
"ocaml" {>= "4.12"}
"alcotest" {>= "1.7.0" & with-test & = "1.9.0+ox"}
"alcotest" {>= "1.7.0" & with-test}
"domain_shims" {>= "0.1.0" & with-test}
"odoc" {with-doc}
]
Expand Down
2 changes: 1 addition & 1 deletion packages/base/base.v0.18~preview.130.76+222/opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ depends: [
"sexplib0" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"dune-configurator"
"ppxlib" {= "0.33.0+ox"}
"ppxlib" {>= "0.33.0"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis: "Full standard library replacement for OCaml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ depends: [
"ppxlib_jane" {= "v0.18~preview.130.76+222"}
"splittable_random" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"ocaml-compiler-libs" {= "v0.17.0+ox"}
"ppxlib" {= "0.33.0+ox"}
"ocaml-compiler-libs" {>= "v0.17.0"}
"ppxlib" {>= "0.33.0"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ depends: [
"ppx_jane" {= "v0.18~preview.130.76+222"}
"ppx_stable_witness" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"zarith" {= "1.12+ox"}
"zarith" {>= "1.12"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis: "Arbitrary-precision decimal based on Zarith"
Expand Down
2 changes: 1 addition & 1 deletion packages/bignum/bignum.v0.18~preview.130.76+222/opam
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ depends: [
"zarith_stubs_js" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"num"
"zarith" {= "1.12+ox"}
"zarith" {>= "1.12"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis:
Expand Down
4 changes: 2 additions & 2 deletions packages/bonsai/bonsai.v0.18~preview.130.76+222/opam
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ depends: [
"uopt" {= "v0.18~preview.130.76+222"}
"virtual_dom" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"js_of_ocaml-ppx" {= "6.0.1+ox"}
"ppxlib" {= "0.33.0+ox"}
"js_of_ocaml-ppx" {>= "6.0.1"}
"ppxlib" {>= "0.33.0"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis: "A library for building dynamic webapps, using Js_of_ocaml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ depends: [
"ppx_pattern_bind" {= "v0.18~preview.130.76+222"}
"textutils" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"js_of_ocaml-ppx" {= "6.0.1+ox"}
"js_of_ocaml-ppx" {>= "6.0.1"}
"uri" {>= "3.0.0"}
]
available: arch != "arm32" & arch != "x86_32"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ depends: [
"cohttp" {>= "2.5.6"}
"cohttp-async" {>= "2.5.7" & < "3.0.0" | >= "5.1.1" & < "6.0.0"}
"dune" {>= "3.17.0"}
"js_of_ocaml" {= "6.0.1+ox"}
"js_of_ocaml-ppx" {= "6.0.1+ox"}
"js_of_ocaml" {>= "6.0.1"}
"js_of_ocaml-ppx" {>= "6.0.1"}
"uri" {>= "3.0.0"}
]
available: arch != "arm32" & arch != "x86_32"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ depends: [
"uopt" {= "v0.18~preview.130.76+222"}
"virtual_dom" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"notty-community" {= "0.2.4+ox"}
"notty-community" {>= "0.2.4"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis: "A library for building dynamic terminal apps, using bonsai"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ depends: [
"sexplib" {= "v0.18~preview.130.76+222"}
"vec" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"notty-community" {= "0.2.4+ox"}
"notty-community" {>= "0.2.4"}
"react"
]
available: arch != "arm32" & arch != "x86_32"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ depends: [
"ppx_quick_test" {= "v0.18~preview.130.76+222"}
"ppx_with" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"notty-community" {= "0.2.4+ox"}
"re" {= "1.14.0+ox"}
"notty-community" {>= "0.2.4"}
"re" {>= "1.14.0"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis: "A library for building dynamic terminal apps, using bonsai"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ depends: [
"ppx_quick_test" {= "v0.18~preview.130.76+222"}
"virtual_dom" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"re" {= "1.14.0+ox"}
"re" {>= "1.14.0"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis: "A library for testing Bonsai state machines."
Expand Down
4 changes: 2 additions & 2 deletions packages/bonsai_web/bonsai_web.v0.18~preview.130.76+222/opam
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ depends: [
"versioned_polling_state_rpc" {= "v0.18~preview.130.76+222"}
"virtual_dom" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"js_of_ocaml" {= "6.0.1+ox"}
"js_of_ocaml-ppx" {= "6.0.1+ox"}
"js_of_ocaml" {>= "6.0.1"}
"js_of_ocaml-ppx" {>= "6.0.1"}
"uri" {>= "3.0.0"}
]
available: arch != "arm32" & arch != "x86_32"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ depends: [
"uri_parsing" {= "v0.18~preview.130.76+222"}
"virtual_dom" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"gen_js_api" {= "1.1.2+ox"}
"js_of_ocaml" {= "6.0.1+ox"}
"js_of_ocaml-ppx" {= "6.0.1+ox"}
"re" {= "1.14.0+ox"}
"gen_js_api" {>= "1.1.2"}
"js_of_ocaml" {>= "6.0.1"}
"js_of_ocaml-ppx" {>= "6.0.1"}
"re" {>= "1.14.0"}
"uri" {>= "3.0.0"}
]
available: arch != "arm32" & arch != "x86_32"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ depends: [
"versioned_polling_state_rpc" {= "v0.18~preview.130.76+222"}
"virtual_dom" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"js_of_ocaml" {= "6.0.1+ox"}
"js_of_ocaml-ppx" {= "6.0.1+ox"}
"js_of_ocaml" {>= "6.0.1"}
"js_of_ocaml-ppx" {>= "6.0.1"}
"lambdasoup" {>= "0.6.3"}
"re" {= "1.14.0+ox"}
"re" {>= "1.14.0"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis: "A library for testing dynamic bonsai webapps, using Js_of_ocaml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ depends: [
"base" {= "v0.18~preview.130.76+222"}
"ppx_base" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"ppxlib" {= "0.33.0+ox"}
"ppxlib" {>= "0.33.0"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ depends: [
"core_kernel" {= "v0.18~preview.130.76+222"}
"ppx_jane" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"js_of_ocaml" {= "6.0.1+ox"}
"js_of_ocaml-ppx" {= "6.0.1+ox"}
"js_of_ocaml" {>= "6.0.1"}
"js_of_ocaml-ppx" {>= "6.0.1"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis:
Expand Down
4 changes: 2 additions & 2 deletions packages/core_bench/core_bench.v0.18~preview.130.76+222/opam
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ depends: [
"textutils" {= "v0.18~preview.130.76+222"}
"time_now" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"js_of_ocaml-ppx" {= "6.0.1+ox"}
"re" {= "1.14.0+ox"}
"js_of_ocaml-ppx" {>= "6.0.1"}
"re" {>= "1.14.0"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis: "Benchmarking library"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ depends: [
"record_builder" {= "v0.18~preview.130.76+222"}
"sexplib" {= "v0.18~preview.130.76+222"}
"dune" {>= "3.17.0"}
"re" {= "1.14.0+ox"}
"re" {>= "1.14.0"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis:
Expand Down
2 changes: 1 addition & 1 deletion packages/core_unix/core_unix.v0.18~preview.130.76+222/opam
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ depends: [
"uopt" {= "v0.18~preview.130.76+222"}
"base-threads"
"dune" {>= "3.17.0"}
"spawn" {= "v0.15.1+ox"}
"spawn" {>= "v0.15.1"}
]
available: arch != "arm32" & arch != "x86_32"
synopsis: "Unix-specific portions of Core"
Expand Down
2 changes: 1 addition & 1 deletion packages/ctypes-foreign/ctypes-foreign.0.23.0+ox/opam
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ depends: [
"dune" {>= "2.9"}
"ocaml" {>= "4.03.0"}
"integers" {with-test & >= "0.2.2"}
"ctypes" {= version & = "0.23.0+ox"}
"ctypes" {= version}
"dune-configurator"
"conf-pkg-config"
"lwt" {with-test & >= "2.4.7"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bug-reports: "https://github.com/ocaml/merlin/issues"
depends: [
"ocaml" {>= "5.2"}
"dune" {>= "3.0"}
"merlin-lib" {= version & = "5.2.1-502+ox"}
"merlin-lib" {= version}
"ocamlfind" {>= "1.6.0"}
]
build: [
Expand Down
2 changes: 1 addition & 1 deletion packages/dune-rpc/dune-rpc.3.20.2+ox/opam
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ doc: "https://dune.readthedocs.io/"
bug-reports: "https://github.com/ocaml/dune/issues"
depends: [
"dune" {>= "3.20"}
"ocamlc-loc" {= "3.20.2+ox"}
"ocamlc-loc"
"csexp"
"ordering"
"dyn"
Expand Down
Loading
Loading