guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.

commit 0372a9751482a3dd37e8599f33a67dddef1ab26a
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Mon May 19 08:45:23 2025 +0900

    gnu: ftgl: Fix build.
    
    * gnu/packages/patches/ftgl-ftcontour-type.patch: New patch.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/gl.scm (ftgl) [source]: Apply it.
    
    Change-Id: Ifaf78e18cd2d1ec1c706ebb5d649d7ead7df335a
---
 gnu/local.mk                                   |  1 +
 gnu/packages/gl.scm                            |  3 +-
 gnu/packages/patches/ftgl-ftcontour-type.patch | 50 ++++++++++++++++++++++++++
 3 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 7729c6d0d5..766b2e2a09 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1333,6 +1333,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/freesolid-autotools.patch               \
   %D%/packages/patches/freesolid-configure.patch               \
   %D%/packages/patches/freesolid-pkgconfig.patch               \
+  %D%/packages/patches/ftgl-ftcontour-type.patch               \
   %D%/packages/patches/fulcrum-1.9.1-unbundled-libraries.patch \
   %D%/packages/patches/fuse-glibc-2.34.patch                   \
   %D%/packages/patches/fuse-overlapping-headers.patch          \
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index be856b8423..d0acaa871b 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -187,7 +187,8 @@ the X-Consortium license.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0zjs1h9w30gajq9lndzvjsa26rsmr1081lb1fbpbj10yhcdcsc79"))))
+                "0zjs1h9w30gajq9lndzvjsa26rsmr1081lb1fbpbj10yhcdcsc79"))
+              (patches (search-patches "ftgl-ftcontour-type.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
diff --git a/gnu/packages/patches/ftgl-ftcontour-type.patch 
b/gnu/packages/patches/ftgl-ftcontour-type.patch
new file mode 100644
index 0000000000..f69528bbe3
--- /dev/null
+++ b/gnu/packages/patches/ftgl-ftcontour-type.patch
@@ -0,0 +1,50 @@
+From d546aefd73dcbb0d0d1e0f3c916770d7f9f98169 Mon Sep 17 00:00:00 2001
+From: Joseph C Wang <[email protected]>
+Date: Tue, 8 Oct 2024 19:47:53 +0800
+Subject: [PATCH] fix type error
+
+---
+ src/FTContour.cpp    | 2 +-
+ src/FTContour.h      | 2 +-
+ src/FTVectoriser.cpp | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/FTContour.cpp b/src/FTContour.cpp
+index c668d32..ef13576 100644
+--- a/src/FTContour.cpp
++++ b/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/src/FTContour.h b/src/FTContour.h
+index d2d187c..dc64e3a 100644
+--- a/src/FTContour.h
++++ b/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/src/FTVectoriser.cpp b/src/FTVectoriser.cpp
+index 26e7da8..53d738e 100644
+--- a/src/FTVectoriser.cpp
++++ b/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;

Reply via email to