Package: src:wp2latex
Version: 3.86-1
Control: tags -1 ftbfs patch

--

Dear maintainer,
latest 3.86-1 fails to build on multiple architectures with the
following error :
---
In file included from wp2latex.cc:29:
wp2latex.h:20:25: error: expected unqualified-id before string constant
   20 | #define version         "3.86"
      |                         ^~~~~~
---

Actually that "version" keyword collides deep in some arch-specific header : for
example on ppc64el, I get this :
---
# 201 "/usr/include/powerpc64le-linux-gnu/asm/ptrace.h" 3 4
struct ppc_debug_info {

# 202 "/usr/include/powerpc64le-linux-gnu/asm/ptrace.h"
__u32 "3.86"
---

Renaming from "version" to "versionwp2l" in the source, for example, does the 
trick.

Regards,


F.
diff -Nru wp2latex-3.86/debian/patches/fix-version-keyword-FTBFS.patch 
wp2latex-3.86/debian/patches/fix-version-keyword-FTBFS.patch
--- wp2latex-3.86/debian/patches/fix-version-keyword-FTBFS.patch        
1970-01-01 01:00:00.000000000 +0100
+++ wp2latex-3.86/debian/patches/fix-version-keyword-FTBFS.patch        
2019-12-20 20:56:49.000000000 +0100
@@ -0,0 +1,64 @@
+--- a/sources.cc/pass2.cc
++++ b/sources.cc/pass2.cc
+@@ -292,7 +292,7 @@
+ int i;
+ string TeX_RelativeFigDir;
+ 
+-  fprintf(this->LaTeX,_("%% This file was created by the WP2LaTeX program 
version: %s \n"), version );
++  fprintf(this->LaTeX,_("%% This file was created by the WP2LaTeX program 
version: %s \n"), versionwp2l );
+   if(LaTeX_Version<0x300)
+     {
+     fprintf(this->LaTeX, "\\documentstyle[11pt,");
+--- a/sources.cc/wp2latex.cc
++++ b/sources.cc/wp2latex.cc
+@@ -319,7 +319,7 @@
+  if(Verbosing < 1) return;
+  printf(_("\n>>>WP2LaTeX<<< Conversion program: From Wordperfect to LaTeX 
Version %s \n"
+         "  (c) Made by J.Fojtik  ---- Date : 1996-2019\n"),
+-          version);
++          versionwp2l);
+ }
+ 
+ 
+@@ -733,7 +733,7 @@
+       else fprintf(logg,_("%% log file for converted file %s, %s ver %d.%d\n"
+                         "%% conversion program WP2LaTeX v. %s from %s.\n"),
+                          wpd_filename(), chk(FilForD.DocumentType), 
FilForD.DocVersion>>8, FilForD.DocVersion & 0xFF,
+-                           version, versiondate);
++                           versionwp2l, versiondate);
+       }
+     }
+ 
+--- a/sources.cc/wp2latex.h
++++ b/sources.cc/wp2latex.h
+@@ -17,7 +17,7 @@
+ 
+ #define LineLength   80               /* Split lines after more than 
LineLength charcters */
+ 
+-#define version         "3.86"
++#define versionwp2l         "3.86"
+ #define versiondate "21 Dec 2019"  /* day (space) month (space) full year */
+ 
+ #ifndef false
+--- a/sources.cc/wp2l_lib.cc
++++ b/sources.cc/wp2l_lib.cc
+@@ -1842,7 +1842,7 @@
+               }
+       if(!strcmp(name, "v"))
+               {
+-              fprintf(err,_("wp2latex %s   %s\n  
modules:("),version,versiondate);
++              fprintf(err,_("wp2latex %s   %s\n  
modules:("),versionwp2l,versiondate);
+               FFormatTranslator *Fx;
+               Fx = FFormatTranslator::first();
+               while(Fx!=NULL)
+--- a/sources.cc/images.cc
++++ b/sources.cc/images.cc
+@@ -222,7 +222,7 @@
+ %%%%IncludeFeature: *PageSize Letter\n\
+ %%%%EndSetup\n\
+ %%%%EndComments\n",
+-Filename,version,versiondate);
++Filename,versionwp2l,versiondate);
+ 
+ fprintf(PostScript,"\
+ /$F2psDict 200 dict def\n\
diff -Nru wp2latex-3.86/debian/patches/series 
wp2latex-3.86/debian/patches/series
--- wp2latex-3.86/debian/patches/series 2019-12-20 20:56:49.000000000 +0100
+++ wp2latex-3.86/debian/patches/series 2019-12-20 20:56:49.000000000 +0100
@@ -3,3 +3,4 @@
 sources.cc_pass1_3.cc.patch
 sources.cc_wp2l_lib.cc.patch
 no_copy_binary.patch
+fix-version-keyword-FTBFS.patch

Attachment: pgpmDY_Zb13l2.pgp
Description: PGP signature

Reply via email to