[freeorion] 01/02: Add fix-FTBFS.patch and fix compiler errors.

Markus Koschany apo-guest at moszumanska.debian.org
Thu May 7 17:56:42 UTC 2015


This is an automated email from the git hooks/post-receive script.

apo-guest pushed a commit to branch jessie
in repository freeorion.

commit e2cfd4f5ca65e5bfeb253472f0cdcfdf3d5e20d9
Author: Markus Koschany <apo at gambaru.de>
Date:   Fri May 1 15:06:09 2015 +0200

    Add fix-FTBFS.patch and fix compiler errors.
---
 debian/patches/fix-FTBFS.patch | 63 ++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series          |  1 +
 2 files changed, 64 insertions(+)

diff --git a/debian/patches/fix-FTBFS.patch b/debian/patches/fix-FTBFS.patch
new file mode 100644
index 0000000..3bf3367
--- /dev/null
+++ b/debian/patches/fix-FTBFS.patch
@@ -0,0 +1,63 @@
+From: Markus Koschany <apo at gambaru.de>
+Date: Sun, 3 May 2015 21:39:23 +0200
+Subject: fix FTBFS
+
+Fixes some compiler errors due to a newer version of freetype.
+
+Bug: https://bugs.debian.org/783839
+Forwarded: no, already fixed
+---
+ FreeOrion/GG/src/Font.cpp | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/FreeOrion/GG/src/Font.cpp b/FreeOrion/GG/src/Font.cpp
+index 170863b..d3c501c 100644
+--- a/FreeOrion/GG/src/Font.cpp
++++ b/FreeOrion/GG/src/Font.cpp
+@@ -1286,16 +1286,16 @@ void Font::Init(FT_Face& face)
+         for (boost::uint32_t c = low; c < high; ++c) {
+             if (temp_glyph_data.find(c) == temp_glyph_data.end() && GenerateGlyph(face, c)) {
+                 const FT_Bitmap& glyph_bitmap = face->glyph->bitmap;
+-                if ((glyph_bitmap.width > BUF_WIDTH) | (glyph_bitmap.rows > BUF_HEIGHT)) {
++                if ((glyph_bitmap.width > Value(BUF_WIDTH)) | (glyph_bitmap.rows > Value(BUF_HEIGHT))) {
+                     ThrowBadGlyph("GG::Font::Init : Glyph too large for buffer'%1%'", c); // catch broken fonts
+                 }
+ 
+-                if (x + glyph_bitmap.width > BUF_WIDTH) { // start a new row of glyph images
++                if (Value(x) + glyph_bitmap.width > Value(BUF_WIDTH)) { // start a new row of glyph images
+                     if (x > max_x) max_x = x;
+                     x = X0;
+                     y = max_y;
+                 }
+-                if (y + glyph_bitmap.rows > BUF_HEIGHT) { // if there's not enough room, create a new buffer
++                if (Value(y) + glyph_bitmap.rows > Value(BUF_HEIGHT)) { // if there's not enough room, create a new buffer
+                     // cut off bottom and side of buffer just written, if it is possible to do so and maintain power-of-two height
+                     X pow_of_2_x(NextPowerOfTwo(max_x));
+                     Y pow_of_2_y(NextPowerOfTwo(max_y));
+@@ -1312,8 +1312,8 @@ void Font::Init(FT_Face& face)
+                     buffer_vec.push_back(temp_buf);
+                     buffer_sizes.push_back(Pt(BUF_WIDTH, BUF_HEIGHT));
+                 }
+-                if (y + glyph_bitmap.rows > max_y) {
+-                    max_y = y + glyph_bitmap.rows;
++                if (Value(y) + glyph_bitmap.rows > Value(max_y)) {
++                    max_y = y + Y(glyph_bitmap.rows);
+                 }
+ 
+                 boost::uint8_t*  src_start = glyph_bitmap.buffer;
+@@ -1334,13 +1334,13 @@ void Font::Init(FT_Face& face)
+                 // record info on how to find and use this glyph later
+                 temp_glyph_data[c] =
+                     TempGlyphData(static_cast<int>(buffer_vec.size()) - 1,
+-                                  Pt(x, y), Pt(x + glyph_bitmap.width, y + glyph_bitmap.rows),
++                                  Pt(x, y), Pt(x + X(glyph_bitmap.width), y + Y(glyph_bitmap.rows)),
+                                   Y(m_height - 1 + m_descent - face->glyph->bitmap_top),
+                                   X(static_cast<int>((std::ceil(face->glyph->metrics.horiBearingX / 64.0)))),
+                                   X(static_cast<int>((std::ceil(face->glyph->metrics.horiAdvance / 64.0)))));
+ 
+                 // advance buffer write-position
+-                x += glyph_bitmap.width;
++                x += X(glyph_bitmap.width);
+             }
+         }
+     }
diff --git a/debian/patches/series b/debian/patches/series
index e0eeafb..45d9ef6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 OISInput-config.patch
 GG-verbose-makefile.patch
+fix-FTBFS.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/freeorion.git



More information about the Pkg-games-commits mailing list