Merge remote-tracking branch 'origin/pj/ocaml' into staging

This commit is contained in:
Anton Livaja 2024-08-18 21:26:50 -04:00
commit 6428ed19a9
No known key found for this signature in database
GPG key ID: 44A86CFF1FDF0E85
2 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,41 @@
FROM scratch AS base
ENV VERSION=5.2.0
ENV SRC_HASH=48554abfd530fcdaa08f23f801b699e4f74c320ddf7d0bd56b0e8c24e55fc911
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/ocaml/ocaml/archive/refs/tags/${SRC_FILE}
ENV SOURCE_DATE_EPOCH=1
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/libzstd . /
RUN tar -xf ${SRC_FILE}
WORKDIR /ocaml-${VERSION}
RUN --network=none <<-EOF
set -eux
CFLAGS="-fPIC" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var
make -j "$(nproc)"
EOF
FROM build AS install
RUN --network=none <<-EOF
set -eux
make install DESTDIR=/rootfs
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -2038,6 +2038,19 @@ out/nuspell/index.json: \
out/samurai/index.json
$(call build,nuspell)
.PHONY: ocaml
ocaml: out/ocaml/index.json
out/ocaml/index.json: \
packages/ocaml/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/libzstd/index.json \
out/make/index.json \
out/musl/index.json
$(call build,ocaml)
.PHONY: ocismack
ocismack: out/ocismack/index.json
out/ocismack/index.json: \