forked from Pokes303/WUPDownloader
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathDockerfile
112 lines (103 loc) · 3.5 KB
/
Dockerfile
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
FROM devkitpro/devkitppc:20250102
COPY --from=ghcr.io/wiiu-env/libmocha:20240603 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/librpxloader:20240425 /artifacts $DEVKITPRO
ENV DEBIAN_FRONTEND=noninteractive \
PATH=$DEVKITPPC/bin:$DEVKITPRO/portlibs/wiiu/bin/:$PATH \
WUT_ROOT=$DEVKITPRO/wut \
CC=$DEVKITPPC/bin/powerpc-eabi-gcc \
CXX=$DEVKITPPC/bin/powerpc-eabi-g++ \
AR=$DEVKITPPC/bin/powerpc-eabi-ar \
RANLIB=$DEVKITPPC/bin/powerpc-eabi-ranlib \
PKG_CONFIG=$DEVKITPRO/portlibs/wiiu/bin/powerpc-eabi-pkg-config \
CFLAGS="-mcpu=750 -meabi -mhard-float -Ofast -ffunction-sections -fdata-sections" \
CXXFLAGS="-mcpu=750 -meabi -mhard-float -Ofast -ffunction-sections -fdata-sections" \
CPPFLAGS="-D__WIIU__ -D__WUT__ -I$DEVKITPRO/wut/include -L$DEVKITPRO/wut/lib" \
LDFLAGS="-L$DEVKITPRO/wut/lib" \
LIBS="-lwut -lm" \
BROTLI_VER=1.1.0 \
CURL_VER=8.11.1 \
NGHTTP2_VER=1.64.0
WORKDIR /
# Upgrade the systen
RUN mkdir -p /usr/share/man/man1 /usr/share/man/man2 && \
apt-get -y --no-install-recommends update && \
apt-get -y --no-install-recommends upgrade
# Install the requirements to package the homebrew
RUN apt-get -y install --no-install-recommends autoconf automake libtool openjdk-11-jre-headless python3-pycurl && \
apt-get clean
# Install nghttp2 for HTTP/2 support (WUT don't include this)
RUN curl -LO https://github.com/nghttp2/nghttp2/releases/download/v$NGHTTP2_VER/nghttp2-$NGHTTP2_VER.tar.xz && \
mkdir nghttp2 && \
tar xf nghttp2-$NGHTTP2_VER.tar.xz -C nghttp2/ --strip-components=1 && \
cd nghttp2 && \
autoreconf -fi && \
automake && \
autoconf && \
./configure \
--enable-lib-only \
--prefix=$DEVKITPRO/portlibs/wiiu/ \
--enable-static \
--disable-threads \
--host=powerpc-eabi && \
make -j$(nproc) install && \
cd .. && \
rm -rf nghttp2 nghttp2-$NGHTTP2_VER.tar.xz
# Install Brotli
RUN git clone --depth 1 --single-branch https://github.com/google/brotli.git && \
cd brotli && \
mkdir out && cd out && \
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$DEVKITPRO/portlibs/wiiu/ -DBUILD_SHARED_LIBS=OFF -DBROTLI_BUILD_TOOLS=OFF .. && \
cmake --build . --config Release --target install -j$(nproc) && \
cd ../.. && \
rm -rf brotli
# Install libCURL since WUT doesn't ship with the latest version
RUN curl -LO https://curl.se/download/curl-$CURL_VER.tar.xz && \
mkdir /curl && \
tar xJf curl-$CURL_VER.tar.xz -C /curl --strip-components=1 && \
cd curl && \
autoreconf -fi && ./configure \
--prefix=$DEVKITPRO/portlibs/wiiu/ \
--host=powerpc-eabi \
--enable-static \
--disable-threaded-resolver \
--disable-pthreads \
--with-mbedtls=$DEVKITPRO/portlibs/wiiu/ \
--disable-ipv6 \
--disable-unix-sockets \
--disable-socketpair \
--disable-ntlm-wb \
--with-nghttp2=$DEVKITPRO/portlibs/wiiu/ \
--with-brotli=$DEVKITPRO/portlibs/wiiu/ \
--without-libpsl \
--disable-cookies \
--disable-doh \
--disable-form-api \
--disable-http-auth \
--disable-netrc \
--disable-progress-meter \
--disable-ftp \
--disable-file \
--disable-ldap \
--disable-ldaps \
--disable-rtsp \
--disable-dict \
--disable-telnet \
--disable-tftp \
--disable-pop3 \
--disable-imap \
--disable-smb \
--disable-smtp \
--disable-gopher \
--disable-mqtt \
--disable-manual \
--disable-docs && \
cd lib && \
make -j$(nproc) install && \
cd ../include && \
make -j$(nproc) install && \
cd ../.. && \
rm -rf curl curl-$CURL_VER.tar.xz
RUN git config --global --add safe.directory /project && \
git config --global --add safe.directory /project/SDL_FontCache && \
git config --global --add safe.directory /project/zlib
WORKDIR /project