Skip to content

Commit ef09b36

Browse files
committed
Remove libwebp and use another musl.cc url
1 parent a372c14 commit ef09b36

486 files changed

Lines changed: 25 additions & 127816 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release-libpdfium.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
env:
4747
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
4848
EMSDK_VERSION: 3.1.72
49-
MUSL_URL: https://musl.cc
49+
MUSL_URLS: ${{ secrets.MUSL_URL || 'https://more.musl.cc https://musl.cc' }}
5050
PDF_RUNTIME_TARGET_OS_LIST: ${{ matrix.target_os }}
5151
steps:
5252
- uses: actions/checkout@v6
@@ -64,18 +64,38 @@ jobs:
6464
sudo apt-get update
6565
sudo apt-get install -y cmake curl g++ pkg-config tar
6666
67+
download_musl_toolchain() {
68+
local triple="$1"
69+
local archive="$triple-cross.tgz"
70+
71+
for base_url in $MUSL_URLS; do
72+
local url="$base_url/$archive"
73+
if [[ "$base_url" == *"more.musl.cc"* ]]; then
74+
url="$base_url/$triple/$archive"
75+
fi
76+
77+
echo "Downloading $url"
78+
if curl --fail --location --retry 5 --retry-all-errors --connect-timeout 20 --max-time 300 -o "$archive" "$url"; then
79+
tar xzf "$archive"
80+
echo "$PWD/$triple-cross/bin" >> "$GITHUB_PATH"
81+
return
82+
fi
83+
done
84+
85+
echo "Failed to download musl toolchain for $triple" >&2
86+
exit 1
87+
}
88+
6789
if [[ " ${{ matrix.targets }} " == *" linux-arm64 "* ]]; then
6890
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
6991
fi
7092
7193
if [[ " ${{ matrix.targets }} " == *" linuxmusl-x64 "* ]]; then
72-
curl -L "$MUSL_URL/x86_64-linux-musl-cross.tgz" | tar xz
73-
echo "$PWD/x86_64-linux-musl-cross/bin" >> "$GITHUB_PATH"
94+
download_musl_toolchain x86_64-linux-musl
7495
fi
7596
7697
if [[ " ${{ matrix.targets }} " == *" linuxmusl-arm64 "* ]]; then
77-
curl -L "$MUSL_URL/aarch64-linux-musl-cross.tgz" | tar xz
78-
echo "$PWD/aarch64-linux-musl-cross/bin" >> "$GITHUB_PATH"
98+
download_musl_toolchain aarch64-linux-musl
7999
fi
80100
81101
if [[ " ${{ matrix.targets }} " == *" wasm32 "* ]]; then

BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ source_set("pdfium_public_headers_impl") {
212212
"public/fpdf_text.h",
213213
"public/fpdf_transformpage.h",
214214
"public/fpdfview.h",
215-
"public/fpdf_webp.h",
216215
"public/fpdf_png.h",
217216
"public/fpdf_jpeg.h",
218217
]

fpdfsdk/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import("../testing/test.gni")
88
source_set("fpdfsdk") {
99
sources = [
1010
"epdf_outline.cpp",
11-
"epdf_webp_shim.cpp",
1211
"epdf_png_shim.cpp",
1312
"epdf_jpeg_shim.cpp",
1413
"cpdfsdk_annot.cpp",
@@ -70,7 +69,6 @@ source_set("fpdfsdk") {
7069
"../:pdfium_noshorten_config",
7170
]
7271
deps = [
73-
"//third_party/libwebp:webp_enc",
7472
"//third_party:png",
7573
"//third_party/libjpeg_turbo:libjpeg",
7674
"../:pdfium_public_headers",

fpdfsdk/epdf_webp_shim.cpp

Lines changed: 0 additions & 27 deletions
This file was deleted.

public/fpdf_webp.h

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)