![gal@spitfire.co.il](/assets/img/avatar_default.png)
commit
45800d0841
100 changed files with 5845 additions and 0 deletions
@ -0,0 +1,24 @@ |
|||||||
|
# Cross-platform set of build steps for building esy projects |
||||||
|
|
||||||
|
steps: |
||||||
|
- task: NodeTool@0 |
||||||
|
inputs: |
||||||
|
versionSpec: '8.9' |
||||||
|
- script: npm install -g esy@0.4.3 |
||||||
|
displayName: 'npm install -g esy@0.4.3' |
||||||
|
- script: esy install |
||||||
|
displayName: 'esy install' |
||||||
|
- script: esy pesy |
||||||
|
displayName: 'esy pesy' |
||||||
|
- script: esy build |
||||||
|
displayName: 'esy build' |
||||||
|
- script: esy test |
||||||
|
displayName: 'esy test' |
||||||
|
- script: esy x NswApp.exe |
||||||
|
displayName: 'Run the main binary' |
||||||
|
- script: esy ls-libs |
||||||
|
continueOnError: true |
||||||
|
displayName: 'Show all libraries including this package lib' |
||||||
|
- script: esy release |
||||||
|
displayName: 'Test Creation of Prebuilt Binary Releases' |
||||||
|
continueOnError: true |
@ -0,0 +1,11 @@ |
|||||||
|
# Steps for publishing project cache |
||||||
|
|
||||||
|
steps: |
||||||
|
- task: PublishBuildArtifacts@1 |
||||||
|
displayName: 'Cache: Upload install folder' |
||||||
|
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) |
||||||
|
inputs: |
||||||
|
pathToPublish: '$(ESY__CACHE_INSTALL_PATH)' |
||||||
|
artifactName: 'cache-$(Agent.OS)-install' |
||||||
|
parallel: true |
||||||
|
parallelCount: 8 |
@ -0,0 +1,23 @@ |
|||||||
|
# Steps for restoring project cache |
||||||
|
|
||||||
|
steps: |
||||||
|
- task: DownloadBuildArtifacts@0 |
||||||
|
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) |
||||||
|
displayName: 'Cache: Restore install' |
||||||
|
inputs: |
||||||
|
buildType: 'specific' |
||||||
|
project: '$(System.TeamProject)' |
||||||
|
pipeline: '$(Build.DefinitionName)' |
||||||
|
branchName: 'refs/heads/master' |
||||||
|
buildVersionToDownload: 'latestFromBranch' |
||||||
|
downloadType: 'single' |
||||||
|
artifactName: 'cache-$(Agent.OS)-install' |
||||||
|
downloadPath: '$(System.ArtifactsDirectory)' |
||||||
|
continueOnError: true |
||||||
|
|
||||||
|
- task: CopyFiles@2 |
||||||
|
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) |
||||||
|
inputs: |
||||||
|
sourceFolder: '$(System.ArtifactsDirectory)\cache-$(Agent.OS)-install' |
||||||
|
targetFolder: '$(ESY__CACHE_INSTALL_PATH)' |
||||||
|
continueOnError: true |
@ -0,0 +1,11 @@ |
|||||||
|
npm-debug.log |
||||||
|
.merlin |
||||||
|
yarn-error.log |
||||||
|
node_modules |
||||||
|
node_modules/ |
||||||
|
_build |
||||||
|
_release |
||||||
|
_esy/ |
||||||
|
nsw.install |
||||||
|
.DS_Store |
||||||
|
*.install |
@ -0,0 +1,50 @@ |
|||||||
|
# nsw |
||||||
|
|
||||||
|
|
||||||
|
[![CircleCI](https://circleci.com/gh/yourgithubhandle/nsw/tree/master.svg?style=svg)](https://circleci.com/gh/yourgithubhandle/nsw/tree/master) |
||||||
|
|
||||||
|
|
||||||
|
**Contains the following libraries and executables:** |
||||||
|
|
||||||
|
``` |
||||||
|
nsw@0.0.0 |
||||||
|
│ |
||||||
|
├─test/ |
||||||
|
│ name: TestNsw.exe |
||||||
|
│ main: TestNsw |
||||||
|
│ require: nsw.lib |
||||||
|
│ |
||||||
|
├─library/ |
||||||
|
│ library name: nsw.lib |
||||||
|
│ namespace: Nsw |
||||||
|
│ require: |
||||||
|
│ |
||||||
|
└─executable/ |
||||||
|
name: NswApp.exe |
||||||
|
main: NswApp |
||||||
|
require: nsw.lib |
||||||
|
``` |
||||||
|
|
||||||
|
## Developing: |
||||||
|
|
||||||
|
``` |
||||||
|
npm install -g esy |
||||||
|
git clone <this-repo> |
||||||
|
esy install |
||||||
|
esy build |
||||||
|
``` |
||||||
|
|
||||||
|
## Running Binary: |
||||||
|
|
||||||
|
After building the project, you can run the main binary that is produced. |
||||||
|
|
||||||
|
``` |
||||||
|
esy x NswApp.exe |
||||||
|
``` |
||||||
|
|
||||||
|
## Running Tests: |
||||||
|
|
||||||
|
``` |
||||||
|
# Runs the "test" command in `package.json`. |
||||||
|
esy test |
||||||
|
``` |
@ -0,0 +1,67 @@ |
|||||||
|
# Starter pipeline |
||||||
|
# Start with a minimal pipeline that you can customize to build and deploy your code. |
||||||
|
# Add steps that build, run tests, deploy, and more: |
||||||
|
# https://aka.ms/yaml |
||||||
|
|
||||||
|
name: $(Build.SourceVersion) |
||||||
|
jobs: |
||||||
|
- job: Linux |
||||||
|
timeoutInMinutes: 0 |
||||||
|
pool: |
||||||
|
vmImage: 'Ubuntu 16.04' |
||||||
|
|
||||||
|
variables: |
||||||
|
ESY__CACHE_INSTALL_PATH: /home/vsts/.esy/3_____________________________________________________________________/i/ |
||||||
|
ESY__CACHE_SOURCE_TARBALL_PATH: /home/vsts/.esy/source/i |
||||||
|
|
||||||
|
steps: |
||||||
|
# TODO: Uncomment both this and 'publish-build-cache' below to enable build caching for Linux. |
||||||
|
# - template: .ci/restore-build-cache.yml |
||||||
|
- template: .ci/esy-build-steps.yml |
||||||
|
# - template: .ci/publish-build-cache.yml |
||||||
|
|
||||||
|
- job: MacOS |
||||||
|
timeoutInMinutes: 0 |
||||||
|
pool: |
||||||
|
vmImage: 'macOS 10.13' |
||||||
|
|
||||||
|
variables: |
||||||
|
ESY__CACHE_INSTALL_PATH: /Users/vsts/.esy/3____________________________________________________________________/i/ |
||||||
|
ESY__CACHE_SOURCE_TARBALL_PATH: /Users/vsts/.esy/source/i |
||||||
|
|
||||||
|
steps: |
||||||
|
# TODO: Uncomment both this and 'publish-build-cache' below to enable build caching for Mac. |
||||||
|
# - template: .ci/restore-build-cache.yml |
||||||
|
- template: .ci/esy-build-steps.yml |
||||||
|
# - template: .ci/publish-build-cache.yml |
||||||
|
|
||||||
|
- job: Windows |
||||||
|
timeoutInMinutes: 0 |
||||||
|
pool: |
||||||
|
vmImage: 'vs2017-win2016' |
||||||
|
|
||||||
|
variables: |
||||||
|
ESY__CACHE_INSTALL_PATH: C:\Users\VssAdministrator\.esy\3_\i |
||||||
|
ESY__CACHE_SOURCE_TARBALL_PATH: C:\Users\VssAdministrator\.esy\source\i |
||||||
|
|
||||||
|
steps: |
||||||
|
- template: .ci/restore-build-cache.yml |
||||||
|
- template: .ci/esy-build-steps.yml |
||||||
|
- template: .ci/publish-build-cache.yml |
||||||
|
|
||||||
|
- job: Release |
||||||
|
timeoutInMinutes: 0 |
||||||
|
displayName: Release |
||||||
|
dependsOn: |
||||||
|
- Linux |
||||||
|
- MacOS |
||||||
|
- Windows |
||||||
|
condition: succeeded() |
||||||
|
pool: |
||||||
|
vmImage: ubuntu-16.04 |
||||||
|
steps: |
||||||
|
- task: PublishBuildArtifacts@1 |
||||||
|
displayName: 'Release Package' |
||||||
|
inputs: |
||||||
|
PathtoPublish: '.' |
||||||
|
ArtifactName: npm-package |
@ -0,0 +1,3 @@ |
|||||||
|
|
||||||
|
# Set eol to LF so files aren't converted to CRLF-eol on Windows. |
||||||
|
* text eol=lf |
@ -0,0 +1,3 @@ |
|||||||
|
|
||||||
|
# Reset any possible .gitignore, we want all esy.lock to be un-ignored. |
||||||
|
!* |
@ -0,0 +1,6 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "https://github.com/ocaml/opam-repository/issues" |
||||||
|
description: """ |
||||||
|
Threads library distributed with the OCaml compiler |
||||||
|
""" |
||||||
|
|
@ -0,0 +1,6 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "https://github.com/ocaml/opam-repository/issues" |
||||||
|
description: """ |
||||||
|
Unix library distributed with the OCaml compiler |
||||||
|
""" |
||||||
|
|
@ -0,0 +1,37 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/base" |
||||||
|
bug-reports: "https://github.com/janestreet/base/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/base.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"sexplib0" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
] |
||||||
|
depopts: [ |
||||||
|
"base-native-int63" |
||||||
|
] |
||||||
|
synopsis: "Full standard library replacement for OCaml" |
||||||
|
description: """ |
||||||
|
Full standard library replacement for OCaml |
||||||
|
|
||||||
|
Base is a complete and portable alternative to the OCaml standard |
||||||
|
library. It provides all standard functionalities one would expect |
||||||
|
from a language standard library. It uses consistent conventions |
||||||
|
across all of its module. |
||||||
|
|
||||||
|
Base aims to be usable in any context. As a result system dependent |
||||||
|
features such as I/O are not offered by Base. They are instead |
||||||
|
provided by companion libraries such as stdio: |
||||||
|
|
||||||
|
https://github.com/janestreet/stdio""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/janestreet/base/releases/download/v0.11.1/base-v0.11.1.tbz" |
||||||
|
checksum: "md5=e7e7dc5db3f1fea19d74a31bbd4ac621" |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/bin_prot" |
||||||
|
bug-reports: "https://github.com/janestreet/bin_prot/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/bin_prot.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_compare" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_custom_printf" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_fields_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_variants_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
] |
||||||
|
depopts: [ |
||||||
|
"mirage-xen-ocaml" |
||||||
|
] |
||||||
|
synopsis: "A binary protocol generator" |
||||||
|
description: """ |
||||||
|
Part of Jane Street's Core library |
||||||
|
The Core suite of libraries is an industrial strength alternative to |
||||||
|
OCaml's standard library that was developed by Jane Street, the |
||||||
|
largest industrial user of OCaml.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/bin_prot-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=64495e0e88fe7cccba6e66b0deaef283" |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "martin@mjambon.com" |
||||||
|
authors: ["Martin Jambon"] |
||||||
|
|
||||||
|
homepage: "https://github.com/mjambon/biniou" |
||||||
|
bug-reports: "https://github.com/mjambon/biniou/issues" |
||||||
|
dev-repo: "git+https://github.com/mjambon/biniou.git" |
||||||
|
license: "BSD-3-Clause" |
||||||
|
|
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
["jbuilder" "runtest" "-p" name] {with-test} |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02.3"} |
||||||
|
"conf-which" {build} |
||||||
|
"jbuilder" {build & >= "1.0+beta7"} |
||||||
|
"easy-format" |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve" |
||||||
|
url { |
||||||
|
src: "https://github.com/mjambon/biniou/archive/v1.2.0.tar.gz" |
||||||
|
checksum: "md5=f3e92358e832ed94eaf23ce622ccc2f9" |
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "tim@gfxmonk.net" |
||||||
|
homepage: "http://www.gnu.org/software/m4/m4.html" |
||||||
|
bug-reports: "https://github.com/ocaml/opam-repository/issues" |
||||||
|
authors: "GNU Project" |
||||||
|
license: "GPL-3" |
||||||
|
build: [["sh" "-exc" "echo | m4"]] |
||||||
|
depexts: [ |
||||||
|
["m4"] {os-distribution = "debian"} |
||||||
|
["m4"] {os-distribution = "ubuntu"} |
||||||
|
["m4"] {os-distribution = "fedora"} |
||||||
|
["m4"] {os-distribution = "rhel"} |
||||||
|
["m4"] {os-distribution = "centos"} |
||||||
|
["m4"] {os-distribution = "alpine"} |
||||||
|
["m4"] {os-distribution = "nixos"} |
||||||
|
["m4"] {os-family = "suse"} |
||||||
|
["m4"] {os-distribution = "oraclelinux"} |
||||||
|
["m4"] {os-distribution = "archlinux"} |
||||||
|
] |
||||||
|
synopsis: "Virtual package relying on m4" |
||||||
|
description: |
||||||
|
"This package can only install if the m4 binary is installed on the system." |
||||||
|
flags: conf |
@ -0,0 +1,20 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "unixjunkie@sdf.org" |
||||||
|
homepage: "http://www.gnu.org/software/which/" |
||||||
|
authors: "Carlo Wood" |
||||||
|
bug-reports: "https://github.com/ocaml/opam-repository/issues" |
||||||
|
license: "GPL-2+" |
||||||
|
build: [["which" "which"]] |
||||||
|
depexts: [ |
||||||
|
["which"] {os-distribution = "centos"} |
||||||
|
["which"] {os-distribution = "fedora"} |
||||||
|
["which"] {os-family = "suse"} |
||||||
|
["debianutils"] {os-distribution = "debian"} |
||||||
|
["debianutils"] {os-distribution = "ubuntu"} |
||||||
|
["which"] {os-distribution = "nixos"} |
||||||
|
["which"] {os-distribution = "archlinux"} |
||||||
|
] |
||||||
|
synopsis: "Virtual package relying on which" |
||||||
|
description: |
||||||
|
"This package can only install if the which program is installed on the system." |
||||||
|
flags: conf |
@ -0,0 +1,33 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/configurator" |
||||||
|
bug-reports: "https://github.com/janestreet/configurator/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/configurator.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"stdio" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
] |
||||||
|
synopsis: "Helper library for gathering system configuration" |
||||||
|
description: """ |
||||||
|
Configurator is a small library that helps writing OCaml scripts that |
||||||
|
test features available on the system, in order to generate config.h |
||||||
|
files for instance. |
||||||
|
|
||||||
|
Configurator allows one to: |
||||||
|
- test if a C program compiles |
||||||
|
- query pkg-config |
||||||
|
- import #define from OCaml header files |
||||||
|
- generate config.h file""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/configurator-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=55511f3ea8e3d66439910b3324701218" |
||||||
|
} |
@ -0,0 +1,35 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/core" |
||||||
|
bug-reports: "https://github.com/janestreet/core/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/core.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"configurator" {>= "v0.11" & < "v0.12"} |
||||||
|
"core_kernel" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_assert" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_jane" {>= "v0.11" & < "v0.12"} |
||||||
|
"sexplib" {>= "v0.11" & < "v0.12"} |
||||||
|
"spawn" {>= "v0.12"} |
||||||
|
"stdio" {>= "v0.11" & < "v0.12"} |
||||||
|
"base-threads" |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Industrial strength alternative to OCaml's standard library" |
||||||
|
description: """ |
||||||
|
The Core suite of libraries is an industrial strength alternative to |
||||||
|
OCaml's standard library that was developed by Jane Street, the |
||||||
|
largest industrial user of OCaml.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/janestreet/core/releases/download/v0.11.3/core-v0.11.3.tbz" |
||||||
|
checksum: "md5=89ca9e9aa9f1742790efb5016cc5d69b" |
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/core_kernel" |
||||||
|
bug-reports: "https://github.com/janestreet/core_kernel/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/core_kernel.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"bin_prot" {>= "v0.11" & < "v0.12"} |
||||||
|
"configurator" {>= "v0.11" & < "v0.12"} |
||||||
|
"fieldslib" {>= "v0.11" & < "v0.12"} |
||||||
|
"jane-street-headers" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_assert" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_hash" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_inline_test" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_jane" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_message" {>= "v0.11" & < "v0.12"} |
||||||
|
"sexplib" {>= "v0.11" & < "v0.12"} |
||||||
|
"splittable_random" {>= "v0.11" & < "v0.12"} |
||||||
|
"stdio" {>= "v0.11" & < "v0.12"} |
||||||
|
"typerep" {>= "v0.11" & < "v0.12"} |
||||||
|
"variantslib" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
] |
||||||
|
depopts: [ |
||||||
|
"base-native-int63" |
||||||
|
] |
||||||
|
synopsis: "Industrial strength alternative to OCaml's standard library" |
||||||
|
description: """ |
||||||
|
The Core suite of libraries is an industrial strength alternative to |
||||||
|
OCaml's standard library that was developed by Jane Street, the |
||||||
|
largest industrial user of OCaml. |
||||||
|
|
||||||
|
Core_kernel is the system-independent part of Core.""" |
||||||
|
url { |
||||||
|
src: "https://github.com/janestreet/core_kernel/archive/v0.11.1.tar.gz" |
||||||
|
checksum: "md5=2946775ce7660e026996d55da9c10b83" |
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "martin@mjambon.com" |
||||||
|
authors: ["Martin Jambon"] |
||||||
|
homepage: "https://github.com/mjambon/cppo" |
||||||
|
dev-repo: "git+https://github.com/mjambon/cppo.git" |
||||||
|
bug-reports: "https://github.com/mjambon/cppo/issues" |
||||||
|
license: "BSD-3-Clause" |
||||||
|
|
||||||
|
build: [ |
||||||
|
["jbuilder" "subst" "-p" name] {pinned} |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
["jbuilder" "runtest" "-p" name] {with-test} |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" |
||||||
|
"jbuilder" {build & >= "1.0+beta17"} |
||||||
|
"base-unix" |
||||||
|
] |
||||||
|
synopsis: "Equivalent of the C preprocessor for OCaml programs" |
||||||
|
url { |
||||||
|
src: "https://github.com/mjambon/cppo/archive/v1.6.5.tar.gz" |
||||||
|
checksum: "md5=1cd25741d31417995b0973fe0b6f6c82" |
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/ocaml/dune" |
||||||
|
bug-reports: "https://github.com/ocaml/dune/issues" |
||||||
|
dev-repo: "git+https://github.com/ocaml/dune.git" |
||||||
|
license: "MIT" |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02"} |
||||||
|
"base-unix" |
||||||
|
"base-threads" |
||||||
|
] |
||||||
|
build: [ |
||||||
|
# opam 2 sets OPAM_SWITCH_PREFIX, so we don't need a hardcoded path |
||||||
|
["ocaml" "configure.ml" "--libdir" lib] {opam-version < "2"} |
||||||
|
["ocaml" "bootstrap.ml"] |
||||||
|
["./boot.exe" "--release" "--subst"] {pinned} |
||||||
|
["./boot.exe" "--release" "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ |
||||||
|
"jbuilder" {!= "transition"} |
||||||
|
"odoc" {< "1.3.0"} |
||||||
|
] |
||||||
|
|
||||||
|
synopsis: "Fast, portable and opinionated build system" |
||||||
|
description: """ |
||||||
|
dune is a build system that was designed to simplify the release of |
||||||
|
Jane Street packages. It reads metadata from "dune" files following a |
||||||
|
very simple s-expression syntax. |
||||||
|
|
||||||
|
dune is fast, it has very low-overhead and support parallel builds on |
||||||
|
all platforms. It has no system dependencies, all you need to build |
||||||
|
dune and packages using dune is OCaml. You don't need or make or bash |
||||||
|
as long as the packages themselves don't use bash explicitly. |
||||||
|
|
||||||
|
dune supports multi-package development by simply dropping multiple |
||||||
|
repositories into the same directory. |
||||||
|
|
||||||
|
It also supports multi-context builds, such as building against |
||||||
|
several opam roots/switches simultaneously. This helps maintaining |
||||||
|
packages across several versions of OCaml and gives cross-compilation |
||||||
|
for free. |
||||||
|
""" |
||||||
|
url { |
||||||
|
src: "https://github.com/ocaml/dune/releases/download/1.6.3/dune-1.6.3.tbz" |
||||||
|
checksum: "md5=1212a36547d25269675d767c38fecf5f" |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "martin@mjambon.com" |
||||||
|
authors: ["Martin Jambon"] |
||||||
|
homepage: "http://mjambon.com/easy-format.html" |
||||||
|
bug-reports: "https://github.com/mjambon/easy-format/issues" |
||||||
|
dev-repo: "git+https://github.com/mjambon/easy-format.git" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
["jbuilder" "runtest" "-p" name] {with-test} |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02.3"} |
||||||
|
"jbuilder" {build} |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"High-level and functional interface to the Format module of the OCaml standard library" |
||||||
|
url { |
||||||
|
src: "https://github.com/mjambon/easy-format/archive/v1.3.1.tar.gz" |
||||||
|
checksum: "md5=4e163700fb88fdcd6b8976c3a216c8ea" |
||||||
|
} |
@ -0,0 +1,30 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/fieldslib" |
||||||
|
bug-reports: "https://github.com/janestreet/fieldslib/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/fieldslib.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values" |
||||||
|
description: """ |
||||||
|
Part of Jane Street's Core library |
||||||
|
The Core suite of libraries is an industrial strength alternative to |
||||||
|
OCaml's standard library that was developed by Jane Street, the |
||||||
|
largest industrial user of OCaml.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/fieldslib-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=a42506b460a1dc47fb65a37d875211ae" |
||||||
|
} |
@ -0,0 +1,21 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/jane-street-headers" |
||||||
|
bug-reports: "https://github.com/janestreet/jane-street-headers/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/jane-street-headers.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
] |
||||||
|
synopsis: "Jane Street C header files" |
||||||
|
description: "C header files shared between the various Jane Street packages" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/jane-street-headers-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=13299bfe41f66f6a3f42cfaa015f4869" |
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/ocaml/dune" |
||||||
|
bug-reports: "https://github.com/ocaml/dune/issues" |
||||||
|
dev-repo: "git+https://github.com/ocaml/dune.git" |
||||||
|
license: "MIT" |
||||||
|
depends: ["ocaml" "dune"] |
||||||
|
post-messages: [ |
||||||
|
"Jbuilder has been renamed and the jbuilder package is now a transition \ |
||||||
|
package. Use the dune package instead." |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"This is a transition package, jbuilder is now named dune. Use the dune" |
||||||
|
description: "package instead." |
@ -0,0 +1,60 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
version: "4.1.0" |
||||||
|
maintainer: [ |
||||||
|
"Anton Bachin <antonbachin@yahoo.com>" |
||||||
|
"Mauricio Fernandez <mfp@acm.org>" |
||||||
|
"Simon Cruanes <simon.cruanes.2007@m4x.org>" |
||||||
|
] |
||||||
|
authors: [ |
||||||
|
"Jérôme Vouillon" |
||||||
|
"Jérémie Dimino" |
||||||
|
] |
||||||
|
homepage: "https://github.com/ocsigen/lwt" |
||||||
|
doc: "https://ocsigen.org/lwt/manual/" |
||||||
|
bug-reports: "https://github.com/ocsigen/lwt/issues" |
||||||
|
license: "LGPL with OpenSSL linking exception" |
||||||
|
dev-repo: "git+https://github.com/ocsigen/lwt.git" |
||||||
|
build: [ |
||||||
|
[ "ocaml" "src/util/configure.ml" "-use-libev" "%{conf-libev:installed}%" ] |
||||||
|
[ "jbuilder" "build" "-p" name "-j" jobs ] |
||||||
|
] |
||||||
|
|
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02.0"} |
||||||
|
"cppo" {build & >= "1.1.0"} |
||||||
|
"jbuilder" {build & >= "1.0+beta14"} |
||||||
|
"ocamlfind" {build & >= "1.7.3-1"} |
||||||
|
"result" |
||||||
|
] |
||||||
|
depopts: [ |
||||||
|
"base-threads" |
||||||
|
"base-unix" |
||||||
|
"conf-libev" |
||||||
|
] |
||||||
|
# In practice, Lwt requires OCaml >= 4.02.3, as that is a constraint of the |
||||||
|
# dependency jbuilder. |
||||||
|
messages: [ |
||||||
|
"For the PPX, please install package lwt_ppx" |
||||||
|
{!lwt_ppx:installed} |
||||||
|
"For the Camlp4 syntax, please install package lwt_camlp4" |
||||||
|
{camlp4:installed & !lwt_camlp4:installed} |
||||||
|
"For Lwt_log and Lwt_daemon, please install package lwt_log" |
||||||
|
{!lwt_log:installed} |
||||||
|
] |
||||||
|
synopsis: "Promises, concurrency, and parallelized I/O" |
||||||
|
description: """ |
||||||
|
A promise is a value that may become determined in the future. |
||||||
|
|
||||||
|
Lwt provides typed, composable promises. Promises that are resolved by I/O are |
||||||
|
resolved by Lwt in parallel. |
||||||
|
|
||||||
|
Meanwhile, OCaml code, including code creating and waiting on promises, runs in |
||||||
|
a single thread by default. This reduces the need for locks or other |
||||||
|
synchronization primitives. Code can be run in parallel on an opt-in basis.""" |
||||||
|
conflicts: [ |
||||||
|
"ocaml-variants" {= "4.02.1+BER"} |
||||||
|
] |
||||||
|
url { |
||||||
|
src: "https://github.com/ocsigen/lwt/archive/4.1.0.tar.gz" |
||||||
|
checksum: "md5=e919bee206f18b3d49250ecf9584fde7" |
||||||
|
} |
@ -0,0 +1,30 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
version: "1.2.1" |
||||||
|
maintainer: [ |
||||||
|
"Anton Bachin <antonbachin@yahoo.com>" |
||||||
|
] |
||||||
|
authors: [ |
||||||
|
"Gabriel Radanne" |
||||||
|
] |
||||||
|
homepage: "https://github.com/ocsigen/lwt" |
||||||
|
doc: "https://ocsigen.org/lwt/api/Ppx_lwt" |
||||||
|
dev-repo: "git+https://github.com/ocsigen/lwt.git" |
||||||
|
bug-reports: "https://github.com/ocsigen/lwt/issues" |
||||||
|
license: "LGPL with OpenSSL linking exception" |
||||||
|
|
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02.0"} |
||||||
|
"jbuilder" {build & >= "1.0+beta14"} |
||||||
|
"lwt" |
||||||
|
"ocaml-migrate-parsetree" |
||||||
|
"ppx_tools_versioned" {>= "5.0.1"} |
||||||
|
] |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"PPX syntax for Lwt, providing something similar to async/await from JavaScript" |
||||||
|
url { |
||||||
|
src: "https://github.com/ocsigen/lwt/archive/4.1.0.tar.gz" |
||||||
|
checksum: "md5=e919bee206f18b3d49250ecf9584fde7" |
||||||
|
} |
@ -0,0 +1,32 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "francois.pottier@inria.fr" |
||||||
|
authors: [ |
||||||
|
"François Pottier <francois.pottier@inria.fr>" |
||||||
|
"Yann Régis-Gianas <yrg@pps.univ-paris-diderot.fr>" |
||||||
|
] |
||||||
|
homepage: "http://gitlab.inria.fr/fpottier/menhir" |
||||||
|
dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" |
||||||
|
bug-reports: "menhir@inria.fr" |
||||||
|
build: [ |
||||||
|
[make "-f" "Makefile" "PREFIX=%{prefix}%" "USE_OCAMLFIND=true" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] |
||||||
|
] |
||||||
|
install: [ |
||||||
|
[make "-f" "Makefile" "install" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] |
||||||
|
] |
||||||
|
remove: [ |
||||||
|
[make "-f" "Makefile" "uninstall" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02"} |
||||||
|
"ocamlfind" {build} |
||||||
|
"ocamlbuild" {build} |
||||||
|
] |
||||||
|
synopsis: "An LR(1) parser generator" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://gitlab.inria.fr/fpottier/menhir/repository/20181113/archive.tar.gz" |
||||||
|
checksum: [ |
||||||
|
"md5=69ce441a06ea131cd43e7b44c4303f3c" |
||||||
|
"sha512=4ddefcd71d305bfb933a4056da57e36c13c99ec6dfcc4695814798fbbd78b4d65828381ebcb0e58c4c0394105ac763af3d475474e05e408f7080315bc3cf6176" |
||||||
|
] |
||||||
|
} |
@ -0,0 +1,24 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "Frederic Bour <frederic.bour@lakaban.net>" |
||||||
|
authors: "Frederic Bour <frederic.bour@lakaban.net>" |
||||||
|
homepage: "https://github.com/let-def/merlin-extend" |
||||||
|
bug-reports: "https://github.com/let-def/merlin-extend" |
||||||
|
license: "MIT" |
||||||
|
dev-repo: "git+https://github.com/let-def/merlin-extend.git" |
||||||
|
build: [make] |
||||||
|
install: [make "install"] |
||||||
|
remove: ["ocamlfind" "remove" "merlin_extend"] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02.3"} |
||||||
|
"ocamlfind" {build} |
||||||
|
"cppo" {build} |
||||||
|
] |
||||||
|
synopsis: "A protocol to provide custom frontend to Merlin" |
||||||
|
description: """ |
||||||
|
This protocol allows to replace the OCaml frontend of Merlin. |
||||||
|
It extends what used to be done with the `-pp' flag to handle a few more cases.""" |
||||||
|
flags: light-uninstall |
||||||
|
url { |
||||||
|
src: "https://github.com/let-def/merlin-extend/archive/v0.3.tar.gz" |
||||||
|
checksum: "md5=9c6dfd4f53328f02f12fcc265f4e2dda" |
||||||
|
} |
@ -0,0 +1,74 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
name: "merlin" |
||||||
|
synopsis: "Installation with Opam" |
||||||
|
description: """ |
||||||
|
If you have a working [Opam](https://opam.ocaml.org/) installation, Merlin is only two commands away: |
||||||
|
|
||||||
|
```shell |
||||||
|
opam install merlin |
||||||
|
opam user-setup install |
||||||
|
``` |
||||||
|
|
||||||
|
[opam-user-setup](https://github.com/OCamlPro/opam-user-setup) takes care of configuring Emacs and Vim to make best use of your current install. |
||||||
|
|
||||||
|
You can also [configure the editor](#editor-setup) yourself, if you prefer.""" |
||||||
|
maintainer: "defree@gmail.com" |
||||||
|
authors: "The Merlin team" |
||||||
|
homepage: "https://github.com/ocaml/merlin" |
||||||
|
bug-reports: "https://github.com/ocaml/merlin/issues" |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02.1" & < "4.08"} |
||||||
|
"dune" {build} |
||||||
|
"ocamlfind" {>= "1.5.2"} |
||||||
|
"yojson" |
||||||
|
"craml" {with-test} |
||||||
|
] |
||||||
|
build: [ |
||||||
|
["dune" "subst"] {pinned} |
||||||
|
["dune" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
post-messages: |
||||||
|
""" |
||||||
|
merlin installed. |
||||||
|
|
||||||
|
Quick setup for VIM |
||||||
|
------------------- |
||||||
|
Append this to your .vimrc to add merlin to vim's runtime-path: |
||||||
|
let g:opamshare = substitute(system('opam config var share'),'\\n$','','''') |
||||||
|
execute "set rtp+=" . g:opamshare . "/merlin/vim" |
||||||
|
|
||||||
|
Also run the following line in vim to index the documentation: |
||||||
|
:execute "helptags " . g:opamshare . "/merlin/vim/doc" |
||||||
|
|
||||||
|
Quick setup for EMACS |
||||||
|
------------------- |
||||||
|
Add opam emacs directory to your load-path by appending this to your .emacs: |
||||||
|
(let ((opam-share (ignore-errors (car (process-lines "opam" "config" "var" "share"))))) |
||||||
|
(when (and opam-share (file-directory-p opam-share)) |
||||||
|
;; Register Merlin |
||||||
|
(add-to-list 'load-path (expand-file-name "emacs/site-lisp" opam-share)) |
||||||
|
(autoload 'merlin-mode "merlin" nil t nil) |
||||||
|
;; Automatically start it in OCaml buffers |
||||||
|
(add-hook 'tuareg-mode-hook 'merlin-mode t) |
||||||
|
(add-hook 'caml-mode-hook 'merlin-mode t) |
||||||
|
;; Use opam switch to lookup ocamlmerlin binary |
||||||
|
(setq merlin-command 'opam))) |
||||||
|
|
||||||
|
Take a look at https://github.com/ocaml/merlin for more information |
||||||
|
|
||||||
|
Quick setup with opam-user-setup |
||||||
|
-------------------------------- |
||||||
|
|
||||||
|
Opam-user-setup support Merlin. |
||||||
|
|
||||||
|
$ opam user-setup install |
||||||
|
|
||||||
|
should take care of basic setup. |
||||||
|
See https://github.com/OCamlPro/opam-user-setup""" |
||||||
|
{success & !user-setup:installed} |
||||||
|
dev-repo: "git+https://github.com/ocaml/merlin.git" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/ocaml/merlin/releases/download/v3.2.2/merlin-v3.2.2.tbz" |
||||||
|
checksum: "md5=ede35b65f8ac9c440cfade5445662c54" |
||||||
|
} |
@ -0,0 +1,129 @@ |
|||||||
|
From 7688bb4fea24463c92e9c4870acc08495a4c77cb Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Allsopp <david.allsopp@metastack.com>
|
||||||
|
Date: Wed, 10 Jan 2018 15:20:46 +0000
|
||||||
|
Subject: [PATCH] Provide findlib-install target
|
||||||
|
|
||||||
|
Allows installing the entire library using ocamlfind.
|
||||||
|
---
|
||||||
|
Makefile | 10 +++++++++-
|
||||||
|
src/META | 17 -----------------
|
||||||
|
src/META.in | 19 +++++++++++++++++++
|
||||||
|
src/Makefile | 17 +++++++++++++++--
|
||||||
|
4 files changed, 43 insertions(+), 20 deletions(-)
|
||||||
|
delete mode 100644 src/META
|
||||||
|
create mode 100644 src/META.in
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 6a5d08f..b40e588 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -14,8 +14,16 @@ install:
|
||||||
|
$(MAKE) -C src install
|
||||||
|
$(MAKE) -C toplevel install
|
||||||
|
|
||||||
|
+findlib-install:
|
||||||
|
+ $(MAKE) -C src findlib-install
|
||||||
|
+ $(MAKE) -C toplevel install
|
||||||
|
+
|
||||||
|
uninstall:
|
||||||
|
$(MAKE) -C src uninstall
|
||||||
|
$(MAKE) -C toplevel uninstall
|
||||||
|
|
||||||
|
-.PHONY: all test clean install uninstall
|
||||||
|
+findlib-uninstall:
|
||||||
|
+ $(MAKE) -C src findlib-uninstall
|
||||||
|
+ $(MAKE) -C toplevel uninstall
|
||||||
|
+
|
||||||
|
+.PHONY: all test clean install uninstall findlib-install findlib-uninstall
|
||||||
|
diff --git a/src/META b/src/META
|
||||||
|
deleted file mode 100644
|
||||||
|
index 66ac170..0000000
|
||||||
|
--- a/src/META
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,17 +0,0 @@
|
||||||
|
-# This META is the one provided by findlib when the "num" library was
|
||||||
|
-# part of the core OCaml distribution. For backward compatibility,
|
||||||
|
-# it installs into OCaml's standard library directory, not in a subdirectory
|
||||||
|
-
|
||||||
|
-requires = "num.core"
|
||||||
|
-requires(toploop) = "num.core,num-top"
|
||||||
|
-version = "1.0"
|
||||||
|
-description = "Arbitrary-precision rational arithmetic"
|
||||||
|
-package "core" (
|
||||||
|
- directory = "^"
|
||||||
|
- version = "1.0"
|
||||||
|
- browse_interfaces = ""
|
||||||
|
- archive(byte) = "nums.cma"
|
||||||
|
- archive(native) = "nums.cmxa"
|
||||||
|
- plugin(byte) = "nums.cma"
|
||||||
|
- plugin(native) = "nums.cmxs"
|
||||||
|
-)
|
||||||
|
diff --git a/src/META.in b/src/META.in
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..b5678b7
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/META.in
|
||||||
|
@@ -0,0 +1,19 @@
|
||||||
|
+# This META is the one provided by findlib when the "num" library was
|
||||||
|
+# part of the core OCaml distribution. For backward compatibility,
|
||||||
|
+# it is installed into OCaml's standard library directory. If the
|
||||||
|
+# directory line below is removed, then it's installed in a
|
||||||
|
+# subdirectory, as normal for a findlib package.
|
||||||
|
+
|
||||||
|
+requires = "num.core"
|
||||||
|
+requires(toploop) = "num.core,num-top"
|
||||||
|
+version = "1.0"
|
||||||
|
+description = "Arbitrary-precision rational arithmetic"
|
||||||
|
+package "core" (
|
||||||
|
+ directory = "^"
|
||||||
|
+ version = "1.0"
|
||||||
|
+ browse_interfaces = ""
|
||||||
|
+ archive(byte) = "nums.cma"
|
||||||
|
+ archive(native) = "nums.cmxa"
|
||||||
|
+ plugin(byte) = "nums.cma"
|
||||||
|
+ plugin(native) = "nums.cmxs"
|
||||||
|
+)
|
||||||
|
diff --git a/src/Makefile b/src/Makefile
|
||||||
|
index 97dc074..ff271fe 100644
|
||||||
|
--- a/src/Makefile
|
||||||
|
+++ b/src/Makefile
|
||||||
|
@@ -80,21 +80,34 @@ endif
|
||||||
|
ifeq "$(NATDYNLINK)" "true"
|
||||||
|
TOINSTALL+=nums.cmxs
|
||||||
|
endif
|
||||||
|
+ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
|
||||||
|
TOINSTALL_STUBS=dllnums.$(SO)
|
||||||
|
+else
|
||||||
|
+TOINSTALL_STUBS=
|
||||||
|
+endif
|
||||||
|
|
||||||
|
install:
|
||||||
|
+ cp META.in META
|
||||||
|
$(OCAMLFIND) install num META
|
||||||
|
+ rm -f META
|
||||||
|
$(INSTALL_DATA) $(TOINSTALL) $(STDLIBDIR)
|
||||||
|
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
|
||||||
|
$(INSTALL_DLL) $(TOINSTALL_STUBS) $(STDLIBDIR)/stublibs
|
||||||
|
endif
|
||||||
|
|
||||||
|
-uninstall:
|
||||||
|
+findlib-install:
|
||||||
|
+ grep -Fv '^' META.in > META
|
||||||
|
+ $(OCAMLFIND) install num META $(TOINSTALL) $(TOINSTALL_STUBS)
|
||||||
|
+ rm -f META
|
||||||
|
+
|
||||||
|
+findlib-uninstall:
|
||||||
|
+ $(OCAMLFIND) remove num
|
||||||
|
+
|
||||||
|
+uninstall: findlib-uninstall
|
||||||
|
cd $(STDLIBDIR) && rm -f $(TOINSTALL)
|
||||||
|
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
|
||||||
|
cd $(STDLIBDIR)/stublibs && rm -f $(TOINSTALL_STUBS)
|
||||||
|
endif
|
||||||
|
- $(OCAMLFIND) remove num
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.cm[ioxta] *.cmx[as] *.cmti *.$(O) *.$(A) *.$(SO)
|
||||||
|
--
|
||||||
|
2.14.1
|
||||||
|
|
@ -0,0 +1,59 @@ |
|||||||
|
From db8d748b2cad0adc2698e9fcf28727083a711bae Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Allsopp <david.allsopp@metastack.com>
|
||||||
|
Date: Wed, 24 Jan 2018 16:01:56 +0000
|
||||||
|
Subject: [PATCH] Warn about installations broken by previous faulty package
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 33 +++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 33 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index b40e588..d4dcd70 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -14,9 +14,42 @@ install:
|
||||||
|
$(MAKE) -C src install
|
||||||
|
$(MAKE) -C toplevel install
|
||||||
|
|
||||||
|
+OCAMLFIND_DIR:=$(dir $(shell command -v ocamlfind 2>/dev/null))
|
||||||
|
+OCAMLC_DIR:=$(dir $(shell command -v ocamlc 2>/dev/null))
|
||||||
|
+NUM_INSTALLED:=$(shell ocamlfind query num 2>/dev/null)
|
||||||
|
+
|
||||||
|
+ifeq ($(NUM_INSTALLED),)
|
||||||
|
+# The num findlib package is not already present - wohoo!
|
||||||
|
+OUR_FAULT=no
|
||||||
|
+else
|
||||||
|
+ifeq ($(OCAMLFIND_DIR),$(OCAMLC_DIR))
|
||||||
|
+# The num findlib package is present, but ocamlc and ocamlfind are in the
|
||||||
|
+# same place, which means that either we're looking at a system-installed
|
||||||
|
+# ocamlfind (which isn't supported), or the user has done something else
|
||||||
|
+# nefarious and doesn't deserve our sympathy (or, at least, our potentially
|
||||||
|
+# unhelpful advice)
|
||||||
|
+OUR_FAULT=no
|
||||||
|
+else
|
||||||
|
+# The num findlib package package is present, and ocamlc and ocamlfind reside
|
||||||
|
+# in different directories, which means that we're almost certainly looking at
|
||||||
|
+# a system switch which has been damaged by a previous num package installation
|
||||||
|
+# on an OS which didn't protect the system lib directory.
|
||||||
|
+OUR_FAULT=probably
|
||||||
|
+endif
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
findlib-install:
|
||||||
|
+ifeq ($(OUR_FAULT),no)
|
||||||
|
$(MAKE) -C src findlib-install
|
||||||
|
$(MAKE) -C toplevel install
|
||||||
|
+else
|
||||||
|
+ @echo "\033[0;31m[ERROR]\033[m It appears that the num library was previously installed to your system"
|
||||||
|
+ @echo " compiler's lib directory, probably by a faulty opam package."
|
||||||
|
+ @echo " You will need to remove arith_flags.*, arith_status.*, big_int.*,"
|
||||||
|
+ @echo " int_misc.*, nat.*, num.*, ratio.*, nums.*, libnums.* and"
|
||||||
|
+ @echo " stublibs/dllnums.* from $(shell ocamlc -where)."
|
||||||
|
+ @false
|
||||||
|
+endif
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
$(MAKE) -C src uninstall
|
||||||
|
--
|
||||||
|
2.14.1
|
||||||
|
|
@ -0,0 +1,43 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
name: "num" |
||||||
|
version: "1.1" |
||||||
|
maintainer: "Xavier Leroy <xavier.leroy@inria.fr>" |
||||||
|
authors: [ |
||||||
|
"Valérie Ménissier-Morain" |
||||||
|
"Pierre Weis" |
||||||
|
"Xavier Leroy" |
||||||
|
] |
||||||
|
license: "LGPL 2.1 with OCaml linking exception" |
||||||
|
|
||||||
|
homepage: "https://github.com/ocaml/num/" |
||||||
|
bug-reports: "https://github.com/ocaml/num/issues" |
||||||
|
dev-repo: "git+https://github.com/ocaml/num.git" |
||||||
|
build: [ |
||||||
|
[make] |
||||||
|
] |
||||||
|
install: [ |
||||||
|
make |
||||||
|
"install" {!ocaml:preinstalled} |
||||||
|
"findlib-install" {ocaml:preinstalled} |
||||||
|
] |
||||||
|
remove: [ |
||||||
|
make |
||||||
|
"uninstall" {!ocaml:preinstalled} |
||||||
|
"findlib-uninstall" {ocaml:preinstalled} |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.06.0"} |
||||||
|
"ocamlfind" {build & >= "1.7.3"} |
||||||
|
] |
||||||
|
conflicts: [ "base-num" ] |
||||||
|
patches: [ "findlib-install.patch" "installation-warning.patch" ] |
||||||
|
synopsis: |
||||||
|
"The legacy Num library for arbitrary-precision integer and rational arithmetic" |
||||||
|
extra-files: [ |
||||||
|
["installation-warning.patch" "md5=93c92bf6da6bae09d068da42b1bbaaac"] |
||||||
|
["findlib-install.patch" "md5=3163a4c3f8dd084653eeb64d95311a2a"] |
||||||
|
] |
||||||
|
url { |
||||||
|
src: "https://github.com/ocaml/num/archive/v1.1.tar.gz" |
||||||
|
checksum: "md5=710cbe18b144955687a03ebab439ff2b" |
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ocaml-compiler-libs" |
||||||
|
bug-reports: "https://github.com/janestreet/ocaml-compiler-libs/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ocaml-compiler-libs.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"jbuilder" {build & >= "1.0+beta12"} |
||||||
|
] |
||||||
|
synopsis: "OCaml compiler libraries repackaged" |
||||||
|
description: """ |
||||||
|
This packages exposes the OCaml compiler libraries repackages under |
||||||
|
the toplevel names Ocaml_common, Ocaml_bytecomp, ...""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ocaml-compiler-libs-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=e170c16186aa55b7e8b11e461418a10a" |
||||||
|
} |
@ -0,0 +1,34 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "frederic.bour@lakaban.net" |
||||||
|
authors: [ |
||||||
|
"Frédéric Bour <frederic.bour@lakaban.net>" |
||||||
|
"Jérémie Dimino <jeremie@dimino.org>" |
||||||
|
] |
||||||
|
license: "LGPL-2.1" |
||||||
|
homepage: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree" |
||||||
|
bug-reports: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/issues" |
||||||
|
dev-repo: "git+https://github.com/ocaml-ppx/ocaml-migrate-parsetree.git" |
||||||
|
doc: "https://ocaml-ppx.github.io/ocaml-migrate-parsetree/" |
||||||
|
tags: [ "syntax" "org:ocamllabs" ] |
||||||
|
build: [ |
||||||
|
["dune" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"result" |
||||||
|
"ppx_derivers" |
||||||
|
"dune" {build & >= "1.6.0"} |
||||||
|
"ocaml" {>= "4.02.3"} |
||||||
|
] |
||||||
|
synopsis: "Convert OCaml parsetrees between different versions" |
||||||
|
description: """ |
||||||
|
Convert OCaml parsetrees between different versions |
||||||
|
|
||||||
|
This library converts parsetrees, outcometree and ast mappers between |
||||||
|
different OCaml versions. High-level functions help making PPX |
||||||
|
rewriters independent of a compiler version. |
||||||
|
""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.2.0/ocaml-migrate-parsetree-v1.2.0.tbz" |
||||||
|
checksum: "md5=cc6fb09ad6f99156c7dba47711c62c6f" |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "Gabriel Scherer <gabriel.scherer@gmail.com>" |
||||||
|
authors: ["Nicolas Pouillard" "Berke Durak"] |
||||||
|
homepage: "https://github.com/ocaml/ocamlbuild/" |
||||||
|
bug-reports: "https://github.com/ocaml/ocamlbuild/issues" |
||||||
|
license: "LGPL-2 with OCaml linking exception" |
||||||
|
doc: "https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc" |
||||||
|
dev-repo: "git+https://github.com/ocaml/ocamlbuild.git" |
||||||
|
build: [ |
||||||
|
[ |
||||||
|
make |
||||||
|
"-f" |
||||||
|
"configure.make" |
||||||
|
"all" |
||||||
|
"OCAMLBUILD_PREFIX=%{prefix}%" |
||||||
|
"OCAMLBUILD_BINDIR=%{bin}%" |
||||||
|
"OCAMLBUILD_LIBDIR=%{lib}%" |
||||||
|
"OCAMLBUILD_MANDIR=%{man}%" |
||||||
|
"OCAML_NATIVE=%{ocaml:native}%" |
||||||
|
"OCAML_NATIVE_TOOLS=%{ocaml:native}%" |
||||||
|
] |
||||||
|
[make "check-if-preinstalled" "all" "opam-install"] |
||||||
|
] |
||||||
|
conflicts: [ |
||||||
|
"base-ocamlbuild" |
||||||
|
"ocamlfind" {< "1.6.2"} |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"OCamlbuild is a build system with builtin rules to easily build most OCaml projects." |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.03" & < "4.08.0"} |
||||||
|
] |
||||||
|
url { |
||||||
|
src: "https://github.com/ocaml/ocamlbuild/archive/0.12.0.tar.gz" |
||||||
|
checksum: "md5=442baa19470bd49150f153122e22907b" |
||||||
|
} |
@ -0,0 +1,4 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
BINDIR=$(dirname "$(command -v ocamlc)") |
||||||
|
"$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" |
@ -0,0 +1,6 @@ |
|||||||
|
bin: [ |
||||||
|
"src/findlib/ocamlfind" {"ocamlfind"} |
||||||
|
"?src/findlib/ocamlfind_opt" {"ocamlfind"} |
||||||
|
"?tools/safe_camlp4" |
||||||
|
] |
||||||
|
toplevel: ["src/findlib/topfind"] |
@ -0,0 +1,64 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "Thomas Gazagnaire <thomas@gazagnaire.org>" |
||||||
|
homepage: "http://projects.camlcity.org/projects/findlib.html" |
||||||
|
bug-reports: "https://gitlab.camlcity.org/gerd/lib-findlib/issues" |
||||||
|
dev-repo: "git+https://gitlab.camlcity.org/gerd/lib-findlib.git" |
||||||
|
build: [ |
||||||
|
[ |
||||||
|
"./configure" |
||||||
|
"-bindir" |
||||||
|
bin |
||||||
|
"-sitelib" |
||||||
|
lib |
||||||
|
"-mandir" |
||||||
|
man |
||||||
|
"-config" |
||||||
|
"%{lib}%/findlib.conf" |
||||||
|
"-no-custom" |
||||||
|
"-no-topfind" {ocaml:preinstalled} |
||||||
|
] |
||||||
|
[make "all"] |
||||||
|
[make "opt"] {ocaml:native} |
||||||
|
] |
||||||
|
install: [ |
||||||
|
[make "install"] |
||||||
|
["install" "-m" "0755" "ocaml-stub" "%{bin}%/ocaml"] {ocaml:preinstalled} |
||||||
|
] |
||||||
|
remove: [ |
||||||
|
["ocamlfind" "remove" "bytes"] |
||||||
|
[ |
||||||
|
"./configure" |
||||||
|
"-bindir" |
||||||
|
bin |
||||||
|
"-sitelib" |
||||||
|
lib |
||||||
|
"-mandir" |
||||||
|
man |
||||||
|
"-config" |
||||||
|
"%{lib}%/findlib.conf" |
||||||
|
"-no-topfind" {ocaml:preinstalled} |
||||||
|
] |
||||||
|
[make "uninstall"] |
||||||
|
["rm" "-f" "%{bin}%/ocaml"] {ocaml:preinstalled} |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.00.0"} |
||||||
|
"conf-m4" {build} |
||||||
|
] |
||||||
|
synopsis: "A library manager for OCaml" |
||||||
|
description: """ |
||||||
|
Findlib is a library manager for OCaml. It provides a convention how |
||||||
|
to store libraries, and a file format ("META") to describe the |
||||||
|
properties of libraries. There is also a tool (ocamlfind) for |
||||||
|
interpreting the META files, so that it is very easy to use libraries |
||||||
|
in programs and scripts.""" |
||||||
|
authors: "Gerd Stolpmann <gerd@gerd-stolpmann.de>" |
||||||
|
extra-files: [ |
||||||
|
["ocamlfind.install" "md5=06f2c282ab52d93aa6adeeadd82a2543"] |
||||||
|
["ocaml-stub" "md5=181f259c9e0bad9ef523e7d4abfdf87a"] |
||||||
|
] |
||||||
|
url { |
||||||
|
src: "http://download.camlcity.org/download/findlib-1.8.0.tar.gz" |
||||||
|
checksum: "md5=a710c559667672077a93d34eb6a42e5b" |
||||||
|
mirrors: "http://download2.camlcity.org/download/findlib-1.8.0.tar.gz" |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
version: "1.2.0" |
||||||
|
opam-version: "2.0" |
||||||
|
name: "octavius" |
||||||
|
maintainer: "leo@lpw25.net" |
||||||
|
authors: [ "Leo White <leo@lpw25.net>" ] |
||||||
|
homepage: "https://github.com/ocaml-doc/octavius" |
||||||
|
doc: "http://ocaml-doc.github.io/octavius/" |
||||||
|
license: "ISC" |
||||||
|
dev-repo: "git+http://github.com/ocaml-doc/octavius.git" |
||||||
|
bug-reports: "https://github.com/ocaml-doc/octavius/issues" |
||||||
|
tags: ["doc" "ocamldoc" "org:ocaml-doc"] |
||||||
|
|
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.03.0"} |
||||||
|
"ocamlfind" {build} |
||||||
|
"jbuilder" {build & >= "1.0+beta7"} |
||||||
|
] |
||||||
|
build: [ |
||||||
|
["jbuilder" "subst" "-p" name] {pinned} |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
synopsis: "Ocamldoc comment syntax parser" |
||||||
|
description: "Octavius is a library to parse the `ocamldoc` comment syntax." |
||||||
|
url { |
||||||
|
src: "https://github.com/ocaml-doc/octavius/archive/v1.2.0.tar.gz" |
||||||
|
checksum: "md5=3e6049c39045354853d9dc3a197133ac" |
||||||
|
} |
@ -0,0 +1,41 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/parsexp" |
||||||
|
bug-reports: "https://github.com/janestreet/parsexp/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/parsexp.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"sexplib0" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
] |
||||||
|
synopsis: "S-expression parsing library" |
||||||
|
description: """ |
||||||
|
This library provides generic parsers for parsing S-expressions from |
||||||
|
strings or other medium. |
||||||
|
|
||||||
|
The library is focused on performances but still provide full generic |
||||||
|
parsers that can be used with strings, bigstrings, lexing buffers, |
||||||
|
character streams or any other sources effortlessly. |
||||||
|
|
||||||
|
It provides three different class of parsers: |
||||||
|
- the normal parsers, producing [Sexp.t] or [Sexp.t list] values |
||||||
|
- the parsers with positions, building compact position sequences so |
||||||
|
that one can recover original positions in order to report properly |
||||||
|
located errors at little cost |
||||||
|
- the Concrete Syntax Tree parsers, produce values of type |
||||||
|
[Parsexp.Cst.t] which record the concrete layout of the s-expression |
||||||
|
syntax, including comments |
||||||
|
|
||||||
|
This library is portable and doesn't provide IO functions. To read |
||||||
|
s-expressions from files or other external sources, you should use |
||||||
|
parsexp_io.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/parsexp-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=816fce8d14b71a379296577c803bdbca" |
||||||
|
} |
@ -0,0 +1,28 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_assert" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_assert/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_assert.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_compare" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_here" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Assert-like extension nodes that raise useful errors on failure" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_assert-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=0b3aed19391e9a23217a5abf022dfe10" |
||||||
|
} |
@ -0,0 +1,33 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_base" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_base/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_base.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"ppx_compare" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_enumerate" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_hash" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_js_style" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Base set of ppx rewriters" |
||||||
|
description: """ |
||||||
|
ppx_base is the set of ppx rewriters used for Base. |
||||||
|
|
||||||
|
Note that Base doesn't need ppx to build, it is only used as a |
||||||
|
verification tool.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_base-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=a0020fbf308592aa71932bea8135fac5" |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_bench" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_bench/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_bench.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"ppx_inline_test" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Syntax extension for writing in-line benchmarks in ocaml code" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_bench-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=a1565e9aa8e341f33e2e3dd712c889c8" |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_bin_prot" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_bin_prot/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_bin_prot.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"bin_prot" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_here" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.3.0"} |
||||||
|
] |
||||||
|
synopsis: "Generation of bin_prot readers and writers from types" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: "https://github.com/janestreet/ppx_bin_prot/archive/v0.11.1.tar.gz" |
||||||
|
checksum: "md5=fae0a476df94eb1dc7fccb293adffe1f" |
||||||
|
} |
@ -0,0 +1,24 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_compare" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_compare/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_compare.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.3.0"} |
||||||
|
] |
||||||
|
synopsis: "Generation of comparison functions from types" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: "https://github.com/janestreet/ppx_compare/archive/v0.11.1.tar.gz" |
||||||
|
checksum: "md5=3df1a90fc90d180b1f96cdd30e64145d" |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_custom_printf" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_custom_printf/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_custom_printf.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Printf-style format-strings for user-defined string conversion" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_custom_printf-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=b7cf49585319576dd77f6ddd6db95b21" |
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "jeremie@dimino.org" |
||||||
|
authors: ["Jérémie Dimino"] |
||||||
|
license: "BSD3" |
||||||
|
homepage: "https://github.com/ocaml-ppx/ppx_derivers" |
||||||
|
bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" |
||||||
|
dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" |
||||||
|
"jbuilder" {build & >= "1.0+beta7"} |
||||||
|
] |
||||||
|
synopsis: "Shared [@@deriving] plugin registry" |
||||||
|
description: """ |
||||||
|
Ppx_derivers is a tiny package whose sole purpose is to allow |
||||||
|
ppx_deriving and ppx_type_conv to inter-operate gracefully when linked |
||||||
|
as part of the same ocaml-migrate-parsetree driver.""" |
||||||
|
url { |
||||||
|
src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.0.tar.gz" |
||||||
|
checksum: "md5=4ddce8f43fdb9b0ef0ab6a7cbfebc3e3" |
||||||
|
} |
@ -0,0 +1,24 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_enumerate" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_enumerate/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_enumerate.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.3.0"} |
||||||
|
] |
||||||
|
synopsis: "Generate a list containing all values of a finite type" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: "https://github.com/janestreet/ppx_enumerate/archive/v0.11.1.tar.gz" |
||||||
|
checksum: "md5=25107fc78678dc46058aa5d3a7f3ab84" |
||||||
|
} |
@ -0,0 +1,35 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
version: "v0.11.1" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_expect" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_expect/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_expect.git" |
||||||
|
license: "MIT" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_assert" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_compare" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_custom_printf" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_fields_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_here" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_inline_test" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_variants_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"stdio" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
"re" {>= "1.5.0"} |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
] |
||||||
|
synopsis: "Cram like framework for OCaml" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/janestreet/ppx_expect/releases/download/v0.11.1/ppx_expect-v0.11.1.tbz" |
||||||
|
checksum: "md5=ee5e03094674de295aadc10efe6bb7b7" |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_fail" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_fail/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_fail.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_here" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Add location to calls to failwiths" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_fail-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=b153a48e619b819a89924857586e76ac" |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_fields_conv" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_fields_conv/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_fields_conv.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"fieldslib" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Generation of accessor and iteration functions for ocaml records" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_fields_conv-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=72f207c23d65f7f3eaabcc92e33ccdab" |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_hash" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_hash/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_hash.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_compare" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.3.0"} |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"A ppx rewriter that generates hash functions from type expressions and definitions" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: "https://github.com/janestreet/ppx_hash/archive/v0.11.1.tar.gz" |
||||||
|
checksum: "md5=48dfe890e195808ccdae0a7261bbb17d" |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_here" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_here/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_here.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Expands [%here] into its location" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_here-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=479c9cd5f6ef90c2df9f01eab9d6c91d" |
||||||
|
} |
@ -0,0 +1,24 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_inline_test" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_inline_test/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_inline_test.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Syntax extension for writing in-line tests in ocaml code" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_inline_test-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=1f2e014332373638696d8893d87f4682" |
||||||
|
} |
@ -0,0 +1,44 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_jane" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_jane/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_jane.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"ppx_assert" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_bench" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_bin_prot" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_custom_printf" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_expect" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_fail" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_fields_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_here" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_inline_test" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_let" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_optcomp" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_optional" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_pipebang" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_message" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_value" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_typerep_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_variants_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Standard Jane Street ppx rewriters" |
||||||
|
description: """ |
||||||
|
This package installs a ppx-jane executable, which is a ppx driver |
||||||
|
including all standard Jane Street ppx rewriters.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_jane-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=11da0871ae3841fb6710ec6471ce6b92" |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_js_style" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_js_style/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_js_style.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"octavius" |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Code style checker for Jane Street Packages" |
||||||
|
description: """ |
||||||
|
Part of the Jane Street's PPX rewriters collection. |
||||||
|
|
||||||
|
This packages is a no-op ppx rewriter. It is used as a 'lint' tool to |
||||||
|
enforce some coding conventions across all Jane Street packages.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_js_style-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=0994a7ecf0468f13fcac660413afafad" |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_let" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_let/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_let.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Monadic let-bindings" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_let-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=40d1798d7724816c65eb5cdabd20f150" |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_optcomp" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_optcomp/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_optcomp.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"stdio" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Optional compilation for OCaml" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_optcomp-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=396d6bac4ed5652d7be146756613c67e" |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_optional" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_optional/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_optional.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Pattern matching on flat options" |
||||||
|
description: """ |
||||||
|
A ppx rewriter that rewrites simple match statements with an if then |
||||||
|
else expression.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_optional-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=27bcae8445af584299876bdab0288152" |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_pipebang" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_pipebang/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_pipebang.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"A ppx rewriter that inlines reverse application operators `|>` and `|!`" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_pipebang-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=8f41bb8e67167d04b82223d024008683" |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_sexp_conv" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_sexp_conv/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_sexp_conv.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.3.0"} |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"Generation of S-expression conversion functions from type definitions" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: "https://github.com/janestreet/ppx_sexp_conv/archive/v0.11.2.tar.gz" |
||||||
|
checksum: "md5=77d3b30b3d9c5810552bde2027656b8d" |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_sexp_message" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_sexp_message/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_sexp_message.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_here" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "A ppx rewriter for easy construction of s-expressions" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_sexp_message-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=2cec96bcf6f7c54ba79fe39fc9fc4d98" |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_sexp_value" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_sexp_value/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_sexp_value.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_here" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_sexp_conv" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"A ppx rewriter that simplifies building s-expressions from ocaml values" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_sexp_value-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=28375d3b4bf5cda71b9260d20e5c3d34" |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "frederic.bour@lakaban.net" |
||||||
|
authors: [ |
||||||
|
"Frédéric Bour <frederic.bour@lakaban.net>" |
||||||
|
"Alain Frisch <alain.frisch@lexifi.com>" |
||||||
|
] |
||||||
|
license: "MIT" |
||||||
|
homepage: "https://github.com/let-def/ppx_tools_versioned" |
||||||
|
bug-reports: "https://github.com/let-def/ppx_tools_versioned/issues" |
||||||
|
dev-repo: "git://github.com/let-def/ppx_tools_versioned.git" |
||||||
|
tags: [ "syntax" ] |
||||||
|
build: [ |
||||||
|
["jbuilder" "subst" "-p" name] {pinned} |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
["jbuilder" "runtest" "-p" name "-j" jobs] {with-test} |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02.0"} |
||||||
|
"jbuilder" {build & >= "1.0+beta17"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0.10"} |
||||||
|
] |
||||||
|
synopsis: "A variant of ppx_tools based on ocaml-migrate-parsetree" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.2.1.tar.gz" |
||||||
|
checksum: "md5=1ae6ae43ec161fbbf12c2b4d3a7e26f5" |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_typerep_conv" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_typerep_conv/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_typerep_conv.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"typerep" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.3.0"} |
||||||
|
] |
||||||
|
synopsis: "Generation of runtime types from type declarations" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/janestreet/ppx_typerep_conv/archive/v0.11.1.tar.gz" |
||||||
|
checksum: "md5=826e9daf00258184e3392c970fa7d616" |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/ppx_variants_conv" |
||||||
|
bug-reports: "https://github.com/janestreet/ppx_variants_conv/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/ppx_variants_conv.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"variantslib" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.3.0"} |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"Generation of accessor and iteration functions for ocaml variant types" |
||||||
|
description: "Part of the Jane Street's PPX rewriters collection." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/janestreet/ppx_variants_conv/archive/v0.11.1.tar.gz" |
||||||
|
checksum: "md5=146b49b84315b7d67c1ca758fcbf2fb2" |
||||||
|
} |
@ -0,0 +1,42 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/ocaml-ppx/ppxlib" |
||||||
|
bug-reports: "https://github.com/ocaml-ppx/ppxlib/issues" |
||||||
|
dev-repo: "git+https://github.com/ocaml-ppx/ppxlib.git" |
||||||
|
doc: "https://ocaml-ppx.github.io/ppxlib/" |
||||||
|
license: "MIT" |
||||||
|
build: [ |
||||||
|
["dune" "subst"] {pinned} |
||||||
|
["dune" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
run-test: [ |
||||||
|
["dune" "runtest" "-p" name "-j" jobs] { ocaml >= "4.06" } |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11.0"} |
||||||
|
"dune" {build} |
||||||
|
"ocaml-compiler-libs" {>= "v0.11.0"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0.9"} |
||||||
|
"ppx_derivers" {>= "1.0"} |
||||||
|
"stdio" {>= "v0.11.0"} |
||||||
|
"ocamlfind" {with-test} |
||||||
|
] |
||||||
|
synopsis: "Base library and tools for ppx rewriters" |
||||||
|
description: """ |
||||||
|
A comprehensive toolbox for ppx development. It features: |
||||||
|
- a OCaml AST / parser / pretty-printer snapshot,to create a full |
||||||
|
frontend independent of the version of OCaml; |
||||||
|
- a library for library for ppx rewriters in general, and type-driven |
||||||
|
code generators in particular; |
||||||
|
- a feature-full driver for OCaml AST transformers; |
||||||
|
- a quotation mechanism allowing to write values representing the |
||||||
|
OCaml AST in the OCaml syntax; |
||||||
|
- a generator of open recursion classes from type definitions. |
||||||
|
""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/ocaml-ppx/ppxlib/releases/download/0.5.0/ppxlib-0.5.0.tbz" |
||||||
|
checksum: "md5=bb278ff6e819e0e4a4d8a005bb2512a4" |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "rudi.grinberg@gmail.com" |
||||||
|
authors: [ |
||||||
|
"Jerome Vouillon" |
||||||
|
"Thomas Gazagnaire" |
||||||
|
"Anil Madhavapeddy" |
||||||
|
"Rudi Grinberg" |
||||||
|
"Gabriel Radanne" |
||||||
|
] |
||||||
|
license: "LGPL-2.0 with OCaml linking exception" |
||||||
|
homepage: "https://github.com/ocaml/ocaml-re" |
||||||
|
bug-reports: "https://github.com/ocaml/ocaml-re/issues" |
||||||
|
dev-repo: "git+https://github.com/ocaml/ocaml-re.git" |
||||||
|
build: [ |
||||||
|
["jbuilder" "subst" "-p" name] {pinned} |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
["jbuilder" "runtest" "-p" name "-j" jobs] {with-test} |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02.3"} |
||||||
|
"jbuilder" {build & >= "1.0+beta10"} |
||||||
|
"ounit" {with-test} |
||||||
|
] |
||||||
|
synopsis: "RE is a regular expression library for OCaml" |
||||||
|
description: """ |
||||||
|
Pure OCaml regular expressions with: |
||||||
|
* Perl-style regular expressions (module Re.Perl) |
||||||
|
* Posix extended regular expressions (module Re.Posix) |
||||||
|
* Emacs-style regular expressions (module Re.Emacs) |
||||||
|
* Shell-style file globbing (module Re.Glob) |
||||||
|
* Compatibility layer for OCaml's built-in Str module (module Re.Str)""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/ocaml/ocaml-re/releases/download/1.7.3/re-1.7.3.tbz" |
||||||
|
checksum: "md5=d2a74ca77216861bce4449600a132de9" |
||||||
|
} |
@ -0,0 +1,22 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/result" |
||||||
|
dev-repo: "git+https://github.com/janestreet/result.git" |
||||||
|
bug-reports: "https://github.com/janestreet/result/issues" |
||||||
|
license: "BSD3" |
||||||
|
build: [["jbuilder" "build" "-p" name "-j" jobs]] |
||||||
|
depends: [ |
||||||
|
"ocaml" |
||||||
|
"jbuilder" {build & >= "1.0+beta11"} |
||||||
|
] |
||||||
|
synopsis: "Compatibility Result module" |
||||||
|
description: """ |
||||||
|
Projects that want to use the new result type defined in OCaml >= 4.03 |
||||||
|
while staying compatible with older version of OCaml should use the |
||||||
|
Result module defined in this library.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/janestreet/result/releases/download/1.3/result-1.3.tbz" |
||||||
|
checksum: "md5=4beebefd41f7f899b6eeba7414e7ae01" |
||||||
|
} |
@ -0,0 +1,28 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/sexplib" |
||||||
|
bug-reports: "https://github.com/janestreet/sexplib/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/sexplib.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"parsexp" {>= "v0.11" & < "v0.12"} |
||||||
|
"sexplib0" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"num" |
||||||
|
] |
||||||
|
synopsis: "Library for serializing OCaml values to and from S-expressions" |
||||||
|
description: """ |
||||||
|
Part of Jane Street's Core library |
||||||
|
The Core suite of libraries is an industrial strength alternative to |
||||||
|
OCaml's standard library that was developed by Jane Street, the |
||||||
|
largest industrial user of OCaml.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/sexplib-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=1d53d945914b6b9a380dc8923f19e9ae" |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/sexplib0" |
||||||
|
bug-reports: "https://github.com/janestreet/sexplib0/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/sexplib0.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
] |
||||||
|
conflicts: [ |
||||||
|
"sexplib" { < "v0.11"} |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"Library containing the definition of S-expressions and some base converters" |
||||||
|
description: """ |
||||||
|
Part of Jane Street's Core library |
||||||
|
The Core suite of libraries is an industrial strength alternative to |
||||||
|
OCaml's standard library that was developed by Jane Street, the |
||||||
|
largest industrial user of OCaml.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/sexplib0-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=1c14ba30b471e49f1b23fea5ff99ea6b" |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/spawn" |
||||||
|
bug-reports: "https://github.com/janestreet/spawn/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/spawn.git" |
||||||
|
doc: "https://janestreet.github.io/spawn/" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02.3"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
] |
||||||
|
synopsis: "Spawning sub-processes" |
||||||
|
description: """ |
||||||
|
Spawn is a small library exposing only one functionality: spawning sub-process. |
||||||
|
|
||||||
|
It has three main goals: |
||||||
|
|
||||||
|
1. provide missing features of Unix.create_process such as providing a |
||||||
|
working directory |
||||||
|
|
||||||
|
2. provide better errors when a system call fails in the |
||||||
|
sub-process. For instance if a command is not found, you get a proper |
||||||
|
[Unix.Unix_error] exception |
||||||
|
|
||||||
|
3. improve performances by using vfork when available. It is often |
||||||
|
claimed that nowadays fork is as fast as vfork, however in practice |
||||||
|
fork takes time proportional to the process memory while vfork is |
||||||
|
constant time. In application using a lot of memory, vfork can be |
||||||
|
thousands of times faster than fork.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/janestreet/spawn/releases/download/v0.12.0/spawn-v0.12.0.tbz" |
||||||
|
checksum: "md5=f9c770cbe3856e6ed5b92ba3ce7c691c" |
||||||
|
} |
@ -0,0 +1,32 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/splittable_random" |
||||||
|
bug-reports: "https://github.com/janestreet/splittable_random/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/splittable_random.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"ppx_jane" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
] |
||||||
|
synopsis: "PRNG that can be split into independent streams" |
||||||
|
description: """ |
||||||
|
PRNG that can be split into independent streams |
||||||
|
|
||||||
|
A splittable pseudo-random number generator (SPRNG) functions like a PRNG in that it can |
||||||
|
be used as a stream of random values; it can also be \\"split\\" to produce a second, |
||||||
|
independent stream of random values. |
||||||
|
|
||||||
|
This library implements a splittable pseudo-random number generator that sacrifices |
||||||
|
cryptographic-quality randomness in favor of performance.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/splittable_random-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=9caf5111500c790f44967b6ee648bfe9" |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/stdio" |
||||||
|
bug-reports: "https://github.com/janestreet/stdio/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/stdio.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
] |
||||||
|
synopsis: "Standard IO library for OCaml" |
||||||
|
description: """ |
||||||
|
Stdio implements simple input/output functionalities for OCaml. |
||||||
|
|
||||||
|
It re-exports the input/output functions of the OCaml standard |
||||||
|
libraries using a more consistent API.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/stdio-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=2db42ee38c91b3ff7126c2634c407b99" |
||||||
|
} |
@ -0,0 +1,22 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/typerep" |
||||||
|
bug-reports: "https://github.com/janestreet/typerep/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/typerep.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
] |
||||||
|
synopsis: "typerep is a library for runtime types." |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/typerep-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=9d7500376ac660c1427137310fabe9da" |
||||||
|
} |
@ -0,0 +1,28 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "opensource@janestreet.com" |
||||||
|
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] |
||||||
|
homepage: "https://github.com/janestreet/variantslib" |
||||||
|
bug-reports: "https://github.com/janestreet/variantslib/issues" |
||||||
|
dev-repo: "git+https://github.com/janestreet/variantslib.git" |
||||||
|
license: "Apache-2.0" |
||||||
|
build: [ |
||||||
|
["jbuilder" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
conflicts: [ "jbuilder" { = "1.0+beta19" } ] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.04.1"} |
||||||
|
"base" {>= "v0.11" & < "v0.12"} |
||||||
|
"jbuilder" {build & >= "1.0+beta18.1"} |
||||||
|
"ocaml-migrate-parsetree" {>= "1.0"} |
||||||
|
"ppxlib" {>= "0.1.0"} |
||||||
|
] |
||||||
|
synopsis: "Part of Jane Street's Core library" |
||||||
|
description: """ |
||||||
|
The Core suite of libraries is an industrial strength alternative to |
||||||
|
OCaml's standard library that was developed by Jane Street, the |
||||||
|
largest industrial user of OCaml.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/variantslib-v0.11.0.tar.gz" |
||||||
|
checksum: "md5=3031317975df165cc3154578680eddfb" |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
opam-version: "2.0" |
||||||
|
maintainer: "martin@mjambon.com" |
||||||
|
authors: ["Martin Jambon"] |
||||||
|
homepage: "https://github.com/ocaml-community/yojson" |
||||||
|
bug-reports: "https://github.com/ocaml-community/yojson/issues" |
||||||
|
dev-repo: "git+https://github.com/ocaml-community/yojson.git" |
||||||
|
doc: "https://ocaml-community.github.io/yojson/" |
||||||
|
build: [ |
||||||
|
["dune" "subst"] {pinned} |
||||||
|
["dune" "build" "-p" name "-j" jobs] |
||||||
|
] |
||||||
|
depends: [ |
||||||
|
"ocaml" {>= "4.02.3"} |
||||||
|
"dune" {build} |
||||||
|
"cppo" {build} |
||||||
|
"easy-format" |
||||||
|
"biniou" {>= "1.2.0"} |
||||||
|
] |
||||||
|
synopsis: |
||||||
|
"Yojson is an optimized parsing and printing library for the JSON format" |
||||||
|
description: """ |
||||||
|
Yojson is an optimized parsing and printing library for the JSON format. |
||||||
|
|
||||||
|
It addresses a few shortcomings of json-wheel including 2x speedup, |
||||||
|
polymorphic variants and optional syntax for tuples and variants. |
||||||
|
|
||||||
|
ydump is a pretty-printing command-line program provided with the |
||||||
|
yojson package. |
||||||
|
|
||||||
|
The program atdgen can be used to derive OCaml-JSON serializers and |
||||||
|
deserializers from type definitions.""" |
||||||
|
url { |
||||||
|
src: |
||||||
|
"https://github.com/ocaml-community/yojson/releases/download/1.5.0/yojson-1.5.0.tbz" |
||||||
|
checksum: "md5=d80de1bacdde292af42f7c78b323da7b" |
||||||
|
} |
@ -0,0 +1,56 @@ |
|||||||
|
--- ./src/exn_stubs.c
|
||||||
|
+++ ./src/exn_stubs.c
|
||||||
|
@@ -1,8 +1,13 @@
|
||||||
|
#include <caml/mlvalues.h>
|
||||||
|
|
||||||
|
extern int caml_backtrace_pos;
|
||||||
|
+#ifndef _MSC_VER
|
||||||
|
+#define UNUSED __attribute__((unused))
|
||||||
|
+#else
|
||||||
|
+#define UNUSED
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
-CAMLprim value Base_clear_caml_backtrace_pos (value __attribute__((unused)) unit) {
|
||||||
|
+CAMLprim value Base_clear_caml_backtrace_pos (value UNUSED unit) {
|
||||||
|
caml_backtrace_pos = 0;
|
||||||
|
return Val_unit;
|
||||||
|
}
|
||||||
|
--- ./src/int_math_stubs.c
|
||||||
|
+++ ./src/int_math_stubs.c
|
||||||
|
@@ -5,6 +5,25 @@
|
||||||
|
#include <caml/mlvalues.h>
|
||||||
|
#include <caml/memory.h>
|
||||||
|
|
||||||
|
+#if defined(_MSC_VER)
|
||||||
|
+#include <intrin.h>
|
||||||
|
+#ifdef ARCH_SIXTYFOUR
|
||||||
|
+#define __builtin_popcountll(x) __popcnt64((uint64_t)(x))
|
||||||
|
+static __inline uint32_t __builtin_clzll(uint64_t value) {
|
||||||
|
+ uint32_t leading_zero = 0;
|
||||||
|
+ _BitScanReverse64(&leading_zero, value);
|
||||||
|
+ return (63 - leading_zero);
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
+#define __builtin_popcount(x) __popcnt((unsigned int)(x))
|
||||||
|
+static __inline uint32_t __builtin_clz(uint32_t value) {
|
||||||
|
+ uint32_t leading_zero = 0;
|
||||||
|
+ _BitScanReverse(&leading_zero, value);
|
||||||
|
+ return (31 - leading_zero);
|
||||||
|
+}
|
||||||
|
+#endif /* ARCH_SIXTYFOUR */
|
||||||
|
+#endif /* defined(_MSC_VER) */
|
||||||
|
+
|
||||||
|
static int64_t int_pow(int64_t base, int64_t exponent) {
|
||||||
|
int64_t ret = 1;
|
||||||
|
int64_t mul[4];
|
||||||
|
--- ./src/jbuild
|
||||||
|
+++ ./src/jbuild
|
||||||
|
@@ -65,7 +65,7 @@
|
||||||
|
(progn
|
||||||
|
(with-stdout-to popcnt_test.c
|
||||||
|
(echo "int main(int argc, char ** argv) { return __builtin_popcount(argc); }"))
|
||||||
|
- (system "${CC} -mpopcnt -c popcnt_test.c 2> ${null} && \
|
||||||
|
+ (bash "${CC} -mpopcnt -c popcnt_test.c 2> ${null} && \
|
||||||
|
echo '(-mpopcnt)' > ${@} || echo '()' > ${@}"))))))
|
||||||
|
|
||||||
|
(ocamllex (hex_lexer))
|
@ -0,0 +1,17 @@ |
|||||||
|
{ |
||||||
|
"build": [ |
||||||
|
[ |
||||||
|
"bash", |
||||||
|
"-c", |
||||||
|
"#{os == 'windows' ? 'patch -p1 < base-v0.11.1.patch' : 'true'}" |
||||||
|
], |
||||||
|
[ |
||||||
|
"jbuilder", |
||||||
|
"build", |
||||||
|
"-p", |
||||||
|
"base", |
||||||
|
"-j", |
||||||
|
"4" |
||||||
|
] |
||||||
|
] |
||||||
|
} |
@ -0,0 +1,14 @@ |
|||||||
|
{ |
||||||
|
"build": [ |
||||||
|
[ |
||||||
|
"ocaml", |
||||||
|
"bootstrap.ml" |
||||||
|
], |
||||||
|
[ |
||||||
|
"./boot.exe", |
||||||
|
"--release", |
||||||
|
"-j", |
||||||
|
"4" |
||||||
|
] |
||||||
|
] |
||||||
|
} |
@ -0,0 +1,34 @@ |
|||||||
|
--- ./extend_helper.ml
|
||||||
|
+++ ./extend_helper.ml
|
||||||
|
@@ -1,13 +1,6 @@
|
||||||
|
-(*pp cppo -V OCAML:`ocamlc -version` *)
|
||||||
|
open Parsetree
|
||||||
|
open Extend_protocol
|
||||||
|
|
||||||
|
-#if OCAML_VERSION < (4, 3, 0)
|
||||||
|
-# define CONST_STRING Asttypes.Const_string
|
||||||
|
-#else
|
||||||
|
-# define CONST_STRING Parsetree.Pconst_string
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
(** Default implementation for [Reader_def.print_outcome] using
|
||||||
|
[Oprint] from compiler-libs *)
|
||||||
|
let print_outcome_using_oprint ppf = function
|
||||||
|
@@ -28,7 +21,7 @@
|
||||||
|
pstr_loc = Location.none;
|
||||||
|
pstr_desc = Pstr_eval ({
|
||||||
|
pexp_loc = Location.none;
|
||||||
|
- pexp_desc = Pexp_constant (CONST_STRING (msg, None));
|
||||||
|
+ pexp_desc = Pexp_constant (Parsetree.Pconst_string (msg, None));
|
||||||
|
pexp_attributes = [];
|
||||||
|
}, []);
|
||||||
|
}]
|
||||||
|
@@ -112,7 +105,7 @@
|
||||||
|
let msg = match payload with
|
||||||
|
| PStr [{
|
||||||
|
pstr_desc = Pstr_eval ({
|
||||||
|
- pexp_desc = Pexp_constant (CONST_STRING (msg, _));
|
||||||
|
+ pexp_desc = Pexp_constant (Parsetree.Pconst_string (msg, _));
|
||||||
|
}, _);
|
||||||
|
}] -> msg
|
||||||
|
| _ -> "Warning: extension produced an incorrect syntax-error node"
|
@ -0,0 +1,12 @@ |
|||||||
|
{ |
||||||
|
"build": [ |
||||||
|
[ |
||||||
|
"bash", |
||||||
|
"-c", |
||||||
|
"#{os == 'windows' ? 'patch -p1 < merlin-extend-winfix.patch' : 'true'}" |
||||||
|
], |
||||||
|
[ |
||||||
|
"make" |
||||||
|
] |
||||||
|
] |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
--- ./src/Makefile
|
||||||
|
+++ ./src/Makefile
|
||||||
|
@@ -80,7 +80,7 @@
|
||||||
|
ifeq "$(NATDYNLINK)" "true"
|
||||||
|
TOINSTALL+=nums.cmxs
|
||||||
|
endif
|
||||||
|
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
|
||||||
|
-TOINSTALL_STUBS=dllnums.$(SO)
|
||||||
|
+TOINSTALL_STUBS=dllnums$(EXT_DLL)
|
||||||
|
else
|
||||||
|
TOINSTALL_STUBS=
|
||||||
|
@@ -112,7 +112,7 @@
|
||||||
|
endif
|
||||||
|
|
||||||
|
clean:
|
||||||
|
- rm -f *.cm[ioxta] *.cmx[as] *.cmti *.$(O) *.$(A) *.$(SO)
|
||||||
|
+ rm -f *.cm[ioxta] *.cmx[as] *.cmti *.$(O) *.$(A) *$(EXE_DLL)
|
||||||
|
|
||||||
|
depend:
|
||||||
|
$(OCAMLDEP) -slash *.mli *.ml > .depend
|
@ -0,0 +1,24 @@ |
|||||||
|
{ |
||||||
|
"build": [ |
||||||
|
[ |
||||||
|
"bash", |
||||||
|
"-c", |
||||||
|
"#{os == 'windows' ? 'patch -p1 < num-1.1.patch' : 'true'}" |
||||||
|
], |
||||||
|
[ |
||||||
|
"make" |
||||||
|
] |
||||||
|
], |
||||||
|
"install": [ |
||||||
|
[ |
||||||
|
"make", |
||||||
|
"findlib-install" |
||||||
|
] |
||||||
|
], |
||||||
|
"exportedEnv": { |
||||||
|
"CAML_LD_LIBRARY_PATH": { |
||||||
|
"val": "#{self.install / 'lib' / 'num' : $CAML_LD_LIBRARY_PATH}", |
||||||
|
"scope": "global" |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,463 @@ |
|||||||
|
--- ./Makefile
|
||||||
|
+++ ./Makefile
|
||||||
|
@@ -213,7 +213,7 @@
|
||||||
|
rm -f man/ocamlbuild.1
|
||||||
|
|
||||||
|
man/options_man.byte: src/ocamlbuild_pack.cmo
|
||||||
|
- $(OCAMLC) $^ -I src man/options_man.ml -o man/options_man.byte
|
||||||
|
+ $(OCAMLC) -I +unix unix.cma $^ -I src man/options_man.ml -o man/options_man.byte
|
||||||
|
|
||||||
|
clean::
|
||||||
|
rm -f man/options_man.cm*
|
||||||
|
--- ./src/command.ml
|
||||||
|
+++ ./src/command.ml
|
||||||
|
@@ -148,9 +148,10 @@
|
||||||
|
let self = string_of_command_spec_with_calls call_with_tags call_with_target resolve_virtuals in
|
||||||
|
let b = Buffer.create 256 in
|
||||||
|
(* The best way to prevent bash from switching to its windows-style
|
||||||
|
- * quote-handling is to prepend an empty string before the command name. *)
|
||||||
|
+ * quote-handling is to prepend an empty string before the command name.
|
||||||
|
+ * space seems to work, too - and the ouput is nicer *)
|
||||||
|
if Sys.os_type = "Win32" then
|
||||||
|
- Buffer.add_string b "''";
|
||||||
|
+ Buffer.add_char b ' ';
|
||||||
|
let first = ref true in
|
||||||
|
let put_space () =
|
||||||
|
if !first then
|
||||||
|
@@ -260,7 +261,7 @@
|
||||||
|
|
||||||
|
let execute_many ?(quiet=false) ?(pretend=false) cmds =
|
||||||
|
add_parallel_stat (List.length cmds);
|
||||||
|
- let degraded = !*My_unix.is_degraded || Sys.os_type = "Win32" in
|
||||||
|
+ let degraded = !*My_unix.is_degraded in
|
||||||
|
let jobs = !jobs in
|
||||||
|
if jobs < 0 then invalid_arg "jobs < 0";
|
||||||
|
let max_jobs = if jobs = 0 then None else Some jobs in
|
||||||
|
--- ./src/findlib.ml
|
||||||
|
+++ ./src/findlib.ml
|
||||||
|
@@ -66,9 +66,6 @@
|
||||||
|
(fun command -> lexer & Lexing.from_string & run_and_read command)
|
||||||
|
command
|
||||||
|
|
||||||
|
-let run_and_read command =
|
||||||
|
- Printf.ksprintf run_and_read command
|
||||||
|
-
|
||||||
|
let rec query name =
|
||||||
|
try
|
||||||
|
Hashtbl.find packages name
|
||||||
|
@@ -135,7 +132,8 @@
|
||||||
|
with Not_found -> s
|
||||||
|
|
||||||
|
let list () =
|
||||||
|
- List.map before_space (split_nl & run_and_read "%s list" ocamlfind)
|
||||||
|
+ let cmd = Shell.quote_filename_if_needed ocamlfind ^ " list" in
|
||||||
|
+ List.map before_space (split_nl & run_and_read cmd)
|
||||||
|
|
||||||
|
(* The closure algorithm is easy because the dependencies are already closed
|
||||||
|
and sorted for each package. We only have to make the union. We could also
|
||||||
|
--- ./src/main.ml
|
||||||
|
+++ ./src/main.ml
|
||||||
|
@@ -162,6 +162,9 @@
|
||||||
|
Tags.mem "traverse" tags
|
||||||
|
|| List.exists (Pathname.is_prefix path_name) !Options.include_dirs
|
||||||
|
|| List.exists (Pathname.is_prefix path_name) target_dirs)
|
||||||
|
+ && ((* beware: !Options.build_dir is an absolute directory *)
|
||||||
|
+ Pathname.normalize !Options.build_dir
|
||||||
|
+ <> Pathname.normalize (Pathname.pwd/path_name))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--- ./src/my_std.ml
|
||||||
|
+++ ./src/my_std.ml
|
||||||
|
@@ -271,13 +271,107 @@
|
||||||
|
try Array.iter (fun x -> if x = basename then raise Exit) a; false
|
||||||
|
with Exit -> true
|
||||||
|
|
||||||
|
+let command_plain = function
|
||||||
|
+| [| |] -> 0
|
||||||
|
+| margv ->
|
||||||
|
+ let rec waitpid a b =
|
||||||
|
+ match Unix.waitpid a b with
|
||||||
|
+ | exception (Unix.Unix_error(Unix.EINTR,_,_)) -> waitpid a b
|
||||||
|
+ | x -> x
|
||||||
|
+ in
|
||||||
|
+ let pid = Unix.(create_process margv.(0) margv stdin stdout stderr) in
|
||||||
|
+ let pid', process_status = waitpid [] pid in
|
||||||
|
+ assert (pid = pid');
|
||||||
|
+ match process_status with
|
||||||
|
+ | Unix.WEXITED n -> n
|
||||||
|
+ | Unix.WSIGNALED _ -> 2 (* like OCaml's uncaught exceptions *)
|
||||||
|
+ | Unix.WSTOPPED _ -> 127
|
||||||
|
+
|
||||||
|
+(* can't use Lexers because of circular dependency *)
|
||||||
|
+let split_path_win str =
|
||||||
|
+ let rec aux pos =
|
||||||
|
+ try
|
||||||
|
+ let i = String.index_from str pos ';' in
|
||||||
|
+ let len = i - pos in
|
||||||
|
+ if len = 0 then
|
||||||
|
+ aux (succ i)
|
||||||
|
+ else
|
||||||
|
+ String.sub str pos (i - pos) :: aux (succ i)
|
||||||
|
+ with Not_found | Invalid_argument _ ->
|
||||||
|
+ let len = String.length str - pos in
|
||||||
|
+ if len = 0 then [] else [String.sub str pos len]
|
||||||
|
+ in
|
||||||
|
+ aux 0
|
||||||
|
+
|
||||||
|
+let windows_shell = lazy begin
|
||||||
|
+ let rec iter = function
|
||||||
|
+ | [] -> [| "bash.exe" ; "--norc" ; "--noprofile" |]
|
||||||
|
+ | hd::tl ->
|
||||||
|
+ let dash = Filename.concat hd "dash.exe" in
|
||||||
|
+ if Sys.file_exists dash then [|dash|] else
|
||||||
|
+ let bash = Filename.concat hd "bash.exe" in
|
||||||
|
+ if Sys.file_exists bash = false then iter tl else
|
||||||
|
+ (* if sh.exe and bash.exe exist in the same dir, choose sh.exe *)
|
||||||
|
+ let sh = Filename.concat hd "sh.exe" in
|
||||||
|
+ if Sys.file_exists sh then [|sh|] else [|bash ; "--norc" ; "--noprofile"|]
|
||||||
|
+ in
|
||||||
|
+ split_path_win (try Sys.getenv "PATH" with Not_found -> "") |> iter
|
||||||
|
+end
|
||||||
|
+
|
||||||
|
+let prep_windows_cmd cmd =
|
||||||
|
+ (* workaround known ocaml bug, remove later *)
|
||||||
|
+ if String.contains cmd '\t' && String.contains cmd ' ' = false then
|
||||||
|
+ " " ^ cmd
|
||||||
|
+ else
|
||||||
|
+ cmd
|
||||||
|
+
|
||||||
|
+let run_with_shell = function
|
||||||
|
+| "" -> 0
|
||||||
|
+| cmd ->
|
||||||
|
+ let cmd = prep_windows_cmd cmd in
|
||||||
|
+ let shell = Lazy.force windows_shell in
|
||||||
|
+ let qlen = Filename.quote cmd |> String.length in
|
||||||
|
+ (* old versions of dash had problems with bs *)
|
||||||
|
+ try
|
||||||
|
+ if qlen < 7_900 then
|
||||||
|
+ command_plain (Array.append shell [| "-ec" ; cmd |])
|
||||||
|
+ else begin
|
||||||
|
+ (* it can still work, if the called command is a cygwin tool *)
|
||||||
|
+ let ch_closed = ref false in
|
||||||
|
+ let file_deleted = ref false in
|
||||||
|
+ let fln,ch =
|
||||||
|
+ Filename.open_temp_file
|
||||||
|
+ ~mode:[Open_binary]
|
||||||
|
+ "ocamlbuildtmp"
|
||||||
|
+ ".sh"
|
||||||
|
+ in
|
||||||
|
+ try
|
||||||
|
+ let f_slash = String.map ( fun x -> if x = '\\' then '/' else x ) fln in
|
||||||
|
+ output_string ch cmd;
|
||||||
|
+ ch_closed:= true;
|
||||||
|
+ close_out ch;
|
||||||
|
+ let ret = command_plain (Array.append shell [| "-e" ; f_slash |]) in
|
||||||
|
+ file_deleted:= true;
|
||||||
|
+ Sys.remove fln;
|
||||||
|
+ ret
|
||||||
|
+ with
|
||||||
|
+ | x ->
|
||||||
|
+ if !ch_closed = false then
|
||||||
|
+ close_out_noerr ch;
|
||||||
|
+ if !file_deleted = false then
|
||||||
|
+ (try Sys.remove fln with _ -> ());
|
||||||
|
+ raise x
|
||||||
|
+ end
|
||||||
|
+ with
|
||||||
|
+ | (Unix.Unix_error _) as x ->
|
||||||
|
+ (* Sys.command doesn't raise an exception, so run_with_shell also won't
|
||||||
|
+ raise *)
|
||||||
|
+ Printexc.to_string x ^ ":" ^ cmd |> prerr_endline;
|
||||||
|
+ 1
|
||||||
|
+
|
||||||
|
let sys_command =
|
||||||
|
- match Sys.os_type with
|
||||||
|
- | "Win32" -> fun cmd ->
|
||||||
|
- if cmd = "" then 0 else
|
||||||
|
- let cmd = "bash --norc -c " ^ Filename.quote cmd in
|
||||||
|
- Sys.command cmd
|
||||||
|
- | _ -> fun cmd -> if cmd = "" then 0 else Sys.command cmd
|
||||||
|
+ if Sys.win32 then run_with_shell
|
||||||
|
+ else fun cmd -> if cmd = "" then 0 else Sys.command cmd
|
||||||
|
|
||||||
|
(* FIXME warning fix and use Filename.concat *)
|
||||||
|
let filename_concat x y =
|
||||||
|
--- ./src/my_std.mli
|
||||||
|
+++ ./src/my_std.mli
|
||||||
|
@@ -69,3 +69,6 @@
|
||||||
|
|
||||||
|
val split_ocaml_version : (int * int * int * string) option
|
||||||
|
(** (major, minor, patchlevel, rest) *)
|
||||||
|
+
|
||||||
|
+val windows_shell : string array Lazy.t
|
||||||
|
+val prep_windows_cmd : string -> string
|
||||||
|
--- ./src/ocamlbuild_executor.ml
|
||||||
|
+++ ./src/ocamlbuild_executor.ml
|
||||||
|
@@ -34,6 +34,8 @@
|
||||||
|
job_stdin : out_channel;
|
||||||
|
job_stderr : in_channel;
|
||||||
|
job_buffer : Buffer.t;
|
||||||
|
+ job_pid : int;
|
||||||
|
+ job_tmp_file: string option;
|
||||||
|
mutable job_dying : bool;
|
||||||
|
};;
|
||||||
|
|
||||||
|
@@ -76,6 +78,61 @@
|
||||||
|
in
|
||||||
|
loop 0
|
||||||
|
;;
|
||||||
|
+
|
||||||
|
+let open_process_full_win cmd env =
|
||||||
|
+ let (in_read, in_write) = Unix.pipe () in
|
||||||
|
+ let (out_read, out_write) = Unix.pipe () in
|
||||||
|
+ let (err_read, err_write) = Unix.pipe () in
|
||||||
|
+ Unix.set_close_on_exec in_read;
|
||||||
|
+ Unix.set_close_on_exec out_write;
|
||||||
|
+ Unix.set_close_on_exec err_read;
|
||||||
|
+ let inchan = Unix.in_channel_of_descr in_read in
|
||||||
|
+ let outchan = Unix.out_channel_of_descr out_write in
|
||||||
|
+ let errchan = Unix.in_channel_of_descr err_read in
|
||||||
|
+ let shell = Lazy.force Ocamlbuild_pack.My_std.windows_shell in
|
||||||
|
+ let test_cmd =
|
||||||
|
+ String.concat " " (List.map Filename.quote (Array.to_list shell)) ^
|
||||||
|
+ "-ec " ^
|
||||||
|
+ Filename.quote (Ocamlbuild_pack.My_std.prep_windows_cmd cmd) in
|
||||||
|
+ let argv,tmp_file =
|
||||||
|
+ if String.length test_cmd < 7_900 then
|
||||||
|
+ Array.append
|
||||||
|
+ shell
|
||||||
|
+ [| "-ec" ; Ocamlbuild_pack.My_std.prep_windows_cmd cmd |],None
|
||||||
|
+ else
|
||||||
|
+ let fln,ch = Filename.open_temp_file ~mode:[Open_binary] "ocamlbuild" ".sh" in
|
||||||
|
+ output_string ch (Ocamlbuild_pack.My_std.prep_windows_cmd cmd);
|
||||||
|
+ close_out ch;
|
||||||
|
+ let fln' = String.map (function '\\' -> '/' | c -> c) fln in
|
||||||
|
+ Array.append
|
||||||
|
+ shell
|
||||||
|
+ [| "-c" ; fln' |], Some fln in
|
||||||
|
+ let pid =
|
||||||
|
+ Unix.create_process_env argv.(0) argv env out_read in_write err_write in
|
||||||
|
+ Unix.close out_read;
|
||||||
|
+ Unix.close in_write;
|
||||||
|
+ Unix.close err_write;
|
||||||
|
+ (pid, inchan, outchan, errchan,tmp_file)
|
||||||
|
+
|
||||||
|
+let close_process_full_win (pid,inchan, outchan, errchan, tmp_file) =
|
||||||
|
+ let delete tmp_file =
|
||||||
|
+ match tmp_file with
|
||||||
|
+ | None -> ()
|
||||||
|
+ | Some x -> try Sys.remove x with Sys_error _ -> () in
|
||||||
|
+ let tmp_file_deleted = ref false in
|
||||||
|
+ try
|
||||||
|
+ close_in inchan;
|
||||||
|
+ close_out outchan;
|
||||||
|
+ close_in errchan;
|
||||||
|
+ let res = snd(Unix.waitpid [] pid) in
|
||||||
|
+ tmp_file_deleted := true;
|
||||||
|
+ delete tmp_file;
|
||||||
|
+ res
|
||||||
|
+ with
|
||||||
|
+ | x when tmp_file <> None && !tmp_file_deleted = false ->
|
||||||
|
+ delete tmp_file;
|
||||||
|
+ raise x
|
||||||
|
+
|
||||||
|
(* ***)
|
||||||
|
(*** execute *)
|
||||||
|
(* XXX: Add test for non reentrancy *)
|
||||||
|
@@ -130,10 +187,16 @@
|
||||||
|
(*** add_job *)
|
||||||
|
let add_job cmd rest result id =
|
||||||
|
(*display begin fun oc -> fp oc "Job %a is %s\n%!" print_job_id id cmd; end;*)
|
||||||
|
- let (stdout', stdin', stderr') = open_process_full cmd env in
|
||||||
|
+ let (pid,stdout', stdin', stderr', tmp_file) =
|
||||||
|
+ if Sys.win32 then open_process_full_win cmd env else
|
||||||
|
+ let a,b,c = open_process_full cmd env in
|
||||||
|
+ -1,a,b,c,None
|
||||||
|
+ in
|
||||||
|
incr jobs_active;
|
||||||
|
- set_nonblock (doi stdout');
|
||||||
|
- set_nonblock (doi stderr');
|
||||||
|
+ if not Sys.win32 then (
|
||||||
|
+ set_nonblock (doi stdout');
|
||||||
|
+ set_nonblock (doi stderr');
|
||||||
|
+ );
|
||||||
|
let job =
|
||||||
|
{ job_id = id;
|
||||||
|
job_command = cmd;
|
||||||
|
@@ -143,7 +206,9 @@
|
||||||
|
job_stdin = stdin';
|
||||||
|
job_stderr = stderr';
|
||||||
|
job_buffer = Buffer.create 1024;
|
||||||
|
- job_dying = false }
|
||||||
|
+ job_dying = false;
|
||||||
|
+ job_tmp_file = tmp_file;
|
||||||
|
+ job_pid = pid }
|
||||||
|
in
|
||||||
|
outputs := FDM.add (doi stdout') job (FDM.add (doi stderr') job !outputs);
|
||||||
|
jobs := JS.add job !jobs;
|
||||||
|
@@ -199,6 +264,7 @@
|
||||||
|
try
|
||||||
|
read fd u 0 (Bytes.length u)
|
||||||
|
with
|
||||||
|
+ | Unix.Unix_error(Unix.EPIPE,_,_) when Sys.win32 -> 0
|
||||||
|
| Unix.Unix_error(e,_,_) ->
|
||||||
|
let msg = error_message e in
|
||||||
|
display (fun oc -> fp oc
|
||||||
|
@@ -241,14 +307,19 @@
|
||||||
|
decr jobs_active;
|
||||||
|
|
||||||
|
(* PR#5371: we would get EAGAIN below otherwise *)
|
||||||
|
- clear_nonblock (doi job.job_stdout);
|
||||||
|
- clear_nonblock (doi job.job_stderr);
|
||||||
|
-
|
||||||
|
+ if not Sys.win32 then (
|
||||||
|
+ clear_nonblock (doi job.job_stdout);
|
||||||
|
+ clear_nonblock (doi job.job_stderr);
|
||||||
|
+ );
|
||||||
|
do_read ~loop:true (doi job.job_stdout) job;
|
||||||
|
do_read ~loop:true (doi job.job_stderr) job;
|
||||||
|
outputs := FDM.remove (doi job.job_stdout) (FDM.remove (doi job.job_stderr) !outputs);
|
||||||
|
jobs := JS.remove job !jobs;
|
||||||
|
- let status = close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in
|
||||||
|
+ let status =
|
||||||
|
+ if Sys.win32 then
|
||||||
|
+ close_process_full_win (job.job_pid, job.job_stdout, job.job_stdin, job.job_stderr, job.job_tmp_file)
|
||||||
|
+ else
|
||||||
|
+ close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in
|
||||||
|
|
||||||
|
let shown = ref false in
|
||||||
|
|
||||||
|
--- ./src/ocamlbuild_unix_plugin.ml
|
||||||
|
+++ ./src/ocamlbuild_unix_plugin.ml
|
||||||
|
@@ -48,12 +48,22 @@
|
||||||
|
end
|
||||||
|
|
||||||
|
let run_and_open s kont =
|
||||||
|
+ let s_orig = s in
|
||||||
|
+ let s =
|
||||||
|
+ (* Be consistent! My_unix.run_and_open uses My_std.sys_command and
|
||||||
|
+ sys_command uses bash. *)
|
||||||
|
+ if Sys.win32 = false then s else
|
||||||
|
+ let l = match Lazy.force My_std.windows_shell |> Array.to_list with
|
||||||
|
+ | hd::tl -> (Filename.quote hd)::tl
|
||||||
|
+ | _ -> assert false in
|
||||||
|
+ "\"" ^ (String.concat " " l) ^ " -ec " ^ Filename.quote (" " ^ s) ^ "\""
|
||||||
|
+ in
|
||||||
|
let ic = Unix.open_process_in s in
|
||||||
|
let close () =
|
||||||
|
match Unix.close_process_in ic with
|
||||||
|
| Unix.WEXITED 0 -> ()
|
||||||
|
| Unix.WEXITED _ | Unix.WSIGNALED _ | Unix.WSTOPPED _ ->
|
||||||
|
- failwith (Printf.sprintf "Error while running: %s" s) in
|
||||||
|
+ failwith (Printf.sprintf "Error while running: %s" s_orig) in
|
||||||
|
let res = try
|
||||||
|
kont ic
|
||||||
|
with e -> (close (); raise e)
|
||||||
|
--- ./src/options.ml
|
||||||
|
+++ ./src/options.ml
|
||||||
|
@@ -174,11 +174,24 @@
|
||||||
|
build_dir := Filename.concat (Sys.getcwd ()) s
|
||||||
|
else
|
||||||
|
build_dir := s
|
||||||
|
+
|
||||||
|
+let slashify =
|
||||||
|
+ if Sys.win32 then fun p -> String.map (function '\\' -> '/' | x -> x) p
|
||||||
|
+ else fun p ->p
|
||||||
|
+
|
||||||
|
+let sb () =
|
||||||
|
+ match Sys.os_type with
|
||||||
|
+ | "Win32" ->
|
||||||
|
+ (try set_binary_mode_out stdout true with _ -> ());
|
||||||
|
+ | _ -> ()
|
||||||
|
+
|
||||||
|
+
|
||||||
|
let spec = ref (
|
||||||
|
let print_version () =
|
||||||
|
+ sb ();
|
||||||
|
Printf.printf "ocamlbuild %s\n%!" Ocamlbuild_config.version; raise Exit_OK
|
||||||
|
in
|
||||||
|
- let print_vnum () = print_endline Ocamlbuild_config.version; raise Exit_OK in
|
||||||
|
+ let print_vnum () = sb (); print_endline Ocamlbuild_config.version; raise Exit_OK in
|
||||||
|
Arg.align
|
||||||
|
[
|
||||||
|
"-version", Unit print_version , " Display the version";
|
||||||
|
@@ -257,8 +270,8 @@
|
||||||
|
"-build-dir", String set_build_dir, "<path> Set build directory (implies no-links)";
|
||||||
|
"-install-lib-dir", Set_string Ocamlbuild_where.libdir, "<path> Set the install library directory";
|
||||||
|
"-install-bin-dir", Set_string Ocamlbuild_where.bindir, "<path> Set the install binary directory";
|
||||||
|
- "-where", Unit (fun () -> print_endline !Ocamlbuild_where.libdir; raise Exit_OK), " Display the install library directory";
|
||||||
|
- "-which", String (fun cmd -> print_endline (find_tool cmd); raise Exit_OK), "<command> Display path to the tool command";
|
||||||
|
+ "-where", Unit (fun () -> sb (); print_endline (slashify !Ocamlbuild_where.libdir); raise Exit_OK), " Display the install library directory";
|
||||||
|
+ "-which", String (fun cmd -> sb (); print_endline (slashify (find_tool cmd)); raise Exit_OK), "<command> Display path to the tool command";
|
||||||
|
"-ocamlc", set_cmd ocamlc, "<command> Set the OCaml bytecode compiler";
|
||||||
|
"-plugin-ocamlc", set_cmd plugin_ocamlc, "<command> Set the OCaml bytecode compiler \
|
||||||
|
used when building myocamlbuild.ml (only)";
|
||||||
|
--- ./src/pathname.ml
|
||||||
|
+++ ./src/pathname.ml
|
||||||
|
@@ -84,6 +84,26 @@
|
||||||
|
| x :: xs -> x :: normalize_list xs
|
||||||
|
|
||||||
|
let normalize x =
|
||||||
|
+ let x =
|
||||||
|
+ if Sys.win32 = false then
|
||||||
|
+ x
|
||||||
|
+ else
|
||||||
|
+ let len = String.length x in
|
||||||
|
+ let b = Bytes.create len in
|
||||||
|
+ for i = 0 to pred len do
|
||||||
|
+ match x.[i] with
|
||||||
|
+ | '\\' -> Bytes.set b i '/'
|
||||||
|
+ | c -> Bytes.set b i c
|
||||||
|
+ done;
|
||||||
|
+ if len > 1 then (
|
||||||
|
+ let c1 = Bytes.get b 0 in
|
||||||
|
+ let c2 = Bytes.get b 1 in
|
||||||
|
+ if c2 = ':' && c1 >= 'a' && c1 <= 'z' &&
|
||||||
|
+ ( len = 2 || Bytes.get b 2 = '/') then
|
||||||
|
+ Bytes.set b 0 (Char.uppercase_ascii c1)
|
||||||
|
+ );
|
||||||
|
+ Bytes.unsafe_to_string b
|
||||||
|
+ in
|
||||||
|
if Glob.eval not_normal_form_re x then
|
||||||
|
let root, paths = split x in
|
||||||
|
join root (normalize_list paths)
|
||||||
|
--- ./src/shell.ml
|
||||||
|
+++ ./src/shell.ml
|
||||||
|
@@ -24,12 +24,26 @@
|
||||||
|
| 'a'..'z' | 'A'..'Z' | '0'..'9' | '.' | '-' | '/' | '_' | ':' | '@' | '+' | ',' -> loop (pos + 1)
|
||||||
|
| _ -> false in
|
||||||
|
loop 0
|
||||||
|
+
|
||||||
|
+let generic_quote quotequote s =
|
||||||
|
+ let l = String.length s in
|
||||||
|
+ let b = Buffer.create (l + 20) in
|
||||||
|
+ Buffer.add_char b '\'';
|
||||||
|
+ for i = 0 to l - 1 do
|
||||||
|
+ if s.[i] = '\''
|
||||||
|
+ then Buffer.add_string b quotequote
|
||||||
|
+ else Buffer.add_char b s.[i]
|
||||||
|
+ done;
|
||||||
|
+ Buffer.add_char b '\'';
|
||||||
|
+ Buffer.contents b
|
||||||
|
+let unix_quote = generic_quote "'\\''"
|
||||||
|
+
|
||||||
|
let quote_filename_if_needed s =
|
||||||
|
if is_simple_filename s then s
|
||||||
|
(* We should probably be using [Filename.unix_quote] except that function
|
||||||
|
* isn't exported. Users on Windows will have to live with not being able to
|
||||||
|
* install OCaml into c:\o'caml. Too bad. *)
|
||||||
|
- else if Sys.os_type = "Win32" then Printf.sprintf "'%s'" s
|
||||||
|
+ else if Sys.os_type = "Win32" then unix_quote s
|
||||||
|
else Filename.quote s
|
||||||
|
let chdir dir =
|
||||||
|
reset_filesys_cache ();
|
||||||
|
@@ -37,7 +51,7 @@
|
||||||
|
let run args target =
|
||||||
|
reset_readdir_cache ();
|
||||||
|
let cmd = String.concat " " (List.map quote_filename_if_needed args) in
|
||||||
|
- if !*My_unix.is_degraded || Sys.os_type = "Win32" then
|
||||||
|
+ if !*My_unix.is_degraded then
|
||||||
|
begin
|
||||||
|
Log.event cmd target Tags.empty;
|
||||||
|
let st = sys_command cmd in
|
@ -0,0 +1,27 @@ |
|||||||
|
{ |
||||||
|
"build": [ |
||||||
|
[ |
||||||
|
"bash", |
||||||
|
"-c", |
||||||
|
"#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.12.0.patch' : 'true'}" |
||||||
|
], |
||||||
|
[ |
||||||
|
"make", |
||||||
|
"-f", |
||||||
|
"configure.make", |
||||||
|
"all", |
||||||
|
"OCAMLBUILD_PREFIX=#{self.install}", |
||||||
|
"OCAMLBUILD_BINDIR=#{self.bin}", |
||||||
|
"OCAMLBUILD_LIBDIR=#{self.lib}", |
||||||
|
"OCAMLBUILD_MANDIR=#{self.man}", |
||||||
|
"OCAMLBUILD_NATIVE=true", |
||||||
|
"OCAMLBUILD_NATIVE_TOOLS=true" |
||||||
|
], |
||||||
|
[ |
||||||
|
"make", |
||||||
|
"check-if-preinstalled", |
||||||
|
"all", |
||||||
|
"#{os == 'windows' ? 'install' : 'opam-install'}" |
||||||
|
] |
||||||
|
] |
||||||
|
} |
@ -0,0 +1,489 @@ |
|||||||
|
--- ./Makefile
|
||||||
|
+++ ./Makefile
|
||||||
|
@@ -57,16 +57,16 @@
|
||||||
|
cat findlib.conf.in | \
|
||||||
|
$(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf
|
||||||
|
if ./tools/cmd_from_same_dir ocamlc; then \
|
||||||
|
- echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \
|
||||||
|
+ echo 'ocamlc="ocamlc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \
|
||||||
|
fi
|
||||||
|
if ./tools/cmd_from_same_dir ocamlopt; then \
|
||||||
|
- echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \
|
||||||
|
+ echo 'ocamlopt="ocamlopt.opt$(EXEC_SUFFIX)"' >>findlib.conf; \
|
||||||
|
fi
|
||||||
|
if ./tools/cmd_from_same_dir ocamldep; then \
|
||||||
|
- echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \
|
||||||
|
+ echo 'ocamldep="ocamldep.opt$(EXEC_SUFFIX)"' >>findlib.conf; \
|
||||||
|
fi
|
||||||
|
if ./tools/cmd_from_same_dir ocamldoc; then \
|
||||||
|
- echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \
|
||||||
|
+ echo 'ocamldoc="ocamldoc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
.PHONY: install-doc
|
||||||
|
--- ./src/findlib/findlib_config.mlp
|
||||||
|
+++ ./src/findlib/findlib_config.mlp
|
||||||
|
@@ -24,3 +24,5 @@
|
||||||
|
| "MacOS" -> "" (* don't know *)
|
||||||
|
| _ -> failwith "Unknown Sys.os_type"
|
||||||
|
;;
|
||||||
|
+
|
||||||
|
+let exec_suffix = "@EXEC_SUFFIX@";;
|
||||||
|
--- ./src/findlib/findlib.ml
|
||||||
|
+++ ./src/findlib/findlib.ml
|
||||||
|
@@ -28,15 +28,20 @@
|
||||||
|
let conf_ldconf = ref "";;
|
||||||
|
let conf_ignore_dups_in = ref ([] : string list);;
|
||||||
|
|
||||||
|
-let ocamlc_default = "ocamlc";;
|
||||||
|
-let ocamlopt_default = "ocamlopt";;
|
||||||
|
-let ocamlcp_default = "ocamlcp";;
|
||||||
|
-let ocamloptp_default = "ocamloptp";;
|
||||||
|
-let ocamlmklib_default = "ocamlmklib";;
|
||||||
|
-let ocamlmktop_default = "ocamlmktop";;
|
||||||
|
-let ocamldep_default = "ocamldep";;
|
||||||
|
-let ocamlbrowser_default = "ocamlbrowser";;
|
||||||
|
-let ocamldoc_default = "ocamldoc";;
|
||||||
|
+let add_exec str =
|
||||||
|
+ match Findlib_config.exec_suffix with
|
||||||
|
+ | "" -> str
|
||||||
|
+ | a -> str ^ a ;;
|
||||||
|
+let ocamlc_default = add_exec "ocamlc";;
|
||||||
|
+let ocamlopt_default = add_exec "ocamlopt";;
|
||||||
|
+let ocamlcp_default = add_exec "ocamlcp";;
|
||||||
|
+let ocamloptp_default = add_exec "ocamloptp";;
|
||||||
|
+let ocamlmklib_default = add_exec "ocamlmklib";;
|
||||||
|
+let ocamlmktop_default = add_exec "ocamlmktop";;
|
||||||
|
+let ocamldep_default = add_exec "ocamldep";;
|
||||||
|
+let ocamlbrowser_default = add_exec "ocamlbrowser";;
|
||||||
|
+let ocamldoc_default = add_exec "ocamldoc";;
|
||||||
|
+
|
||||||
|
|
||||||
|
|
||||||
|
let init_manually
|
||||||
|
--- ./src/findlib/fl_package_base.ml
|
||||||
|
+++ ./src/findlib/fl_package_base.ml
|
||||||
|
@@ -133,7 +133,15 @@
|
||||||
|
List.find (fun def -> def.def_var = "exists_if") p.package_defs in
|
||||||
|
let files = Fl_split.in_words def.def_value in
|
||||||
|
List.exists
|
||||||
|
- (fun file -> Sys.file_exists (Filename.concat d' file))
|
||||||
|
+ (fun file ->
|
||||||
|
+ let fln = Filename.concat d' file in
|
||||||
|
+ let e = Sys.file_exists fln in
|
||||||
|
+ (* necessary for ppx executables *)
|
||||||
|
+ if e || Sys.os_type <> "Win32" || Filename.check_suffix fln ".exe" then
|
||||||
|
+ e
|
||||||
|
+ else
|
||||||
|
+ Sys.file_exists (fln ^ ".exe")
|
||||||
|
+ )
|
||||||
|
files
|
||||||
|
with Not_found -> true in
|
||||||
|
|
||||||
|
--- ./src/findlib/fl_split.ml
|
||||||
|
+++ ./src/findlib/fl_split.ml
|
||||||
|
@@ -126,10 +126,17 @@
|
||||||
|
| '/' | '\\' -> true
|
||||||
|
| _ -> false in
|
||||||
|
let norm_dir_win() =
|
||||||
|
- if l >= 1 && s.[0] = '/' then
|
||||||
|
- Buffer.add_char b '\\' else Buffer.add_char b s.[0];
|
||||||
|
- if l >= 2 && s.[1] = '/' then
|
||||||
|
- Buffer.add_char b '\\' else Buffer.add_char b s.[1];
|
||||||
|
+ if l >= 1 then (
|
||||||
|
+ if s.[0] = '/' then
|
||||||
|
+ Buffer.add_char b '\\'
|
||||||
|
+ else
|
||||||
|
+ Buffer.add_char b s.[0] ;
|
||||||
|
+ if l >= 2 then
|
||||||
|
+ if s.[1] = '/' then
|
||||||
|
+ Buffer.add_char b '\\'
|
||||||
|
+ else
|
||||||
|
+ Buffer.add_char b s.[1];
|
||||||
|
+ );
|
||||||
|
for k = 2 to l - 1 do
|
||||||
|
let c = s.[k] in
|
||||||
|
if is_slash c then (
|
||||||
|
--- ./src/findlib/frontend.ml
|
||||||
|
+++ ./src/findlib/frontend.ml
|
||||||
|
@@ -31,10 +31,18 @@
|
||||||
|
else
|
||||||
|
Sys_error (arg ^ ": " ^ Unix.error_message code)
|
||||||
|
|
||||||
|
+let is_win = Sys.os_type = "Win32"
|
||||||
|
+
|
||||||
|
+let () =
|
||||||
|
+ match Findlib_config.system with
|
||||||
|
+ | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" ->
|
||||||
|
+ (try set_binary_mode_out stdout true with _ -> ());
|
||||||
|
+ (try set_binary_mode_out stderr true with _ -> ());
|
||||||
|
+ | _ -> ()
|
||||||
|
|
||||||
|
let slashify s =
|
||||||
|
match Findlib_config.system with
|
||||||
|
- | "mingw" | "mingw64" | "cygwin" ->
|
||||||
|
+ | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" ->
|
||||||
|
let b = Buffer.create 80 in
|
||||||
|
String.iter
|
||||||
|
(function
|
||||||
|
@@ -49,7 +57,7 @@
|
||||||
|
|
||||||
|
let out_path ?(prefix="") s =
|
||||||
|
match Findlib_config.system with
|
||||||
|
- | "mingw" | "mingw64" | "cygwin" ->
|
||||||
|
+ | "win32" | "win64" | "mingw" | "mingw64" | "cygwin" ->
|
||||||
|
let u = slashify s in
|
||||||
|
prefix ^
|
||||||
|
(if String.contains u ' ' then
|
||||||
|
@@ -273,11 +281,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
let identify_dir d =
|
||||||
|
- match Sys.os_type with
|
||||||
|
- | "Win32" ->
|
||||||
|
- failwith "identify_dir" (* not available *)
|
||||||
|
- | _ ->
|
||||||
|
- let s = Unix.stat d in
|
||||||
|
+ if is_win then
|
||||||
|
+ failwith "identify_dir"; (* not available *)
|
||||||
|
+ let s = Unix.stat d in
|
||||||
|
(s.Unix.st_dev, s.Unix.st_ino)
|
||||||
|
;;
|
||||||
|
|
||||||
|
@@ -459,6 +465,96 @@
|
||||||
|
)
|
||||||
|
packages
|
||||||
|
|
||||||
|
+let rewrite_cmd s =
|
||||||
|
+ if s = "" || not is_win then
|
||||||
|
+ s
|
||||||
|
+ else
|
||||||
|
+ let s =
|
||||||
|
+ let l = String.length s in
|
||||||
|
+ let b = Buffer.create l in
|
||||||
|
+ for i = 0 to pred l do
|
||||||
|
+ match s.[i] with
|
||||||
|
+ | '/' -> Buffer.add_char b '\\'
|
||||||
|
+ | x -> Buffer.add_char b x
|
||||||
|
+ done;
|
||||||
|
+ Buffer.contents b
|
||||||
|
+ in
|
||||||
|
+ if (Filename.is_implicit s && String.contains s '\\' = false) ||
|
||||||
|
+ Filename.check_suffix (String.lowercase s) ".exe" then
|
||||||
|
+ s
|
||||||
|
+ else
|
||||||
|
+ let s' = s ^ ".exe" in
|
||||||
|
+ if Sys.file_exists s' then
|
||||||
|
+ s'
|
||||||
|
+ else
|
||||||
|
+ s
|
||||||
|
+
|
||||||
|
+let rewrite_cmd s =
|
||||||
|
+ if s = "" || not is_win then s else
|
||||||
|
+ let s =
|
||||||
|
+ let l = String.length s in
|
||||||
|
+ let b = Buffer.create l in
|
||||||
|
+ for i = 0 to pred l do
|
||||||
|
+ match s.[i] with
|
||||||
|
+ | '/' -> Buffer.add_char b '\\'
|
||||||
|
+ | x -> Buffer.add_char b x
|
||||||
|
+ done;
|
||||||
|
+ Buffer.contents b
|
||||||
|
+ in
|
||||||
|
+ if (Filename.is_implicit s && String.contains s '\\' = false) ||
|
||||||
|
+ Filename.check_suffix (String.lowercase s) ".exe" then
|
||||||
|
+ s
|
||||||
|
+ else
|
||||||
|
+ let s' = s ^ ".exe" in
|
||||||
|
+ if Sys.file_exists s' then
|
||||||
|
+ s'
|
||||||
|
+ else
|
||||||
|
+ s
|
||||||
|
+
|
||||||
|
+let rewrite_pp cmd =
|
||||||
|
+ if not is_win then cmd else
|
||||||
|
+ let module T = struct exception Keep end in
|
||||||
|
+ let is_whitespace = function
|
||||||
|
+ | ' ' | '\011' | '\012' | '\n' | '\r' | '\t' -> true
|
||||||
|
+ | _ -> false in
|
||||||
|
+ (* characters that triggers special behaviour (cmd.exe, not unix shell) *)
|
||||||
|
+ let is_unsafe_char = function
|
||||||
|
+ | '(' | ')' | '%' | '!' | '^' | '<' | '>' | '&' -> true
|
||||||
|
+ | _ -> false in
|
||||||
|
+ let len = String.length cmd in
|
||||||
|
+ let buf = Buffer.create (len + 4) in
|
||||||
|
+ let buf_cmd = Buffer.create len in
|
||||||
|
+ let rec iter_ws i =
|
||||||
|
+ if i >= len then () else
|
||||||
|
+ let cur = cmd.[i] in
|
||||||
|
+ if is_whitespace cur then (
|
||||||
|
+ Buffer.add_char buf cur;
|
||||||
|
+ iter_ws (succ i)
|
||||||
|
+ )
|
||||||
|
+ else
|
||||||
|
+ iter_cmd i
|
||||||
|
+ and iter_cmd i =
|
||||||
|
+ if i >= len then add_buf_cmd () else
|
||||||
|
+ let cur = cmd.[i] in
|
||||||
|
+ if is_unsafe_char cur || cur = '"' || cur = '\'' then
|
||||||
|
+ raise T.Keep;
|
||||||
|
+ if is_whitespace cur then (
|
||||||
|
+ add_buf_cmd ();
|
||||||
|
+ Buffer.add_substring buf cmd i (len - i)
|
||||||
|
+ )
|
||||||
|
+ else (
|
||||||
|
+ Buffer.add_char buf_cmd cur;
|
||||||
|
+ iter_cmd (succ i)
|
||||||
|
+ )
|
||||||
|
+ and add_buf_cmd () =
|
||||||
|
+ if Buffer.length buf_cmd > 0 then
|
||||||
|
+ Buffer.add_string buf (rewrite_cmd (Buffer.contents buf_cmd))
|
||||||
|
+ in
|
||||||
|
+ try
|
||||||
|
+ iter_ws 0;
|
||||||
|
+ Buffer.contents buf
|
||||||
|
+ with
|
||||||
|
+ | T.Keep -> cmd
|
||||||
|
|
||||||
|
let process_pp_spec syntax_preds packages pp_opts =
|
||||||
|
(* Returns: pp_command *)
|
||||||
|
@@ -549,7 +645,7 @@
|
||||||
|
None -> []
|
||||||
|
| Some cmd ->
|
||||||
|
["-pp";
|
||||||
|
- cmd ^ " " ^
|
||||||
|
+ (rewrite_cmd cmd) ^ " " ^
|
||||||
|
String.concat " " (List.map Filename.quote pp_i_options) ^ " " ^
|
||||||
|
String.concat " " (List.map Filename.quote pp_archives) ^ " " ^
|
||||||
|
String.concat " " (List.map Filename.quote pp_opts)]
|
||||||
|
@@ -625,9 +721,11 @@
|
||||||
|
in
|
||||||
|
try
|
||||||
|
let preprocessor =
|
||||||
|
+ rewrite_cmd (
|
||||||
|
resolve_path
|
||||||
|
~base ~explicit:true
|
||||||
|
- (package_property predicates pname "ppx") in
|
||||||
|
+ (package_property predicates pname "ppx") )
|
||||||
|
+ in
|
||||||
|
["-ppx"; String.concat " " (preprocessor :: options)]
|
||||||
|
with Not_found -> []
|
||||||
|
)
|
||||||
|
@@ -895,6 +993,14 @@
|
||||||
|
switch (e.g. -L<path> instead of -L <path>)
|
||||||
|
*)
|
||||||
|
|
||||||
|
+(* We may need to remove files on which we do not have complete control.
|
||||||
|
+ On Windows, removing a read-only file fails so try to change the
|
||||||
|
+ mode of the file first. *)
|
||||||
|
+let remove_file fname =
|
||||||
|
+ try Sys.remove fname
|
||||||
|
+ with Sys_error _ when is_win ->
|
||||||
|
+ (try Unix.chmod fname 0o666 with Unix.Unix_error _ -> ());
|
||||||
|
+ Sys.remove fname
|
||||||
|
|
||||||
|
let ocamlc which () =
|
||||||
|
|
||||||
|
@@ -1022,9 +1128,12 @@
|
||||||
|
|
||||||
|
"-intf",
|
||||||
|
Arg.String (fun s -> pass_files := !pass_files @ [ Intf(slashify s) ]);
|
||||||
|
-
|
||||||
|
+
|
||||||
|
"-pp",
|
||||||
|
- Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" s);
|
||||||
|
+ Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" (rewrite_pp s));
|
||||||
|
+
|
||||||
|
+ "-ppx",
|
||||||
|
+ Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s));
|
||||||
|
|
||||||
|
"-thread",
|
||||||
|
Arg.Unit (fun _ -> threads := threads_default);
|
||||||
|
@@ -1237,7 +1346,7 @@
|
||||||
|
with
|
||||||
|
any ->
|
||||||
|
close_out initl;
|
||||||
|
- Sys.remove initl_file_name;
|
||||||
|
+ remove_file initl_file_name;
|
||||||
|
raise any
|
||||||
|
end;
|
||||||
|
|
||||||
|
@@ -1245,9 +1354,9 @@
|
||||||
|
at_exit
|
||||||
|
(fun () ->
|
||||||
|
let tr f x = try f x with _ -> () in
|
||||||
|
- tr Sys.remove initl_file_name;
|
||||||
|
- tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmi");
|
||||||
|
- tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmo");
|
||||||
|
+ tr remove_file initl_file_name;
|
||||||
|
+ tr remove_file (Filename.chop_extension initl_file_name ^ ".cmi");
|
||||||
|
+ tr remove_file (Filename.chop_extension initl_file_name ^ ".cmo");
|
||||||
|
);
|
||||||
|
|
||||||
|
let exclude_list = [ stdlibdir; threads_dir; vmthreads_dir ] in
|
||||||
|
@@ -1493,7 +1602,9 @@
|
||||||
|
[ "-v", Arg.Unit (fun () -> verbose := Verbose);
|
||||||
|
"-pp", Arg.String (fun s ->
|
||||||
|
pp_specified := true;
|
||||||
|
- options := !options @ ["-pp"; s]);
|
||||||
|
+ options := !options @ ["-pp"; rewrite_pp s]);
|
||||||
|
+ "-ppx", Arg.String (fun s ->
|
||||||
|
+ options := !options @ ["-ppx"; rewrite_pp s]);
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@@ -1672,7 +1783,9 @@
|
||||||
|
Arg.String (fun s -> add_spec_fn "-I" (slashify (resolve_path s)));
|
||||||
|
|
||||||
|
"-pp", Arg.String (fun s -> pp_specified := true;
|
||||||
|
- add_spec_fn "-pp" s);
|
||||||
|
+ add_spec_fn "-pp" (rewrite_pp s));
|
||||||
|
+ "-ppx", Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s));
|
||||||
|
+
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@@ -1830,7 +1943,10 @@
|
||||||
|
output_string ch_out append;
|
||||||
|
close_out ch_out;
|
||||||
|
close_in ch_in;
|
||||||
|
- Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime;
|
||||||
|
+ (try Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime
|
||||||
|
+ with Unix.Unix_error(e,_,_) ->
|
||||||
|
+ prerr_endline("Warning: setting utimes for " ^ outpath
|
||||||
|
+ ^ ": " ^ Unix.error_message e));
|
||||||
|
|
||||||
|
prerr_endline("Installed " ^ outpath);
|
||||||
|
with
|
||||||
|
@@ -1882,6 +1998,8 @@
|
||||||
|
Unix.openfile (Filename.concat dir owner_file) [Unix.O_RDONLY] 0 in
|
||||||
|
let f =
|
||||||
|
Unix.in_channel_of_descr fd in
|
||||||
|
+ if is_win then
|
||||||
|
+ set_binary_mode_in f false;
|
||||||
|
try
|
||||||
|
let line = input_line f in
|
||||||
|
let is_my_file = (line = pkg) in
|
||||||
|
@@ -2208,7 +2326,7 @@
|
||||||
|
let lines = read_ldconf !ldconf in
|
||||||
|
let dlldir_norm = Fl_split.norm_dir dlldir in
|
||||||
|
let dlldir_norm_lc = string_lowercase_ascii dlldir_norm in
|
||||||
|
- let ci_filesys = (Sys.os_type = "Win32") in
|
||||||
|
+ let ci_filesys = is_win in
|
||||||
|
let check_dir d =
|
||||||
|
let d' = Fl_split.norm_dir d in
|
||||||
|
(d' = dlldir_norm) ||
|
||||||
|
@@ -2356,7 +2474,7 @@
|
||||||
|
List.iter
|
||||||
|
(fun file ->
|
||||||
|
let absfile = Filename.concat dlldir file in
|
||||||
|
- Sys.remove absfile;
|
||||||
|
+ remove_file absfile;
|
||||||
|
prerr_endline ("Removed " ^ absfile)
|
||||||
|
)
|
||||||
|
dll_files
|
||||||
|
@@ -2365,7 +2483,7 @@
|
||||||
|
(* Remove the files from the package directory: *)
|
||||||
|
if Sys.file_exists pkgdir then begin
|
||||||
|
let files = Sys.readdir pkgdir in
|
||||||
|
- Array.iter (fun f -> Sys.remove (Filename.concat pkgdir f)) files;
|
||||||
|
+ Array.iter (fun f -> remove_file (Filename.concat pkgdir f)) files;
|
||||||
|
Unix.rmdir pkgdir;
|
||||||
|
prerr_endline ("Removed " ^ pkgdir)
|
||||||
|
end
|
||||||
|
@@ -2415,7 +2533,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
let print_configuration() =
|
||||||
|
+ let sl = slashify in
|
||||||
|
let dir s =
|
||||||
|
+ let s = sl s in
|
||||||
|
if Sys.file_exists s then
|
||||||
|
s
|
||||||
|
else
|
||||||
|
@@ -2453,27 +2573,27 @@
|
||||||
|
if md = "" then "the corresponding package directories" else dir md
|
||||||
|
);
|
||||||
|
Printf.printf "The standard library is assumed to reside in:\n %s\n"
|
||||||
|
- (Findlib.ocaml_stdlib());
|
||||||
|
+ (sl (Findlib.ocaml_stdlib()));
|
||||||
|
Printf.printf "The ld.conf file can be found here:\n %s\n"
|
||||||
|
- (Findlib.ocaml_ldconf());
|
||||||
|
+ (sl (Findlib.ocaml_ldconf()));
|
||||||
|
flush stdout
|
||||||
|
| Some "conf" ->
|
||||||
|
- print_endline Findlib_config.config_file
|
||||||
|
+ print_endline (sl Findlib_config.config_file)
|
||||||
|
| Some "path" ->
|
||||||
|
- List.iter print_endline (Findlib.search_path())
|
||||||
|
+ List.iter ( fun x -> print_endline (sl x)) (Findlib.search_path())
|
||||||
|
| Some "destdir" ->
|
||||||
|
- print_endline (Findlib.default_location())
|
||||||
|
+ print_endline ( sl (Findlib.default_location()))
|
||||||
|
| Some "metadir" ->
|
||||||
|
- print_endline (Findlib.meta_directory())
|
||||||
|
+ print_endline ( sl (Findlib.meta_directory()))
|
||||||
|
| Some "metapath" ->
|
||||||
|
let mdir = Findlib.meta_directory() in
|
||||||
|
let ddir = Findlib.default_location() in
|
||||||
|
- print_endline
|
||||||
|
- (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META")
|
||||||
|
+ print_endline ( sl
|
||||||
|
+ (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META"))
|
||||||
|
| Some "stdlib" ->
|
||||||
|
- print_endline (Findlib.ocaml_stdlib())
|
||||||
|
+ print_endline ( sl (Findlib.ocaml_stdlib()))
|
||||||
|
| Some "ldconf" ->
|
||||||
|
- print_endline (Findlib.ocaml_ldconf())
|
||||||
|
+ print_endline ( sl (Findlib.ocaml_ldconf()))
|
||||||
|
| _ ->
|
||||||
|
assert false
|
||||||
|
;;
|
||||||
|
@@ -2481,7 +2601,7 @@
|
||||||
|
|
||||||
|
let ocamlcall pkg cmd =
|
||||||
|
let dir = package_directory pkg in
|
||||||
|
- let path = Filename.concat dir cmd in
|
||||||
|
+ let path = rewrite_cmd (Filename.concat dir cmd) in
|
||||||
|
begin
|
||||||
|
try Unix.access path [ Unix.X_OK ]
|
||||||
|
with
|
||||||
|
@@ -2647,6 +2767,10 @@
|
||||||
|
| Sys_error f ->
|
||||||
|
prerr_endline ("ocamlfind: " ^ f);
|
||||||
|
exit 2
|
||||||
|
+ | Unix.Unix_error (e, fn, f) ->
|
||||||
|
+ prerr_endline ("ocamlfind: " ^ fn ^ " " ^ f
|
||||||
|
+ ^ ": " ^ Unix.error_message e);
|
||||||
|
+ exit 2
|
||||||
|
| Findlib.No_such_package(pkg,info) ->
|
||||||
|
prerr_endline ("ocamlfind: Package `" ^ pkg ^ "' not found" ^
|
||||||
|
(if info <> "" then " - " ^ info else ""));
|
||||||
|
--- ./src/findlib/Makefile
|
||||||
|
+++ ./src/findlib/Makefile
|
||||||
|
@@ -90,6 +90,7 @@
|
||||||
|
cat findlib_config.mlp | \
|
||||||
|
$(SH) $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \
|
||||||
|
$(SH) $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \
|
||||||
|
+ $(SH) $(TOP)/tools/patch '@EXEC_SUFFIX@' '$(EXEC_SUFFIX)' | \
|
||||||
|
sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \
|
||||||
|
-e 's;@SYSTEM@;$(SYSTEM);g' \
|
||||||
|
>findlib_config.ml
|
||||||
|
@@ -113,7 +114,7 @@
|
||||||
|
$(OCAMLC) -a -o num_top.cma $(NUMTOP_OBJECTS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
- rm -f *.cmi *.cmo *.cma *.cmx *.a *.o *.cmxa \
|
||||||
|
+ rm -f *.cmi *.cmo *.cma *.cmx *.lib *.a *.o *.cmxa \
|
||||||
|
fl_meta.ml findlib_config.ml findlib.mml topfind.ml topfind \
|
||||||
|
ocamlfind$(EXEC_SUFFIX) ocamlfind_opt$(EXEC_SUFFIX)
|
||||||
|
|
||||||
|
@@ -121,7 +122,7 @@
|
||||||
|
mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
|
||||||
|
mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
|
||||||
|
test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)"
|
||||||
|
- 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` && \
|
||||||
|
+ files=`$(SH) $(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib$(LIB_SUFFIX) 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$(LIB_SUFFIX) findlib_top.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload$(LIB_SUFFIX) 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)"
|
@ -0,0 +1,61 @@ |
|||||||
|
{ |
||||||
|
"build": [ |
||||||
|
[ |
||||||
|
"bash", |
||||||
|
"-c", |
||||||
|
"#{os == 'windows' ? 'patch -p1 < findlib-1.8.0.patch' : 'true'}" |
||||||
|
], |
||||||
|
[ |
||||||
|
"./configure", |
||||||
|
"-bindir", |
||||||
|
"#{self.bin}", |
||||||
|
"-sitelib", |
||||||
|
"#{self.lib}", |
||||||
|
"-mandir", |
||||||
|
"#{self.man}", |
||||||
|
"-config", |
||||||
|
"#{self.lib}/findlib.conf", |
||||||
|
"-no-custom", |
||||||
|
"-no-topfind" |
||||||
|
], |
||||||
|
[ |
||||||
|
"make", |
||||||
|
"all" |
||||||
|
], |
||||||
|
[ |
||||||
|
"make", |
||||||
|
"opt" |
||||||
|
] |
||||||
|
], |
||||||
|
"install": [ |
||||||
|
[ |
||||||
|
"make", |
||||||
|
"install" |
||||||
|
], |
||||||
|
[ |
||||||
|
"install", |
||||||
|
"-m", |
||||||
|
"0755", |
||||||
|
"ocaml-stub", |
||||||
|
"#{self.bin}/ocaml" |
||||||
|
], |
||||||
|
[ |
||||||
|
"mkdir", |
||||||
|
"-p", |
||||||
|
"#{self.toplevel}" |
||||||
|
], |
||||||
|
[ |
||||||
|
"install", |
||||||
|
"-m", |
||||||
|
"0644", |
||||||
|
"src/findlib/topfind", |
||||||
|
"#{self.toplevel}/topfind" |
||||||
|
] |
||||||
|
], |
||||||
|
"exportedEnv": { |
||||||
|
"OCAML_TOPLEVEL_PATH": { |
||||||
|
"val": "#{self.toplevel}", |
||||||
|
"scope": "global" |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,122 @@ |
|||||||
|
module Path = { |
||||||
|
let rec join = xs => |
||||||
|
switch (xs) { |
||||||
|
| [x] => x |
||||||
|
| [x, ...xs] => Filename.concat(x, join(xs)) |
||||||
|
| [] => "" |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
module Fs = { |
||||||
|
open Core; |
||||||
|
let readdir = dir => |
||||||
|
switch (Sys.readdir(dir)) { |
||||||
|
| x => Ok(x) |
||||||
|
| exception (Sys_error(error)) => Error(error) |
||||||
|
}; |
||||||
|
|
||||||
|
let realpath = Filename.realpath; |
||||||
|
}; |
||||||
|
|
||||||
|
module Result = { |
||||||
|
let return = x => Ok(x); |
||||||
|
|
||||||
|
let both = (a, b) => |
||||||
|
switch (a, b) { |
||||||
|
| (Error(_) as e, _) |
||||||
|
| (_, Error(_) as e) => e |
||||||
|
| (Ok(ax), Ok(bx)) => Ok((ax, bx)) |
||||||
|
}; |
||||||
|
|
||||||
|
let map = (fn, res) => |
||||||
|
switch (res) { |
||||||
|
| Ok(x) => Ok(fn(x)) |
||||||
|
| Error(_) as e => e |
||||||
|
}; |
||||||
|
|
||||||
|
let bind = (fn, res) => |
||||||
|
switch (res) { |
||||||
|
| Ok(x) => fn(x) |
||||||
|
| Error(_) as e => e |
||||||
|
}; |
||||||
|
|
||||||
|
let fold = (error, ok, res) => |
||||||
|
switch (res) { |
||||||
|
| Ok(x) => ok(x) |
||||||
|
| Error(x) => error(x) |
||||||
|
}; |
||||||
|
|
||||||
|
module Let_syntax = { |
||||||
|
let map = (x, ~f) => map(f, x); |
||||||
|
let bind = (x, ~f) => bind(f, x); |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
module Opt = { |
||||||
|
let orThrow = (message, opt) => |
||||||
|
switch (opt) { |
||||||
|
| None => failwith(message) |
||||||
|
| Some(x) => x |
||||||
|
}; |
||||||
|
|
||||||
|
let fold = (none, some, opt) => |
||||||
|
switch (opt) { |
||||||
|
| None => none() |
||||||
|
| Some(x) => some(x) |
||||||
|
}; |
||||||
|
|
||||||
|
let toResult = (error, opt) => |
||||||
|
switch (opt) { |
||||||
|
| None => Error(error) |
||||||
|
| Some(x) => Ok(x) |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
module Directories = { |
||||||
|
open Core; |
||||||
|
let home = |
||||||
|
Sys.getenv("HOME") |
||||||
|
|> Opt.orThrow("There isn't $HOME environment variable set."); |
||||||
|
let sfwRoot = Path.join([home, ".nsw"]); |
||||||
|
let nodeVersions = Path.join([sfwRoot, "node-versions"]); |
||||||
|
let currentVersion = Path.join([sfwRoot, "current"]); |
||||||
|
}; |
||||||
|
|
||||||
|
let currentVersion = () => |
||||||
|
switch (Fs.realpath(Directories.currentVersion)) { |
||||||
|
| x => Some(x) |
||||||
|
| exception (Unix.Unix_error(_, _, _)) => None |
||||||
|
}; |
||||||
|
|
||||||
|
let printableVersions = (~current, ~versions) => { |
||||||
|
open Pastel; |
||||||
|
|
||||||
|
let strings = |
||||||
|
versions |
||||||
|
|> List.map(version => { |
||||||
|
let fullPath = Path.join([Directories.nodeVersions, version]); |
||||||
|
let str = "- " ++ version; |
||||||
|
fullPath == current ? <Pastel color=Green> str </Pastel> : str; |
||||||
|
}); |
||||||
|
|
||||||
|
<Pastel> ...strings </Pastel>; |
||||||
|
}; |
||||||
|
|
||||||
|
let run = () => { |
||||||
|
open Result; |
||||||
|
|
||||||
|
let%bind current = |
||||||
|
currentVersion() |
||||||
|
|> Opt.toResult("No version selected") |
||||||
|
|> Result.fold(x => x, x => x) |
||||||
|
|> Result.return; |
||||||
|
let%bind x = Fs.readdir(Directories.nodeVersions); |
||||||
|
let%bind versions = |
||||||
|
Fs.readdir(Directories.nodeVersions) |> Result.map(Array.to_list); |
||||||
|
|
||||||
|
Console.log( |
||||||
|
<Pastel color=Pastel.Cyan> "## List of installed versions:" </Pastel>, |
||||||
|
); |
||||||
|
printableVersions(~current, ~versions) |> Console.log; |
||||||
|
Result.return(); |
||||||
|
}; |
@ -0,0 +1,12 @@ |
|||||||
|
|
||||||
|
; !!!! This dune file is generated from the package.json file by pesy. If you modify it by hand |
||||||
|
; !!!! your changes will be undone! Instead, edit the package.json and then rerun 'esy pesy' at the project root. |
||||||
|
; !!!! If you want to stop using pesy and manage this file by hand, change pacakge.json's 'esy.build' command to: refmterr dune build -p nsw |
||||||
|
(executable |
||||||
|
; The entrypoint module |
||||||
|
(name NswApp) ; From package.json main field |
||||||
|
; The name of the executable (runnable via esy x NswApp.exe) |
||||||
|
(public_name NswApp.exe) ; From package.json name field |
||||||
|
(libraries core lwt lwt.unix console.lib pastel.lib nsw.lib ) ; From package.json require field (array of strings) |
||||||
|
(preprocess ( pps lwt_ppx ppx_let )) ; From package.json preprocess field |
||||||
|
) |
@ -0,0 +1,10 @@ |
|||||||
|
|
||||||
|
; !!!! This dune file is generated from the package.json file by pesy. If you modify it by hand |
||||||
|
; !!!! your changes will be undone! Instead, edit the package.json and then rerun 'esy pesy' at the project root. |
||||||
|
; !!!! If you want to stop using pesy and manage this file by hand, change pacakge.json's 'esy.build' command to: refmterr dune build -p nsw |
||||||
|
(library |
||||||
|
; The namespace that other packages/libraries will access this library through |
||||||
|
(name Nsw) |
||||||
|
; Other libraries list this name in their package.json 'require' field to use this library. |
||||||
|
(public_name nsw.lib) |
||||||
|
) |
@ -0,0 +1,50 @@ |
|||||||
|
{ |
||||||
|
"name": "nsw", |
||||||
|
"version": "0.0.0", |
||||||
|
"description": "My Project", |
||||||
|
"esy": { |
||||||
|
"build": "pesy", |
||||||
|
"release": { |
||||||
|
"releasedBinaries": [ |
||||||
|
"NswApp.exe" |
||||||
|
] |
||||||
|
} |
||||||
|
}, |
||||||
|
"buildDirs": { |
||||||
|
"test": { |
||||||
|
"require": ["nsw.lib"], |
||||||
|
"main": "TestNsw", |
||||||
|
"name": "TestNsw.exe" |
||||||
|
}, |
||||||
|
"library": { |
||||||
|
"name": "nsw.lib", |
||||||
|
"namespace": "Nsw" |
||||||
|
}, |
||||||
|
"executable": { |
||||||
|
"preprocess": ["pps", "lwt_ppx", "ppx_let"], |
||||||
|
"require": ["core", "lwt", "lwt.unix", "console.lib", "pastel.lib", "nsw.lib"], |
||||||
|
"main": "NswApp", |
||||||
|
"name": "NswApp.exe" |
||||||
|
} |
||||||
|
}, |
||||||
|
"scripts": { |
||||||
|
"pesy": "bash -c 'env PESY_MODE=update pesy'", |
||||||
|
"test": "esy x TestNsw.exe" |
||||||
|
}, |
||||||
|
"dependencies": { |
||||||
|
"@opam/dune": "*", |
||||||
|
"@opam/core": "*", |
||||||
|
"@opam/lwt": "*", |
||||||
|
"@opam/lwt_ppx": "*", |
||||||
|
"@opam/ppx_let": "*", |
||||||
|
"@reason-native/console": "*", |
||||||
|
"@reason-native/pastel": "*", |
||||||
|
"@esy-ocaml/reason": "*", |
||||||
|
"refmterr": "*", |
||||||
|
"ocaml": "~4.6.0", |
||||||
|
"pesy": "*" |
||||||
|
}, |
||||||
|
"devDependencies": { |
||||||
|
"@opam/merlin": "*" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,2 @@ |
|||||||
|
Nsw.Util.foo(); |
||||||
|
print_endline("Add Your Test Cases Here"); |
@ -0,0 +1,11 @@ |
|||||||
|
|
||||||
|
; !!!! This dune file is generated from the package.json file by pesy. If you modify it by hand |
||||||
|
; !!!! your changes will be undone! Instead, edit the package.json and then rerun 'esy pesy' at the project root. |
||||||
|
; !!!! If you want to stop using pesy and manage this file by hand, change pacakge.json's 'esy.build' command to: refmterr dune build -p nsw |
||||||
|
(executable |
||||||
|
; The entrypoint module |
||||||
|
(name TestNsw) ; From package.json main field |
||||||
|
; The name of the executable (runnable via esy x TestNsw.exe) |
||||||
|
(public_name TestNsw.exe) ; From package.json name field |
||||||
|
(libraries nsw.lib ) ; From package.json require field (array of strings) |
||||||
|
) |
Loading…
Reference in new issue