stagex/packages/glib/Containerfile

67 lines
1.8 KiB
Text
Raw Normal View History

FROM scratch AS base
2024-08-16 19:26:04 +00:00
ARG ARCH=x86_64
2024-10-04 22:38:23 +00:00
ENV VERSION=2.82.1
ENV SRC_HASH=478634440bf52ee4ec4428d558787398c0be6b043c521beb308334b3db4489a6
2024-08-16 19:26:04 +00:00
ENV SRC_FILE=glib-${VERSION}.tar.xz
2024-10-04 22:38:23 +00:00
ENV SRC_SITE=https://download.gnome.org/sources/glib/${VERSION%.*}/${SRC_FILE}
2024-08-16 19:26:04 +00:00
FROM base AS fetch
2024-08-16 19:26:04 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
FROM fetch AS build
2024-08-16 19:26:04 +00:00
COPY --from=stagex/python . /
COPY --from=stagex/zlib . /
COPY --from=stagex/bzip2 . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/ncurses . /
COPY --from=stagex/meson . /
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/cmake . /
COPY --from=stagex/pcre2 . /
COPY --from=stagex/python . /
COPY --from=stagex/bison . /
COPY --from=stagex/flex . /
COPY --from=stagex/py-packaging . /
COPY --from=stagex/libxslt . /
COPY --from=stagex/libffi . /
COPY --from=stagex/xz . /
COPY --from=stagex/expat . /
COPY --from=stagex/rhash . /
COPY --from=stagex/libxml2 . /
COPY --from=stagex/util-linux . /
COPY --from=stagex/libxslt . /
COPY --from=stagex/gettext . /
COPY --from=stagex/ninja . /
RUN tar -xf ${SRC_FILE}
2024-08-26 01:18:52 +00:00
WORKDIR /glib-${VERSION}
2024-08-16 19:26:04 +00:00
COPY *.patch .
RUN --network=none <<-EOF
set -eux
2024-08-16 19:26:04 +00:00
export CFLAGS="-ffat-lto-objects -O2"
export CXXFLAGS="-O2"
export CPPFLAGS="-O2"
meson setup \
--default-library=shared \
--prefix=/usr \
-Dman-pages=disabled \
-Dlibmount=disabled \
-Dtests=false \
-Dintrospection=disabled \
-Dnls=disabled \
. output
meson compile -C output
meson install --no-rebuild -C output
EOF
FROM build AS install
2024-08-16 19:26:04 +00:00
RUN DESTDIR=/rootfs meson install --no-rebuild -C output
RUN find /rootfs -exec touch -hcd "@0" "{}" +
FROM stagex/filesystem AS package
2024-08-16 19:26:04 +00:00
COPY --from=install /rootfs/. /