git: af6dcf2661a8 - main - graphics/cgif: Add cgif 0.3.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 05 Apr 2023 17:33:11 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=af6dcf2661a846a9156ac0b35840923c62be7041

commit af6dcf2661a846a9156ac0b35840923c62be7041
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-04-05 17:07:20 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-04-05 17:29:37 +0000

    graphics/cgif: Add cgif 0.3.0
    
    CGIF is a fast and lightweight GIF encoder that can create GIF animations and
    images. Summary of the main features:
    - user-defined global or local color-palette with up to 256 colors (limit of the
      GIF format)
    - size-optimizations for GIF animations:
      - option to set a pixel to transparent if it has identical color in the
        previous frame (transparency optimization)
      - do encoding just for the rectangular area that differs from the previous
        frame (width/height optimization)
    - fast: a GIF with 256 colors and 1024x1024 pixels can be created in below 50 ms
      even on a minimalistic system
    - MIT license (permissive)
    - different options for GIF animations: static image, N repetitions, infinite
      repetitions
    - additional source-code for verifying the encoder after making changes
    - user-defined delay time from one frame to the next (can be set independently
      for each frame)
    - source-code conforms to the C99 standard
---
 graphics/Makefile       |  1 +
 graphics/cgif/Makefile  | 22 ++++++++++++++++++++++
 graphics/cgif/distinfo  |  3 +++
 graphics/cgif/pkg-descr | 18 ++++++++++++++++++
 graphics/cgif/pkg-plist |  6 ++++++
 5 files changed, 50 insertions(+)

diff --git a/graphics/Makefile b/graphics/Makefile
index 0fcd0037c0fa..a8cd9d248fe2 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -100,6 +100,7 @@
     SUBDIR += cegui
     SUBDIR += cenon
     SUBDIR += cfdg
+    SUBDIR += cgif
     SUBDIR += chafa
     SUBDIR += charls
     SUBDIR += cimg
diff --git a/graphics/cgif/Makefile b/graphics/cgif/Makefile
new file mode 100644
index 000000000000..55eb95f806e4
--- /dev/null
+++ b/graphics/cgif/Makefile
@@ -0,0 +1,22 @@
+PORTNAME=	cgif
+PORTVERSION=	0.3.0
+DISTVERSIONPREFIX=	V
+CATEGORIES=	graphics
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	GIF encoder written in C
+WWW=		https://github.com/dloebl/cgif
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		meson
+
+MESON_ARGS=	--default-library=both -Dtests=true
+
+PLIST_SUB=	PORTVERSION=${PORTVERSION}
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	dloebl
+
+.include <bsd.port.mk>
diff --git a/graphics/cgif/distinfo b/graphics/cgif/distinfo
new file mode 100644
index 000000000000..bbd2eded108b
--- /dev/null
+++ b/graphics/cgif/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1679498482
+SHA256 (dloebl-cgif-V0.3.0_GH0.tar.gz) = c4f70bbae4c6afee3a524e65be31ae495201fd26687cb8429d7aded8be96306a
+SIZE (dloebl-cgif-V0.3.0_GH0.tar.gz) = 29189
diff --git a/graphics/cgif/pkg-descr b/graphics/cgif/pkg-descr
new file mode 100644
index 000000000000..23de4ef300f8
--- /dev/null
+++ b/graphics/cgif/pkg-descr
@@ -0,0 +1,18 @@
+CGIF is a fast and lightweight GIF encoder that can create GIF animations and
+images. Summary of the main features:
+- user-defined global or local color-palette with up to 256 colors (limit of the
+  GIF format)
+- size-optimizations for GIF animations:
+  - option to set a pixel to transparent if it has identical color in the
+    previous frame (transparency optimization)
+  - do encoding just for the rectangular area that differs from the previous
+    frame (width/height optimization)
+- fast: a GIF with 256 colors and 1024x1024 pixels can be created in below 50 ms
+  even on a minimalistic system
+- MIT license (permissive)
+- different options for GIF animations: static image, N repetitions, infinite
+  repetitions
+- additional source-code for verifying the encoder after making changes
+- user-defined delay time from one frame to the next (can be set independently
+  for each frame)
+- source-code conforms to the C99 standard
diff --git a/graphics/cgif/pkg-plist b/graphics/cgif/pkg-plist
new file mode 100644
index 000000000000..e60664c1e417
--- /dev/null
+++ b/graphics/cgif/pkg-plist
@@ -0,0 +1,6 @@
+include/cgif.h
+lib/libcgif.a
+lib/libcgif.so
+lib/libcgif.so.0
+lib/libcgif.so.%%PORTVERSION%%
+libdata/pkgconfig/cgif.pc