1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 20:37:35 +00:00

Ports: Add QOI converter and QOI benchmark utility

This commit is contained in:
Liav A 2022-06-26 22:36:57 +03:00 committed by Linus Groh
parent 5fe4feee33
commit 6256bdb075
4 changed files with 49 additions and 0 deletions

11
Ports/qoi/package.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='qoi'
version='edb8d7b1140be3168cc99ed87edc605c7c1cf31f'
files="https://github.com/phoboslab/qoi/archive/${version}.zip qoi-${version}.zip 3d3df95fb0b59aca2113ce45396f887eaba1be914cd54b56804efc241f93f203"
auth_type='sha256'
depends=('libpng' 'stb')
install() {
run cp qoibench "${SERENITY_INSTALL_ROOT}/bin"
run cp qoiconv "${SERENITY_INSTALL_ROOT}/bin"
}

View file

@ -0,0 +1,30 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Liav A <liavalb@gmail.com>
Date: Thu, 7 Jul 2022 23:49:02 +0300
Subject: [PATCH] Use LibMath frexp function
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 4d21d41..1096a88 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CC ?= gcc
CFLAGS_BENCH ?= -std=gnu99 -O3
-LFLAGS_BENCH ?= -lpng
+LFLAGS_BENCH ?= -lpng -lm
CFLAGS_CONV ?= -std=c99 -O3
TARGET_BENCH ?= qoibench
@@ -15,7 +15,7 @@ $(TARGET_BENCH):$(TARGET_BENCH).c
conv: $(TARGET_CONV)
$(TARGET_CONV):$(TARGET_CONV).c
- $(CC) $(CFLAGS_CONV) $(TARGET_CONV).c -o $(TARGET_CONV)
+ $(CC) $(CFLAGS_CONV) $(TARGET_CONV).c -o $(TARGET_CONV) -lm
.PHONY: clean
clean:

View file

@ -0,0 +1,7 @@
# Patches for qoi on SerenityOS
## `0001-Use-LibMath-frexp-function.patch`
Use LibMath frexp function