├── .github └── workflows │ └── build.yml ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── README.md ├── build-bash-profile.sh ├── build-deps.sh ├── check-versions.sh ├── download-deps.sh ├── install-go.sh ├── install-rust.sh └── versions.sh /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'test/*' 7 | tags: 8 | - 'v[0-9]+.[0-9]+.[0-9]+*' 9 | - 'test-[a-zA-Z0-9]+' 10 | 11 | env: 12 | DOCKER_META_IMAGES: | 13 | ghcr.io/imgproxy/imgproxy-base 14 | DOCKER_META_TAGS: | 15 | type=semver,pattern=v{{version}} 16 | type=ref,event=branch,enable=${{ startsWith(github.ref, 'refs/heads/test/') }} 17 | 18 | jobs: 19 | build: 20 | if: github.repository_owner == 'imgproxy' 21 | strategy: 22 | matrix: 23 | build: 24 | - arch: amd64 25 | dockerPlatform: linux/amd64 26 | image: linux-5.0 27 | - arch: arm64 28 | dockerPlatform: linux/arm64/v8 29 | image: arm-3.0 30 | runs-on: 31 | - codebuild-imgproxy-${{ github.run_id }}-${{ github.run_attempt }} 32 | - image:${{ matrix.build.image }} 33 | permissions: 34 | contents: read 35 | packages: write 36 | steps: 37 | - name: Checkout 38 | uses: actions/checkout@v4 39 | 40 | - name: Docker meta 41 | id: meta 42 | uses: docker/metadata-action@v5 43 | with: 44 | images: ${{ env.DOCKER_META_IMAGES }} 45 | tags: ${{ env.DOCKER_META_TAGS }} 46 | flavor: | 47 | latest=auto 48 | suffix=-${{ matrix.build.arch }},onlatest=true 49 | 50 | - name: Login to GitHub Container Registry 51 | uses: docker/login-action@v3 52 | with: 53 | registry: ghcr.io 54 | username: ${{ github.actor }} 55 | password: ${{ secrets.GITHUB_TOKEN }} 56 | 57 | - name: Build and push 58 | uses: docker/build-push-action@v6 59 | with: 60 | tags: ${{ steps.meta.outputs.tags }} 61 | labels: ${{ steps.meta.outputs.labels }} 62 | platforms: ${{ matrix.build.dockerPlatform }} 63 | provenance: false 64 | push: true 65 | 66 | push_manifests: 67 | needs: build 68 | runs-on: ubuntu-latest 69 | permissions: 70 | contents: read 71 | packages: write 72 | steps: 73 | - name: Docker meta 74 | id: meta 75 | uses: docker/metadata-action@v5 76 | with: 77 | images: ${{ env.DOCKER_META_IMAGES }} 78 | tags: ${{ env.DOCKER_META_TAGS }} 79 | flavor: | 80 | latest=auto 81 | 82 | - name: Login to GitHub Container Registry 83 | uses: docker/login-action@v3 84 | with: 85 | registry: ghcr.io 86 | username: ${{ github.actor }} 87 | password: ${{ secrets.GITHUB_TOKEN }} 88 | 89 | - name: Push manifests 90 | run: | 91 | for tag in ${{ join(fromJSON(steps.meta.outputs.json).tags, ' ') }} 92 | do 93 | docker buildx imagetools create -t $tag ${tag}-amd64 ${tag}-arm64 94 | done 95 | 96 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [3.13.2] - 2025-04-18 4 | ### Changed 5 | - Update Go to 1.24.2. 6 | - Update ffi to 3.4.8. 7 | - Update GLib to 2.84.1. 8 | - Update quantizr to 1.4.3. 9 | - Update libxml2 to 2.14.2. 10 | - Update aom to 3.12.1. 11 | - Update fontconfig to 2.16.2. 12 | - Update harfbuzz to 11.1.0. 13 | 14 | ## [3.13.1] - 2025-03-30 15 | ### Changed 16 | - Update Go to 1.24.1. 17 | - Update zlib to 2.2.4. 18 | - Update ffi to 3.4.7. 19 | - Update GLib to 2.84.0. 20 | - Update libexpat to 2.7.1. 21 | - Update libxml2 to 2.14.0. 22 | - Update libexif to 0.6.25. 23 | - Update lcms2 to 2.17. 24 | - Update libjpegturbo to 3.1.0. 25 | - Update libwebp to 1.5.0. 26 | - Update cgif to 0.5.0. 27 | - Update dav1d to 1.5.1. 28 | - Update aom to 3.12.0. 29 | - Update libheif to 1.19.7. 30 | - Update fontconfig to 2.16.1. 31 | - Update harfbuzz to 11.0.0. 32 | - Update cairo to 1.18.4. 33 | - Update pango to 1.56.3. 34 | - Update librsvg to 2.60.0. 35 | - Update vips to 8.16.1. 36 | 37 | ## [3.13.0] - 2024-12-05 38 | ### Added 39 | - Add brotli 1.1.0. 40 | - Add libjxl 0.11.1. 41 | 42 | ### Changed 43 | - Update Go to 1.23.4. 44 | - Update GLib to 2.83.0. 45 | - Update libexpat to 2.6.4. 46 | - Update libxml2 to 2.13.5. 47 | - Update aom to 3.11.0. 48 | - Update libheif to 1.19.5. 49 | - Update harfbuzz to 10.1.0. 50 | - Update pixman to 0.44.2. 51 | - Update pango to 1.55.0. 52 | - Update librsvg to 2.59.2. 53 | - Update vips to 8.16.0. 54 | 55 | ## [3.12.0] - 2024-10-24 56 | ### Changed 57 | - Update Go to 1.23.2. 58 | - Update zlib to 2.2.2. 59 | - Update GLib to 2.82.2. 60 | - Update libexpat to 2.6.3. 61 | - Update libxml2 to 2.13.4. 62 | - Update libjpegturbo to 3.0.4. 63 | - Update libtiff to 4.7.0. 64 | - Update dav1d to 1.5.0. 65 | - Update aom to 3.10.0. 66 | - Update harfbuzz to 10.0.1. 67 | - Update cairo to 1.18.2. 68 | - Update fribidi to 1.0.16. 69 | - Update librsvg to 2.59.1. 70 | - Update vips to 8.15.5. 71 | 72 | ### Removed 73 | - Remove gdkpixbuf. 74 | 75 | ## [3.11.0] - 2024-08-13 76 | ### Change 77 | - Change base image to `debian:bullseye` for glibc compatibility. 78 | - Install all dependencies to `/opt/imgproxy` to avoid conflicts with system libraries. 79 | - Update Go to 1.22.6. 80 | - Update zlib to 2.2.1. 81 | - Update GLib to 2.81.1. 82 | - Update libxml2 to 2.13.3. 83 | - Update cgif to 0.4.1. 84 | - Update libheif to 1.18.2. 85 | - Update freetype to 2.13.3. 86 | - Update harfbuzz to 9.0.0. 87 | - Update vips to 8.15.3. 88 | 89 | ### Removed 90 | - Remove liblzma. 91 | - Remove libzstd. 92 | 93 | ## [3.10.0] - 2024-06-18 94 | ### Change 95 | - Update base image to `ubuntu:noble`. 96 | - Update Go to 1.22.4. 97 | - Update GLib to 2.80.3. 98 | - Update libxml2 to 2.13.0. 99 | - Update dav1d to 1.4.3. 100 | - Update aom to 3.9.1. 101 | - Update fribidi to 1.0.15. 102 | - Update pango to 1.54.0. 103 | - Update librsvg to 2.58.1. 104 | 105 | ## [3.9.2] - 2024-06-04 106 | ### Change 107 | - Update Go 1.22.3. 108 | - Update GLib 2.80.2. 109 | - Update highway 1.2.0. 110 | - Update libxml2 2.12.7. 111 | - Update libjpegturbo 3.0.3. 112 | - Update dav1d 1.4.2. 113 | - Update aom 3.9.0. 114 | - Update gdkpixbuf 2.42.12. 115 | - Update harfbuzz 8.5.0. 116 | - Update fribidi 1.0.14. 117 | 118 | ### Fix 119 | - Fix possible crash in libheif when encoding HEIC. 120 | 121 | ## [3.9.1] - 2024-04-15 122 | ### Change 123 | - Update Go to 1.22.2. 124 | - Update libwebp to 1.4.0. 125 | - Update cgif to 0.4.0. 126 | - Update kvazaar to 2.3.1. 127 | - Update harfbuzz to 8.4.0. 128 | - Update pango to 1.52.2. 129 | - Patch vips to increase EXIF size limit to 8MB. 130 | 131 | ## [3.9.0] - 2024-03-21 132 | ### Change 133 | - Change base image to `ubuntu:mantic`. 134 | - Update GLib to 2.80.0. 135 | - Update libexpat to 2.6.2. 136 | - Update libxml2 to 2.12.6. 137 | - Update dav1d to 1.4.1. 138 | - Update aom to 3.8.2. 139 | - Update harfbuzz to 8.3.1. 140 | - Update librsvg to 2.58.0. 141 | - Update vips to 8.15.2. 142 | 143 | ## [3.8.6] - 2024-03-06 144 | ### Change 145 | - Update golang to 1.22.1. 146 | - Update GLib to 2.79.3. 147 | - Update libexpat to 2.6.1. 148 | - Update pixman to 0.43.4. 149 | - Update pango to 1.52.1. 150 | 151 | ## [3.8.5] - 2024-02-22 152 | ### Change 153 | - Update Go to 1.22.0. 154 | - Update ffi to 3.4.6. 155 | - Update GLib to 2.79.2. 156 | - Update highway to 1.1.0. 157 | - Update libexpat to 2.6.0. 158 | - Update libxml2 to 2.12.5. 159 | - Update libjpegturbo to 3.0.2. 160 | - Update dav1d to 1.4.0. 161 | - Update aom to 3.8.1. 162 | - Update pixman to 0.43.2. 163 | - Update pango to 1.51.2. 164 | - Update librsvg to 2.57.91. 165 | 166 | ## [3.8.4] - 2024-01-18 167 | ### Change 168 | - Update Go to 1.21.6. 169 | - Update zlib to 2.1.6. 170 | - Update GLib to 2.79.0. 171 | - Update quantizr to 1.4.2. 172 | - Update libxml2 to 2.12.4. 173 | - Update lcms2 to 2.16. 174 | - Update libde265 to 1.0.15. 175 | - Update kvazaar to 2.3.0. 176 | - Update aom to 3.8.0. 177 | - Update libheif to 1.17.6. 178 | - Update fontconfig to 2.15.0. 179 | - Update pixman to 0.43.0. 180 | - Update librsvg to 2.57.1. 181 | - Update vips to 8.15.1. 182 | 183 | ## [3.8.3] - 2023-12-05 184 | ### Change 185 | - Patch libheif to ignore alpha channel if it has different BPP instead of throwing an error. 186 | 187 | ## [3.8.2] - 2023-11-25 188 | ### Change 189 | - Update libxml2 to 2.12.1. 190 | - Use Ninja in CMake builds. 191 | - Use `Release` build type for aom. 192 | 193 | ## [3.8.1] - 2023-11-22 194 | ### Change 195 | - Update libde265 to 1.0.14. 196 | - Update aom to 3.7.1. 197 | - Update libheif to 1.17.5. 198 | 199 | ### Fix 200 | - Patch vips to fix `reduceh` on SSE2 CPUs. 201 | 202 | ## [3.8.0] - 2023-11-18 203 | ### Add 204 | - Add highway. 205 | - Add kvazaar. 206 | 207 | ### Change 208 | - Update Go to 1.21.4. 209 | - Update GLib to 2.78.1. 210 | - Update libxml2 to 2.12.0. 211 | - Update libheif to 1.17.3. 212 | - Update harfbuzz to 8.3.0. 213 | - Update pango to 1.51.1. 214 | - Update vips to 8.15.0. 215 | - Patch vips to use `vips_concurrency_get()` threads in `heifsave`. 216 | 217 | ## [3.7.5] - 2023-10-24 218 | ### Change 219 | - Enable GIF gdkpixbuf loader. 220 | - Patch vips to set default NCLX profile to HEIC/AVIF if no ICC profile is provided. 221 | 222 | ## [3.7.4] - 2023-10-21 223 | ### Change 224 | - Update Go to 1.21.3. 225 | - Update zlib to 2.1.4. 226 | - Update libjpegturbo to 3.0.1. 227 | - Update libheif to 1.17.1. 228 | - Update harfbuzz to 8.2.2. 229 | - Patch vips to correctly treat EXIF strings with invalid UTF8 characters. 230 | - Patch vips to fix possible segfault in heifload. 231 | 232 | ## [3.7.3] - 2023-10-05 233 | ### Change 234 | - Update Go to 1.21.1. 235 | - Update GLib to 2.78.0. 236 | - Update libwebp to 1.3.2. 237 | - Update libtiff to 4.6.0. 238 | - Update dav1d to 1.3.0. 239 | - Update harfbuzz to 8.2.1. 240 | - Update cairo to 1.18.0. 241 | - Update pango to 1.51.1. 242 | - Update librsvg to 2.57.0. 243 | - Update vips to 8.14.5. 244 | - Patch vips to fix invalid UTF-8 strings instead of ignoring them. 245 | - Patch vips for 16-bit float TIFFs support. 246 | - Patch vips for OJPEG TIFFs support. 247 | 248 | ## [3.7.2] - 2023-09-04 249 | ### Change 250 | - Update GLib to 2.77.3. 251 | - Update aom to 3.7.0. 252 | - Update freetype to 2.13.2. 253 | - Update librsvg to 2.56.93. 254 | - Enable HDR support in aom. 255 | 256 | ## [3.7.1] - 2023-08-22 257 | ### Fix 258 | - Fix building libheif with dav1d support. 259 | 260 | ## [3.7.0] - 2023-08-20 261 | ### Change 262 | - Change base image to `debian:stable-slim`. 263 | - Update Go to 1.21.0. 264 | - Update GLib to 2.77.2. 265 | - Update libxml2 to 2.11.5. 266 | - Update harfbuzz to 8.1.1. 267 | - Update pango to 1.51.0. 268 | - Update librsvg to 2.56.92. 269 | - Update vips to 8.14.4. 270 | - Update vips patches. 271 | 272 | ## [3.6.1] - 2023-07-13 273 | ### Change 274 | - Update Go to 1.20.6. 275 | - Update zlib to 2.1.3. 276 | - Update GLib to 2.77.0. 277 | - Update libjpegturbo to 3.0.0. 278 | - Update libwebp to 1.3.1. 279 | - Update harfbuzz to 8.0.0. 280 | - Update librsvg to 2.56.90. 281 | 282 | ### Fix 283 | - Fix SIMD-optimized methods in vips. 284 | 285 | ## [3.6.0] - 2023-06-28 286 | ### Add 287 | - Add libyuv. 288 | 289 | ### Change 290 | - Update Go to 1.20.5. 291 | - Update zlib to 2.1.2. 292 | - Update GLib to 2.76.3. 293 | - Update libxml2 to 2.11.4. 294 | - Update libtiff to 4.5.1. 295 | - Update cgif to 0.3.2. 296 | - Update libde265 to 1.0.12. 297 | - Update dav1d to 1.2.1. 298 | - Update libheif to 1.16.2. 299 | - Update freetype to 2.13.1. 300 | - Update librsvg to 2.56.1. 301 | - Add SIMD optimizations to vips. 302 | - Patch libheif to support libyuv. 303 | 304 | ### Removed 305 | - Removed orc. 306 | 307 | ## [3.5.1] - 2023-05-23 308 | ### Change 309 | - Set optimization flags for some libraries. 310 | 311 | ## [3.5.0] - 2023-05-17 312 | ### Add 313 | - Add zlib-ng 2.0.7. 314 | - Add ffi 3.4.4. 315 | 316 | ### Changed 317 | - Update fribidi to 1.0.13. 318 | 319 | ## [3.4.0] - 2023-05-16 320 | ### Add 321 | - Add orc 0.4.33. 322 | 323 | ### Changed 324 | - Update Go to 1.20.4. 325 | - Update GLib to 2.76.2. 326 | - Update libxml2 to 2.11.3. 327 | - Update lcms2 to 2.15. 328 | - Update libjpegturbo to 2.1.91. 329 | - Update libspng to 0.7.4. 330 | - Update cgif to 0.3.1. 331 | - Update dav1d to 1.2.0. 332 | - Update aom to 3.6.1. 333 | - Update libheif to 1.16.1. 334 | - Update freetype to 2.13.0. 335 | - Update harfbuzz to 7.3.0. 336 | - Update pango to 1.50.14. 337 | - Update librsvg to 2.56.0. 338 | - Update vips to 8.14.2. 339 | 340 | ### Removed 341 | - Remove libcroco. 342 | 343 | ## [3.3.5] - 2023-02-06 344 | ### Changed 345 | - Update Go to 1.20. 346 | - Update GLib to 2.75.2. 347 | - Update libjpegturbo to 2.1.90. 348 | - Update libspng to 0.7.3. 349 | - Update libwebp to 1.3.0. 350 | - Update libtiff to 4.5.0. 351 | - Update libde265 to 1.0.11. 352 | - Update libheif to 1.14.2. 353 | - Update fontconfig to 2.14.2. 354 | - Update harfbuzz to 6.0.0. 355 | - Update cairo to 1.17.8. 356 | - Update pango to 1.50.12. 357 | - Update librsvg to 2.55.90. 358 | - Update vips to 8.14.1. 359 | 360 | ## [3.3.4] - 2022-11-17 361 | ### Changed 362 | - Update Go to 1.19.3. 363 | - Update GLib to 2.75.0. 364 | - Update libexpat to 2.5.0. 365 | - Update lcms2 to 2.14. 366 | - Update libde265 to 1.0.9. 367 | - Update libheif to 1.14.0. 368 | - Update gdkpixbuf to 2.42.10. 369 | - Update fontconfig to 2.14.1. 370 | - Update harfbuzz to 5.3.1. 371 | - Update pixman to 0.42.2. 372 | - Update vips to 8.13.3. 373 | 374 | ## [3.3.3] - 2022-10-19 375 | ### Changed 376 | - Update libxml2 to 2.10.3. 377 | - Update harfbuzz to 5.3.0. 378 | - Update pixman to 0.42.0. 379 | 380 | ### Fix 381 | - Patch libvips to fix saving of paletted PNGs with low bit-depth. 382 | 383 | ## [3.3.2] - 2022-10-06 384 | ### Changed 385 | - Update Go to 1.19.2. 386 | - Update GLib to 2.74.0. 387 | - Update libexpat to 2.4.9. 388 | - Update libxml2 to 2.10.2. 389 | - Update aom to 3.5.0. 390 | - Update libheif to 1.13.0. 391 | - Update harfbuzz to 5.2.0. 392 | - Update pango to 1.50.11. 393 | - Update librsvg to 2.55.1. 394 | - Update vips to 8.13.2. 395 | 396 | ## [3.3.1] - 2022-08-19 397 | ### Changed 398 | - Update Go to 1.19. 399 | - Update GLib to 2.73.3. 400 | - Update Quantizr to 1.4.1. 401 | - Update libxml2 to 2.10.0. 402 | - Update libjpegturbo to 2.1.4. 403 | - Update libwebp to 1.2.4. 404 | - Update gdkpixbuf to 2.42.9. 405 | - Update harfbuzz to 5.1.0. 406 | - Update pango to 1.50.9. 407 | - Update librsvg to 2.55.0. 408 | - Patch libvips to speed up GIF loading. 409 | 410 | ## [3.3.0] - 2022-07-25 411 | ### Add 412 | - Add libspng 0.7.2. 413 | 414 | ### Changed 415 | - Update Go to 1.18.4. 416 | - Update GLib to 2.73.2. 417 | - Update Quantizr to 1.3.0. 418 | - Update libwebp to 1.2.3. 419 | - Update libtiff to 4.4.0. 420 | - Update aom to 3.4.0. 421 | - Update harfbuzz to 4.4.1. 422 | - Update pango to 1.50.8. 423 | - Update librsvg to 2.54.4. 424 | - Update vips to 8.13.0. 425 | - Patch libheif. 426 | 427 | ## [3.2.4] - 2022-05-20 428 | ### Fix 429 | - Fix dav1d plugin of libheif. 430 | 431 | ## [3.2.3] - 2022-05-15 432 | ### Changed 433 | - Update Go to 1.18.2. 434 | - Update GLib to 2.72.1. 435 | - Update libxml2 to 2.9.14. 436 | - Update cgif to 0.3.0. 437 | - Update freetype to 2.12.1. 438 | - Update harfbuzz to 4.2.1. 439 | - Update fribidi to 1.0.12. 440 | - Update pango to 1.50.7. 441 | - Update librsvg to 2.54.3. 442 | 443 | ### Fix 444 | - Patch libvips to not fail on PNGs with to many text chunks. 445 | 446 | ## [3.2.2] - 2022-04-13 447 | ### Changed 448 | - Update Go to 1.18. 449 | - Update GLib to 2.72.0. 450 | - Update Quantizr to 1.2.0. 451 | - Update libexpat to 2.4.8. 452 | - Update libxml2 to 2.9.13. 453 | - Update libjpegturbo to 2.1.3. 454 | - Update cgif to 0.2.1. 455 | - Update dav1d to 1.0.0. 456 | - Update aom to 3.3.0. 457 | - Update gdkpixbuf to 2.42.8. 458 | - Update freetype to 2.12.0. 459 | - Update fontconfig to 2.14.0. 460 | - Update harfbuzz to 4.2.0. 461 | - Update cairo to 1.17.6. 462 | - Update pango to 1.50.6. 463 | - Update librsvg to 2.54.0. 464 | 465 | ### Fix 466 | - Patch nsgif in vips code to recover from LZW_EOI_CODE. 467 | 468 | ## [3.2.1] - 2022-02-11 469 | ### Fix 470 | - Fix `CFLAGS` for amd64 build. 471 | 472 | ## [3.2.0] - 2022-02-07 473 | ### Added 474 | - Add libaom 3.2.0. 475 | 476 | ### Changed 477 | - Update lcms2 to 2.13.1. 478 | - Update fontconfig to 2.13.96. 479 | - Update harfbuzz to 3.3.2. 480 | 481 | ### Removed 482 | - Remove rav1e. 483 | 484 | ## [3.1.0] - 2022-01-31 485 | ### Added 486 | - Multiarch build. 487 | 488 | ### Changed 489 | - Update Go to 1.17.6. 490 | - Update GLib to 2.71.1. 491 | - Update libexpat to 2.4.4. 492 | - Update libexif to 0.6.24. 493 | - Update lcms2 to 2.13. 494 | - Update Quantizr to 1.1.0. 495 | - Update libwebp to 1.2.2. 496 | - Update rav1e to 0.5.1. 497 | - Update freetype to 2.11.1. 498 | - Update harfbuzz to 3.2.0. 499 | - Update pango to 1.50.3. 500 | - Update vips to 8.12.2. 501 | 502 | ## [3.0.1] - 2021-11-22 503 | ### Added 504 | - Add cgif 0.0.2. 505 | 506 | ### Changed 507 | - Update Go to 1.17.3. 508 | - Update GLib to 2.70.1. 509 | - Update libjpegturbo to 2.1.2. 510 | - Update libpng to 1.6.37. 511 | - Update Quantizr to 1.0.1. 512 | - Update rav1e to 0.5.0. 513 | - Update freetype to 2.11.0. 514 | - Update harfbuzz to 3.1.1. 515 | - Update pango to 1.49.3. 516 | - Update vips to 8.12.0. 517 | 518 | ### Removed 519 | - Remove ImageMagick. 520 | 521 | ## [3.0.0] - 2021-09-29 522 | ### Changed 523 | - Update Go to 1.17.1. 524 | - Update GLib to 2.70.0. 525 | - Update libexif to 0.6.23. 526 | - Update libjpegturbo to 2.1.1. 527 | - Update libwebp to 1.2.1. 528 | - Update dav1d to 0.9.2. 529 | - Update fontconfig to 2.13.94. 530 | - Update harfbuzz to 3.0.0. 531 | - Update fribidi to 1.0.11. 532 | - Update pango to 1.49.1. 533 | - Update ImageMagick to 7.1.0-8. 534 | - Update vips to 8.11.4. 535 | 536 | ## [1.4.0] - 2021-06-10 537 | ### Changed 538 | - Use Debian Bullseye as a base. 539 | - Reduce final image size by using multistage build. 540 | - Update GLib to 2.68.2. 541 | - Update libexpat to 2.4.1. 542 | - Update libxml2 to 2.9.12. 543 | - Update libjpegturbo to 2.1.0. 544 | - Update libtiff to 4.3.0. 545 | - Update dav1d to 0.9.0. 546 | - Update rav1e to 0.4.1. 547 | - Update libheif to 1.12.0. 548 | - Update gdkpixbuf to 2.42.6. 549 | - Update harfbuzz to 2.8.1. 550 | - Update pango to 1.48.5. 551 | - Update librsvg to 2.50.7. 552 | - Update ImageMagick to 7.0.11-14. 553 | - Update vips to 8.11.0. 554 | 555 | ### Fix 556 | - Fix librsvg panics when processing some SVGs. 557 | 558 | ### Removed 559 | - Remove giflib (libvips has builtin libnsgif now). 560 | 561 | ## [1.3.2] - 2021-03-04 562 | ### Changed 563 | - Update GLib to 2.67.5. 564 | - Update lcms2 to 2.12. 565 | - Update libwebp to 1.2.0. 566 | - Update libtiff to 4.2.0. 567 | - Update dav1d to 0.8.2. 568 | - Update rav1e to 0.4.0. 569 | - Update libheif to 1.11.0. 570 | - Update harfbuzz to 2.7.4. 571 | - Update pango to 1.48.2. 572 | - Update librsvg to 2.50.3. 573 | - Update ImageMagick to 7.0.11-2. 574 | - Update vips to 8.10.5. 575 | 576 | ## [1.3.1] - 2020-12-15 577 | ### Changed 578 | - Update GLib to 2.67.0. 579 | - Update libexpat to 2.2.10. 580 | - Update libjpegturbo to 2.0.90. 581 | - Update libde265 to 1.0.8. 582 | - Update dav1d to 0.8.0. 583 | - Update gdkpixbuf to 2.42.2. 584 | - Update freetype to 2.10.4. 585 | - Update fontconfig to 2.13.93. 586 | - Update pango to 1.48.0. 587 | - Update librsvg to 2.50.2. 588 | - Update ImageMagick to 7.0.10-48. 589 | - Update libvips to 8.10.4. 590 | 591 | ## [1.3.0] - 2020-09-15 592 | ### Added 593 | - Add rav1e 0.3.4. 594 | - Add dav1d 0.7.1. 595 | 596 | # Removed 597 | - Remove libaom. 598 | 599 | ## [1.2.0] - 2020-09-15 600 | ### Added 601 | - Add libaom 2.0.0. 602 | 603 | ### Changed 604 | - Update GLib to 2.66.0. 605 | - Update harfbuzz to 2.7.2. 606 | - Update librsvg to 2.50.0. 607 | - Update ImageMagick to 7.0.10-29. 608 | - Update libvips to 8.10.1. 609 | 610 | ## [1.0.4] - 2020-08-27 611 | ### Changed 612 | - Update GLib to 2.65.2. 613 | - Update libde265 to 1.0.6. 614 | - Update libheif to 1.8.0. 615 | - Update harfbuzz to 2.7.1. 616 | - Update pango to 1.46.1. 617 | - Update librsvg to 2.49.4. 618 | - Update ImageMagick to 7.0.10-28. 619 | 620 | ## [1.0.3] - 2020-08-11 621 | ### Changed 622 | - Update GLib version to 2.65.1. 623 | - Update libjpegturbo version to 2.0.5. 624 | - Update harfbuzz version to 2.7.0. 625 | - Update fribidi version to 1.0.10. 626 | - Update pango version to 1.46.0. 627 | - Update librsvg version to 2.49.3. 628 | - Update ImageMagick version to 7.0.10-26. 629 | - Update libvips version to 8.10.0. 630 | 631 | ## [1.0.2] - 2020-07-09 632 | ### Fix 633 | - Fix libde265 build 634 | 635 | ## [1.0.1] - 2020-06-22 636 | ### Changed 637 | - Update GLib version to 2.65.0. 638 | - Update lcms2 version to 2.11. 639 | - Update ImageMagick version to 7.0.10-20. 640 | 641 | ## [1.0.0] - 2020-06-16 642 | ### Added 643 | - First release. 644 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Use Debian Bullseye as a base image to link against glibc 2.31. 2 | FROM public.ecr.aws/debian/debian:bullseye-slim AS base 3 | 4 | RUN apt-get update \ 5 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 6 | bash \ 7 | curl \ 8 | git \ 9 | ca-certificates \ 10 | build-essential \ 11 | pkg-config \ 12 | libssl-dev \ 13 | libstdc++-10-dev 14 | 15 | WORKDIR /root 16 | 17 | # ============================================================================== 18 | 19 | FROM base AS deps-src 20 | 21 | COPY versions.sh download-deps.sh ./ 22 | RUN ./download-deps.sh 23 | 24 | # ============================================================================== 25 | 26 | FROM base AS deps 27 | 28 | COPY install-rust.sh ./ 29 | 30 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 31 | autoconf \ 32 | autopoint \ 33 | automake \ 34 | cmake \ 35 | nasm \ 36 | libtool \ 37 | python3-pip \ 38 | python3-venv \ 39 | gettext \ 40 | gperf \ 41 | && ./install-rust.sh \ 42 | && python3 -m venv /root/.python \ 43 | && /root/.python/bin/pip install meson ninja packaging 44 | 45 | COPY versions.sh build-deps.sh build-bash-profile.sh *.patch ./ 46 | COPY --from=deps-src /root/deps /root/deps 47 | 48 | # We need environment variables that are based on the uname -m output, 49 | # so we have to use a Bash profile instead of ENV 50 | RUN ./build-bash-profile.sh > /root/.bashrc 51 | ENV BASH_ENV=/root/.bashrc 52 | 53 | RUN ./build-deps.sh 54 | 55 | # ============================================================================== 56 | 57 | FROM base AS golang 58 | 59 | COPY versions.sh install-go.sh ./ 60 | RUN ./install-go.sh 61 | 62 | # ============================================================================== 63 | 64 | FROM public.ecr.aws/debian/debian:bullseye-slim AS final 65 | LABEL maintainer="Sergey Alexandrovich " 66 | 67 | RUN apt-get update \ 68 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 69 | bash \ 70 | curl \ 71 | git \ 72 | ca-certificates \ 73 | build-essential \ 74 | pkg-config \ 75 | libssl-dev \ 76 | libstdc++-10-dev 77 | 78 | WORKDIR /root 79 | 80 | COPY --from=golang /usr/local/go /usr/local/go 81 | ENV PATH=$PATH:/usr/local/go/bin 82 | 83 | COPY --from=deps /opt/imgproxy/lib /opt/imgproxy/lib 84 | COPY --from=deps /opt/imgproxy/include /opt/imgproxy/include 85 | COPY --from=deps /opt/imgproxy/bin /opt/imgproxy/bin 86 | 87 | COPY --from=deps /root/.bashrc /root/.bashrc 88 | ENV BASH_ENV=/root/.bashrc 89 | 90 | WORKDIR /app 91 | CMD ["bash"] 92 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Sergey Alexandrovich 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # imgproxy Docker base 2 | 3 | ## What is this? 4 | 5 | Base Docker image with the latest imgproxy dependencies. Ideal for imgproxy development and building its Docker images. 6 | 7 | ## How to use this? 8 | 9 | ### For development 10 | 11 | Run this image with your development directory mounted: 12 | 13 | ```shell 14 | docker run --rm -it \ 15 | -p 8080:8080 \ 16 | -v $(pwd):/app \ 17 | --name imgproxy_dev \ 18 | ghcr.io/imgproxy/imgproxy-base:latest 19 | ``` 20 | 21 | ...and build your imgproxy as usual: 22 | 23 | ```shell 24 | go build 25 | ``` 26 | 27 | ### For production 28 | 29 | If you don't care about the size, you can just build your Docker image on top of this one: 30 | 31 | ```dockerfile 32 | FROM ghcr.io/imgproxy/imgproxy-base:latest 33 | 34 | COPY . . 35 | # We use bash here to load dynamically generated build environment from /root/.basrc 36 | RUN ["bash", "-c", "go build -v -o /opt/imgproxy/bin/imgproxy"] 37 | RUN ln -s /opt/imgproxy/bin/imgproxy /usr/local/bin/imgproxy 38 | 39 | ENV VIPS_WARNING=0 40 | ENV MALLOC_ARENA_MAX=2 41 | 42 | RUN groupadd -r imgproxy && useradd -r -u 999 -g imgproxy imgproxy 43 | USER 999 44 | 45 | CMD ["imgproxy"] 46 | 47 | EXPOSE 8080 48 | ``` 49 | 50 | But you probably want to use multistage build to minimize the final image, and it's a bit tricky. You need to take care of the following: 51 | 52 | 1. Copy built dependencies from `/opt/imgproxy`. 53 | 2. Install required system dependencies. 54 | 55 | Here is the working example: 56 | 57 | ```dockerfile 58 | FROM ghcr.io/imgproxy/imgproxy-base:latest 59 | 60 | COPY . . 61 | RUN ["bash", "-c", "go build -v -o /opt/imgproxy/bin/imgproxy"] 62 | 63 | # Remove unnecessary files 64 | RUN rm -rf /opt/imgproxy/lib/pkgconfig /opt/imgproxy/lib/cmake 65 | 66 | # ================================================================================================== 67 | # Final image 68 | 69 | FROM public.ecr.aws/ubuntu/ubuntu:noble 70 | 71 | RUN apt-get update \ 72 | && apt-get upgrade -y \ 73 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 74 | bash \ 75 | ca-certificates \ 76 | libstdc++6 \ 77 | fontconfig-config \ 78 | fonts-dejavu-core \ 79 | media-types \ 80 | && rm -rf /var/lib/apt/lists/* \ 81 | && rm -rf /etc/fonts/conf.d/10-sub-pixel-rgb.conf /etc/fonts/conf.d/11-lcdfilter-default.conf 82 | 83 | COPY --from=build /opt/imgproxy/bin/imgproxy /opt/imgproxy/bin/ 84 | COPY --from=build /opt/imgproxy/lib /opt/imgproxy/lib 85 | RUN ln -s /opt/imgproxy/bin/imgproxy /usr/local/bin/imgproxy 86 | 87 | ENV VIPS_WARNING=0 88 | ENV MALLOC_ARENA_MAX=2 89 | 90 | RUN groupadd -r imgproxy && useradd -r -u 999 -g imgproxy imgproxy 91 | USER 999 92 | 93 | CMD ["imgproxy"] 94 | 95 | EXPOSE 8080 96 | ``` 97 | 98 | ## Author 99 | 100 | Sergey "[DarthSim](https://github.com/DarthSim)" Alexandrovich 101 | 102 | ## License 103 | 104 | imgproxy-base is licensed under the MIT license. 105 | 106 | See LICENSE for the full license text. 107 | -------------------------------------------------------------------------------- /build-bash-profile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | case "$(uname -m)" in 6 | x86_64) 7 | ARCH_ENV=$(cat << EOF 8 | export CFLAGS="-mssse3" 9 | EOF 10 | ) 11 | ;; 12 | 13 | aarch64) 14 | ARCH_ENV=$(cat << EOF 15 | export CFLAGS="-march=armv8.2-a+fp16" 16 | EOF 17 | ) 18 | ;; 19 | 20 | *) 21 | echo "Unsupported architecture $(uname -m)" 22 | exit 1 23 | ;; 24 | esac 25 | 26 | cat << EOF 27 | export PATH="/opt/imgproxy/bin:/root/.cargo/bin:/root/.python/bin:\$PATH" 28 | export PKG_CONFIG_LIBDIR=/opt/imgproxy/lib/pkgconfig 29 | export CGO_LDFLAGS_ALLOW="-s|-w" 30 | export CGO_LDFLAGS="-Wl,-rpath,/opt/imgproxy/lib" 31 | 32 | $ARCH_ENV 33 | export CFLAGS="\$CFLAGS -Os -fPIC -D_GLIBCXX_USE_CXX11_ABI=1 -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections" 34 | export CXXFLAGS=\$CFLAGS 35 | export CPPFLAGS="\$CPPFLAGS -I/opt/imgproxy/include" 36 | export LDFLAGS="\$LDFLAGS -L/opt/imgproxy/lib -Wl,--gc-sections -Wl,-rpath,/opt/imgproxy/lib" 37 | EOF 38 | -------------------------------------------------------------------------------- /build-deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | my_dir="$(dirname "$0")" 6 | source "$my_dir/versions.sh" 7 | 8 | print_build_stage() { 9 | echo "" 10 | echo "== Build $1 $2 =====================================" 11 | echo "" 12 | } 13 | 14 | DEPS_SRC=/root/deps 15 | mkdir -p $DEPS_SRC 16 | 17 | TARGET_PATH=/opt/imgproxy 18 | mkdir -p $TARGET_PATH 19 | 20 | export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 21 | export CARGO_PROFILE_RELEASE_LTO=true 22 | 23 | print_build_stage zlib $ZLIB_VERSION 24 | cd $DEPS_SRC/zlib 25 | mkdir _build 26 | cd _build 27 | CFLAGS="${CFLAGS} -O3" \ 28 | cmake \ 29 | -G"Ninja" \ 30 | -DCMAKE_BUILD_TYPE=Release \ 31 | -DCMAKE_INSTALL_PREFIX=$TARGET_PATH \ 32 | -DBUILD_SHARED_LIBS=TRUE \ 33 | -DZLIB_COMPAT=TRUE \ 34 | -DWITH_ARMV6=FALSE \ 35 | -DWITH_GTEST=FALSE \ 36 | .. 37 | ninja install/strip 38 | 39 | print_build_stage brotli $BROTLI_VERSION 40 | cd $DEPS_SRC/brotli 41 | mkdir _build 42 | cd _build 43 | CFLAGS="${CFLAGS} -O3" \ 44 | cmake \ 45 | -G"Ninja" \ 46 | -DCMAKE_BUILD_TYPE=Release \ 47 | -DCMAKE_INSTALL_PREFIX=$TARGET_PATH \ 48 | -DBUILD_SHARED_LIBS=TRUE \ 49 | -DBROTLI_DISABLE_TESTS=TRUE \ 50 | .. 51 | ninja install/strip 52 | 53 | print_build_stage ffi $FFI_VERSION 54 | cd $DEPS_SRC/ffi 55 | ./configure \ 56 | --prefix=$TARGET_PATH \ 57 | --enable-shared \ 58 | --disable-static \ 59 | --disable-dependency-tracking \ 60 | --disable-builddir \ 61 | --disable-multi-os-directory \ 62 | --disable-raw-api 63 | make install-strip -j$(nproc) 64 | 65 | print_build_stage glib $GLIB_VERSION 66 | cd $DEPS_SRC/glib 67 | # Build GLib without gregex 68 | curl -Ls https://gist.github.com/kleisauke/284d685efa00908da99ea6afbaaf39ae/raw/936a6b8013d07d358c6944cc5b5f0e27db707ace/glib-without-gregex.patch | patch -p1 69 | meson setup _build \ 70 | --buildtype=release \ 71 | --strip \ 72 | --wrap-mode=nofallback \ 73 | --prefix=$TARGET_PATH \ 74 | --libdir=lib \ 75 | -Dlibmount=disabled \ 76 | -Dtests=false \ 77 | -Dintrospection=disabled \ 78 | -Dnls=disabled \ 79 | -Dsysprof=disabled \ 80 | -Dlibelf=disabled \ 81 | -Dinstalled_tests=false \ 82 | -Dglib_debug=disabled 83 | ninja -C _build 84 | ninja -C _build install 85 | 86 | print_build_stage highway $HIGHWAY_VERSION 87 | cd $DEPS_SRC/highway 88 | mkdir _build 89 | cd _build 90 | CFLAGS="${CFLAGS} -O3" CXXFLAGS="${CXXFLAGS} -O3" \ 91 | cmake \ 92 | -G"Ninja" \ 93 | -DCMAKE_BUILD_TYPE=Release \ 94 | -DCMAKE_INSTALL_PREFIX=$TARGET_PATH \ 95 | -DBUILD_SHARED_LIBS=TRUE \ 96 | -DHWY_ENABLE_EXAMPLES=FALSE \ 97 | -DHWY_ENABLE_TESTS=FALSE \ 98 | -DHWY_ENABLE_CONTRIB=FALSE \ 99 | .. 100 | ninja install/strip 101 | 102 | print_build_stage quantizr $QUANTIZR_VERSION 103 | cd $DEPS_SRC/quantizr 104 | cargo cinstall \ 105 | --release \ 106 | --library-type=cdylib \ 107 | --prefix=$TARGET_PATH \ 108 | --libdir=$TARGET_PATH/lib 109 | 110 | print_build_stage expat $LIBEXPAT_VERSION 111 | cd $DEPS_SRC/expat 112 | ./configure \ 113 | --prefix=$TARGET_PATH \ 114 | --enable-shared \ 115 | --disable-static \ 116 | --disable-dependency-tracking \ 117 | --without-xmlwf 118 | make install -j$(nproc) 119 | 120 | print_build_stage libxml2 $LIBXML2_VERSION 121 | cd $DEPS_SRC/libxml2 122 | ./configure \ 123 | --prefix=$TARGET_PATH \ 124 | --enable-shared \ 125 | --disable-static \ 126 | --disable-dependency-tracking \ 127 | --with-minimum \ 128 | --with-reader \ 129 | --with-writer \ 130 | --with-valid \ 131 | --with-http \ 132 | --with-tree \ 133 | --with-xpath \ 134 | --with-zlib \ 135 | --without-python \ 136 | --without-lzma 137 | make install-strip -j$(nproc) 138 | 139 | print_build_stage libexif $LIBEXIF_VERSION 140 | cd $DEPS_SRC/libexif 141 | autoreconf -i 142 | ./configure \ 143 | --prefix=$TARGET_PATH \ 144 | --enable-shared \ 145 | --disable-static \ 146 | --disable-dependency-tracking 147 | make install-strip -j$(nproc) 148 | 149 | print_build_stage lcms2 $LCMS2_VERSION 150 | cd $DEPS_SRC/lcms2 151 | CFLAGS="${CFLAGS} -O3" \ 152 | ./configure \ 153 | --prefix=$TARGET_PATH \ 154 | --enable-shared \ 155 | --disable-static \ 156 | --disable-dependency-tracking 157 | make install-strip -j$(nproc) 158 | 159 | print_build_stage libjpeg-turbo $LIBJPEGTURBO_VERSION 160 | cd $DEPS_SRC/libjpeg-turbo 161 | mkdir _build 162 | cd _build 163 | cmake \ 164 | -G"Ninja" \ 165 | -DCMAKE_BUILD_TYPE=Release \ 166 | -DCMAKE_INSTALL_PREFIX=$TARGET_PATH \ 167 | -DENABLE_SHARED=TRUE \ 168 | -DENABLE_STATIC=FALSE \ 169 | -DWITH_TURBOJPEG=FALSE \ 170 | -DWITH_JPEG8=1 \ 171 | -DPNG_SUPPORTED=FALSE \ 172 | .. 173 | ninja install/strip 174 | 175 | print_build_stage libjxl $LIBJXL_VERSION 176 | cd $DEPS_SRC/libjxl 177 | mkdir _build 178 | cd _build 179 | cmake \ 180 | -G"Ninja" \ 181 | -DCMAKE_BUILD_TYPE=Release \ 182 | -DCMAKE_INSTALL_PREFIX=$TARGET_PATH \ 183 | -DJPEGXL_STATIC=FALSE \ 184 | -DBUILD_TESTING=OFF \ 185 | -DJPEGXL_ENABLE_FUZZERS=FALSE \ 186 | -DJPEGXL_ENABLE_DEVTOOLS=FALSE \ 187 | -DJPEGXL_ENABLE_TOOLS=FALSE \ 188 | -DJPEGXL_ENABLE_JPEGLI=FALSE \ 189 | -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=FALSE \ 190 | -DJPEGXL_ENABLE_DOXYGEN=FALSE \ 191 | -DJPEGXL_ENABLE_MANPAGES=FALSE \ 192 | -DJPEGXL_ENABLE_BENCHMARK=FALSE \ 193 | -DJPEGXL_ENABLE_EXAMPLES=FALSE \ 194 | -DJPEGXL_BUNDLE_LIBPNG=FALSE \ 195 | -DJPEGXL_ENABLE_JNI=FALSE \ 196 | -DJPEGXL_ENABLE_SKCMS=FALSE \ 197 | -DJPEGXL_ENABLE_SJPEG=FALSE \ 198 | .. 199 | ninja install/strip 200 | 201 | print_build_stage libpng $LIBPNG_VERSION 202 | cd $DEPS_SRC/libpng 203 | ./configure \ 204 | --prefix=$TARGET_PATH \ 205 | --enable-shared \ 206 | --disable-static \ 207 | --disable-dependency-tracking 208 | make install-strip -j$(nproc) 209 | 210 | print_build_stage libspng $LIBSPNG_VERSION 211 | cd $DEPS_SRC/libspng 212 | CFLAGS="${CFLAGS} -O3 -DSPNG_SSE=4" \ 213 | meson setup _build \ 214 | --buildtype=release \ 215 | --strip \ 216 | --wrap-mode=nofallback \ 217 | --prefix=$TARGET_PATH \ 218 | --libdir=lib 219 | ninja -C _build 220 | ninja -C _build install 221 | 222 | print_build_stage libwebp $LIBWEBP_VERSION 223 | cd $DEPS_SRC/libwebp 224 | ./configure \ 225 | --prefix=$TARGET_PATH \ 226 | --enable-shared \ 227 | --disable-static \ 228 | --disable-dependency-tracking \ 229 | --enable-libwebpmux \ 230 | --enable-libwebpdemux 231 | make install-strip -j$(nproc) 232 | 233 | print_build_stage libtiff $LIBTIFF_VERSION 234 | cd $DEPS_SRC/libtiff 235 | mkdir _build 236 | cd _build 237 | cmake \ 238 | -G"Ninja" \ 239 | -DCMAKE_BUILD_TYPE=Release \ 240 | -DCMAKE_INSTALL_PREFIX=$TARGET_PATH \ 241 | -DBUILD_SHARED_LIBS=TRUE \ 242 | -Dtiff-tools=FALSE \ 243 | -Dtiff-tests=FALSE \ 244 | -Dtiff-contrib=FALSE \ 245 | -Dtiff-docs=FALSE \ 246 | -Dtiff-deprecated=FALSE \ 247 | .. 248 | ninja install/strip 249 | 250 | print_build_stage cgif $CGIF_VERSION 251 | cd $DEPS_SRC/cgif 252 | CFLAGS="${CFLAGS} -O3" \ 253 | meson setup _build \ 254 | --buildtype=release \ 255 | --strip \ 256 | --wrap-mode=nofallback \ 257 | --prefix=$TARGET_PATH \ 258 | --libdir=lib 259 | ninja -C _build 260 | ninja -C _build install 261 | 262 | print_build_stage libde265 $LIBDE265_VERSION 263 | cd $DEPS_SRC/libde265 264 | ./configure \ 265 | --prefix=$TARGET_PATH \ 266 | --enable-shared \ 267 | --disable-static 268 | make install-strip -j$(nproc) 269 | 270 | print_build_stage kvazaar $KVAZAAR_VERSION 271 | cd $DEPS_SRC/kvazaar 272 | ./configure \ 273 | --prefix=$TARGET_PATH \ 274 | --enable-shared \ 275 | --disable-static 276 | make install-strip -j$(nproc) 277 | 278 | print_build_stage dav1d $DAV1D_VERSION 279 | cd $DEPS_SRC/dav1d 280 | meson setup _build \ 281 | --buildtype=release \ 282 | --strip \ 283 | --wrap-mode=nofallback \ 284 | --prefix=$TARGET_PATH \ 285 | --libdir=lib 286 | ninja -C _build 287 | ninja -C _build install 288 | 289 | # print_build_stage rav1e $RAV1E_VERSION 290 | # cd $DEPS_SRC/rav1e 291 | # cargo cinstall \ 292 | # --release \ 293 | # --library-type=cdylib \ 294 | # --prefix=$TARGET_PATH \ 295 | # --libdir=$TARGET_PATH/lib 296 | 297 | print_build_stage aom $AOM_VERSION 298 | cd $DEPS_SRC/aom 299 | mkdir _build 300 | cd _build 301 | AOM_AS_FLAGS=#{CFLAGS} \ 302 | cmake \ 303 | -G"Ninja" \ 304 | -DCMAKE_BUILD_TYPE=Release \ 305 | -DCMAKE_INSTALL_PREFIX=$TARGET_PATH \ 306 | -DBUILD_SHARED_LIBS=1 \ 307 | -DENABLE_DOCS=0 \ 308 | -DENABLE_TESTS=0 \ 309 | -DENABLE_TESTDATA=0 \ 310 | -DENABLE_TOOLS=0 \ 311 | -DENABLE_EXAMPLES=0 \ 312 | -DCONFIG_WEBM_IO=0 \ 313 | .. 314 | ninja install/strip 315 | 316 | print_build_stage libyuv $LIBYUV_SHA 317 | cd $DEPS_SRC/libyuv 318 | mkdir _build 319 | cd _build 320 | CFLAGS="${CFLAGS} -O3" CXXFLAGS="${CXXFLAGS} -O3" \ 321 | cmake \ 322 | -G"Ninja" \ 323 | -DCMAKE_BUILD_TYPE=Release \ 324 | -DCMAKE_INSTALL_PREFIX=$TARGET_PATH \ 325 | -DBUILD_SHARED_LIBS=1 \ 326 | .. 327 | ninja install/strip 328 | 329 | print_build_stage libheif $LIBHEIF_VERSION 330 | cd $DEPS_SRC/libheif 331 | # libyuv support 332 | curl -Ls https://github.com/DarthSim/libheif/commit/a1deab044df96b3758c1c0476169dffeb85030f1.patch | git apply 333 | # Ignore alpha in Op_RGB_HDR_to_RRGGBBaa_BE if aplpha has different BPP 334 | curl -Ls https://github.com/DarthSim/libheif/commit/dcd4f0f90704a849ddd2440c671a7df41110c9b5.patch | git apply 335 | mkdir _build 336 | cd _build 337 | CFLAGS="${CFLAGS} -O3" CXXFLAGS="${CXXFLAGS} -O3" \ 338 | cmake \ 339 | -G"Ninja" \ 340 | -DCMAKE_BUILD_TYPE=Release \ 341 | -DCMAKE_INSTALL_PREFIX=$TARGET_PATH \ 342 | --preset=release-noplugins \ 343 | -DBUILD_SHARED_LIBS=1 \ 344 | -DWITH_EXAMPLES=0 \ 345 | -DWITH_KVAZAAR=1 \ 346 | -DWITH_DAV1D=1 \ 347 | -DWITH_AOM_DECODER=0 \ 348 | .. 349 | ninja install/strip 350 | 351 | print_build_stage freetype $FREETYPE_VERSION 352 | cd $DEPS_SRC/freetype 353 | meson setup _build \ 354 | --buildtype=release \ 355 | --strip \ 356 | --wrap-mode=nofallback \ 357 | --prefix=$TARGET_PATH \ 358 | --libdir=lib \ 359 | -Dzlib=enabled \ 360 | -Dpng=disabled \ 361 | -Dharfbuzz=disabled \ 362 | -Dbrotli=disabled \ 363 | -Dbzip2=disabled 364 | ninja -C _build 365 | ninja -C _build install 366 | 367 | print_build_stage fontconfig $FONTCONFIG_VERSION 368 | cd $DEPS_SRC/fontconfig 369 | meson setup _build \ 370 | --buildtype=release \ 371 | --strip \ 372 | --wrap-mode=nofallback \ 373 | --prefix=$TARGET_PATH \ 374 | --libdir=lib \ 375 | -Ddoc=disabled \ 376 | -Dnls=disabled \ 377 | -Dtests=disabled \ 378 | -Dtools=disabled \ 379 | -Dcache-build=disabled 380 | ninja -C _build 381 | ninja -C _build install 382 | 383 | print_build_stage harfbuzz $HARFBUZZ_VERSION 384 | cd $DEPS_SRC/harfbuzz 385 | meson setup _build \ 386 | --buildtype=release \ 387 | --strip \ 388 | --wrap-mode=nofallback \ 389 | --prefix=$TARGET_PATH \ 390 | --libdir=lib \ 391 | -Dgobject=disabled \ 392 | -Dicu=disabled \ 393 | -Dtests=disabled \ 394 | -Dintrospection=disabled \ 395 | -Ddocs=disabled \ 396 | -Dbenchmark=disabled 397 | ninja -C _build 398 | ninja -C _build install 399 | rm $TARGET_PATH/lib/libharfbuzz-subset* 400 | 401 | print_build_stage pixman $PIXMAN_VERSION 402 | cd $DEPS_SRC/pixman 403 | meson setup _build \ 404 | --buildtype=release \ 405 | --strip \ 406 | --wrap-mode=nofallback \ 407 | --prefix=$TARGET_PATH \ 408 | --libdir=lib \ 409 | -Dlibpng=disabled \ 410 | -Dgtk=disabled \ 411 | -Dopenmp=disabled \ 412 | -Ddemos=disabled \ 413 | -Dtests=disabled 414 | ninja -C _build 415 | ninja -C _build install 416 | 417 | print_build_stage cairo $CAIRO_VERSION 418 | cd $DEPS_SRC/cairo 419 | meson setup _build \ 420 | --buildtype=release \ 421 | --strip \ 422 | --wrap-mode=nofallback \ 423 | --prefix=$TARGET_PATH \ 424 | --libdir=lib \ 425 | -Dfontconfig=enabled \ 426 | -Dquartz=disabled \ 427 | -Dtee=disabled \ 428 | -Dxcb=disabled \ 429 | -Dxlib=disabled \ 430 | -Dzlib=disabled \ 431 | -Dtests=disabled \ 432 | -Dspectre=disabled \ 433 | -Dsymbol-lookup=disabled 434 | ninja -C _build 435 | ninja -C _build install 436 | 437 | print_build_stage fribidi $FRIBIDI_VERSION 438 | cd $DEPS_SRC/fribidi 439 | autoreconf -fiv 440 | ./configure \ 441 | --prefix=$TARGET_PATH \ 442 | --enable-shared \ 443 | --disable-static \ 444 | --disable-dependency-tracking 445 | make install-strip -j$(nproc) 446 | 447 | print_build_stage pango $PANGO_VERSION 448 | cd $DEPS_SRC/pango 449 | meson setup _build \ 450 | --buildtype=release \ 451 | --strip \ 452 | --wrap-mode=nofallback \ 453 | --prefix=$TARGET_PATH \ 454 | --libdir=lib \ 455 | -Dgtk_doc=false \ 456 | -Dintrospection=disabled \ 457 | -Dfontconfig=enabled 458 | ninja -C _build 459 | ninja -C _build install 460 | 461 | print_build_stage librsvg $LIBRSVG_VERSION 462 | cd $DEPS_SRC/librsvg 463 | # Remove pdf and ps support 464 | sed -i'.bak' "/cairo-rs = /s/, \"pdf\", \"ps\"//" {librsvg-c,rsvg}/Cargo.toml 465 | # Skip executables 466 | sed -i'.bak' "/subdir('rsvg_convert')/d" meson.build 467 | # For some reason, librsvg fails to build without -ldl 468 | CFLAGS="${CFLAGS} -ldl" CXXFLAGS="${CXXFLAGS} -ldl" \ 469 | LDFLAGS="${LDFLAGS} -ldl" \ 470 | meson setup _build \ 471 | --buildtype=release \ 472 | --strip \ 473 | --wrap-mode=nofallback \ 474 | --prefix=$TARGET_PATH \ 475 | --libdir=lib \ 476 | -Dintrospection=disabled \ 477 | -Dpixbuf{,-loader}=disabled \ 478 | -Ddocs=disabled \ 479 | -Dvala=disabled \ 480 | -Dtests=false \ 481 | -Davif=enabled 482 | ninja -C _build 483 | ninja -C _build install 484 | 485 | print_build_stage vips $VIPS_VERSION 486 | cd $DEPS_SRC/vips 487 | CFLAGS="${CFLAGS} -O3" CXXFLAGS="${CXXFLAGS} -O3" \ 488 | meson setup _build \ 489 | --buildtype=release \ 490 | --strip \ 491 | --wrap-mode=nofallback \ 492 | --prefix=$TARGET_PATH \ 493 | --libdir=lib \ 494 | -Dgtk_doc=false \ 495 | -Dintrospection=disabled \ 496 | -Dmodules=disabled 497 | ninja -C _build 498 | ninja -C _build install 499 | rm -rf $TARGET_PATH/lib/libvips-cpp.* 500 | 501 | rm -rf $TARGET_PATH/lib/*.a 502 | rm -rf $TARGET_PATH/lib/*.la 503 | -------------------------------------------------------------------------------- /check-versions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | my_dir="$(dirname "$0")" 5 | versions_file="$my_dir/versions.sh" 6 | source $versions_file 7 | 8 | version_entry() { 9 | echo "export $1_VERSION=$2" 10 | } 11 | 12 | update_version() { 13 | name=$1 14 | old_version=$2 15 | new_version=$3 16 | 17 | if [ "$new_version" != "$old_version" ]; then 18 | old_entry=$(version_entry $name $old_version) 19 | new_entry=$(version_entry $name $new_version) 20 | sed -i '' "s/$old_entry/$new_entry/g" "$versions_file" 21 | echo "$name. Latest version: $new_version. Current version: $old_version" 22 | fi 23 | } 24 | 25 | check_version() { 26 | name=$1 27 | old_version=$2 28 | new_version=$(curl -s https://release-monitoring.org/api/project/$3 | jq -r '.versions | map(select(match("^[0-9]+(\\.[0-9]+)*$")))[0]') 29 | 30 | update_version $name $old_version $new_version 31 | } 32 | 33 | check_version_github() { 34 | name=$1 35 | old_version=$2 36 | new_version=$(curl -sL https://api.github.com/repos/$3/releases | jq -r 'map(select(.prerelease == false)) | map(select(.draft == false)) | map(.tag_name)[0] | ltrimstr("v") | ltrimstr("V")') 37 | 38 | update_version $name $old_version $new_version 39 | } 40 | 41 | check_version "GOLANG" $GOLANG_VERSION "1227" 42 | check_version_github "ZLIB" $ZLIB_VERSION "zlib-ng/zlib-ng" 43 | check_version "BROTLI" $BROTLI_VERSION "15235" 44 | check_version "FFI" "$FFI_VERSION" "1611" 45 | check_version "GLIB" $GLIB_VERSION "10024" 46 | check_version "HIGHWAY" $HIGHWAY_VERSION "205809" 47 | check_version_github "QUANTIZR" $QUANTIZR_VERSION "Darthsim/quantizr" 48 | check_version "LIBEXPAT" $LIBEXPAT_VERSION "770" 49 | check_version "LIBXML2" $LIBXML2_VERSION "1783" 50 | check_version "LIBEXIF" $LIBEXIF_VERSION "1607" 51 | check_version "LCMS2" $LCMS2_VERSION "9815" 52 | check_version "LIBJPEGTURBO" $LIBJPEGTURBO_VERSION "1648" 53 | check_version "LIBJXL" $LIBJXL_VERSION "232764" 54 | check_version "LIBPNG" $LIBPNG_VERSION "15294" 55 | check_version "LIBSPNG" $LIBSPNG_VERSION "24289" 56 | check_version "LIBWEBP" $LIBWEBP_VERSION "1761" 57 | check_version "LIBTIFF" $LIBTIFF_VERSION "1738" 58 | check_version_github "CGIF" $CGIF_VERSION "dloebl/cgif" 59 | check_version "LIBDE265" $LIBDE265_VERSION "11239" 60 | check_version "KVAZAAR" $KVAZAAR_VERSION "12418" 61 | check_version "DAV1D" $DAV1D_VERSION "18920" 62 | # check_version "RAV1E" $RAV1E_VERSION "75048" 63 | check_version "AOM" $AOM_VERSION "17628" 64 | check_version "LIBHEIF" $LIBHEIF_VERSION "64439" 65 | check_version "FREETYPE" $FREETYPE_VERSION "854" 66 | check_version "FONTCONFIG" $FONTCONFIG_VERSION "827" 67 | check_version "HARFBUZZ" $HARFBUZZ_VERSION "1299" 68 | check_version "PIXMAN" $PIXMAN_VERSION "3648" 69 | check_version "CAIRO" $CAIRO_VERSION "247" 70 | check_version "FRIBIDI" $FRIBIDI_VERSION "857" 71 | check_version "PANGO" $PANGO_VERSION "11783" 72 | check_version "LIBRSVG" $LIBRSVG_VERSION "5420" 73 | check_version "VIPS" $VIPS_VERSION "5097" 74 | -------------------------------------------------------------------------------- /download-deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | my_dir="$(dirname "$0")" 6 | source "$my_dir/versions.sh" 7 | 8 | print_download_stage() { 9 | echo "" 10 | echo "== Download $1 $2 ==================================" 11 | echo "" 12 | } 13 | 14 | snake_version() { 15 | echo $1 | sed 's/\./_/g' 16 | } 17 | 18 | minor_version() { 19 | echo "$1" | sed -E 's/^([0-9]+\.[0-9]+).*/\1/' 20 | } 21 | 22 | DEPS_SRC=/root/deps 23 | mkdir -p $DEPS_SRC 24 | 25 | print_download_stage zlib $ZLIB_VERSION 26 | mkdir $DEPS_SRC/zlib 27 | cd $DEPS_SRC/zlib 28 | curl -Lks https://github.com/zlib-ng/zlib-ng/archive/${ZLIB_VERSION}.tar.gz \ 29 | | tar -xzC . --strip-components=1 30 | 31 | print_download_stage brotli $BROTLI_VERSION 32 | mkdir $DEPS_SRC/brotli 33 | cd $DEPS_SRC/brotli 34 | curl -Lks https://github.com/google/brotli/archive/refs/tags/v$BROTLI_VERSION.tar.gz \ 35 | | tar -xzC . --strip-components=1 36 | 37 | print_download_stage ffi $FFI_VERSION 38 | mkdir $DEPS_SRC/ffi 39 | cd $DEPS_SRC/ffi 40 | curl -Lks https://github.com/libffi/libffi/releases/download/v${FFI_VERSION}/libffi-${FFI_VERSION}.tar.gz \ 41 | | tar -xzC . --strip-components=1 42 | 43 | print_download_stage glib $GLIB_VERSION 44 | mkdir $DEPS_SRC/glib 45 | cd $DEPS_SRC/glib 46 | curl -Lks https://download.gnome.org/sources/glib/$(minor_version $GLIB_VERSION)/glib-${GLIB_VERSION}.tar.xz \ 47 | | tar -xJC . --strip-components=1 48 | 49 | print_download_stage highway $HIGHWAY_VERSION 50 | mkdir $DEPS_SRC/highway 51 | cd $DEPS_SRC/highway 52 | curl -Lks https://github.com/google/highway/archive/refs/tags/$HIGHWAY_VERSION.tar.gz \ 53 | | tar -xzC . --strip-components=1 54 | 55 | print_download_stage quantizr $QUANTIZR_VERSION 56 | mkdir $DEPS_SRC/quantizr 57 | cd $DEPS_SRC/quantizr 58 | curl -Ls https://github.com/DarthSim/quantizr/archive/v$QUANTIZR_VERSION.tar.gz \ 59 | | tar -xzC . --strip-components=1 60 | 61 | print_download_stage expat $LIBEXPAT_VERSION 62 | mkdir $DEPS_SRC/expat 63 | cd $DEPS_SRC/expat 64 | curl -Ls https://github.com/libexpat/libexpat/releases/download/R_$(snake_version $LIBEXPAT_VERSION)/expat-$LIBEXPAT_VERSION.tar.gz \ 65 | | tar -xzC . --strip-components=1 66 | 67 | print_download_stage libxml2 $LIBXML2_VERSION 68 | mkdir $DEPS_SRC/libxml2 69 | cd $DEPS_SRC/libxml2 70 | curl -Ls https://download.gnome.org/sources/libxml2/$(minor_version $LIBXML2_VERSION)/libxml2-${LIBXML2_VERSION}.tar.xz \ 71 | | tar -xJC . --strip-components=1 72 | 73 | print_download_stage libexif $LIBEXIF_VERSION 74 | mkdir $DEPS_SRC/libexif 75 | cd $DEPS_SRC/libexif 76 | curl -Ls https://github.com/libexif/libexif/archive/libexif-$(snake_version $LIBEXIF_VERSION)-release.tar.gz \ 77 | | tar -xzC . --strip-components=1 78 | 79 | print_download_stage lcms2 $LCMS2_VERSION 80 | mkdir $DEPS_SRC/lcms2 81 | cd $DEPS_SRC/lcms2 82 | curl -Ls https://github.com/mm2/Little-CMS/releases/download/lcms${LCMS2_VERSION}/lcms2-${LCMS2_VERSION}.tar.gz \ 83 | | tar -xzC . --strip-components=1 84 | 85 | print_download_stage libjpeg-turbo $LIBJPEGTURBO_VERSION 86 | mkdir $DEPS_SRC/libjpeg-turbo 87 | cd $DEPS_SRC/libjpeg-turbo 88 | curl -Ls https://github.com/libjpeg-turbo/libjpeg-turbo/archive/$LIBJPEGTURBO_VERSION.tar.gz \ 89 | | tar -xzC . --strip-components=1 90 | 91 | print_download_stage libjxl $LIBJXL_VERSION 92 | mkdir $DEPS_SRC/libjxl 93 | cd $DEPS_SRC/libjxl 94 | curl -Ls https://github.com/libjxl/libjxl/archive/refs/tags/v$LIBJXL_VERSION.tar.gz \ 95 | | tar -xzC . --strip-components=1 96 | 97 | print_download_stage libpng $LIBPNG_VERSION 98 | mkdir $DEPS_SRC/libpng 99 | cd $DEPS_SRC/libpng 100 | curl -Ls https://sourceforge.net/projects/libpng/files/libpng16/$LIBPNG_VERSION/libpng-$LIBPNG_VERSION.tar.gz/download \ 101 | | tar -xzC . --strip-components=1 102 | 103 | print_download_stage libspng $LIBSPNG_VERSION 104 | mkdir $DEPS_SRC/libspng 105 | cd $DEPS_SRC/libspng 106 | curl -Ls https://github.com/randy408/libspng/archive/refs/tags/v$LIBSPNG_VERSION.tar.gz \ 107 | | tar -xzC . --strip-components=1 108 | 109 | print_download_stage libwebp $LIBWEBP_VERSION 110 | mkdir $DEPS_SRC/libwebp 111 | cd $DEPS_SRC/libwebp 112 | curl -Ls https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP_VERSION.tar.gz \ 113 | | tar -xzC . --strip-components=1 114 | 115 | print_download_stage libtiff $LIBTIFF_VERSION 116 | mkdir $DEPS_SRC/libtiff 117 | cd $DEPS_SRC/libtiff 118 | curl -Ls https://gitlab.com/libtiff/libtiff/-/archive/v$LIBTIFF_VERSION/libtiff-v$LIBTIFF_VERSION.tar.gz \ 119 | | tar -xzC . --strip-components=1 120 | 121 | print_download_stage cgif $CGIF_VERSION 122 | mkdir $DEPS_SRC/cgif 123 | cd $DEPS_SRC/cgif 124 | curl -Ls https://github.com/dloebl/cgif/archive/refs/tags/v$CGIF_VERSION.tar.gz \ 125 | | tar -xzC . --strip-components=1 126 | 127 | print_download_stage libde265 $LIBDE265_VERSION 128 | mkdir $DEPS_SRC/libde265 129 | cd $DEPS_SRC/libde265 130 | curl -Ls https://github.com/strukturag/libde265/releases/download/v$LIBDE265_VERSION/libde265-$LIBDE265_VERSION.tar.gz \ 131 | | tar -xzC . --strip-components=1 132 | 133 | print_download_stage kvazaar $KVAZAAR_VERSION 134 | mkdir $DEPS_SRC/kvazaar 135 | cd $DEPS_SRC/kvazaar 136 | curl -Ls https://github.com/ultravideo/kvazaar/releases/download/v$KVAZAAR_VERSION/kvazaar-$KVAZAAR_VERSION.tar.gz \ 137 | | tar -xzC . --strip-components=1 138 | 139 | print_download_stage dav1d $DAV1D_VERSION 140 | mkdir $DEPS_SRC/dav1d 141 | cd $DEPS_SRC/dav1d 142 | curl -Ls https://code.videolan.org/videolan/dav1d/-/archive/$DAV1D_VERSION/dav1d-$DAV1D_VERSION.tar.gz \ 143 | | tar -xzC . --strip-components=1 144 | 145 | # print_download_stage rav1e $RAV1E_VERSION 146 | # mkdir $DEPS_SRC/rav1e 147 | # cd $DEPS_SRC/rav1e 148 | # curl -Ls https://github.com/xiph/rav1e/archive/v$RAV1E_VERSION.tar.gz \ 149 | # | tar -xzC . --strip-components=1 150 | 151 | print_download_stage aom $AOM_VERSION 152 | mkdir $DEPS_SRC/aom 153 | cd $DEPS_SRC/aom 154 | curl -Ls https://storage.googleapis.com/aom-releases/libaom-${AOM_VERSION}.tar.gz \ 155 | | tar -xzC . --strip-components=1 156 | 157 | print_download_stage libyuv $LIBYUV_SHA 158 | mkdir $DEPS_SRC/libyuv 159 | cd $DEPS_SRC/libyuv 160 | curl -Ls https://chromium.googlesource.com/libyuv/libyuv/+archive/${LIBYUV_SHA}.tar.gz \ 161 | | tar -xzC . 162 | 163 | print_download_stage libheif $LIBHEIF_VERSION 164 | mkdir $DEPS_SRC/libheif 165 | cd $DEPS_SRC/libheif 166 | curl -Ls https://github.com/strukturag/libheif/releases/download/v$LIBHEIF_VERSION/libheif-$LIBHEIF_VERSION.tar.gz \ 167 | | tar -xzC . --strip-components=1 168 | 169 | print_download_stage freetype $FREETYPE_VERSION 170 | mkdir $DEPS_SRC/freetype 171 | cd $DEPS_SRC/freetype 172 | curl -Ls https://gitlab.freedesktop.org/freetype/freetype/-/archive/VER-${FREETYPE_VERSION//./-}/freetype-VER-${FREETYPE_VERSION//./-}.tar.bz2 \ 173 | | tar -xjC . --strip-components=1 174 | 175 | print_download_stage fontconfig $FONTCONFIG_VERSION 176 | mkdir $DEPS_SRC/fontconfig 177 | cd $DEPS_SRC/fontconfig 178 | curl -Ls https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/${FONTCONFIG_VERSION}/fontconfig-${FONTCONFIG_VERSION}.tar.gz \ 179 | | tar -xzC . --strip-components=1 180 | 181 | print_download_stage harfbuzz $HARFBUZZ_VERSION 182 | mkdir $DEPS_SRC/harfbuzz 183 | cd $DEPS_SRC/harfbuzz 184 | curl -Ls https://github.com/harfbuzz/harfbuzz/archive/${HARFBUZZ_VERSION}.tar.gz \ 185 | | tar -xzC . --strip-components=1 186 | 187 | print_download_stage pixman $PIXMAN_VERSION 188 | mkdir $DEPS_SRC/pixman 189 | cd $DEPS_SRC/pixman 190 | curl -Ls https://cairographics.org/releases/pixman-${PIXMAN_VERSION}.tar.gz \ 191 | | tar -xzC . --strip-components=1 192 | 193 | print_download_stage cairo $CAIRO_VERSION 194 | mkdir $DEPS_SRC/cairo 195 | cd $DEPS_SRC/cairo 196 | curl -Ls https://gitlab.freedesktop.org/cairo/cairo/-/archive/$CAIRO_VERSION/cairo-$CAIRO_VERSION.tar.gz \ 197 | | tar -xzC . --strip-components=1 198 | 199 | print_download_stage fribidi $FRIBIDI_VERSION 200 | mkdir $DEPS_SRC/fribidi 201 | cd $DEPS_SRC/fribidi 202 | curl -Ls https://github.com/fribidi/fribidi/releases/download/v${FRIBIDI_VERSION}/fribidi-${FRIBIDI_VERSION}.tar.xz \ 203 | | tar -xJC . --strip-components=1 204 | 205 | print_download_stage pango $PANGO_VERSION 206 | mkdir $DEPS_SRC/pango 207 | cd $DEPS_SRC/pango 208 | curl -Lks https://download.gnome.org/sources/pango/$(minor_version $PANGO_VERSION)/pango-${PANGO_VERSION}.tar.xz \ 209 | | tar -xJC . --strip-components=1 210 | 211 | print_download_stage librsvg $LIBRSVG_VERSION 212 | mkdir $DEPS_SRC/librsvg 213 | cd $DEPS_SRC/librsvg 214 | curl -Lks https://download.gnome.org/sources/librsvg/$(minor_version $LIBRSVG_VERSION)/librsvg-${LIBRSVG_VERSION}.tar.xz \ 215 | | tar -xJC . --strip-components=1 216 | 217 | print_download_stage vips $VIPS_VERSION 218 | mkdir $DEPS_SRC/vips 219 | cd $DEPS_SRC/vips 220 | curl -Ls https://github.com/libvips/libvips/releases/download/v$VIPS_VERSION/vips-$VIPS_VERSION.tar.xz \ 221 | | tar -xJC . --strip-components=1 222 | -------------------------------------------------------------------------------- /install-go.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | my_dir="$(dirname "$0")" 5 | versions_file="$my_dir/versions.sh" 6 | source $versions_file 7 | 8 | case "$(uname -m)" in 9 | x86_64) 10 | ARCH=amd64 11 | ;; 12 | 13 | aarch64) 14 | ARCH=arm64 15 | ;; 16 | 17 | *) 18 | echo "Unsupported architecture $(uname -m)" 19 | exit 1 20 | ;; 21 | esac 22 | 23 | curl -Ls https://golang.org/dl/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \ 24 | | tar -xzC /usr/local 25 | -------------------------------------------------------------------------------- /install-rust.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | PATH="/root/.cargo/bin:$PATH" 5 | 6 | curl https://sh.rustup.rs -sSf | sh -s -- -y 7 | cargo install cargo-c 8 | -------------------------------------------------------------------------------- /versions.sh: -------------------------------------------------------------------------------- 1 | export GOLANG_VERSION=1.24.2 2 | export ZLIB_VERSION=2.2.4 3 | export BROTLI_VERSION=1.1.0 4 | export FFI_VERSION=3.4.8 5 | export GLIB_VERSION=2.84.1 6 | export HIGHWAY_VERSION=1.2.0 7 | export QUANTIZR_VERSION=1.4.3 8 | export LIBEXPAT_VERSION=2.7.1 9 | export LIBXML2_VERSION=2.14.2 10 | export LIBEXIF_VERSION=0.6.25 11 | export LCMS2_VERSION=2.17 12 | export LIBJPEGTURBO_VERSION=3.1.0 13 | export LIBJXL_VERSION=0.11.1 14 | export LIBPNG_VERSION=1.6.37 15 | export LIBSPNG_VERSION=0.7.4 16 | export LIBWEBP_VERSION=1.5.0 17 | export LIBTIFF_VERSION=4.7.0 18 | export CGIF_VERSION=0.5.0 19 | export LIBDE265_VERSION=1.0.15 20 | export KVAZAAR_VERSION=2.3.1 21 | export DAV1D_VERSION=1.5.1 22 | # export RAV1E_VERSION=0.5.1 23 | export AOM_VERSION=3.12.1 24 | export LIBYUV_SHA='a6a2ec65' 25 | export LIBHEIF_VERSION=1.19.7 26 | export FREETYPE_VERSION=2.13.3 27 | export FONTCONFIG_VERSION=2.16.2 28 | export HARFBUZZ_VERSION=11.1.0 29 | export PIXMAN_VERSION=0.44.2 30 | export CAIRO_VERSION=1.18.4 31 | export FRIBIDI_VERSION=1.0.16 32 | export PANGO_VERSION=1.56.3 33 | export LIBRSVG_VERSION=2.60.0 34 | export VIPS_VERSION=8.16.1 35 | --------------------------------------------------------------------------------