aarch64 support
This commit is contained in:
parent
5c7968905e
commit
68ab2ec16a
3 changed files with 27 additions and 6 deletions
18
Dockerfile
18
Dockerfile
|
@ -1,5 +1,8 @@
|
||||||
FROM ubuntu:20.10 as base
|
FROM ubuntu:20.10 as base
|
||||||
|
|
||||||
|
ARG ARCH
|
||||||
|
ENV ARCH=$ARCH
|
||||||
|
|
||||||
ENV TZ=US/Eastern
|
ENV TZ=US/Eastern
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
@ -7,11 +10,14 @@ RUN apt-get install -y build-essential curl git
|
||||||
|
|
||||||
FROM base as builder
|
FROM base as builder
|
||||||
|
|
||||||
|
RUN apt-get install -y unzip
|
||||||
# otfcc depends on premake5
|
# otfcc depends on premake5
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
ENV PREMAKE_VERSION 5.0.0-alpha15
|
ENV PREMAKE_VERSION 5.0.0-alpha15
|
||||||
RUN curl -sL https://github.com/premake/premake-core/releases/download/v${PREMAKE_VERSION}/premake-${PREMAKE_VERSION}-linux.tar.gz | tar -xzC /tmp
|
RUN curl -O -sL https://github.com/premake/premake-core/releases/download/v${PREMAKE_VERSION}/premake-${PREMAKE_VERSION}-src.zip && unzip premake-${PREMAKE_VERSION}-src.zip
|
||||||
RUN mv /tmp/premake5 /usr/local/bin/premake5
|
# RUN curl -sL https://github.com/premake/premake-core/releases/download/v${PREMAKE_VERSION}/premake-${PREMAKE_VERSION}-linux.tar.gz | tar -xzC /tmp
|
||||||
|
RUN cd premake-${PREMAKE_VERSION}/build/gmake2.unix && make
|
||||||
|
RUN mv /tmp/premake-${PREMAKE_VERSION}/bin/release/premake5 /usr/local/bin/premake5
|
||||||
|
|
||||||
# otfcc
|
# otfcc
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
|
@ -19,11 +25,13 @@ ENV OTFCC_VERSION=0.10.4
|
||||||
RUN curl -sL https://github.com/caryll/otfcc/archive/v${OTFCC_VERSION}.tar.gz | tar -xzC /tmp
|
RUN curl -sL https://github.com/caryll/otfcc/archive/v${OTFCC_VERSION}.tar.gz | tar -xzC /tmp
|
||||||
RUN mv otfcc-${OTFCC_VERSION} otfcc
|
RUN mv otfcc-${OTFCC_VERSION} otfcc
|
||||||
WORKDIR /tmp/otfcc
|
WORKDIR /tmp/otfcc
|
||||||
RUN premake5 gmake && cd build/gmake && make config=release_x64
|
COPY p0.patch /tmp/otfcc/p0.patch
|
||||||
|
RUN patch -u premake5.lua p0.patch
|
||||||
|
RUN premake5 gmake && cd build/gmake && make config=release_${ARCH}
|
||||||
|
|
||||||
FROM base
|
FROM base
|
||||||
COPY --from=builder /tmp/otfcc/bin/release-x64/otfccbuild /usr/local/bin/otfccbuild
|
COPY --from=builder /tmp/otfcc/bin/release-${ARCH}/otfccbuild /usr/local/bin/otfccbuild
|
||||||
COPY --from=builder /tmp/otfcc/bin/release-x64/otfccdump /usr/local/bin/otfccdump
|
COPY --from=builder /tmp/otfcc/bin/release-${ARCH}/otfccdump /usr/local/bin/otfccdump
|
||||||
|
|
||||||
# NodeJS >= 12.16.0
|
# NodeJS >= 12.16.0
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
|
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
|
||||||
|
|
4
justfile
4
justfile
|
@ -1,5 +1,7 @@
|
||||||
|
ARCH := if arch() == "aarch64" { "arm64" } else { "x64" }
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
DOCKER_BUILDKIT=1 docker build -t iosevka .
|
DOCKER_BUILDKIT=1 docker build --build-arg ARCH="{{ARCH}}" -t iosevka .
|
||||||
|
|
||||||
docker-run: docker-build
|
docker-run: docker-build
|
||||||
docker run -it iosevka
|
docker run -it iosevka
|
||||||
|
|
11
p0.patch
Normal file
11
p0.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- premake5.lua 2020-12-20 03:44:14.574580005 +0000
|
||||||
|
+++ premake5.lua.new 2020-12-20 03:43:50.664794008 +0000
|
||||||
|
@@ -49,7 +49,7 @@
|
||||||
|
workspace "otfcc"
|
||||||
|
configurations { "release", "debug" }
|
||||||
|
|
||||||
|
- platforms { "x64", "x86" }
|
||||||
|
+ platforms { "x64", "x86", "arm64" }
|
||||||
|
filter "action:xcode4"
|
||||||
|
platforms { "x64" }
|
||||||
|
filter {}
|
Loading…
Add table
Reference in a new issue