forked from macports/macports-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e88eabe
commit 636a724
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2 | ||
|
||
PortSystem 1.0 | ||
PortGroup github 1.0 | ||
PortGroup makefile 1.0 | ||
|
||
github.setup phoboslab qoi 23c790ce59e1419d348dc4b1ae7306a0914edf47 | ||
version 20220806 | ||
revision 0 | ||
|
||
categories graphics | ||
license MIT | ||
maintainers {@aeiouaeiouaeiouaeiouaeiouaeiou outlook.com:aeioudev} openmaintainer | ||
|
||
description The “Quite OK Image Format” for fast, lossless image \ | ||
compression. | ||
long_description ${description} It losslessly compresses images to a similar \ | ||
size of PNG, while offering 20x-50x faster encoding and \ | ||
3x-4x faster decoding. The reference en-/decoder fits \ | ||
in about 300 lines of C. | ||
|
||
homepage https://qoiformat.org/ | ||
|
||
checksums rmd160 15e10aafb0416a6ba85f4902146077cd6d64fdfb \ | ||
sha256 24cac72639d356c538566ba97cf5d9eb02bbe6b22592623691c4abaf8b6101e5 \ | ||
size 14461 | ||
|
||
depends_build port:libpng \ | ||
port:stb | ||
|
||
patchfiles patch-makefile.diff | ||
|
||
post-patch { | ||
reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile | ||
} | ||
|
||
build.target all | ||
|
||
destroot { | ||
set doc_dir ${destroot}${prefix}/share/doc/${name} | ||
|
||
xinstall -d -m 0755 ${doc_dir} | ||
xinstall -m 0644 ${worksrcpath}/README.md ${doc_dir} | ||
xinstall -m 0644 {*}[glob ${worksrcpath}/*.h] ${destroot}${prefix}/include/ | ||
xinstall -m 0755 -W ${worksrcpath} qoibench qoiconv ${destroot}${prefix}/bin/ | ||
} | ||
|
||
livecheck.type none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- Makefile.orig | ||
+++ Makefile | ||
@@ -1,7 +1,6 @@ | ||
-CC ?= gcc | ||
-CFLAGS_BENCH ?= -std=gnu99 -O3 | ||
+CFLAGS_BENCH ?= -std=gnu99 | ||
LFLAGS_BENCH ?= -lpng | ||
-CFLAGS_CONV ?= -std=c99 -O3 | ||
+CFLAGS_CONV ?= -std=c99 | ||
|
||
TARGET_BENCH ?= qoibench | ||
TARGET_CONV ?= qoiconv | ||
@@ -11,11 +10,11 @@ all: $(TARGET_BENCH) $(TARGET_CONV) | ||
bench: $(TARGET_BENCH) | ||
|
||
$(TARGET_BENCH):$(TARGET_BENCH).c | ||
- $(CC) $(CFLAGS_BENCH) $(TARGET_BENCH).c -o $(TARGET_BENCH) $(LFLAGS_BENCH) | ||
+ $(CC) $(CFLAGS) -I@PREFIX@/include/stb $(CFLAGS_BENCH) $(TARGET_BENCH).c -o $(TARGET_BENCH) $(LFLAGS_BENCH) | ||
|
||
conv: $(TARGET_CONV) | ||
$(TARGET_CONV):$(TARGET_CONV).c | ||
- $(CC) $(CFLAGS_CONV) $(TARGET_CONV).c -o $(TARGET_CONV) | ||
+ $(CC) $(CFLAGS) -I@PREFIX@/include/stb $(CFLAGS_CONV) $(TARGET_CONV).c -o $(TARGET_CONV) | ||
|
||
.PHONY: clean | ||
clean: |