arm64 fix

This commit is contained in:
simon987 2021-11-13 21:23:21 -05:00
parent d5d4fae472
commit ce3dce5b07
3 changed files with 37 additions and 23 deletions

View File

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM --platform="linux/arm64/v8" ubuntu:20.04
MAINTAINER simon987 <me@simon987.net>
@ -8,12 +8,11 @@ RUN DEBIAN_FRONTEND="noninteractive" apt install -y pkg-config python3 python3-p
yasm ragel automake autotools-dev wget libtool libssl-dev \
curl zip unzip tar xorg-dev libglu1-mesa-dev libxcursor-dev \
libxml2-dev libxinerama-dev libcurl4-openssl-dev gettext \
gcc g++ git make \
gcc g++ git make bison \
&& apt clean
# cmake
RUN wget https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2.tar.gz && \
tar -xzf cmake-*.tar.gz && cd cmake-* && ./bootstrap && make -j4 && make install && rm -rf /cmake-*
RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.21.4/cmake-3.21.4-linux-aarch64.tar.gz | tar -xzf - --strip-components=1 -C /usr/
# Ninja
RUN git clone git://github.com/ninja-build/ninja.git && \
@ -31,7 +30,7 @@ RUN cd vcpkg && ./bootstrap-vcpkg.sh
ADD patches/* /
RUN patch -p0 < mupdf-curl-dep.patch
RUN patch -p0 < mongoose-master.patch
RUN patch -p0 < glib-meson-fix.patch
RUN cd /vcpkg/ && patch -p1 < ../glib-meson-fix.patch
RUN VCPKG_FORCE_SYSTEM_BINARIES=true ./vcpkg/vcpkg install \
curl[core,openssl] \
@ -40,3 +39,8 @@ RUN VCPKG_FORCE_SYSTEM_BINARIES=true ./vcpkg/vcpkg install \
RUN mkdir /vcpkg/downloads; VCPKG_FORCE_SYSTEM_BINARIES=true ./vcpkg/vcpkg install \
lmdb cjson glib brotli libarchive[core,bzip2,libxml2,lz4,lzma,lzo] pthread tesseract libxml2 libmupdf gtest mongoose libuuid libmagic libraw jasper lcms gumbo \
&& rm -rf /root/.cache/vcpkg /vcpkg/downloads /vcpkg/buildtrees /vcpkg/downloads
RUN mkdir -p /debug/lib/ && mkdir -p /include && \
cp -r /vcpkg/installed/arm64-linux/include/cjson/ /include/ && \
cp /vcpkg/installed/arm64-linux/debug/lib/libcjson.a /debug/lib/ && \
cp /vcpkg/installed/arm64-linux/lib/libcjson.a /lib/

View File

@ -1,11 +1,13 @@
--- /vcpkg/scripts/cmake/vcpkg_configure_meson.cmake
+++ /vcpkg/scripts/cmake/vcpkg_configure_meson.cmake
@@ -220,7 +220,7 @@ function(vcpkg_internal_meson_generate_cross_file _additional_binaries) #https:/
OUTPUT_VARIABLE MACHINE
COMMAND_ERROR_IS_FATAL ANY)
diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake
index e0eab20..4c5d7be 100644
--- a/scripts/cmake/vcpkg_configure_meson.cmake
+++ b/scripts/cmake/vcpkg_configure_meson.cmake
@@ -241,7 +241,7 @@ function(z_vcpkg_meson_generate_cross_file additional_binaries) #https://mesonbu
# Show real machine architecture to visually understand whether we are in a native Apple Silicon terminal or running under Rosetta emulation
debug_message("Machine: ${MACHINE}")
- if(MACHINE MATCHES "arm64")
+ if(MACHINE MATCHES "arm64|aarch64")
set(BUILD_CPU_FAM aarch64)
set(BUILD_CPU armv8)
set(build_cpu_fam aarch64)
set(build_cpu armv8)
elseif(MACHINE MATCHES "x86_64|amd64")

View File

@ -1,10 +1,18 @@
--- /vcpkg/ports/libmupdf/CONTROL 2021-04-13 00:31:01.000000000 +0000
+++ /vcpkg/ports/libmupdf/CONTROL_ 2021-04-13 00:42:40.805239545 +0000
@@ -1,6 +1,6 @@
Source: libmupdf
Version: 1.18.0
-Build-Depends: freetype, libjpeg-turbo, harfbuzz, zlib, curl, glfw3, openjpeg, jbig2dec, gumbo
+Build-Depends: freetype, libjpeg-turbo, harfbuzz, zlib, curl[core,openssl], glfw3, openjpeg, jbig2dec, gumbo
Homepage: https://github.com/ArtifexSoftware/mupdf
Description: a lightweight PDF, XPS, and E-book library
Supports: !osx
--- /vcpkg/ports/libmupdf/vcpkg.json 2021-09-22 09:11:22.598136284 -0400
+++ /vcpkg/ports/libmupdf/vcpkg.json_ 2021-11-07 10:14:38.039574071 -0500
@@ -5,7 +5,13 @@
"homepage": "https://github.com/ArtifexSoftware/mupdf",
"supports": "!osx",
"dependencies": [
- "curl",
+ {
+ "name": "curl",
+ "default-features": false,
+ "features": [
+ "openssl"
+ ]
+ },
"freetype",
"glfw3",
"gumbo",