-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (45 loc) · 1.97 KB
/
Dockerfile
File metadata and controls
53 lines (45 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM devkitpro/devkita64:20260215
SHELL ["/bin/bash", "-c"]
ARG GIMP_VERSION=2
# Build tools + GIMP (for BCn texture conversion)
RUN if [ "$GIMP_VERSION" = "3" ]; then \
echo 'deb http://deb.debian.org/debian trixie main' > /etc/apt/sources.list.d/trixie.list \
&& printf 'Package: *\nPin: release n=trixie\nPin-Priority: 100\n' > /etc/apt/preferences.d/trixie; \
fi \
&& apt-get update && apt-get install -y --no-install-recommends \
autoconf automake libtool \
bison flex \
python3-pip ninja-build \
wget ca-certificates \
&& if [ "$GIMP_VERSION" = "3" ]; then \
apt-get install -y -t trixie --no-install-recommends gimp python3-mako; \
else \
apt-get install -y --no-install-recommends gimp python3-mako; \
fi \
&& pip3 install --break-system-packages meson \
&& rm -rf /var/lib/apt/lists/*
ENV DEVKITPRO=/opt/devkitpro
ENV PORTLIBS_PREFIX=${DEVKITPRO}/portlibs/switch
# Build libusbhsfs (GPL)
RUN git clone --depth 1 https://github.com/DarkMatterCore/libusbhsfs.git /tmp/libusbhsfs \
&& cd /tmp/libusbhsfs \
&& source ${DEVKITPRO}/switchvars.sh \
&& make BUILD_TYPE=gpl install \
&& rm -rf /tmp/libusbhsfs
# Build libsmb2
RUN git clone --depth 1 https://github.com/sahlberg/libsmb2.git /tmp/libsmb2 \
&& cd /tmp/libsmb2 \
&& make -f Makefile.platform switch_install \
&& rm -rf /tmp/libsmb2
# Build libnfs v5.0.2
COPY misc/libnfs/switch.patch /tmp/libnfs-switch.patch
RUN wget -qO- https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-5.0.2.tar.gz | tar xz -C /tmp \
&& cd /tmp/libnfs-libnfs-5.0.2 \
&& patch -Np1 -i /tmp/libnfs-switch.patch \
&& source ${DEVKITPRO}/switchvars.sh \
&& ./bootstrap \
&& ./configure --prefix="${PORTLIBS_PREFIX}" --host=aarch64-none-elf \
--disable-shared --enable-static --disable-werror --disable-utils --disable-examples \
&& make && make install \
&& rm -rf /tmp/libnfs-libnfs-5.0.2 /tmp/libnfs-switch.patch
WORKDIR /mnt