image_optim_pack 0.11.2-x86_64-linux → 0.12.0-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 345891ab42de314de50da7153623b0fad3ef60666acd00e81e0d4b89ba23f158
4
- data.tar.gz: '096e0384fe38d0d791a48fd6485fe07d983e894d53b683da621fd213cac84324'
3
+ metadata.gz: e788e6ab9729a83bfb4d3f3d79b02a58e932e16255e50dcc94fe5441b62d8067
4
+ data.tar.gz: 1ca75c4e7d88cbc53fa12040622cca39e973417d40d12e64d13e44e340da40b8
5
5
  SHA512:
6
- metadata.gz: 24c590ad9a6b7e21d081dd0909513d2c5a2a1fa728f55ec9ebf09e15435e1b89695bf954053ad3f28fc9b6b643e105fe84e65f33d3e026098b942529f3569f12
7
- data.tar.gz: 4905882838bfa1d7d871c76457ab38f634a2f48d3590bfccec76d7df0842497fd2daa00a9bd824112f5010fa56ca6437f8aca94d8763f921d46acf940df2daea
6
+ metadata.gz: 3a42d8096fcaf5ca99338991f21e32de016f5124d9b3878cdf4a82567937f5f2c4900c8cebabd069b66cb3fe43629f4dd8dee3ce49deae992d4d8cfc11cd9a08
7
+ data.tar.gz: 99320bf5fda48c03f776017e0b8cc2001fd99b29b3b20163537a2f27ed7774c157708cb6fb04652185f1a9ede6ca40129a2c5fd8ca552d87bd76f914ab4f6244
@@ -0,0 +1,47 @@
1
+ name: build
2
+ on:
3
+ push:
4
+ pull_request:
5
+ jobs:
6
+ build-on-linux:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+ - run: uname -m
11
+ - run: sudo apt-get install -y chrpath
12
+ - run: rustup target list --installed
13
+ - run: make download download-dependencies
14
+ - run: rm -r vendor
15
+ - run: make all
16
+ - uses: actions/upload-artifact@v4
17
+ with:
18
+ name: on-linux
19
+ path: vendor/
20
+ build-on-darwin-x86_64:
21
+ runs-on: macos-13
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - run: uname -m
25
+ - run: rustup target add aarch64-apple-darwin
26
+ - run: make download download-dependencies
27
+ - run: rm -r vendor
28
+ - run: make all ARCH=x86_64
29
+ - run: make all ARCH=arm64
30
+ - uses: actions/upload-artifact@v4
31
+ with:
32
+ name: on-darwin-x86_64
33
+ path: vendor/
34
+ build-on-darwin-arm64:
35
+ runs-on: macos-14
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+ - run: uname -m
39
+ - run: rustup target add x86_64-apple-darwin
40
+ - run: make download download-dependencies
41
+ - run: rm -r vendor
42
+ - run: make all ARCH=arm64
43
+ - run: make all test ARCH=x86_64
44
+ - uses: actions/upload-artifact@v4
45
+ with:
46
+ name: on-darwin-arm64
47
+ path: vendor/
@@ -12,6 +12,7 @@ jobs:
12
12
  os:
13
13
  - ubuntu-latest
14
14
  - macos-13
15
+ - macos-14
15
16
  ruby:
16
17
  - '2.7'
17
18
  - '3.0'
@@ -1,8 +1,7 @@
1
1
  name: docker-build
2
2
  on:
3
3
  push:
4
- tags:
5
- - '*'
4
+ pull_request:
6
5
  workflow_dispatch:
7
6
  jobs:
8
7
  docker-build:
@@ -20,4 +19,11 @@ jobs:
20
19
  registry: ghcr.io
21
20
  username: ${{ github.actor }}
22
21
  password: ${{ secrets.GITHUB_TOKEN }}
23
- - run: make docker-push ${{ matrix.params }}
22
+ if: startsWith(github.ref, 'refs/tags/')
23
+ - run: |
24
+ if [[ "$GITHUB_REF" == refs/tags/* ]]; then
25
+ echo "MAKE_ACTION=docker-push" >> $GITHUB_ENV
26
+ else
27
+ echo "MAKE_ACTION=docker-test" >> $GITHUB_ENV
28
+ fi
29
+ - run: make "$MAKE_ACTION" ${{ matrix.params }}
data/CHANGELOG.markdown CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## unreleased
4
4
 
5
+ ## v0.12.0 (2025-02-23)
6
+
7
+ * Add darwin-arm64/Apple silicon platform [@toy](https://github.com/toy)
8
+ * Switch to rust version of pngquant updating to 3.0.3 [#27](https://github.com/toy/image_optim_pack/issues/27) [@toy](https://github.com/toy)
9
+ * pngout 20230322 (only for darwin) for arm64 [@toy](https://github.com/toy)
10
+ * Set darwin deployment target to 10.12 [@toy](https://github.com/toy)
11
+ * liblcms 2.17, libpng 1.6.47 and oxipng 9.1.4 [@toy](https://github.com/toy)
12
+
5
13
  ## v0.11.2 (2025-01-31)
6
14
 
7
15
  * Ensure linux binaries built in container have mode `755` instead of `700` [#28](https://github.com/toy/image_optim_pack/issues/28) [#29](https://github.com/toy/image_optim_pack/issues/29) [@toy](https://github.com/toy)
data/Dockerfile CHANGED
@@ -7,7 +7,11 @@ RUN apk add --no-cache build-base cmake nasm bash findutils
7
7
  COPY script/extract ./
8
8
  ENV CPATH=/usr/local/include
9
9
 
10
- FROM build as libz
10
+ FROM rust:1-alpine as cargo
11
+ RUN apk add --no-cache build-base
12
+ COPY script/extract ./
13
+
14
+ FROM cargo as libz
11
15
  ARG LIBZ_VER
12
16
  ARG LIBZ_SHA256
13
17
  COPY download/libz-$LIBZ_VER.tar.gz download/
@@ -105,9 +109,7 @@ RUN ./extract optipng && \
105
109
  ./configure && \
106
110
  make install
107
111
 
108
- FROM rust:1-alpine as oxipng
109
- RUN apk add --no-cache build-base
110
- COPY script/extract ./
112
+ FROM cargo as oxipng
111
113
  ARG OXIPNG_VER
112
114
  ARG OXIPNG_SHA256
113
115
  COPY download/oxipng-$OXIPNG_VER.tar.gz download/
@@ -141,7 +143,8 @@ ARG PNGQUANT_SHA256
141
143
  COPY download/pngquant-$PNGQUANT_VER.tar.gz download/
142
144
  RUN ./extract pngquant && \
143
145
  cd build/pngquant && \
144
- make install
146
+ cargo build --release && \
147
+ install -c target/release/pngquant /usr/local/bin
145
148
 
146
149
  # FROM build as [name]
147
150
  # ARG [NAME]_VER
data/Dockerfile.debian CHANGED
@@ -7,7 +7,11 @@ RUN apt-get update && apt-get install -y build-essential cmake nasm bash finduti
7
7
  COPY script/extract ./
8
8
  ENV CPATH=/usr/local/include
9
9
 
10
- FROM build as libz
10
+ FROM rust:1 as cargo
11
+ RUN apt-get update && apt-get install -y build-essential
12
+ COPY script/extract ./
13
+
14
+ FROM cargo as libz
11
15
  ARG LIBZ_VER
12
16
  ARG LIBZ_SHA256
13
17
  COPY download/libz-$LIBZ_VER.tar.gz download/
@@ -105,9 +109,7 @@ RUN ./extract optipng && \
105
109
  ./configure && \
106
110
  make install
107
111
 
108
- FROM rust:1 as oxipng
109
- RUN apt-get update && apt-get install -y build-essential
110
- COPY script/extract ./
112
+ FROM cargo as oxipng
111
113
  ARG OXIPNG_VER
112
114
  ARG OXIPNG_SHA256
113
115
  COPY download/oxipng-$OXIPNG_VER.tar.gz download/
@@ -141,7 +143,8 @@ ARG PNGQUANT_SHA256
141
143
  COPY download/pngquant-$PNGQUANT_VER.tar.gz download/
142
144
  RUN ./extract pngquant && \
143
145
  cd build/pngquant && \
144
- make install
146
+ cargo build --release && \
147
+ install -c target/release/pngquant /usr/local/bin
145
148
 
146
149
  # FROM build as [name]
147
150
  # ARG [NAME]_VER
data/Makefile CHANGED
@@ -8,18 +8,18 @@ JHEAD_VER := 3.04
8
8
  JPEGARCHIVE_VER := 2.2.0
9
9
  JPEGOPTIM_VER := 1.5.5
10
10
  LIBJPEG_VER := 9f
11
- LIBLCMS_VER := 2.16
11
+ LIBLCMS_VER := 2.17
12
12
  LIBMOZJPEG_VER := 4.1.5
13
- LIBPNG_VER := 1.6.46
13
+ LIBPNG_VER := 1.6.47
14
14
  LIBZ_VER := 1.2.11
15
15
  OPTIPNG_VER := 0.7.8
16
- OXIPNG_VER := 9.1.3
16
+ OXIPNG_VER := 9.1.4
17
17
  PNGCRUSH_VER := 1.8.13
18
- PNGOUT_VER := 20200115
19
- PNGOUT_LINUX_VER := $(PNGOUT_VER)
20
- PNGOUT_LINUX_STATIC_VER := $(PNGOUT_VER)
21
- PNGOUT_DARWIN_VER := $(PNGOUT_VER)
22
- PNGQUANT_VER := 2.18.0
18
+ PNGOUT_VER = $(if $(IS_DARWIN),$(PNGOUT_DARWIN_VER),$(PNGOUT_LINUX_VER))
19
+ PNGOUT_LINUX_VER := 20200115
20
+ PNGOUT_LINUX_STATIC_VER := $(PNGOUT_LINUX_VER)
21
+ PNGOUT_DARWIN_VER := 20230322
22
+ PNGQUANT_VER := 3.0.3
23
23
 
24
24
  # ====== CHECKSUMS ======
25
25
 
@@ -28,7 +28,8 @@ include checksums.mk
28
28
  # ====== CONSTANTS ======
29
29
 
30
30
  OS := $(shell uname -s | tr A-Z a-z)
31
- ARCH := $(shell uname -m)
31
+ HOST_ARCH := $(shell uname -m)
32
+ ARCH := $(HOST_ARCH)
32
33
 
33
34
  IS_DARWIN := $(findstring darwin,$(OS))
34
35
  IS_LINUX := $(findstring linux,$(OS))
@@ -36,7 +37,8 @@ IS_BSD := $(findstring bsd,$(OS))
36
37
  IS_FREEBSD := $(findstring freebsd,$(OS))
37
38
  IS_OPENBSD := $(findstring openbsd,$(OS))
38
39
  DLEXT := $(if $(IS_DARWIN),.dylib,.so)
39
- HOST := $(ARCH)-$(if $(IS_DARWIN),apple,pc)-$(OS)
40
+ HOST := $(ARCH:arm64=arm)-$(if $(IS_DARWIN),apple,pc)-$(OS)
41
+ RUST_HOST := $(ARCH:arm64=aarch64)-$(if $(IS_DARWIN),apple-darwin,unknown-linux-gnu)
40
42
 
41
43
  DL_DIR := $(CURDIR)/download
42
44
  BUILD_ROOT_DIR := $(CURDIR)/build
@@ -109,14 +111,15 @@ $(eval $(call archive-dl,OXIPNG, https://github.com/shssoichiro/oxipng/arch
109
111
  $(eval $(call archive-dl,PNGCRUSH, https://prdownloads.sourceforge.net/pmt/pngcrush-[VER]-nolib.tar.gz?download))
110
112
  $(eval $(call archive-dl,PNGOUT_LINUX,https://www.jonof.id.au/files/kenutils/pngout-[VER]-linux.tar.gz))
111
113
  $(eval $(call archive-dl,PNGOUT_LINUX_STATIC,https://www.jonof.id.au/files/kenutils/pngout-[VER]-linux-static.tar.gz))
112
- $(eval $(call archive-dl,PNGOUT_DARWIN,https://www.jonof.id.au/files/kenutils/pngout-[VER]-macos.zip,zip))
113
- $(eval $(call archive-dl,PNGQUANT, https://pngquant.org/pngquant-[VER]-src.tar.gz))
114
+ $(eval $(call archive-dl,PNGOUT_DARWIN,https://www.jonof.id.au/files/kenutils/pngout-[VER]-mac.zip,zip))
115
+ $(eval $(call archive-dl,PNGQUANT, https://crates.io/api/v1/crates/pngquant/[VER]/download))
114
116
 
115
117
  download : $(foreach archive,$(ARCHIVES),$($(archive)_ARC))
116
118
  .PHONY : download
117
119
 
118
- download-dependencies : $(OXIPNG_EXTRACTED)
120
+ download-dependencies : $(OXIPNG_EXTRACTED) $(PNGQUANT_EXTRACTED)
119
121
  cd $(OXIPNG_DIR) && cargo fetch --locked
122
+ cd $(PNGQUANT_DIR) && cargo fetch --locked
120
123
  .PHONY : download-dependencies
121
124
 
122
125
  download-tidy-up :
@@ -184,19 +187,23 @@ $(eval $(call target-build,LIBMOZJPEG,,libjpeg.a))
184
187
  $(eval $(call target,LIBPNG,,libpng$(DLEXT)))
185
188
  $(eval $(call target,LIBZ,,libz$(DLEXT)))
186
189
  $(eval $(call target,OPTIPNG,,src/optipng/optipng))
187
- $(eval $(call target,OXIPNG,,target/release/oxipng))
190
+ $(eval $(call target,OXIPNG,,target/$(RUST_HOST)/release/oxipng))
188
191
  $(eval $(call target,PNGCRUSH))
189
192
  ifdef IS_DARWIN
190
193
  $(eval $(call target,PNGOUT,PNGOUT_DARWIN,,NOSTRIP))
191
194
  else
192
195
  $(eval $(call target,PNGOUT,PNGOUT_LINUX,,NOSTRIP))
193
196
  endif
194
- $(eval $(call target,PNGQUANT))
197
+ $(eval $(call target,PNGQUANT,,target/$(RUST_HOST)/release/pngquant))
195
198
 
196
199
  # ====== TARGETS ======
197
200
 
198
201
  all : build
202
+ ifeq ($(ARCH),$(HOST_ARCH))
199
203
  @$(MAKE) test
204
+ else
205
+ @echo Skipping tests when compiling for different architecture
206
+ endif
200
207
  .PHONY : all
201
208
 
202
209
  build : $(call downcase,$(PRODUCTS))
@@ -386,9 +393,10 @@ export CPPFLAGS = $(GCC_FLAGS)
386
393
  export LDFLAGS = $(GCC_FLAGS)
387
394
 
388
395
  ifdef IS_DARWIN
389
- export MACOSX_DEPLOYMENT_TARGET := 10.9
396
+ export MACOSX_DEPLOYMENT_TARGET := 10.12
390
397
  GCC_FLAGS += -arch $(ARCH)
391
398
  CXXFLAGS += -stdlib=libc++
399
+ export CMAKE_OSX_ARCHITECTURES := $(ARCH)
392
400
  endif
393
401
 
394
402
  ifdef IS_BSD
@@ -402,13 +410,13 @@ endif
402
410
  ## advpng
403
411
  $(eval $(call depend,ADVPNG,LIBZ))
404
412
  $(ADVPNG_TARGET) :
405
- cd $(DIR) && ./configure LDFLAGS="$(XORIGIN)"
413
+ cd $(DIR) && ./configure --host "$(HOST)" LDFLAGS="$(XORIGIN)"
406
414
  cd $(DIR) && $(MAKE) advpng
407
415
  $(call chrpath_origin,$@)
408
416
 
409
417
  ## gifsicle
410
418
  $(GIFSICLE_TARGET) :
411
- cd $(DIR) && ./configure
419
+ cd $(DIR) && ./configure --host "$(HOST)"
412
420
  cd $(DIR) && $(MAKE) gifsicle
413
421
 
414
422
  ## jhead
@@ -424,7 +432,7 @@ $(JPEG-RECOMPRESS_TARGET) :
424
432
  ## jpegoptim
425
433
  $(eval $(call depend,JPEGOPTIM,LIBJPEG))
426
434
  $(JPEGOPTIM_TARGET) :
427
- cd $(DIR) && ./configure LDFLAGS="$(XORIGIN)" --host $(HOST)
435
+ cd $(DIR) && ./configure --host "$(HOST)" LDFLAGS="$(XORIGIN)"
428
436
  cd $(DIR) && $(MAKE) jpegoptim
429
437
  $(call chrpath_origin,$@)
430
438
 
@@ -436,7 +444,7 @@ $(JPEGTRAN_TARGET) :
436
444
 
437
445
  ## libjpeg
438
446
  $(LIBJPEG_TARGET) :
439
- cd $(DIR) && ./configure CC="$(CC) $(CFLAGS)"
447
+ cd $(DIR) && ./configure --host "$(HOST)" CC="$(CC) $(CFLAGS)"
440
448
  cd $(DIR) && $(libtool_target_soname)
441
449
  ifdef IS_DARWIN
442
450
  cd $(DIR) && $(MAKE) libjpeg.la LDFLAGS="-Wl,-install_name,@loader_path/$(@F)"
@@ -447,7 +455,7 @@ endif
447
455
 
448
456
  ## liblcms
449
457
  $(LIBLCMS_TARGET) :
450
- cd $(DIR) && ./configure
458
+ cd $(DIR) && ./configure --host "$(HOST)"
451
459
  cd $(DIR) && $(libtool_target_soname)
452
460
  ifdef IS_DARWIN
453
461
  cd $(DIR)/src && make liblcms2.la LDFLAGS="-Wl,-install_name,@loader_path/$(@F)"
@@ -465,7 +473,7 @@ $(LIBMOZJPEG_TARGET) :
465
473
  ## libpng
466
474
  $(eval $(call depend,LIBPNG,LIBZ))
467
475
  $(LIBPNG_TARGET) :
468
- cd $(DIR) && ./configure CC="$(CC) $(CFLAGS)"
476
+ cd $(DIR) && ./configure --host "$(HOST)" CC="$(CC) $(CFLAGS)"
469
477
  cd $(DIR) && $(pkgconfig_pwd) -- *.pc
470
478
  cd $(DIR) && perl -pi -e 's/(?<=lpng)\d+//g' -- *.pc # %MAJOR%%MINOR% suffix
471
479
  cd $(DIR) && $(libtool_target_soname)
@@ -497,7 +505,7 @@ $(OPTIPNG_TARGET) :
497
505
 
498
506
  ## oxipng
499
507
  $(OXIPNG_TARGET) :
500
- cd $(DIR) && cargo build --release --frozen --offline
508
+ cd $(DIR) && cargo build --release --frozen --offline --target=$(RUST_HOST)
501
509
 
502
510
  ## pngcrush
503
511
  $(eval $(call depend,PNGCRUSH,LIBPNG LIBZ))
@@ -522,7 +530,14 @@ endif
522
530
 
523
531
  ## pngquant
524
532
  $(eval $(call depend,PNGQUANT,LIBLCMS LIBPNG LIBZ))
533
+ $(PNGQUANT_TARGET) : export OVERRIDE_BIN_DIR = $(LIBPNG_DIR)/override-bin
534
+ $(PNGQUANT_TARGET) : export PATH := $(OVERRIDE_BIN_DIR):$(PATH)
535
+ $(PNGQUANT_TARGET) : export RUSTFLAGS = -C link-arg=$(XORIGIN)
525
536
  $(PNGQUANT_TARGET) :
526
- cd $(DIR) && ./configure --without-cocoa --extra-ldflags="$(XORIGIN) $(STATIC_LIBGCC)"
527
- cd $(DIR) && $(MAKE) pngquant
537
+ # prevent build code of libpng-sys crate from using libpng-config
538
+ mkdir -p $(OVERRIDE_BIN_DIR) && \
539
+ cd $(OVERRIDE_BIN_DIR) && \
540
+ printf '%s\n' '#!/bin/sh' 'echo 1.5' > libpng-config && \
541
+ chmod +x libpng-config
542
+ cd $(DIR) && cargo build --release --frozen --offline --target=$(RUST_HOST)
528
543
  $(call chrpath_origin,$@)
data/README.markdown CHANGED
@@ -1,8 +1,9 @@
1
1
  [![Gem Version](https://img.shields.io/gem/v/image_optim_pack?logo=rubygems)](https://rubygems.org/gems/image_optim_pack)
2
- [![Build Status](https://img.shields.io/github/actions/workflow/status/toy/image_optim_pack/check.yml?logo=github)](https://github.com/toy/image_optim_pack/actions/workflows/check.yml)
2
+ [![Check](https://img.shields.io/github/actions/workflow/status/toy/image_optim_pack/check.yml?label=check&logo=github)](https://github.com/toy/image_optim_pack/actions/workflows/check.yml)
3
3
  [![Rubocop](https://img.shields.io/github/actions/workflow/status/toy/image_optim_pack/rubocop.yml?label=rubocop&logo=rubocop)](https://github.com/toy/image_optim_pack/actions/workflows/rubocop.yml)
4
4
  [![Docker build](https://img.shields.io/github/actions/workflow/status/toy/image_optim_pack/docker-build.yml?label=docker+build&logo=docker)](https://github.com/toy/image_optim_pack/actions/workflows/docker-build.yml)
5
5
  [![Livecheck](https://img.shields.io/github/actions/workflow/status/toy/image_optim_pack/livecheck.yml?label=livecheck&logo=github)](https://github.com/toy/image_optim_pack/actions/workflows/livecheck.yml)
6
+ [![Build](https://img.shields.io/github/actions/workflow/status/toy/image_optim_pack/build.yml?label=build&logo=github)](https://github.com/toy/image_optim_pack/actions/workflows/build.yml)
6
7
  [![Code Climate](https://img.shields.io/codeclimate/maintainability/toy/image_optim_pack?logo=codeclimate)](https://codeclimate.com/github/toy/image_optim_pack)
7
8
  [![Depfu](https://img.shields.io/depfu/toy/image_optim_pack)](https://depfu.com/github/toy/image_optim_pack)
8
9
  [![Inch CI](https://inch-ci.org/github/toy/image_optim_pack.svg?branch=master)](https://inch-ci.org/github/toy/image_optim_pack)
@@ -11,7 +12,7 @@
11
12
 
12
13
  Precompiled binaries for [`image_optim`](https://github.com/toy/image_optim).
13
14
 
14
- Contains binaries for Mac OS X (>= 10.9, x86\_64) and Linux (x86\_64).
15
+ Contains binaries for Mac OS X (>= 10.12, x86\_64, arm64) and Linux (x86\_64).
15
16
 
16
17
  A test application with latest `image_optim` and `image_optim_pack` is available on render: https://iopack.onrender.com/.
17
18
 
data/checksums.mk CHANGED
@@ -4,14 +4,14 @@ JHEAD_SHA256 := ef89bbcf4f6c25ed88088cf242a47a6aedfff4f08cc7dc205bf3e2c0f10a03c9
4
4
  JPEGARCHIVE_SHA256 := 3da16a5abbddd925dee0379aa51d9fe0cba33da0b5703be27c13a2dda3d7ed75
5
5
  JPEGOPTIM_SHA256 := 90a309d1c092de358bb411d702281ac3039b489d03adb0bc3c4ef04cf0067d38
6
6
  LIBJPEG_SHA256 := 04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b
7
- LIBLCMS_SHA256 := d873d34ad8b9b4cea010631f1a6228d2087475e4dc5e763eb81acc23d9d45a51
7
+ LIBLCMS_SHA256 := d11af569e42a1baa1650d20ad61d12e41af4fead4aa7964a01f93b08b53ab074
8
8
  LIBMOZJPEG_SHA256 := 9fcbb7171f6ac383f5b391175d6fb3acde5e64c4c4727274eade84ed0998fcc1
9
- LIBPNG_SHA256 := c2b8ffb46f48331416e01f9e5c7169c7a2e08ad766b742742644e5fdf192e4a1
9
+ LIBPNG_SHA256 := 084115c62fe023e3d88cd78764a4d8e89763985ee4b4a085825f7a00d85eafbb
10
10
  LIBZ_SHA256 := c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
11
11
  OPTIPNG_SHA256 := 25a3bd68481f21502ccaa0f4c13f84dcf6b20338e4c4e8c51f2cefbd8513398c
12
- OXIPNG_SHA256 := 5f34bc3a9eba661a686106261720061b1136301ccd67cc653c9c70d71fa33c09
12
+ OXIPNG_SHA256 := 90c5e32c556c49e8fb2170f281586e87f7619fd574b4ccf1bc76e2f6819bba77
13
13
  PNGCRUSH_SHA256 := fed0aaf5c098aa8c7f78c75365cd18d7341417326ecbdba547876b7b4f3df4be
14
14
  PNGOUT_LINUX_SHA256 := ac38bba6f0de29033de866538c3afa64341319b695bbe388efbc5fd9e830e928
15
15
  PNGOUT_LINUX_STATIC_SHA256 := 7a78ea475d65a00981bf418e5dfa3b34e42d6460fb992340802873bb14b08597
16
- PNGOUT_DARWIN_SHA256 := 3272fa947eeafc1ac0086e1f14935f9efa21d090a555e6892255fe5c88f6686e
17
- PNGQUANT_SHA256 := e72194b52b36f040deaec49a1ddd5dcd8d4feecc3a5fe6c5e9589a9707b233d4
16
+ PNGOUT_DARWIN_SHA256 := 2e3eb79345206040ae3a0d0d0ecfe9ad01d92fe5002b8a1676a65632a56840e1
17
+ PNGQUANT_SHA256 := 68a12bdd8825f9989f4ee9a6ab0b42727dae57728b939ef63453366697a07232
@@ -0,0 +1,3 @@
1
+ # encoding: UTF-8
2
+
3
+ eval "gemspec_path = #{__FILE__.inspect}; #{File.read('image_optim_pack.gemspec')}"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'image_optim_pack'
5
- s.version = '0.11.2'
5
+ s.version = '0.12.0'
6
6
  s.summary = %q{Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegtran, optipng, oxipng, pngcrush, pngout, pngquant}
7
7
  s.homepage = "https://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
data/script/livecheck CHANGED
@@ -73,14 +73,19 @@ CONFIG = {
73
73
  regexp: %r{/pngcrush/(\d+(?:\.\d+)*)/},
74
74
  info_url: 'https://pmt.sourceforge.io/pngcrush/ChangeLog.html',
75
75
  },
76
- pngout: {
76
+ pngout_linux: {
77
77
  url: 'https://www.jonof.id.au/kenutils.html',
78
78
  regexp: %r{/files/kenutils/pngout-(\d{8})-linux.tar.gz},
79
79
  info_url: 'https://www.jonof.id.au/kenutils.html#:~:text=Revision%20history',
80
80
  },
81
+ pngout_darwin: {
82
+ url: 'https://www.jonof.id.au/kenutils.html',
83
+ regexp: %r{/files/kenutils/pngout-(\d{8})-mac(?:os)?.zip},
84
+ info_url: 'https://www.jonof.id.au/kenutils.html#:~:text=Revision%20history',
85
+ },
81
86
  pngquant: {
82
- url: 'https://pngquant.org/releases.html',
83
- regexp: %r{<span itemprop='version'>(\d+(?:\.\d+)*)</span>},
87
+ url: 'https://index.crates.io/pn/gq/pngquant',
88
+ regexp: /"vers":"([^"]+)"/,
84
89
  },
85
90
  }.freeze
86
91
 
@@ -90,7 +95,7 @@ Thread.report_on_exception = false
90
95
  class Livecheck
91
96
  # Commands
92
97
  class Cli
93
- VERSION_REGEXP = /^([A-Z]+)_VER *:= *(.*)$/.freeze
98
+ VERSION_REGEXP = /^([A-Z_]+)_VER *:= *([^$\n]*)$/.freeze
94
99
 
95
100
  def initialize(args)
96
101
  @update = args.delete('--update')
data/script/run CHANGED
@@ -29,7 +29,7 @@ fi
29
29
 
30
30
  make download-dependencies
31
31
 
32
- for arch in x86_64; do
32
+ for arch in x86_64 arm64; do
33
33
  platform="darwin-$arch"
34
34
  passes-filter "$platform" || continue
35
35
  header "$platform"
@@ -40,7 +40,7 @@ for arch in x86_64; do
40
40
 
41
41
  rsync -aR --del Makefile checksums.mk download patches "$build_dir"
42
42
 
43
- sudo -u _image_optim --set-home bash -exc "
43
+ sudo -u _image_optim --set-home zsh -exc "
44
44
  mkdir -p '$build_dir'
45
45
  cd '$build_dir'
46
46
 
@@ -100,6 +100,13 @@ container_build() {
100
100
 
101
101
  if [[ "$status" = @(created|exited|running) ]]; then
102
102
  "$container_tool" exec -it "$container_name" bash -exc "
103
+ UPDATED_FILE=/.updated
104
+ if [ -f \"\$UPDATED_FILE\" ] && [ \"\$(date -r \"\$UPDATED_FILE\" +%F)\" == \"\$(date +%F)\" ]; then
105
+ echo \"Skipping updates\"
106
+ exit 0
107
+ fi
108
+ touch \"\$UPDATED_FILE\"
109
+
103
110
  apt-get update
104
111
  apt-get -y dist-upgrade
105
112
  rustup update
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_optim_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.12.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-30 00:00:00.000000000 Z
10
+ date: 2025-02-23 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: image_optim
@@ -97,6 +97,7 @@ extra_rdoc_files: []
97
97
  files:
98
98
  - ".dockerignore"
99
99
  - ".github/dependabot.yml"
100
+ - ".github/workflows/build.yml"
100
101
  - ".github/workflows/check.yml"
101
102
  - ".github/workflows/docker-build.yml"
102
103
  - ".github/workflows/livecheck.yml"
@@ -137,6 +138,7 @@ files:
137
138
  - acknowledgements/zopfli-contributors.txt
138
139
  - acknowledgements/zopfli.txt
139
140
  - checksums.mk
141
+ - image_optim_pack-darwin-arm64.gemspec
140
142
  - image_optim_pack-darwin-x86_64.gemspec
141
143
  - image_optim_pack-linux-x86_64.gemspec
142
144
  - image_optim_pack.gemspec
@@ -171,7 +173,7 @@ licenses:
171
173
  metadata:
172
174
  bug_tracker_uri: https://github.com/toy/image_optim_pack/issues
173
175
  changelog_uri: https://github.com/toy/image_optim_pack/blob/master/CHANGELOG.markdown
174
- documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.11.2
176
+ documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.12.0
175
177
  source_code_uri: https://github.com/toy/image_optim_pack
176
178
  rdoc_options: []
177
179
  require_paths: