From d3b96614d278bab22505211ec7350d3868f5f0c9 Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Sun, 5 Apr 2026 08:11:16 -0300 Subject: [PATCH] qoi: update to 20250428 Make encoding 1.4% faster by replacing modulo with mask --- graphics/qoi/Portfile | 13 ++++++------- graphics/qoi/files/patch-makefile.diff | 18 +++++++++--------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/graphics/qoi/Portfile b/graphics/qoi/Portfile index 182c322154b..0893233d8d0 100644 --- a/graphics/qoi/Portfile +++ b/graphics/qoi/Portfile @@ -4,10 +4,9 @@ PortSystem 1.0 PortGroup github 1.0 PortGroup makefile 1.0 -github.setup phoboslab qoi f65b365318df43cd0d7de8b51473dabcbefc04a6 -# Change github.tarball_from to 'releases' or 'archive' next update -github.tarball_from tarball -version 20230616 +github.setup phoboslab qoi 4ab68bbd20618a663255625160c40875713f5485 +github.tarball_from archive +version 20250428 revision 0 categories graphics @@ -23,9 +22,9 @@ long_description {*}${description} It losslessly compresses images to a s homepage https://qoiformat.org/ -checksums rmd160 d6680209b5de616e31b54afe6ada147dcc4cb007 \ - sha256 25d1aac8c16e44051988c9f9e7078c27261d9d7ceea6af9ad01b0fa33631f90e \ - size 15511 +checksums rmd160 b6ce31ca151c087ad25edaeffcedfd115b216b81 \ + sha256 79384e6e24ce07bdfcbea8bcf63d4b26b2b3eb66d15579bd8973c639e919176e \ + size 16237 depends_build port:libpng \ port:stb diff --git a/graphics/qoi/files/patch-makefile.diff b/graphics/qoi/files/patch-makefile.diff index 33dae7d0438..3d03eb1e5a2 100644 --- a/graphics/qoi/files/patch-makefile.diff +++ b/graphics/qoi/files/patch-makefile.diff @@ -1,25 +1,25 @@ ---- Makefile.orig -+++ Makefile +--- Makefile.orig 2026-04-05 08:04:53 ++++ Makefile 2026-04-05 07:07:33 @@ -1,7 +1,6 @@ -CC ?= gcc -CFLAGS_BENCH ?= -std=gnu99 -O3 +CFLAGS_BENCH ?= -std=gnu99 - LFLAGS_BENCH ?= -lpng + LFLAGS_BENCH ?= -lpng $(LDFLAGS) -CFLAGS_CONV ?= -std=c99 -O3 +CFLAGS_CONV ?= -std=c99 + LFLAGS_CONV ?= $(LDFLAGS) TARGET_BENCH ?= qoibench - TARGET_CONV ?= qoiconv -@@ -11,11 +10,11 @@ all: $(TARGET_BENCH) $(TARGET_CONV) - bench: $(TARGET_BENCH) +@@ -11,11 +10,11 @@ - $(TARGET_BENCH):$(TARGET_BENCH).c + bench: $(TARGET_BENCH) + $(TARGET_BENCH):$(TARGET_BENCH).c qoi.h - $(CC) $(CFLAGS_BENCH) $(CFLAGS) $(TARGET_BENCH).c -o $(TARGET_BENCH) $(LFLAGS_BENCH) + $(CC) $(CFLAGS_BENCH) $(CFLAGS) -I@PREFIX@/include/stb $(TARGET_BENCH).c -o $(TARGET_BENCH) $(LFLAGS_BENCH) conv: $(TARGET_CONV) - $(TARGET_CONV):$(TARGET_CONV).c -- $(CC) $(CFLAGS_CONV) $(CFLAGS) $(TARGET_CONV).c -o $(TARGET_CONV) + $(TARGET_CONV):$(TARGET_CONV).c qoi.h +- $(CC) $(CFLAGS_CONV) $(CFLAGS) $(TARGET_CONV).c -o $(TARGET_CONV) $(LFLAGS_CONV) + $(CC) $(CFLAGS_CONV) $(CFLAGS) -I@PREFIX@/include/stb $(TARGET_CONV).c -o $(TARGET_CONV) .PHONY: clean