Import graphics/zimg, a scaling, colorspace conversion, and dithering

library.
ok op@ sthen@

The "z" library implements the commonly required image processing basics
of scaling, colorspace conversion, and depth conversion. A simple API
enables conversion between any supported formats to operate with minimal
knowledge from the programmer. All library routines were designed from
the ground-up with correctness, flexibility, and thread-safety as first
priorities. Allocation, buffering, and I/O are cleanly separated from
processing, allowing the programmer to adapt "z" to many scenarios.
This commit is contained in:
bcallah 2022-09-08 11:36:49 +00:00
parent be062eeeb7
commit bab163ff06
5 changed files with 75 additions and 0 deletions

27
graphics/zimg/Makefile Normal file
View File

@ -0,0 +1,27 @@
COMMENT = scaling, colorspace conversion, and dithering library
CATEGORIES = graphics
SHARED_LIBS += zimg 0.0 # 2.0
GH_ACCOUNT = sekrit-twc
GH_PROJECT = zimg
GH_TAGNAME = release-3.0.4
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
# WTFPL
PERMIT_PACKAGE = Yes
WANTLIB += ${COMPILER_LIBCXX} m
# C++14
COMPILER = base-clang ports-gcc
CONFIGURE_STYLE = autoreconf
AUTOCONF_VERSION = 2.71
AUTOMAKE_VERSION = 1.16
FAKE_FLAGS = exampledir="${PREFIX}/share/examples/zimg"
.include <bsd.port.mk>

2
graphics/zimg/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (zimg-3.0.4.tar.gz) = IZ0bxrf94TVdcsm0BuvXMKSu2cIdp3lmDwpMhRJD4y8=
SIZE (zimg-3.0.4.tar.gz) = 326578

View File

@ -0,0 +1,14 @@
Remove hardcoded -O2
Index: Makefile.am
--- Makefile.am.orig
+++ Makefile.am
@@ -3,7 +3,7 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = $(CONFIG_SUBDIRS)
warningflags = -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
-commonflags = -O2 $(warningflags) $(DEBUGCFLAGS) $(PTHREAD_CFLAGS)
+commonflags = $(warningflags) $(DEBUGCFLAGS) $(PTHREAD_CFLAGS)
AM_CXXFLAGS = -std=$(CXXSTD) $(commonflags)
AM_CFLAGS = -std=c89 $(commonflags)
LDADD = $(PTHREAD_LIBS)

7
graphics/zimg/pkg/DESCR Normal file
View File

@ -0,0 +1,7 @@
The "z" library implements the commonly required image processing basics
of scaling, colorspace conversion, and depth conversion. A simple API
enables conversion between any supported formats to operate with minimal
knowledge from the programmer. All library routines were designed from
the ground-up with correctness, flexibility, and thread-safety as first
priorities. Allocation, buffering, and I/O are cleanly separated from
processing, allowing the programmer to adapt "z" to many scenarios.

25
graphics/zimg/pkg/PLIST Normal file
View File

@ -0,0 +1,25 @@
include/zimg++.hpp
include/zimg.h
@static-lib lib/libzimg.a
lib/libzimg.la
@lib lib/libzimg.so.${LIBzimg_VERSION}
lib/pkgconfig/zimg.pc
share/doc/zimg/
share/doc/zimg/COPYING
share/doc/zimg/ChangeLog
share/doc/zimg/README.md
share/examples/zimg/
share/examples/zimg/Makefile
share/examples/zimg/api_example.cpp
share/examples/zimg/api_example_c.c
share/examples/zimg/hdr_example.cpp
share/examples/zimg/interlace_example.cpp
share/examples/zimg/misc/
share/examples/zimg/misc/aligned_malloc.h
share/examples/zimg/misc/argparse.cpp
share/examples/zimg/misc/argparse.h
share/examples/zimg/misc/mmap.cpp
share/examples/zimg/misc/mmap.h
share/examples/zimg/misc/win32_bitmap.cpp
share/examples/zimg/misc/win32_bitmap.h
share/examples/zimg/tile_example.cpp