From bab163ff0661470b0f760ed6ef3166caa8fa2780 Mon Sep 17 00:00:00 2001 From: bcallah Date: Thu, 8 Sep 2022 11:36:49 +0000 Subject: [PATCH] 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. --- graphics/zimg/Makefile | 27 +++++++++++++++++++++++++ graphics/zimg/distinfo | 2 ++ graphics/zimg/patches/patch-Makefile_am | 14 +++++++++++++ graphics/zimg/pkg/DESCR | 7 +++++++ graphics/zimg/pkg/PLIST | 25 +++++++++++++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 graphics/zimg/Makefile create mode 100644 graphics/zimg/distinfo create mode 100644 graphics/zimg/patches/patch-Makefile_am create mode 100644 graphics/zimg/pkg/DESCR create mode 100644 graphics/zimg/pkg/PLIST diff --git a/graphics/zimg/Makefile b/graphics/zimg/Makefile new file mode 100644 index 00000000000..922d87c167d --- /dev/null +++ b/graphics/zimg/Makefile @@ -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 + +# 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 diff --git a/graphics/zimg/distinfo b/graphics/zimg/distinfo new file mode 100644 index 00000000000..f2f9c17cbda --- /dev/null +++ b/graphics/zimg/distinfo @@ -0,0 +1,2 @@ +SHA256 (zimg-3.0.4.tar.gz) = IZ0bxrf94TVdcsm0BuvXMKSu2cIdp3lmDwpMhRJD4y8= +SIZE (zimg-3.0.4.tar.gz) = 326578 diff --git a/graphics/zimg/patches/patch-Makefile_am b/graphics/zimg/patches/patch-Makefile_am new file mode 100644 index 00000000000..4d045b589c2 --- /dev/null +++ b/graphics/zimg/patches/patch-Makefile_am @@ -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) diff --git a/graphics/zimg/pkg/DESCR b/graphics/zimg/pkg/DESCR new file mode 100644 index 00000000000..ad029912f21 --- /dev/null +++ b/graphics/zimg/pkg/DESCR @@ -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. diff --git a/graphics/zimg/pkg/PLIST b/graphics/zimg/pkg/PLIST new file mode 100644 index 00000000000..b62f2e1a4d0 --- /dev/null +++ b/graphics/zimg/pkg/PLIST @@ -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