git: d05315b279ff - main - graphics/ftgl: Fix build with freetype2 2.13.3

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Tue, 17 Sep 2024 18:59:17 UTC
The branch main has been updated by diizzy:

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

commit d05315b279ff17d98f6a704c8689e8f64ca6e70b
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2024-09-17 18:54:15 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-09-17 18:54:51 +0000

    graphics/ftgl: Fix build with freetype2 2.13.3
    
    PR:             281320
---
 graphics/ftgl/Makefile                         |  2 +-
 graphics/ftgl/files/patch-src_FTContour.cpp    | 11 +++++++++++
 graphics/ftgl/files/patch-src_FTContour.h      | 11 +++++++++++
 graphics/ftgl/files/patch-src_FTVectoriser.cpp | 11 +++++++++++
 4 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/graphics/ftgl/Makefile b/graphics/ftgl/Makefile
index 05dd27b29722..68c882e75554 100644
--- a/graphics/ftgl/Makefile
+++ b/graphics/ftgl/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	ftgl
 DISTVERSIONPREFIX=	v
 DISTVERSION=	2.4.0
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	graphics
 
diff --git a/graphics/ftgl/files/patch-src_FTContour.cpp b/graphics/ftgl/files/patch-src_FTContour.cpp
new file mode 100644
index 000000000000..082720cd1ca7
--- /dev/null
+++ b/graphics/ftgl/files/patch-src_FTContour.cpp
@@ -0,0 +1,11 @@
+--- src/FTContour.cpp.orig	2019-02-07 21:39:58 UTC
++++ src/FTContour.cpp
+@@ -174,7 +174,7 @@ void FTContour::SetParity(int parity)
+ }
+ 
+ 
+-FTContour::FTContour(FT_Vector* contour, char* tags, unsigned int n)
++FTContour::FTContour(FT_Vector* contour, unsigned char* tags, unsigned int n)
+ {
+     FTPoint prev, cur(contour[(n - 1) % n]), next(contour[0]);
+     double olddir, dir = atan2((next - cur).Y(), (next - cur).X());
diff --git a/graphics/ftgl/files/patch-src_FTContour.h b/graphics/ftgl/files/patch-src_FTContour.h
new file mode 100644
index 000000000000..8b8423e7c1b7
--- /dev/null
+++ b/graphics/ftgl/files/patch-src_FTContour.h
@@ -0,0 +1,11 @@
+--- src/FTContour.h.orig	2019-02-07 21:39:58 UTC
++++ src/FTContour.h
+@@ -52,7 +52,7 @@ class FTContour
+          * @param pointTags
+          * @param numberOfPoints
+          */
+-        FTContour(FT_Vector* contour, char* pointTags, unsigned int numberOfPoints);
++        FTContour(FT_Vector* contour, unsigned char* pointTags, unsigned int numberOfPoints);
+ 
+         /**
+          * Destructor
diff --git a/graphics/ftgl/files/patch-src_FTVectoriser.cpp b/graphics/ftgl/files/patch-src_FTVectoriser.cpp
new file mode 100644
index 000000000000..373eb4c7bfa3
--- /dev/null
+++ b/graphics/ftgl/files/patch-src_FTVectoriser.cpp
@@ -0,0 +1,11 @@
+--- src/FTVectoriser.cpp.orig	2019-02-07 21:39:58 UTC
++++ src/FTVectoriser.cpp
+@@ -168,7 +168,7 @@ void FTVectoriser::ProcessContours()
+     for(int i = 0; i < ftContourCount; ++i)
+     {
+         FT_Vector* pointList = &outline.points[startIndex];
+-        char* tagList = &outline.tags[startIndex];
++        unsigned char* tagList = &outline.tags[startIndex];
+ 
+         endIndex = outline.contours[i];
+         contourLength =  (endIndex - startIndex) + 1;