diff options
author | B. Watson <urchlay@slackware.uk> | 2024-09-24 04:41:39 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-09-28 06:54:26 +0700 |
commit | b1f9afd21e0a65aa92190403a36ea50d23c8ed34 (patch) | |
tree | e33ab43020808984c0be70e1a409c7317fab90e1 | |
parent | da8a40a1f72374f969fe534e07ee916f21f944bc (diff) |
libraries/ftgl: Fix -current build.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | libraries/ftgl/0001-Fix-type-mismatch-with-latest-FreeType.patch | 36 | ||||
-rw-r--r-- | libraries/ftgl/ftgl.SlackBuild | 15 |
2 files changed, 48 insertions, 3 deletions
diff --git a/libraries/ftgl/0001-Fix-type-mismatch-with-latest-FreeType.patch b/libraries/ftgl/0001-Fix-type-mismatch-with-latest-FreeType.patch new file mode 100644 index 0000000000..ba1215bdfd --- /dev/null +++ b/libraries/ftgl/0001-Fix-type-mismatch-with-latest-FreeType.patch @@ -0,0 +1,36 @@ +From 37ed7d606a0dfecdcb4ab0c26d1b0132cd96d5fa Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 21 Aug 2024 13:50:34 -0700 +Subject: [PATCH] Fix type mismatch with latest FreeType + +This change is intrumented due to a type change in freetype [1] with release 2.13.3 + +Fixes +| ../../git/src/FTVectoriser.cpp:171:15: error: cannot initialize a variable of type 'char *' with an rvalue of type 'unsigned char *' +| 171 | char* tagList = &outline.tags[startIndex]; +| | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ + +[1] https://gitlab.freedesktop.org/freetype/freetype/-/commit/044d142be7b6a93b6940367a1bc5847451ff4775 + +Upstream-Status: Submitted [https://github.com/frankheckenbach/ftgl/pull/19] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/FTVectoriser.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/FTVectoriser.cpp b/src/FTVectoriser.cpp +index 26e7da8..3610215 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]; ++ char* tagList = (char*)&outline.tags[startIndex]; + + endIndex = outline.contours[i]; + contourLength = (endIndex - startIndex) + 1; +-- +2.39.4 + diff --git a/libraries/ftgl/ftgl.SlackBuild b/libraries/ftgl/ftgl.SlackBuild index deb648f898..ce85294cb6 100644 --- a/libraries/ftgl/ftgl.SlackBuild +++ b/libraries/ftgl/ftgl.SlackBuild @@ -7,6 +7,9 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20240924 bkw: BUILD=3. +# - add compile fix patch for -current (does no harm on stable). + # 20220207 bkw: BUILD=2. # - take over maintenance. # - relicense as WTFPL with permission. @@ -18,7 +21,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=ftgl VERSION=${VERSION:-2.4.0} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -63,8 +66,14 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . -find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ - \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +# 20240924 bkw: This patch fixes compilation with -current's newer +# FreeType. It was pointed out to me by Jacques Bon, via email. It +# comes from: +# https://github.com/HamzaM3/ftgl/pull/1/commits/37ed7d606a0dfecdcb4ab0c26d1b0132cd96d5fa +patch -p1 < $CWD/0001-Fix-type-mismatch-with-latest-FreeType.patch ./autogen.sh |