-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ftgl: Fix builds with freetype 2.13.3
Based on research into this issue, freetype 2.13.3 changed some return types that caused current (modern?) builds to fail as seen in the linked ticket. A patch was applied with frankheckenbach/ftgl#20 that appears to fix this, but the repo owner has not indicated a plan to cut a new release with this and other fixes since v2.4.0. In addition to the patch files that were previously present, I have applied all other patches from v2.4.0 to current HEAD. This involved removing the existing patch files, but those changes have been fully incorporated. Builds with +doc and +universal variants worked fine and I have tested a downstream port (gource) with this on an affected system. macOS 15.2 24C101 arm64 Xcode 16.2 16C5032a Closes: https://trac.macports.org/ticket/71434
- Loading branch information
1 parent
6b12302
commit f637058
Showing
12 changed files
with
481 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git c/CMakeLists.txt i/CMakeLists.txt | ||
index 303fcaede209..cdcf2c96012d 100644 | ||
--- c/CMakeLists.txt | ||
+++ i/CMakeLists.txt | ||
@@ -72,5 +72,14 @@ endif () | ||
|
||
install(EXPORT FTGL-targets DESTINATION "${cmakedir}") | ||
install( | ||
FILES "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/FTGLConfig.cmake" | ||
DESTINATION "${cmakedir}") | ||
+ | ||
+SET(PKGCONFIG_INSTALL_PREFIX "lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files") | ||
+CONFIGURE_FILE( | ||
+ ${CMAKE_CURRENT_SOURCE_DIR}/ftgl.pc.cmake | ||
+ ${CMAKE_CURRENT_BINARY_DIR}/ftgl.pc | ||
+ @ONLY) | ||
+INSTALL( | ||
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/ftgl.pc | ||
+ DESTINATION ${PKGCONFIG_INSTALL_PREFIX}) | ||
diff --git c/ftgl.pc.cmake i/ftgl.pc.cmake | ||
new file mode 100644 | ||
index 000000000000..1f1a0af7b3f4 | ||
--- /dev/null | ||
+++ i/ftgl.pc.cmake | ||
@@ -0,0 +1,6 @@ | ||
+Name: ftgl | ||
+Description: OpenGL frontend to Freetype 2 | ||
+Requires.private: freetype2 | ||
+Version: @VERSION_SERIES@.@VERSION_MAJOR@.@VERSION_MINOR@ | ||
+Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lftgl | ||
+Cflags: -I@CMAKE_INSTALL_PREFIX@/include | ||
\ No newline at end of file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git c/src/FTFont/FTBufferFont.cpp i/src/FTFont/FTBufferFont.cpp | ||
index ce04cf56ae0f..b330a3b119f7 100644 | ||
--- c/src/FTFont/FTBufferFont.cpp | ||
+++ i/src/FTFont/FTBufferFont.cpp | ||
@@ -230,11 +230,11 @@ inline FTPoint FTBufferFontImpl::RenderI(const T* string, const int len, | ||
int width, height, texWidth, texHeight; | ||
int cacheIndex = -1; | ||
bool inCache = false; | ||
|
||
// Protect blending functions, GL_TEXTURE_2D and optionally GL_BLEND | ||
- glPushAttrib(GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT | GL_TEXTURE_ENV_MODE); | ||
+ glPushAttrib(GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT | GL_TEXTURE_BIT); | ||
|
||
// Protect glPixelStorei() calls | ||
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); | ||
|
||
if(FTLibrary::Instance().GetLegacyOpenGLStateSet()) | ||
diff --git c/src/FTFont/FTTextureFont.cpp i/src/FTFont/FTTextureFont.cpp | ||
index 97e876876e12..a5145cf05f53 100644 | ||
--- c/src/FTFont/FTTextureFont.cpp | ||
+++ i/src/FTFont/FTTextureFont.cpp | ||
@@ -239,11 +239,11 @@ template <typename T> | ||
inline FTPoint FTTextureFontImpl::RenderI(const T* string, const int len, | ||
FTPoint position, FTPoint spacing, | ||
int renderMode) | ||
{ | ||
// Protect GL_TEXTURE_2D and optionally GL_BLEND | ||
- glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_TEXTURE_ENV_MODE); | ||
+ glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_TEXTURE_BIT); | ||
|
||
if(FTLibrary::Instance().GetLegacyOpenGLStateSet()) | ||
{ | ||
glEnable(GL_BLEND); | ||
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
diff --git c/m4/gl.m4 i/m4/gl.m4 | ||
index 4a1bc4886c35..a4c789f873b6 100644 | ||
--- c/m4/gl.m4 | ||
+++ i/m4/gl.m4 | ||
@@ -5,15 +5,15 @@ AC_DEFUN([FTGL_CHECK_GL], | ||
[dnl | ||
AC_REQUIRE([AC_PROG_CC]) | ||
AC_REQUIRE([AC_PATH_X]) | ||
AC_REQUIRE([AC_PATH_XTRA]) | ||
|
||
-AC_ARG_WITH([--with-gl-inc], | ||
+AC_ARG_WITH([gl-inc], | ||
AC_HELP_STRING([--with-gl-inc=DIR],[Directory where GL/gl.h is installed])) | ||
-AC_ARG_WITH([--with-gl-lib], | ||
+AC_ARG_WITH([gl-lib], | ||
AC_HELP_STRING([--with-gl-lib=DIR],[Directory where OpenGL libraries are installed])) | ||
-AC_ARG_WITH([--with-glu-lib], | ||
+AC_ARG_WITH([glu-lib], | ||
AC_HELP_STRING([--with-glu-lib=DIR],[Directory where OpenGL GLU library is installed])) | ||
|
||
AC_LANG_SAVE | ||
AC_LANG_C | ||
|
||
@@ -48,11 +48,11 @@ FRAMEWORK_OPENGL="" | ||
PRELIBS="$LIBS" | ||
LIBS="$LIBS -Xlinker -framework -Xlinker OpenGL" | ||
# -Xlinker is used because libtool is busted prior to 1.6 wrt frameworks | ||
AC_TRY_LINK([#include <OpenGL/gl.h>], [glBegin(GL_POINTS)], | ||
[GL_DYLIB="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" | ||
- FRAMEWORK_OPENGL="-Xlinker -framework -Xlinker OpenGL -dylib_file $GL_DYLIB: $GL_DYLIB" | ||
+ FRAMEWORK_OPENGL="-Xlinker -framework -Xlinker OpenGL -dylib_file $GL_DYLIB:$GL_DYLIB" | ||
ac_cv_search_glBegin="$FRAMEWORK_OPENGL" | ||
AC_MSG_RESULT(yes)], | ||
[AC_MSG_RESULT(no)]) | ||
if test x"$FRAMEWORK_OPENGL" != "x"; then | ||
with_gl_lib="$FRAMEWORK_OPENGL" | ||
diff --git c/m4/glut.m4 i/m4/glut.m4 | ||
index 4a2b0b87b020..450824962ce8 100644 | ||
--- c/m4/glut.m4 | ||
+++ i/m4/glut.m4 | ||
@@ -6,13 +6,13 @@ AC_DEFUN([FTGL_CHECK_GLUT], | ||
AC_REQUIRE([AC_PROG_CC])dnl | ||
AC_REQUIRE([AC_PATH_X])dnl | ||
AC_REQUIRE([AC_PATH_XTRA])dnl | ||
AC_REQUIRE([FTGL_CHECK_GL])dnl | ||
|
||
-AC_ARG_WITH([--with-glut-inc], | ||
+AC_ARG_WITH([glut-inc], | ||
AC_HELP_STRING([--with-glut-inc=DIR],[Directory where GL/glut.h is installed (optional)])) | ||
-AC_ARG_WITH([--with-glut-lib], | ||
+AC_ARG_WITH([glut-lib], | ||
AC_HELP_STRING([--with-glut-lib=DIR],[Directory where GLUT libraries are installed (optional)])) | ||
|
||
AC_LANG_SAVE | ||
AC_LANG_C | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
diff --git c/debian/changelog i/debian/changelog | ||
index 6741f8e22ab2..bd533a7eecd1 100644 | ||
--- c/debian/changelog | ||
+++ i/debian/changelog | ||
@@ -1,5 +1,36 @@ | ||
+ftgl (2.4.0-2) unstable; urgency=medium | ||
+ | ||
+ * Install ftgl.pdf file again, the external problem generating PDF file | ||
+ was fixed (#921779) | ||
+ * d/patches: | ||
+ - drop disable-pdf.patch | ||
+ * Bump SHLIBVER to 2.4.0, there are new methods/functions in the | ||
+ interface compared to older releases | ||
+ | ||
+ -- Manuel A. Fernandez Montecelo <[email protected]> Tue, 26 Feb 2019 16:52:23 +0100 | ||
+ | ||
+ftgl (2.4.0-1) unstable; urgency=medium | ||
+ | ||
+ * New upstream release. | ||
+ - Fixes problem with some applications's rendering of fonts by | ||
+ reverting to old behaviour by default, but it will be revisited in | ||
+ next upstream major releases (Closes: #914153) | ||
+ * d/watch: Update pattern, some versions don't start with 'v' in the | ||
+ tags of this repo | ||
+ * d/patches: | ||
+ - drop substitute-freetype-config.patch, applied upstream | ||
+ - drop enable-docs.patch, applied upstream | ||
+ - drop fix-pdf-generation, applied upstream | ||
+ - drop patch-relibtoolize-prep.diff, applied upstream | ||
+ - add disable-pdf.patch, problem generating PDF file | ||
+ - add fix-doc-projects-eman2.patch, fix duplicated entry in doc | ||
+ * Do not install ftgl.pdf file, it cannot be generated at the moment and | ||
+ probably it's not very useful (HTML doc is still shipped) | ||
+ | ||
+ -- Manuel A. Fernandez Montecelo <[email protected]> Fri, 08 Feb 2019 02:25:02 +0100 | ||
+ | ||
ftgl (2.3.0-3) unstable; urgency=medium | ||
|
||
[ IOhannes m zmölnig ] | ||
* Copyright improvements: | ||
- d/copyright: convert to standard format 1.0 | ||
diff --git c/debian/watch i/debian/watch | ||
index 34c3c9bd58f5..8fefb4596347 100644 | ||
--- c/debian/watch | ||
+++ i/debian/watch | ||
@@ -1,2 +1,2 @@ | ||
version=4 | ||
-https://github.com/frankheckenbach/ftgl/tags .*/v(\d[\d\.]+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))|zip) | ||
+https://github.com/frankheckenbach/ftgl/tags .*/v?(\d[\d\.]+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))|zip) |
Oops, something went wrong.