Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
yallop committed Oct 13, 2022
0 parents commit 7c0f53b
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Macros
on: [push, pull_request, workflow_dispatch]
jobs:
install:
name: Install
runs-on: ${{ matrix.os }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
strategy:
fail-fast: false
matrix:
ocaml-compiler: [ 'ocaml-variants.4.04.0+macros' ]
os: [ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
macros: file:///home/runner/work/modular-macros-opam/modular-macros-opam
dune-cache: false
opam-depext: false

- name: Deps
run: |
opam install --yes ocamlfind
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# A repository of packages for OCaml with modular macros

A repository of [OPAM][opam] packages for [Modular Macros][modular-macros].

![GitHub Actions status](https://github.com/modular-macros/modular-macros-opam/workflows/Macros/badge.svg)

### Setting up

```
opam switch create macros --repos default,macros=git+https://github.com/modular-macros/modular-macros-opam.git ocaml-variants.4.04.0+macros
```

[modular-macros]: https://www.cl.cam.ac.uk/~jdy22/projects/modular-macros/
[opam]: https://opam.ocaml.org/
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
commit b4443b80713c27deaa5942ba83302409a4b6b3d6
Author: Anil Madhavapeddy <anil@recoil.org>
Date: Sun Jun 21 19:06:50 2020 +0100

Add `-fcommon` unconditionally to CFLAGS to fix gcc10 build

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>

diff --git a/configure b/configure
index f43893a4e..25019ea2c 100755
--- a/configure
+++ b/configure
@@ -358,7 +358,7 @@ case "$ccfamily" in
wrn "Consider using GCC version 4.2 or above."
bytecccompopts="-std=gnu99 -O $gcc_warnings";;
gcc-*)
- bytecccompopts="-std=gnu99 -O2 -fno-strict-aliasing -fwrapv $gcc_warnings";;
+ bytecccompopts="-std=gnu99 -O2 -fno-strict-aliasing -fwrapv -fcommon $gcc_warnings";;
*)
bytecccompopts="-O";;
esac
63 changes: 63 additions & 0 deletions packages/ocaml-variants/ocaml-variants.4.04.0+macros/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
opam-version: "2.0"
synopsis: "OCaml 4.04.0 with modular macros"
maintainer: "yallop@gmail.com"
bug-reports: "https://github.com/modular-macros/ocaml-macros/issues"
dev-repo: "git+https://github.com/modular-macros/ocaml-macros.git#macros_with_lambda_quotes"
homepage: "https://www.cl.cam.ac.uk/~jdy22/projects/modular-macros/"
depends: [
"ocaml" {= "4.04.0" & post}
"base-unix" {post}
"base-bigarray" {post}
"base-threads" {post}
]
conflict-class: "ocaml-core-compiler"
flags: compiler
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"
build: [
[
"sed"
"-ib"
"-e"
"s/opts=\"\"/opts=\"-Wno-implicit-function-declaration\"/"
"config/auto-aux/hasgot"
] {os = "macos"}
[
"./configure"
"-prefix"
prefix
"-with-debug-runtime"
] {os != "openbsd" & os != "freebsd" & os != "macos"}
[
"./configure"
"-prefix"
prefix
"-with-debug-runtime"
"-with-frame-pointers"
"-cc"
"cc"
"-aspp"
"cc -c"
] {os = "openbsd" | os = "freebsd" | os = "macos"}
[make "world"]
[make "world.opt"]
]
install: [make "install"]
url {
src: "https://github.com/modular-macros/ocaml-macros/archive/checkpoint-2022-10-13.tar.gz"
checksum: "md5=306e937db128cd7bb713bd029ae2dab1"
}
patches: ["fix-gcc10.patch" "alt-signal-stack.patch"]
available: !(os = "macos" & arch = "arm64")
license: "QPL-1.0 AND LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
authors: [
"Xavier Leroy"
"Damien Doligez"
"Alain Frisch"
"Jacques Garrigue"
"Didier Rémy"
"Jérôme Vouillon"
]
extra-source "alt-signal-stack.patch" {
src: "https://github.com/ocaml/ocaml/commit/6bcff7e6ce1a43e088469278eb3a9341e6a2ca5b.patch"
checksum: "sha256=81820e9caefabab28563730b992905a8afea74158d46b65ab1c355fe425642fa"
}
2 changes: 2 additions & 0 deletions repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
opam-version: "2.0"
upstream: "https://github.com/modular-macros/modular-macros-opam/tree/master/"

0 comments on commit 7c0f53b

Please sign in to comment.