git: ed35c5b02866 - main - graphics/libsvgtiny: Add new port

From: Emanuel Haupt <ehaupt_at_FreeBSD.org>
Date: Wed, 13 Jul 2022 12:22:06 UTC
The branch main has been updated by ehaupt:

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

commit ed35c5b028660dbc33a5bd3bb4c41b789cf042d2
Author:     Emanuel Haupt <ehaupt@FreeBSD.org>
AuthorDate: 2022-07-13 12:20:09 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2022-07-13 12:22:01 +0000

    graphics/libsvgtiny: Add new port
    
    Tiny SVG fremebuffer abstraction library, written in C.
---
 graphics/Makefile                        |  1 +
 graphics/libsvgtiny/Makefile             | 29 +++++++++++++++++++++++++++++
 graphics/libsvgtiny/distinfo             |  3 +++
 graphics/libsvgtiny/files/patch-Makefile | 11 +++++++++++
 graphics/libsvgtiny/pkg-descr            | 11 +++++++++++
 5 files changed, 55 insertions(+)

diff --git a/graphics/Makefile b/graphics/Makefile
index be7c0819418e..6315022ee3fe 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -503,6 +503,7 @@
     SUBDIR += libspng
     SUBDIR += libsvg
     SUBDIR += libsvg-cairo
+    SUBDIR += libsvgtiny
     SUBDIR += libvisual
     SUBDIR += libvisual04
     SUBDIR += libvisual04-plugins
diff --git a/graphics/libsvgtiny/Makefile b/graphics/libsvgtiny/Makefile
new file mode 100644
index 000000000000..859f5553a904
--- /dev/null
+++ b/graphics/libsvgtiny/Makefile
@@ -0,0 +1,29 @@
+# Created by: Emanuel Haupt <ehaupt@FreeBSD.org>
+
+PORTNAME=	libsvgtiny
+PORTVERSION=	0.1.7
+DISTVERSIONSUFFIX=	-src
+CATEGORIES=	graphics
+MASTER_SITES=	https://download.netsurf-browser.org/libs/releases/
+
+MAINTAINER=	ehaupt@FreeBSD.org
+COMMENT=	SVG tiny library
+COMMENT=	Tiny SVG fremebuffer abstraction library, written in C
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	${LOCALBASE}/bin/gperf:devel/gperf \
+		netsurf-buildsystem>=1.5:devel/netsurf-buildsystem
+LIB_DEPENDS=	libdom.so:www/libdom \
+		libwapcaplet.so:textproc/libwapcaplet
+
+USES=		compiler:c11 gmake pkgconfig
+
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+PLIST_FILES=	include/svgtiny.h \
+		lib/libsvgtiny.a \
+		libdata/pkgconfig/libsvgtiny.pc
+
+.include <bsd.port.mk>
diff --git a/graphics/libsvgtiny/distinfo b/graphics/libsvgtiny/distinfo
new file mode 100644
index 000000000000..c299cee1bc3d
--- /dev/null
+++ b/graphics/libsvgtiny/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1657713120
+SHA256 (libsvgtiny-0.1.7-src.tar.gz) = 2c0dcf952f1cd882c3e95401ef9459f16dbb53c5d3e4512339b2f9eb769d7781
+SIZE (libsvgtiny-0.1.7-src.tar.gz) = 760963
diff --git a/graphics/libsvgtiny/files/patch-Makefile b/graphics/libsvgtiny/files/patch-Makefile
new file mode 100644
index 000000000000..672433a99e71
--- /dev/null
+++ b/graphics/libsvgtiny/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig	2022-07-13 11:37:39 UTC
++++ Makefile
+@@ -25,7 +25,7 @@ WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-a
+ # BeOS/Haiku/AmigaOS standard library headers create warnings
+ ifneq ($(BUILD),i586-pc-haiku)
+   ifneq ($(findstring amigaos,$(BUILD)),amigaos)
+-    WARNFLAGS := $(WARNFLAGS) -Werror
++    WARNFLAGS := $(WARNFLAGS)
+   endif
+ endif
+ 
diff --git a/graphics/libsvgtiny/pkg-descr b/graphics/libsvgtiny/pkg-descr
new file mode 100644
index 000000000000..5374dd8ffc2d
--- /dev/null
+++ b/graphics/libsvgtiny/pkg-descr
@@ -0,0 +1,11 @@
+Tiny SVG fremebuffer abstraction library, written in C.
+
+The overall idea of the library is to take some SVG as input, and return
+a list of paths and texts which can be rendered easily. The library does
+not do the actual rendering.
+
+All supported SVG objects, for example circles, lines, and gradient
+filled shapes, are converted to flat-filled paths or a fragment of text,
+and all coordinates are converted, transformed etc. to pixels.
+
+WWW: https://www.netsurf-browser.org/projects/libsvgtiny/