New Upstream Snapshot - ftgl

Ready changes

Summary

Merged new upstream version: 2.4.0+git20221117.1.ddc7716 (was: 2.4.0).

Resulting package

Built on 2023-01-19T01:33 (took 14m26s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots libftgl-devapt install -t fresh-snapshots libftgl2-dbgsymapt install -t fresh-snapshots libftgl2

Lintian Result

Diff

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 818561f..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.cpp~
-build/
-*~
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 303fcae..cdcf2c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,3 +74,12 @@ 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 a/ChangeLog b/ChangeLog
index 42fef90..0bb44b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2019-05-24 23:57  Frank Heckenbach <f.heckenbach@fh-soft.de>
+
+  * src/FTFont/FTBufferFont.cpp, src/FTFont/FTTextureFont.cpp:
+    GL_TEXTURE_ENV_MODE is not valid mask for glPushAttrib.
+    Use GL_TEXTURE_BIT instead to avoid leaking texture env mode.
+    (reported by Eddie-cz, https://github.com/frankheckenbach/ftgl/issues/3)
+
+2019-02-23 16:41  Frank Heckenbach <f.heckenbach@fh-soft.de>
+
+  * ftgl-release: new script
+
+2019-02-08 00:44  Manuel A. Fernandez Montecelo
+
+  * docs/projects_using_ftgl.txt: fix duplicated entry in doc
+
 2019-02-07 22:35  Frank Heckenbach <f.heckenbach@fh-soft.de>
 
   * NEWS, configure.ac, ppa_upload.sh, msvc/config.h, CMakeLists.txt:
diff --git a/debian/changelog b/debian/changelog
index 37eba92..fe9cc33 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-ftgl (2.4.0-3) UNRELEASED; urgency=medium
+ftgl (2.4.0+git20221117.1.ddc7716-1) UNRELEASED; urgency=medium
 
   [ Manuel A. Fernandez Montecelo ]
   * Bump Policy Standards-Version to 4.3.0 (no changes needed)
@@ -14,8 +14,10 @@ ftgl (2.4.0-3) UNRELEASED; urgency=medium
   * Update standards version to 4.5.0, no changes needed.
   * QA Upload.
     Orphan package - see bug 1011563.
+  * New upstream snapshot.
+  * Drop patch fix-doc-projects-eman2.patch, present upstream.
 
- -- Manuel A. Fernandez Montecelo <mafm@debian.org>  Thu, 28 Feb 2019 19:19:18 +0100
+ -- Manuel A. Fernandez Montecelo <mafm@debian.org>  Thu, 19 Jan 2023 01:24:46 -0000
 
 ftgl (2.4.0-2) unstable; urgency=medium
 
diff --git a/debian/patches/fix-doc-projects-eman2.patch b/debian/patches/fix-doc-projects-eman2.patch
deleted file mode 100644
index fc6cf28..0000000
--- a/debian/patches/fix-doc-projects-eman2.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/docs/projects_using_ftgl.txt
-+++ b/docs/projects_using_ftgl.txt
-@@ -154,7 +154,7 @@
-   Duel (http://www.personal.rdg.ac.uk/~sir03me/play/code.html) is a small
-   overhead perspective spaceship game.
- 
--\subsection emptyclip EMAN2
-+\subsection eman2 EMAN2
- 
-   EMAN2 (http://blake.bcm.tmc.edu/eman/eman2/) is a suite of
-   scientific image processing tools aimed primarily at the
diff --git a/debian/patches/series b/debian/patches/series
index c561687..e69de29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +0,0 @@
-fix-doc-projects-eman2.patch
diff --git a/demo/FTGLDemo.cpp b/demo/FTGLDemo.cpp
index 01f9049..3f0dc48 100644
--- a/demo/FTGLDemo.cpp
+++ b/demo/FTGLDemo.cpp
@@ -528,6 +528,31 @@ void myinit(const char* file)
 }
 
 
+/*
+ * Simple conversion from Unicode character to UTF-8 string.
+ * (In real code, you may want want to use a library such as ICU or
+ * newer C++ features instead, but this avoids additional dependencies.)
+ * s must contain enough space for up to 4 bytes.
+ * Returns number of bytes written.
+ */
+int ToUTF8 (unsigned int c, char *s)
+{
+  char *t = s;
+  int n = 0;
+  if (c < 0x80)
+    *s++ = c;
+  else if (c < 0x800)
+    *s++ = c >> (n = 6) | 0xc0;
+  else if (c < 0x10000)
+    *s++ = c >> (n = 12) | 0xe0;
+  else
+    *s++ = c >> (n = 18) | 0xf0;
+  while (n)
+    *s++ = (c >> (n -= 6) & 0x3f) | 0x80;
+  return s - t;
+}
+
+
 void parsekey(unsigned char key, int, int)
 {
     switch (key)
@@ -573,14 +598,13 @@ void parsekey(unsigned char key, int, int)
     default:
         if(mode == INTERACTIVE)
         {
-            myString[0] = key;
-            myString[1] = 0;
+            myString[ToUTF8 (key, myString)] = 0;
         }
         else
         {
-            myString[carat] = key;
-            myString[carat + 1] = 0;
-            carat = carat > 2000 ? 2000 : carat + 1;
+            int r = ToUTF8 (key, myString + carat) + carat;
+            myString[r] = 0;
+            carat = r > 2000 ? 2000 : r;
         }
         break;
     }
diff --git a/demo/FTGLMFontDemo.cpp b/demo/FTGLMFontDemo.cpp
index 196b54c..7016f18 100644
--- a/demo/FTGLMFontDemo.cpp
+++ b/demo/FTGLMFontDemo.cpp
@@ -484,6 +484,31 @@ void myinit(int numFontFiles)
 }
 
 
+/*
+ * Simple conversion from Unicode character to UTF-8 string.
+ * (In real code, you may want want to use a library such as ICU or
+ * newer C++ features instead, but this avoids additional dependencies.)
+ * s must contain enough space for up to 4 bytes.
+ * Returns number of bytes written.
+ */
+int ToUTF8 (unsigned int c, char *s)
+{
+  char *t = s;
+  int n = 0;
+  if (c < 0x80)
+    *s++ = c;
+  else if (c < 0x800)
+    *s++ = c >> (n = 6) | 0xc0;
+  else if (c < 0x10000)
+    *s++ = c >> (n = 12) | 0xe0;
+  else
+    *s++ = c >> (n = 18) | 0xf0;
+  while (n)
+    *s++ = (c >> (n -= 6) & 0x3f) | 0x80;
+  return s - t;
+}
+
+
 void parsekey(unsigned char key, int, int)
 {
     switch (key)
@@ -529,14 +554,13 @@ void parsekey(unsigned char key, int, int)
     default:
         if(mode == INTERACTIVE)
         {
-            myString[0] = key;
-            myString[1] = 0;
+            myString[ToUTF8 (key, myString)] = 0;
         }
         else
         {
-            myString[carat] = key;
-            myString[carat + 1] = 0;
-            carat = carat > 2000 ? 2000 : carat + 1;
+            int r = ToUTF8 (key, myString + carat) + carat;
+            myString[r] = 0;
+            carat = r > 2000 ? 2000 : r;
         }
         break;
     }
diff --git a/docs/projects_using_ftgl.txt b/docs/projects_using_ftgl.txt
index 0b756a8..2066350 100644
--- a/docs/projects_using_ftgl.txt
+++ b/docs/projects_using_ftgl.txt
@@ -154,7 +154,7 @@ Projects are listed in alphabetical order.
   Duel (http://www.personal.rdg.ac.uk/~sir03me/play/code.html) is a small
   overhead perspective spaceship game.
 
-\subsection emptyclip EMAN2
+\subsection eman2 EMAN2
 
   EMAN2 (http://blake.bcm.tmc.edu/eman/eman2/) is a suite of
   scientific image processing tools aimed primarily at the
diff --git a/ftgl-release b/ftgl-release
new file mode 100755
index 0000000..0ca4d09
--- /dev/null
+++ b/ftgl-release
@@ -0,0 +1,93 @@
+#!/bin/bash
+
+# Set release number
+#
+# Copyright 2019 Frank Heckenbach <f.heckenbach@fh-soft.de>
+#
+# This program is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+die ()
+{
+  echo "$*" >&2
+  exit 1
+}
+
+[ "$#" = 2 ] || die "Usage: $(basename "$0") version description"
+egrep -q "^[0-9]+.[0-9]+.[0-9]+$" <<< "$1" || die "invalid version format (x.y.z)"
+
+[ "$CHANGELOG_NAME" ] || die "Please set CHANGELOG_NAME"
+
+[ -e src/FTLibrary.cpp ] || die "This script must be invoked in the main FTGL source directory."
+
+description="$2"
+new="$1"
+major="${new%%.*}"
+minor="${new#*.}"
+micro="${minor#*.}"
+minor="${minor%%.*}"
+
+prev="$(sed -En '/.* Release ([0-9]+.[0-9]+.[0-9]+)[ -]*$/{s//\1/p;q;}' NEWS)"
+pmajor="${prev%%.*}"
+pminor="${prev#*.}"
+pmicro="${pminor#*.}"
+pminor="${pminor%%.*}"
+
+[[ "$((major != pmajor ? major > pmajor :
+       minor != pminor ? minor > pminor :
+                         micro > pmicro))" -eq 1 ]] || die "new version must be greater than old version ($prev)"
+
+! fgrep "version $new." ChangeLog || die "new version already mentioned in ChangeLog"
+
+[ -z "$(git status --porcelain)" ] || die "Please commit previous changes first."
+
+sed -Ei "s/(AC_INIT\(FTGL, )[0-9]+.[0-9]+.[0-9]+(, )/\1$new\2/;
+         s/(LT_MAJOR=\")[0-9]+(\")/\1$major\2/;
+         s/(LT_MINOR=\")[0-9]+(\")/\1$minor\2/;
+         s/(LT_MICRO=\")[0-9]+(\")/\1$micro\2/" configure.ac
+
+sed -Ei "s/(SET\(VERSION_SERIES )[0-9]+(\))/\1$major\2/;
+         s/(SET\(VERSION_MAJOR )[0-9]+(\))/\1$minor\2/;
+         s/(SET\(VERSION_MINOR )[0-9]+(\))/\1$micro\2/" CMakeLists.txt
+
+sed -Ei "s/(VERSIONNBR=)[0-9]+.[0-9]+.[0-9]+/\1$new/" ppa_upload.sh
+
+sed -Ei "s/(#define PACKAGE_VERSION \")[0-9]+.[0-9]+.[0-9]+(\")/\1$new\2/" msvc/config.h
+
+sed -Ei "s/(SHLIBVER := ).*$/\1$new/" debian/rules
+
+sed -i "1i\\
+$(date +"%F %H:%M")  $CHANGELOG_NAME\\
+\\
+  * NEWS, configure.ac, CMakeLists.txt, ppa_upload.sh, msvc/config.h, debian/rules:\\
+    * Mark package as being version $new.\\
+
+" ChangeLog
+
+sed -i "0,/--- .* Release /{/--- .* Release /i\\
+--- $(date +"%F")  Release $new                                      ---\\
+----------------------------------------------------------------------\\
+\\
+    * ${description//\n/\n    * }\\
+\\
+----------------------------------------------------------------------
+;}" NEWS
+
+PAGER= git diff
+git add -A
+git commit -m "$description"
+
+echo
+echo "*** New release number set; now push and create release tag."
diff --git a/ftgl.pc.cmake b/ftgl.pc.cmake
new file mode 100644
index 0000000..d242667
--- /dev/null
+++ b/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
diff --git a/m4/gl.m4 b/m4/gl.m4
index 4a1bc48..a4c789f 100644
--- a/m4/gl.m4
+++ b/m4/gl.m4
@@ -7,11 +7,11 @@ 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
@@ -50,7 +50,7 @@ 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)])
diff --git a/m4/glut.m4 b/m4/glut.m4
index 4a2b0b8..4508249 100644
--- a/m4/glut.m4
+++ b/m4/glut.m4
@@ -8,9 +8,9 @@ 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
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 693e49f..b0f26f6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -26,7 +26,6 @@ SET(libftgl_la_SOURCES
     FTGlyphContainer.h
     FTInternals.h
     FTLibrary.cpp
-    FTLibrary.h
     FTList.h
     FTPoint.cpp
     FTSize.cpp
diff --git a/src/FTFont/FTBufferFont.cpp b/src/FTFont/FTBufferFont.cpp
index ce04cf5..b330a3b 100644
--- a/src/FTFont/FTBufferFont.cpp
+++ b/src/FTFont/FTBufferFont.cpp
@@ -232,7 +232,7 @@ inline FTPoint FTBufferFontImpl::RenderI(const T* string, const int len,
     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);
diff --git a/src/FTFont/FTTextureFont.cpp b/src/FTFont/FTTextureFont.cpp
index 97e8768..a5145cf 100644
--- a/src/FTFont/FTTextureFont.cpp
+++ b/src/FTFont/FTTextureFont.cpp
@@ -241,7 +241,7 @@ inline FTPoint FTTextureFontImpl::RenderI(const T* string, const int len,
                                           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())
       {

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/debug/.build-id/19/6da496194ce46dd996455840acb1d0f6776ecf.debug

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/lib/debug/.build-id/0a/13ca7a8b30533c0c7b83c178c0a7a9a7bf0668.debug

No differences were encountered between the control files of package libftgl-dev

No differences were encountered between the control files of package libftgl2

Control files of package libftgl2-dbgsym: lines which differ (wdiff format)

  • Build-Ids: 0a13ca7a8b30533c0c7b83c178c0a7a9a7bf0668 196da496194ce46dd996455840acb1d0f6776ecf

More details

Full run details