Control: tags 960424 + patch
Control: tags 960424 + pending

Dear maintainer,

I've prepared an NMU for simgear (versioned as 1:2019.1.1+dfsg-3.1) and
uploaded it to mentors for sponsoring. Please feel free to tell me if I
should remove it.

--
Regards
Sudip

diff -Nru simgear-2019.1.1+dfsg/debian/changelog 
simgear-2019.1.1+dfsg/debian/changelog
--- simgear-2019.1.1+dfsg/debian/changelog      2019-11-14 08:01:57.000000000 
+0000
+++ simgear-2019.1.1+dfsg/debian/changelog      2020-06-16 12:29:15.000000000 
+0100
@@ -1,3 +1,11 @@
+simgear (1:2019.1.1+dfsg-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS with boost 1.71. (Closes: #960424)
+    - Fix breaking change with osgText.
+
+ -- Sudip Mukherjee <sudipm.mukher...@gmail.com>  Tue, 16 Jun 2020 12:29:15 
+0100
+
 simgear (1:2019.1.1+dfsg-3) unstable; urgency=medium
 
   * Team upload
diff -Nru 
simgear-2019.1.1+dfsg/debian/patches/0001-osgText.getActiveFont-Breaking-change-within-OSG.patch
 
simgear-2019.1.1+dfsg/debian/patches/0001-osgText.getActiveFont-Breaking-change-within-OSG.patch
--- 
simgear-2019.1.1+dfsg/debian/patches/0001-osgText.getActiveFont-Breaking-change-within-OSG.patch
    1970-01-01 01:00:00.000000000 +0100
+++ 
simgear-2019.1.1+dfsg/debian/patches/0001-osgText.getActiveFont-Breaking-change-within-OSG.patch
    2020-06-16 12:29:15.000000000 +0100
@@ -0,0 +1,79 @@
+From d883ab278d10c89580d5bbc4473d2e9fc375b7b9 Mon Sep 17 00:00:00 2001
+From: Scott Giese <sctt...@gmail.com>
+Date: Sun, 4 Aug 2019 02:27:57 -0500
+Subject: [PATCH] [osgText.getActiveFont] Breaking change within OSG
+
+---
+
+upstream link: 
https://github.com/FlightGear/simgear/commit/d883ab278d10c89580d5bbc4473d2e9fc375b7b9
+issue link: 
https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/d3396d2b-0ce6-490e-b32f-42174895b...@flightgear.org/
+
+ simgear/canvas/elements/CanvasText.cxx | 22 +++++++++++++++++-----
+ 1 file changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/simgear/canvas/elements/CanvasText.cxx 
b/simgear/canvas/elements/CanvasText.cxx
+index 3051045f..060436e1 100644
+--- a/simgear/canvas/elements/CanvasText.cxx
++++ b/simgear/canvas/elements/CanvasText.cxx
+@@ -53,10 +53,13 @@ namespace canvas
+       TextLine lineAt(size_t i) const;
+ 
+       /// Get nearest line to given y-coordinate
++#if OSG_VERSION_LESS_THAN(3,6,5)
+       TextLine nearestLine(float pos_y) const;
+-
+-
+       SGVec2i sizeForWidth(int w) const;
++#else
++      TextLine nearestLine(float pos_y);
++      SGVec2i sizeForWidth(int w);
++#endif
+ 
+       osg::BoundingBox
+ #if OSG_VERSION_LESS_THAN(3,3,2)
+@@ -319,9 +322,14 @@ namespace canvas
+   }
+ 
+   
//----------------------------------------------------------------------------
++#if OSG_VERSION_LESS_THAN(3,6,5)
+   TextLine Text::TextOSG::nearestLine(float pos_y) const
++#else
++  TextLine Text::TextOSG::nearestLine(float pos_y)
++#endif
+   {
+-    osgText::Font const* font = getActiveFont();
++    auto font = getActiveFont();
++
+     if( !font || lineCount() <= 0 )
+       return TextLine(0, this);
+ 
+@@ -343,12 +351,16 @@ namespace canvas
+   // simplified version of osgText::Text::computeGlyphRepresentation() to
+   // just calculate the size for a given weight. Glpyh calculations/creating
+   // is not necessary for this...
++#if OSG_VERSION_LESS_THAN(3,6,5)
+   SGVec2i Text::TextOSG::sizeForWidth(int w) const
++#else
++  SGVec2i Text::TextOSG::sizeForWidth(int w)
++#endif
+   {
+     if( _text.empty() )
+       return SGVec2i(0, 0);
+ 
+-    osgText::Font* activefont = const_cast<osgText::Font*>(getActiveFont());
++    auto activefont = getActiveFont();
+     if( !activefont )
+       return SGVec2i(-1, -1);
+ 
+@@ -727,7 +739,7 @@ namespace canvas
+   }
+ 
+ #else
+-  void Text::TextOSG::computePositionsImplementation() 
++  void Text::TextOSG::computePositionsImplementation()
+   {
+           TextBase::computePositionsImplementation();
+   }
+-- 
+2.11.0
+
diff -Nru simgear-2019.1.1+dfsg/debian/patches/fix_boost.patch 
simgear-2019.1.1+dfsg/debian/patches/fix_boost.patch
--- simgear-2019.1.1+dfsg/debian/patches/fix_boost.patch        1970-01-01 
01:00:00.000000000 +0100
+++ simgear-2019.1.1+dfsg/debian/patches/fix_boost.patch        2020-06-16 
12:12:52.000000000 +0100
@@ -0,0 +1,34 @@
+Description: Fix FTBFS with boost 1.71
+ The macro Boost_VERSION returned 1.71.0. Based on: 
https://cmake.org/cmake/help/v3.15/module/FindBoost.html
+ we should use Boost_VERSION_MACRO to get the version in the form of 107100.
+ Fixing boost dependency brought out the problem with include folder.
+ The header files were created in build/simgear folder and the source files
+ included 'simgear/simgear_config.h' which was not found as 'build' was
+ not in the include path.
+
+Author: Sudip Mukherjee <sudipm.mukher...@gmail.com>
+Bug-Debian: https://bugs.debian.org/960424
+
+---
+
+--- simgear-2019.1.1+dfsg.orig/CMakeLists.txt
++++ simgear-2019.1.1+dfsg/CMakeLists.txt
+@@ -519,6 +519,7 @@ include(CheckCXXFeatures)
+ # use BEFORE to ensure local directories are used first,
+ # ahead of system-installed libs
+ include_directories(BEFORE ${PROJECT_BINARY_DIR}/simgear)
++include_directories(BEFORE ${PROJECT_BINARY_DIR})
+ 
+ add_definitions(-DHAVE_CONFIG_H)
+ 
+--- simgear-2019.1.1+dfsg.orig/CMakeModules/BoostTestTargets.cmake
++++ simgear-2019.1.1+dfsg/CMakeModules/BoostTestTargets.cmake
+@@ -46,7 +46,7 @@ set(BOOST_TEST_TARGET_PREFIX "test")
+ if(NOT Boost_FOUND)
+       find_package(Boost 1.34.0 QUIET)
+ endif()
+-if("${Boost_VERSION}0" LESS "1034000")
++if("${Boost_VERSION_MACRO}0" LESS "1034000")
+       set(_shared_msg
+               "NOTE: boost::test-based targets and tests cannot "
+               "be added: boost >= 1.34.0 required but not found. "
diff -Nru simgear-2019.1.1+dfsg/debian/patches/series 
simgear-2019.1.1+dfsg/debian/patches/series
--- simgear-2019.1.1+dfsg/debian/patches/series 2019-11-14 08:01:29.000000000 
+0000
+++ simgear-2019.1.1+dfsg/debian/patches/series 2020-06-16 12:14:05.000000000 
+0100
@@ -6,3 +6,5 @@
 spelling_fixes.patch
 fix-failing-http-test.patch
 fix-ftbfs-on-armel-armhf.patch
+fix_boost.patch
+0001-osgText.getActiveFont-Breaking-change-within-OSG.patch

Reply via email to