[metview] 62/97: WIP: fix patches

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Sep 1 09:18:53 UTC 2015


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

mckinstry pushed a commit to branch master
in repository metview.

commit 40c0c87dbe97ab598c87da8a02638acb505dde55
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Sat May 2 14:33:18 2015 +0100

    WIP: fix patches
---
 debian/changelog                |   3 +
 debian/patches/series           |   6 +-
 debian/patches/syserrlist.patch | 119 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 125 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index bb0536a..7270573 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ metview (4.5.3-1) UNRELEASED; urgency=medium
 
   * New upstream release.
   * Move to cmake-based build
+  * fix-colors.patch: Fixed upstream.
+  * syserrlist.patch temporarily disabled
+  * no-m32 patch temporarily disabled.
 
  -- Alastair McKinstry <mckinstry at debian.org>  Sat, 02 May 2015 13:34:23 +0100
 
diff --git a/debian/patches/series b/debian/patches/series
index 631cd23..f4f8c82 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,6 @@
-syserrlist.patch
+# syserrlist.patch
 fix-paths.patch
 fix-scripts.patch
-no-m32.patch
-fix-colors.patch
+# no-m32.patch
+# fix-colors.patch
 socklen-fix.patch
diff --git a/debian/patches/syserrlist.patch b/debian/patches/syserrlist.patch
new file mode 100644
index 0000000..656d246
--- /dev/null
+++ b/debian/patches/syserrlist.patch
@@ -0,0 +1,119 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: Replace sys_errlist[] which causes problems with FreeBSD
+ and is deprecated with strerror()
+Last-Updated: 2014-09-10
+Forwarded: no
+
+Index: metview-4.4.8+dfsg.1/src/Desktop/Log.cc
+===================================================================
+--- metview-4.4.8+dfsg.1.orig/src/Desktop/Log.cc
++++ metview-4.4.8+dfsg.1/src/Desktop/Log.cc
+@@ -12,6 +12,7 @@
+ #include "Folder.h"
+ 
+ #include <errno.h>
++#include <string.h>
+ #include <inc_iostream.h>
+ #include <time.h>
+ 
+@@ -19,12 +20,6 @@
+ #include "IconObject.h"
+ 
+ 
+-// which platform require this one?
+-// (not SGI, and Linux get compiler errors
+-//  because of different types...!)
+-//extern char *sys_errlist[];
+-extern int sys_nerr;
+-
+ //static std::string logTimeStamp();
+ 
+ Log::Log(IconObject* o):
+@@ -80,12 +75,7 @@ const Path& Log::path()
+ 
+ ostream& Log::syserr(ostream& s)
+ {
+-    int e = errno;
+-   
+-    if(e>0 && e < sys_nerr)
+-        s << " (" << sys_errlist[e] << ") " ;
+-    else
+-        s << " (errno = " << e << ") ";
++    s << " (" << strerror(errno) << ") " ;
+     return s;
+ }
+ 
+@@ -138,4 +128,4 @@ ostream& Log::find(IconObject* o)
+ 	string str;
+ 	str=string(buf);
+ 	return str;
+-}*/	
+\ No newline at end of file
++}*/	
+Index: metview-4.4.8+dfsg.1/src/MetviewUI/Log.cc
+===================================================================
+--- metview-4.4.8+dfsg.1.orig/src/MetviewUI/Log.cc
++++ metview-4.4.8+dfsg.1/src/MetviewUI/Log.cc
+@@ -26,12 +26,7 @@
+ #include "IconObject.h"
+ #endif
+ 
+-
+-// which platform require this one?
+-// (not SGI, and Linux get compiler errors
+-//  because of different types...!)
+-//extern char *sys_errlist[];
+-extern int sys_nerr;
++#include <string.h>
+ 
+ 
+ Log::Log(IconObject* o):
+@@ -85,11 +80,7 @@ const Path& Log::path()
+ ostream& Log::syserr(ostream& s)
+ {
+     int e = errno;
+-   
+-    if(e>0 && e < sys_nerr)
+-        s << " (" << sys_errlist[e] << ") " ;
+-    else
+-        s << " (errno = " << e << ") ";
++    s << " (" << strerror(e) << ") " ;
+     return s;
+ }
+ 
+Index: metview-4.4.8+dfsg.1/src/libMars-ecregrid/mars.h
+===================================================================
+--- metview-4.4.8+dfsg.1.orig/src/libMars-ecregrid/mars.h
++++ metview-4.4.8+dfsg.1/src/libMars-ecregrid/mars.h
+@@ -61,13 +61,8 @@
+ 
+ 
+ #include <errno.h>
+-#if !defined(linux) && !defined(CYGWIN)
+ #ifdef VMS
+ #include <sys/perror.h>
+-#else
+-extern char *sys_errlist[];
+-extern int sys_nerr;
+-#endif
+ #endif
+ 
+ #ifdef sun
+Index: metview-4.4.8+dfsg.1/src/libMars/mars.h
+===================================================================
+--- metview-4.4.8+dfsg.1.orig/src/libMars/mars.h
++++ metview-4.4.8+dfsg.1/src/libMars/mars.h
+@@ -61,13 +61,8 @@
+ 
+ 
+ #include <errno.h>
+-#if !defined(linux) && !defined(CYGWIN)
+ #ifdef VMS
+ #include <sys/perror.h>
+-#else
+-extern char *sys_errlist[];
+-extern int sys_nerr;
+-#endif
+ #endif
+ 
+ #ifdef sun

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/metview.git



More information about the debian-science-commits mailing list