Control: tags 862065 + pending
Control: tags 869333 + patch
Control: tags 869333 + pending
Control: tags 887769 + pending

Dear maintainer,

I've prepared an NMU for starplot (versioned as 0.95.5-8.3) and uploaded 
it to DELAYED/5. Please feel free to tell me if I should cancel it.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

diff -Nru starplot-0.95.5/debian/changelog starplot-0.95.5/debian/changelog
--- starplot-0.95.5/debian/changelog	2016-12-24 23:59:59.000000000 +0200
+++ starplot-0.95.5/debian/changelog	2018-02-08 17:11:01.000000000 +0200
@@ -1,3 +1,14 @@
+starplot (0.95.5-8.3) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Add patch from Bernhard Übelacker to fix startup crash.
+    (Closes: #862065)
+  * Add patch from Juhani Numminen to fix FTBFS with glibc 2.26.
+    (Closes: #887769)
+  * Remove Kevin B. McCarty from Uploaders. (Closes: #869333)
+
+ -- Adrian Bunk <b...@debian.org>  Thu, 08 Feb 2018 17:11:01 +0200
+
 starplot (0.95.5-8.2) unstable; urgency=low
 
   * Non-maintainer upload to fix RC bug.
diff -Nru starplot-0.95.5/debian/control starplot-0.95.5/debian/control
--- starplot-0.95.5/debian/control	2014-05-23 20:42:28.000000000 +0300
+++ starplot-0.95.5/debian/control	2018-02-08 17:11:01.000000000 +0200
@@ -2,7 +2,7 @@
 Section: science
 Priority: optional
 Maintainer: Francisco Manuel Garcia Claramonte <franci...@debian.org>
-Uploaders: Javier Fernández-Sanguino Peña <j...@debian.org>, Kevin B. McCarty <kmcca...@debian.org>
+Uploaders: Javier Fernández-Sanguino Peña <j...@debian.org>
 Build-Depends: debhelper (>> 9.0.0), libgtk2.0-dev, dh-autoreconf
 Standards-Version: 3.9.3
 Homepage: http://starplot.org
diff -Nru starplot-0.95.5/debian/patches/04-fix-ftbfs-strings.diff starplot-0.95.5/debian/patches/04-fix-ftbfs-strings.diff
--- starplot-0.95.5/debian/patches/04-fix-ftbfs-strings.diff	1970-01-01 02:00:00.000000000 +0200
+++ starplot-0.95.5/debian/patches/04-fix-ftbfs-strings.diff	2018-02-08 17:11:01.000000000 +0200
@@ -0,0 +1,17 @@
+Description: Fix FTBFS: error: 'starstrings' has not been declared
+ src/classes/strings.h did not get included because its header guard
+ _STRINGS_H conflicted with /usr/include/strings.h.
+Author: Juhani Numminen <juhaninummin...@gmail.com>
+Bug-Debian: https://bugs.debian.org/887769
+Last-Update: 2018-01-24
+
+--- a/src/classes/strings.h
++++ b/src/classes/strings.h
+@@ -1,5 +1,5 @@
+-#ifndef _STRINGS_H
+-#define _STRINGS_H
++#ifndef _STARPLOT_STRINGS_H
++#define _STARPLOT_STRINGS_H
+ 
+ #include "../../lib/compat.h"
+ #include "cxx_macros.h"
diff -Nru starplot-0.95.5/debian/patches/05-startup-crash.diff starplot-0.95.5/debian/patches/05-startup-crash.diff
--- starplot-0.95.5/debian/patches/05-startup-crash.diff	1970-01-01 02:00:00.000000000 +0200
+++ starplot-0.95.5/debian/patches/05-startup-crash.diff	2018-02-08 17:11:01.000000000 +0200
@@ -0,0 +1,84 @@
+From f603ddfa6a0eb6fc90bc8f14d0bb010efef975fa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= <bernha...@mailbox.org>
+Date: Mon, 8 May 2017 23:05:28 +0200
+Subject: Replace c-like qsort with c++-like std::sort.
+
+https://bugs.debian.org/862065
+---
+ src/classes/stararray.cc | 49 +++++++++++++++++-------------------------------
+ 1 file changed, 17 insertions(+), 32 deletions(-)
+
+diff --git a/src/classes/stararray.cc b/src/classes/stararray.cc
+index 26cc6a0..72cc856 100644
+--- a/src/classes/stararray.cc
++++ b/src/classes/stararray.cc
+@@ -26,6 +26,7 @@
+ 
+ #define NEED_FULL_NAMES
+ #include "constellations.h"
++#include <algorithm>
+ 
+ using std::string;
+ using std::vector;
+@@ -167,42 +168,26 @@ typedef struct {
+ 
+ // Next, the function to compare for qsort().
+ 
+-int compare_function(const void *p, const void *q)
+-{
+-  double x1 = ((const sortable *)p)->xposition;
+-  double x2 = ((const sortable *)q)->xposition;
+-  return (x1 - x2 >= 0.0) ? 1 : -1;
+-}
++struct sort_class {
++  Rules &rules;
++  sort_class(Rules &r) : rules(r) {};
++  bool operator() (const Star &p, const Star &q)
++  {
++    SolidAngle orientation = rules.ChartOrientation;
++    Vector3 relativeLocation;
++    relativeLocation = p.GetStarXYZ() - rules.ChartLocation;
++    double x1 = relativeLocation.getX() * cos(orientation.getPhi()) + relativeLocation.getY() * sin(orientation.getPhi());
++    relativeLocation = q.GetStarXYZ() - rules.ChartLocation;
++    double x2 = relativeLocation.getX() * cos(orientation.getPhi()) + relativeLocation.getY() * sin(orientation.getPhi());
++    return (x1 - x2 >= 0.0) ? 1 : -1;
++  }
++};
+ 
+-// Finally, the main function which calls qsort()
++// Finally, the main function which calls std::sort()
+ 
+ void StarArray::Sort()
+ {
+-  size_t size = Array.size();
+-  Vector3 relativeLocation;
+-  SolidAngle orientation = ArrayRules.ChartOrientation;
+-  sortable *temparray = new sortable[size];
+-
+-  // Make a temporary array for qsort(), consisting of "sortable" structs
+-  //  which each contain a Star and a position in local coordinates.
+-  for (size_t i = 0; i < size; i++) {
+-    relativeLocation = Array[i].GetStarXYZ() - ArrayRules.ChartLocation;
+-    temparray[i].xposition =
+-      relativeLocation.getX() * cos(orientation.getPhi())
+-      + relativeLocation.getY() * sin(orientation.getPhi());
+-    temparray[i].star = Array[i];
+-  }
+-
+-  qsort(temparray, size, sizeof(sortable), compare_function);
+-
+-  // Put the sorted temporary array back into the vector
+-  Array.clear();
+-  for (size_t i = 0; i < size; i++) {
+-    temparray[i].star.SetPlace(i+1);    // label stars starting at 1
+-    Array.push_back(temparray[i].star);
+-  }
+-
+-  delete [] temparray;
++  std::sort(Array.begin(), Array.end(), sort_class(ArrayRules));
+   return;
+ }
+ 
+-- 
+2.11.0
+
diff -Nru starplot-0.95.5/debian/patches/series starplot-0.95.5/debian/patches/series
--- starplot-0.95.5/debian/patches/series	2016-12-24 23:59:40.000000000 +0200
+++ starplot-0.95.5/debian/patches/series	2018-02-08 17:11:01.000000000 +0200
@@ -1,3 +1,5 @@
 01-starplot_desktop_file.diff
 02-fix-ftbfs-and-hrdiagram-opts.diff
 03-fix-ftbfs-convert.diff
+04-fix-ftbfs-strings.diff
+05-startup-crash.diff

Reply via email to