diff --git a/0014-Add-missing-include.patch b/0014-Add-missing-include.patch new file mode 100644 index 0000000..48fc047 --- /dev/null +++ b/0014-Add-missing-include.patch @@ -0,0 +1,101 @@ +From: Sebastian Ramacher +Date: Wed, 13 Mar 2024 23:24:29 +0100 +Subject: Add missing include + +--- + decompresswmf.c | 2 ++ + field.c | 1 + + wvConfig.c | 1 + + wvRTF.c | 1 + + wvSummary.c | 1 + + wvWare.c | 1 + + wvparse.c | 3 +++ + 7 files changed, 10 insertions(+) + +diff --git a/decompresswmf.c b/decompresswmf.c +index ace7855..0a918dc 100644 +--- a/decompresswmf.c ++++ b/decompresswmf.c +@@ -17,6 +17,8 @@ + * 02111-1307, USA. + */ + ++#define _POSIX_C_SOURCE 200809L ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +diff --git a/field.c b/field.c +index 8e56c37..0b21f48 100644 +--- a/field.c ++++ b/field.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + + #include "wv.h" +diff --git a/wvConfig.c b/wvConfig.c +index 03ffccc..e44f4f6 100644 +--- a/wvConfig.c ++++ b/wvConfig.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + #include + #include + #include "wv.h" +diff --git a/wvRTF.c b/wvRTF.c +index 7253e53..1cea05b 100644 +--- a/wvRTF.c ++++ b/wvRTF.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_UNISTD_H + #include +diff --git a/wvSummary.c b/wvSummary.c +index 980b856..27b5fed 100644 +--- a/wvSummary.c ++++ b/wvSummary.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/wvWare.c b/wvWare.c +index 1165175..55ebcb0 100644 +--- a/wvWare.c ++++ b/wvWare.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include "wv.h" + #include "getopt.h" +diff --git a/wvparse.c b/wvparse.c +index 250000b..caacf61 100644 +--- a/wvparse.c ++++ b/wvparse.c +@@ -35,6 +35,9 @@ + #include + #include + ++int wvOLEDecode_gsf (wvParseStruct * ps, GsfInput *path, wvStream ** mainfd, wvStream ** tablefd0, ++ wvStream ** tablefd1, wvStream ** data, wvStream ** summary); ++ + int + wvInit (void) + { diff --git a/cross.patch b/cross.patch new file mode 100644 index 0000000..4846d16 --- /dev/null +++ b/cross.patch @@ -0,0 +1,19 @@ +From: Helmut Grohne +Subject: consider ac_tool_prefix when searching for pkg-config + +PKG_CHECK_MODULES will require PKG_PROG_PKG_CONFIG which sets PKG_CONFIG +correctly. + +Index: wv-1.2.9/configure.ac +=================================================================== +--- wv-1.2.9.orig/configure.ac ++++ wv-1.2.9/configure.ac +@@ -74,8 +74,6 @@ + + AC_PROG_LIBTOOL + +-AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +- + # libgsf depends on glib and libxml2, so we should be fine + libgsf_req='libgsf-1 >= 1.13.0' + DEPS_PKGS="$libgsf_req" diff --git a/detect-imagick.patch b/detect-imagick.patch new file mode 100644 index 0000000..2b17162 --- /dev/null +++ b/detect-imagick.patch @@ -0,0 +1,43 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## detect-imagick.dpatch by Matej Vela +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: wvDVI.in, wvPDF.in, wvPS.in: Fix ImageMagick check (#160925). + +@DPATCH@ +diff -urNad wv-1.2.1~/wvDVI.in wv-1.2.1/wvDVI.in +--- wv-1.2.1~/wvDVI.in 2002-02-18 09:08:35.000000000 +0100 ++++ wv-1.2.1/wvDVI.in 2006-03-18 00:45:10.000000000 +0100 +@@ -153,7 +153,7 @@ + # auto_jpg=`"$wv_exec" --auto-eps=jpg` + # auto_pict=`"$wv_exec" --auto-eps=pict` + +-im_chk=`convert --help 2>&1 | grep -v ImageMagick` ++im_chk=`convert --help 2>&1 | grep ImageMagick` + if test "x$im_chk" = "x"; then + im_chk="no" + s_img="" +diff -urNad wv-1.2.1~/wvPDF.in wv-1.2.1/wvPDF.in +--- wv-1.2.1~/wvPDF.in 2004-08-07 22:49:28.000000000 +0200 ++++ wv-1.2.1/wvPDF.in 2006-03-18 00:45:07.000000000 +0100 +@@ -177,7 +177,7 @@ + # auto_jpg=`"$wv_exec" --auto-eps=jpg` + # auto_pict=`"$wv_exec" --auto-eps=pict` + +-im_chk=`convert --help 2>&1 | grep -v ImageMagick` ++im_chk=`convert --help 2>&1 | grep ImageMagick` + if test "x$im_chk" = "x"; then + im_chk="no" + s_img="" +diff -urNad wv-1.2.1~/wvPS.in wv-1.2.1/wvPS.in +--- wv-1.2.1~/wvPS.in 2004-08-07 22:49:28.000000000 +0200 ++++ wv-1.2.1/wvPS.in 2006-03-18 00:44:53.000000000 +0100 +@@ -159,7 +159,7 @@ + # auto_jpg=`"$wv_exec" --auto-eps=jpg` + # auto_pict=`"$wv_exec" --auto-eps=pict` + +-im_chk=`convert --help 2>&1 | grep -v ImageMagick` ++im_chk=`convert --help 2>&1 | grep ImageMagick` + if test "x$im_chk" = "x"; then + im_chk="no" + s_img="" diff --git a/hardening-format.patch b/hardening-format.patch new file mode 100644 index 0000000..9a5efff --- /dev/null +++ b/hardening-format.patch @@ -0,0 +1,18 @@ +Author: Dmitry Smirnov +Last-Update: 2012-02-10 +Forwarded: yes +Description: fixes FTBFS with format hardening + Workaround for error: "format not a string literal and + "no format arguments [-Werror=format-security]" + +--- a/wvRTF.c ++++ b/wvRTF.c +@@ -192,7 +192,7 @@ + rtf_output_char ('{'); + + /* font color */ +- rtf_output (rtfColors[ud->cCol]); ++ rtf_output ("%s", rtfColors[ud->cCol]); + + /* font face */ + rtf_output ("\\f%d", ud->cFont); diff --git a/man-refs.patch b/man-refs.patch new file mode 100644 index 0000000..a9adf6f --- /dev/null +++ b/man-refs.patch @@ -0,0 +1,74 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## man-refs.dpatch by Matej Vela +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Ensure that all man pages have a consistent set of references +## DP: (#294805, #309663). + +@DPATCH@ +diff -urNad wv-1.2.1~/help/man/wvAbw.1 wv-1.2.1/help/man/wvAbw.1 +--- wv-1.2.1~/help/man/wvAbw.1 2006-03-18 17:32:57.000000000 +0100 ++++ wv-1.2.1/help/man/wvAbw.1 2006-03-18 17:39:07.000000000 +0100 +@@ -22,6 +22,7 @@ + .BR wvPS(1), + .BR wvDVI(1), + .BR wvPDF(1), ++.BR wvRTF(1), + .BR wvText(1), + .BR wvWml(1), + .BR wvMime(1), +diff -urNad wv-1.2.1~/help/man/wvCleanLatex.1 wv-1.2.1/help/man/wvCleanLatex.1 +--- wv-1.2.1~/help/man/wvCleanLatex.1 2006-03-18 17:32:57.000000000 +0100 ++++ wv-1.2.1/help/man/wvCleanLatex.1 2006-03-18 17:39:07.000000000 +0100 +@@ -23,6 +23,7 @@ + .BR wvText(1), + .BR wvWml(1), + .BR wvMime(1), ++.BR wvRTF(1), + .BR catdoc(1), + .BR word2x(1) + .SH "AUTHOR" +diff -urNad wv-1.2.1~/help/man/wvDVI.1 wv-1.2.1/help/man/wvDVI.1 +--- wv-1.2.1~/help/man/wvDVI.1 2006-03-18 17:32:57.000000000 +0100 ++++ wv-1.2.1/help/man/wvDVI.1 2006-03-18 17:39:07.000000000 +0100 +@@ -22,6 +22,7 @@ + .BR wvCleanLatex(1), + .BR wvPDF(1), + .BR wvPS(1), ++.BR wvRTF(1), + .BR wvText(1), + .BR wvWml(1), + .BR wvMime(1), +diff -urNad wv-1.2.1~/help/man/wvHtml.1 wv-1.2.1/help/man/wvHtml.1 +--- wv-1.2.1~/help/man/wvHtml.1 2006-03-18 17:32:57.000000000 +0100 ++++ wv-1.2.1/help/man/wvHtml.1 2006-03-18 17:39:07.000000000 +0100 +@@ -21,6 +21,7 @@ + .BR wvPS(1), + .BR wvDVI(1), + .BR wvPDF(1), ++.BR wvRTF(1), + .BR wvText(1), + .BR wvWml(1), + .BR wvMime(1), +diff -urNad wv-1.2.1~/help/man/wvSummary.1 wv-1.2.1/help/man/wvSummary.1 +--- wv-1.2.1~/help/man/wvSummary.1 2006-03-18 17:32:57.000000000 +0100 ++++ wv-1.2.1/help/man/wvSummary.1 2006-03-18 17:39:24.000000000 +0100 +@@ -19,6 +19,7 @@ + .BR wvHtml(1), + .BR wvLatex(1), + .BR wvCleanLatex(1), ++.BR wvPS(1), + .BR wvPDF(1), + .BR wvDVI(1), + .BR wvMime(1), +diff -urNad wv-1.2.1~/help/man/wvText.1 wv-1.2.1/help/man/wvText.1 +--- wv-1.2.1~/help/man/wvText.1 2006-03-18 17:32:57.000000000 +0100 ++++ wv-1.2.1/help/man/wvText.1 2006-03-18 17:39:07.000000000 +0100 +@@ -23,6 +23,7 @@ + .BR wvDVI(1), + .BR wvPDF(1), + .BR wvRTF(1), ++.BR wvWml(1), + .BR wvMime(1), + .BR catdoc(1), + .BR word2x(1) diff --git a/man-remove-PU.patch b/man-remove-PU.patch new file mode 100644 index 0000000..bf379f0 --- /dev/null +++ b/man-remove-PU.patch @@ -0,0 +1,104 @@ +Author: Dmitry Smirnov +Last-Update: 2012-02-10 +Forwarded: no +Description: fixes man "warning: macro 'PU' not defined" + + +--- a/help/man/wvAbw.1 ++++ b/help/man/wvAbw.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvAbw 1 + .SH NAME + wvHtml \- convert msword documents to Abiword's format +--- a/help/man/wvCleanLatex.1 ++++ b/help/man/wvCleanLatex.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvLatex 1 + .SH NAME + wvCleanLatex \- convert msword documents to LaTeX +--- a/help/man/wvDVI.1 ++++ b/help/man/wvDVI.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvDVI 1 + .SH NAME + wvDVI \- convert msword documents to DVI +--- a/help/man/wvHtml.1 ++++ b/help/man/wvHtml.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvHtml 1 + .SH NAME + wvHtml \- convert msword documents to HTML4.0 +--- a/help/man/wvLatex.1 ++++ b/help/man/wvLatex.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvLatex 1 + .SH NAME + wvLatex \- convert msword documents to LaTeX +--- a/help/man/wvMime.1 ++++ b/help/man/wvMime.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvMime 1 + .SH NAME + wvMime \- view MSWord documents +--- a/help/man/wvPDF.1 ++++ b/help/man/wvPDF.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvPDF 1 + .SH NAME + wvPDF \- convert msword documents to PDF +--- a/help/man/wvPS.1 ++++ b/help/man/wvPS.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvPS 1 + .SH NAME + wvPS \- convert msword documents to PS +--- a/help/man/wvRTF.1 ++++ b/help/man/wvRTF.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvRTF 1 + .SH NAME + wvRTF \- convert msword documents to RTF +--- a/help/man/wvSummary.1 ++++ b/help/man/wvSummary.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvSummary 1 + .SH NAME + wvSummary \- view word document's summary info +--- a/help/man/wvText.1 ++++ b/help/man/wvText.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvText 1 + .SH NAME + wvHtml \- convert msword documents to text +--- a/help/man/wvVersion.1 ++++ b/help/man/wvVersion.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvVersion 1 + .SH NAME + wvVersion \- view word document's version # +--- a/help/man/wvWare.1 ++++ b/help/man/wvWare.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvWare 1 + .SH NAME + wvWare \- convert msword documents +--- a/help/man/wvWml.1 ++++ b/help/man/wvWml.1 +@@ -1,4 +1,3 @@ +-.PU + .TH wvWml 1 + .SH NAME + wvHtml \- convert msword documents to WML diff --git a/man-wvrtf-name.patch b/man-wvrtf-name.patch new file mode 100644 index 0000000..85a7695 --- /dev/null +++ b/man-wvrtf-name.patch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## man-wvrtf-name.dpatch by Matej Vela +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: help/man/wvRTF.1: Fix NAME section (#339398). + +@DPATCH@ +diff -urNad wv-1.2.1~/help/man/wvRTF.1 wv-1.2.1/help/man/wvRTF.1 +--- wv-1.2.1~/help/man/wvRTF.1 2001-02-17 22:53:28.000000000 +0100 ++++ wv-1.2.1/help/man/wvRTF.1 2006-03-18 11:47:46.000000000 +0100 +@@ -1,7 +1,7 @@ + .PU + .TH wvRTF 1 + .SH NAME +-wvHtml \- convert msword documents to RTF ++wvRTF \- convert msword documents to RTF + .SH SYNOPSIS + .ll +8 + .B wvRTF in_word_doc diff --git a/man-wvware-options.patch b/man-wvware-options.patch new file mode 100644 index 0000000..83e9119 --- /dev/null +++ b/man-wvware-options.patch @@ -0,0 +1,54 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## man-wvware-options.dpatch by Matej Vela +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: help/man/wvWare.1: Document all options (#200776, #334769). + +@DPATCH@ +diff -urNad wv-1.2.1~/help/man/wvWare.1 wv-1.2.1/help/man/wvWare.1 +--- wv-1.2.1~/help/man/wvWare.1 2004-08-07 22:44:12.000000000 +0200 ++++ wv-1.2.1/help/man/wvWare.1 2006-03-18 15:06:09.000000000 +0100 +@@ -41,10 +41,43 @@ + If dir is used then any created graphics will be placed in this directory. The default is the directory + in which the word document resides. + .TP ++.I "\-b name, \-\-basename name" ++Use ++.I name ++as the base name for image files. ++.TP ++.I "\-a format, \-\-auto-eps format" ++Depending on whether images of type ++.I format ++can be automatically converted to encapsulated PostScript, print "yes" or "no" ++and exit. Encapsulated PostScript is required for LaTeX, PostScript, and PDF ++output. Currently possible values for ++.I format ++are "wmf", "png", and "jpg". ++.TP ++.I "\-s format, \-\-suppress format" ++Suppress automatic conversion of images of type ++.I format ++to encapsulated PostScript. Currently possible values for ++.I format ++are "wmf", "emf", "png", "jpg", and "pict". ++.TP ++.I "\-1, \-\-nographics" ++Suppress output of embedded images. ++.TP + .I "\-x config.xml, \-\-config config.xml" + Use this to give the location of the config file. If not used, the config file is searched for + by first checking the current directory, and then by looking in the install location + (/usr/local/lib/wv/wvHtml.xml by default) ++.TP ++.I "\-X, \-\-xml" ++Produce XHTML-like XML output (as defined in /usr/local/lib/wv/wvXml.xml). ++.TP ++.I "\-v, \-\-version" ++Print wvWare's version number and exit. ++.TP ++.I "\-?, \-\-help" ++Print a help message and exit. + .SH MORE INFORMATION + http://wvware.sourceforge.net + .SH "SEE ALSO" diff --git a/man-wvware-typo.patch b/man-wvware-typo.patch new file mode 100644 index 0000000..4e45734 --- /dev/null +++ b/man-wvware-typo.patch @@ -0,0 +1,14 @@ +--- a/help/man/wvWare.1 2010-09-05 11:41:46.000000000 -0400 ++++ b/help/man/wvWare.1 2011-09-21 11:38:59.279521720 -0400 +@@ -19,9 +19,9 @@ + converted from there, except for the western european codepage + which is always converted to iso-5589-15 if possible. This is the + default behaviour. While it is possible to convert into other formats or +-to force a conversion to a particular format, it is not recomended as ++to force a conversion to a particular format, it is not recommended as + you don't get a guarantee that the output will be correct. For instance, if +-you convert an english document into koi8-r encoding then it will ++you convert an English document into koi8-r encoding then it will + be wrong, but if you are sure then you can override the default + output format. The charsets that are available depend on your system: + systems using the gnu libc 2 and above can convert to just about anything; diff --git a/non-latin-latex.patch b/non-latin-latex.patch new file mode 100644 index 0000000..dbcd98d --- /dev/null +++ b/non-latin-latex.patch @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## non-latin-latex.dpatch by Peter Novodvorsky +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: text.c (wvConvertUnicodeToLaTeX): Disable debugging code which +## DP: causes spurious output for non-Latin-1 files (#171193). + +@DPATCH@ +diff -urNad wv-1.2.1~/text.c wv-1.2.1/text.c +--- wv-1.2.1~/text.c 2006-03-17 22:36:46.000000000 +0100 ++++ wv-1.2.1/text.c 2006-03-17 22:38:28.000000000 +0100 +@@ -1944,12 +1944,14 @@ + return (1); + + } ++#ifdef DEBUG + /* Debugging aid: */ + if (char16 >= 0x80) + { + printf ("[%x]", char16); + return (1); + } ++#endif + return (0); + } + diff --git a/wv-1.0.3-wvText.patch b/wv-1.0.3-wvText.patch deleted file mode 100644 index e62d08b..0000000 --- a/wv-1.0.3-wvText.patch +++ /dev/null @@ -1,120 +0,0 @@ ---- wvText.in -+++ wvText.in -@@ -3,35 +3,49 @@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - datadir=@datadir@ --tmpdir=${TMPDIR:-/tmp} - - # argument checking --if [ ${#} -ne "2" ]; then -- echo "Usage: ${0} " -- exit 1 -+if [ ${#} -eq "1" ]; then -+ o_file='-' -+elif [ ${#} -ne "2" ]; then -+ echo "Usage: ${0} " -+ exit 1 -+else -+ o_file=${2} -+fi -+ -+if [ "x$o_file" = "x-" ]; then -+ o_file=/dev/stdout - fi - - USE_DUMP=0 --which elinks >/dev/null 2>&1 -+which w3m >/dev/null 2>&1 - if [ ${?} -eq "0" ]; then -- USE_DUMP=3 -+ USE_DUMP=4 - else -- which links >/dev/null 2>&1 -+ which elinks >/dev/null 2>&1 - if [ ${?} -eq "0" ]; then -- USE_DUMP=2 -+ USE_DUMP=3 - else -- which lynx >/dev/null 2>&1 -+ which links >/dev/null 2>&1 - if [ ${?} -eq "0" ]; then -- USE_DUMP=1 -- fi -- fi -+ USE_DUMP=2 -+ else -+ which lynx >/dev/null 2>&1 -+ if [ ${?} -eq "0" ]; then -+ USE_DUMP=1 -+ fi -+ fi -+ fi - fi - -+tmpdir=$(mktemp -d ${TMPDIR:-/tmp}/wvText.XXXXXXXX) || { echo "$0: can not create temporary directory" >& 2; exit 1; } -+ - if [ $USE_DUMP -eq "1" ]; then -- echo "Could not find required program 'elinks' or 'links'" -+ echo "Could not find required program 'w3m', 'elinks' or 'links'" - echo "Using lynx. Output will be pretty ugly." - elif [ $USE_DUMP -eq "0" ]; then -- echo "Could not find required program 'elinks', 'links', or even 'lynx'" -+ echo "Could not find required program 'w3m', 'elinks', 'links', or even 'lynx'" - echo "Using wvWare -x wvText.xml. Output will be pretty bad." - fi - -@@ -41,6 +55,7 @@ - which wvHtml >/dev/null 2>&1 - if [ ${?} -ne "0" ]; then - echo "Could not find required program 'wvHtml'" -+ rm -rf "${tmpdir}" - exit 1 - fi - -@@ -51,32 +66,36 @@ - wvHtml -1 "${1}" --targetdir="${tmpdir}" "${TMP_FILE}" >/dev/null 2>&1 - if [ ${?} -ne "0" ]; then - echo "Could not convert into HTML" -+ rm -rf "${tmpdir}" - exit 1 - fi - -- if [ $USE_DUMP -eq "3" ]; then -+ if [ $USE_DUMP -eq "4" ]; then -+ -+ w3m -dump -T text/html "${tmpdir}/${TMP_FILE}" > "$o_file" -+ elif [ $USE_DUMP -eq "3" ]; then - # elinks does the best -- elinks -dump -force-html "${tmpdir}/${TMP_FILE}" > "${2}" -+ elinks -dump -force-html "${tmpdir}/${TMP_FILE}" > "$o_file" - elif [ $USE_DUMP -eq "2" ]; then - # links does a pretty good job -- links -dump "${tmpdir}/${TMP_FILE}" > "${2}" -+ links -dump "${tmpdir}/${TMP_FILE}" > "$o_file" - else - # lynx sucks, but does better than wvText.xml -- TERM=vt100 lynx -dump -force_html "${tmpdir}/${TMP_FILE}" > "${2}" -+ TERM=vt100 lynx -dump -force_html "${tmpdir}/${TMP_FILE}" > "$o_file" - fi; - - if [ ${?} -ne "0" ]; then - echo "Could not convert into Text" -- rm -f "${tmpdir}/${TMP_FILE}" -+ rm -rf "${tmpdir}" - exit 1 - fi - -- # clean up -- rm -f "${tmpdir}/${TMP_FILE}" -- - else - # fall back onto our cruddy output - # this is, admittedly, better than running - # 'strings' on the word document though :) -- wvWare -x ${datadir}/wv/wvText.xml "${1}" > "${2}" -+ wvWare -x ${datadir}/wv/wvText.xml "${1}" > "$o_file" - fi -+ -+# clean up -+rm -rf "${tmpdir}" diff --git a/wv-1.2.2-automake.patch b/wv-1.2.2-automake.patch deleted file mode 100644 index 229897b..0000000 --- a/wv-1.2.2-automake.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- GNUmakefile.am.orig -+++ GNUmakefile.am -@@ -1,3 +1,5 @@ -+AUTOMAKE_OPTIONS=foreign -+ - DIST_SUBDIRS = xml help wingdingfont patterns - - SUBDIRS = xml help wingdingfont patterns . -@@ -8,7 +10,7 @@ - - CFLAGS = @CFLAGS@ @ANSI_CFLAGS@ - --CPPFLAGS = @CPPFLAGS@ @DEPS_CFLAGS@ @OPT_CFLAGS@ -+CPPFLAGS = $(filter-out -I/usr/include,@CPPFLAGS@ @DEPS_CFLAGS@ @OPT_CFLAGS@) - - WVLIBS = @DEPS_LIBS@ @OPT_LIBS@ -lm - diff --git a/wv-1.2.2-fiximplicit.patch b/wv-1.2.2-fiximplicit.patch deleted file mode 100644 index 7345198..0000000 --- a/wv-1.2.2-fiximplicit.patch +++ /dev/null @@ -1,58 +0,0 @@ -Index: wv-1.2.2/decompresswmf.c -=================================================================== ---- wv-1.2.2.orig/decompresswmf.c -+++ wv-1.2.2/decompresswmf.c -@@ -17,6 +17,7 @@ - * 02111-1307, USA. - */ - -+#define _POSIX_SOURCE - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif -Index: wv-1.2.2/wvRTF.c -=================================================================== ---- wv-1.2.2.orig/wvRTF.c -+++ wv-1.2.2/wvRTF.c -@@ -17,6 +17,8 @@ - * 02111-1307, USA. - */ - -+#define _BSD_SOURCE -+#define _POSIX_SOURCE - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif -@@ -192,7 +194,7 @@ output_rtfUserData (rtfUserData * ud) - rtf_output_char ('{'); - - /* font color */ -- rtf_output (rtfColors[ud->cCol]); -+ rtf_output ("%s",rtfColors[ud->cCol]); - - /* font face */ - rtf_output ("\\f%d", ud->cFont); -Index: wv-1.2.2/field.c -=================================================================== ---- wv-1.2.2.orig/field.c -+++ wv-1.2.2/field.c -@@ -17,6 +17,7 @@ - * 02111-1307, USA. - */ - -+#define _BSD_SOURCE - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif -Index: wv-1.2.2/wvConfig.c -=================================================================== ---- wv-1.2.2.orig/wvConfig.c -+++ wv-1.2.2/wvConfig.c -@@ -17,6 +17,7 @@ - * 02111-1307, USA. - */ - -+#define _BSD_SOURCE - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif diff --git a/wv-gsf.patch b/wv-gsf.patch deleted file mode 100644 index 689389b..0000000 --- a/wv-gsf.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: wv-1.2.2/wvSummary.c -=================================================================== ---- wv-1.2.2.orig/wvSummary.c -+++ wv-1.2.2/wvSummary.c -@@ -25,14 +25,7 @@ - #include - #include "wv.h" - --#include --#include --#include --#include --#include --#include --#include --#include -+#include - - #include - #include diff --git a/wv-noansi.patch b/wv-noansi.patch deleted file mode 100644 index 5de44c2..0000000 --- a/wv-noansi.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- wv-1.2.2.orig/configure.ac -+++ wv-1.2.2/configure.ac -@@ -53,9 +53,12 @@ AH_TOP([ - - dnl Checks for programs. - --AC_PROG_CC -+AC_PROG_CC_STDC -+AC_USE_SYSTEM_EXTENSIONS -+AC_SYS_LARGEFILE -+ - if test "x$GCC" = "xyes"; then -- ANSI_CFLAGS="-ansi" -+ ANSI_CFLAGS="" - else - ANSI_CFLAGS="" - fi ---- wv-1.2.2.orig/wvWare.c -+++ wv-1.2.2/wvWare.c -@@ -30,8 +30,6 @@ - #include "wv.h" - #include "getopt.h" - --/* strdup isn't declared in for `gcc -ansi'; declare it here */ --extern char *strdup (const char *); - - extern char *str_copy(char *d, size_t n, char *s); - extern char *str_append(char *d, size_t n, char *s); diff --git a/wv-strcasecmp.patch b/wv-strcasecmp.patch deleted file mode 100644 index 2fe0f2a..0000000 --- a/wv-strcasecmp.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: wv-1.2.2/wvWare.c -=================================================================== ---- wv-1.2.2.orig/wvWare.c -+++ wv-1.2.2/wvWare.c -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - #include - #include "wv.h" - #include "getopt.h" diff --git a/wv.changes b/wv.changes index 9a49256..fd75e2c 100644 --- a/wv.changes +++ b/wv.changes @@ -1,9 +1,15 @@ ------------------------------------------------------------------- -Thu Nov 14 15:16:03 UTC 2024 - Friedrich Haubensak +Thu Nov 14 16:19:42 UTC 2024 - Jan Engelhardt -- add "-Wno-error=implicit-function-declaration" and - "-Wno-error=incompatible-pointer-types" to CFLAGS to prevent - gcc14 build errors +- Delete wv-1.0.3-wvText.patch, wv-1.2.2-automake.patch, + wv-1.2.2-fiximplicit.patch, wv-gsf.patch, wv-noansi.patch, + wv-strcasecmp.patch +- Add patches from Debian: 0014-Add-missing-include.patch, + cross.patch, detect-imagick.patch, hardening-format.patch, + man-refs.patch, man-remove-PU.patch, man-wvrtf-name.patch, + man-wvware-options.patch, man-wvware-typo.patch, + non-latin-latex.patch, wvdvi-output-ext.patch, wvmime.patch, + wvtext-no-graphics.patch, wvware-no-placeholder.patch ------------------------------------------------------------------- Tue Feb 20 15:12:30 UTC 2024 - Dominique Leuenberger diff --git a/wv.spec b/wv.spec index 5d97a8b..c91f537 100644 --- a/wv.spec +++ b/wv.spec @@ -1,7 +1,7 @@ # # spec file for package wv # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,12 +25,20 @@ License: GPL-2.0-or-later Group: Productivity/Publishing/Word URL: http://wvware.sourceforge.net/ Source0: https://www.abisource.com/downloads/%{name}/%{version}/%{name}-%{version}.tar.gz -Patch0: wv-1.2.2-automake.patch -Patch5: wv-1.0.3-wvText.patch -Patch9: wv-1.2.2-fiximplicit.patch -Patch10: wv-strcasecmp.patch -Patch11: wv-gsf.patch -Patch12: wv-noansi.patch +Patch1: detect-imagick.patch +Patch2: man-refs.patch +Patch3: man-wvrtf-name.patch +Patch4: man-wvware-options.patch +Patch5: non-latin-latex.patch +Patch6: wvdvi-output-ext.patch +Patch7: wvmime.patch +Patch8: wvtext-no-graphics.patch +Patch9: wvware-no-placeholder.patch +Patch10: man-wvware-typo.patch +Patch11: hardening-format.patch +Patch12: man-remove-PU.patch +Patch13: cross.patch +Patch14: 0014-Add-missing-include.patch BuildRequires: libexpat-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel @@ -66,21 +74,13 @@ Requires: libwmf-devel Header files for wv. %prep -%setup -q -%patch -P 0 -%patch -P 5 -%patch -P 9 -p1 -%patch -P 10 -p1 -%if 0%{?suse_version} > 1230 -%patch -P 11 -p1 -%endif -%patch -P 12 -p1 +%autosetup -p1 %build +perl -i -lpe 's{AM_INIT_AUTOMAKE.*}{AM_INIT_AUTOMAKE([foreign subdir-objects])}g' configure.ac autoreconf -f -i --verbose %define warn_flags -Wall -Wstrict-prototypes -Wpointer-arith -Wformat -Wformat-security -CFLAGS="%{optflags} %{warn_flags} -fno-strict-aliasing -fstack-protector \ - -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types" \ +CFLAGS="%{optflags} %{warn_flags} -fno-strict-aliasing -fstack-protector" \ %configure \ --with-libwmf \ --with-expat \ @@ -96,8 +96,7 @@ find %{buildroot} -type f -name "*.la" -delete -print %check %make_build check -%post -n %{lname} -p /sbin/ldconfig -%postun -n %{lname} -p /sbin/ldconfig +%ldconfig_scriptlets -n %{lname} %files %license COPYING diff --git a/wvdvi-output-ext.patch b/wvdvi-output-ext.patch new file mode 100644 index 0000000..c96f677 --- /dev/null +++ b/wvdvi-output-ext.patch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## wvdvi-output-ext.dpatch by Matej Vela +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: wvDVI: Avoid `are the same file' error when the output extension +## DP: is `.dvi' (#309524). + +@DPATCH@ +diff -urNad wv-1.2.1~/wvDVI.in wv-1.2.1/wvDVI.in +--- wv-1.2.1~/wvDVI.in 2006-03-18 16:13:32.000000000 +0100 ++++ wv-1.2.1/wvDVI.in 2006-03-18 16:16:15.000000000 +0100 +@@ -299,5 +299,4 @@ + exit 1 + fi + +-cp -f "$name".dvi "$o_file" +-rm -f "$name".dvi ++[ "$name".dvi -ef "$o_file" ] || mv -f "$name".dvi "$o_file" diff --git a/wvmime.patch b/wvmime.patch new file mode 100644 index 0000000..8fb33a1 --- /dev/null +++ b/wvmime.patch @@ -0,0 +1,102 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## wvmime.dpatch by Matej Vela +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: wvMime: +## DP: - If available, use see(1) from mime-support. +## DP: - Look for kghostview. +## DP: - Make the script whitespace-safe. +## DP: - Use wvPS rather than make_epses.sh (now gone). + +@DPATCH@ +diff -urNad wv-1.2.1~/wvMime wv-1.2.1/wvMime +--- wv-1.2.1~/wvMime 2006-03-18 19:16:28.000000000 +0100 ++++ wv-1.2.1/wvMime 2006-03-18 19:18:54.000000000 +0100 +@@ -12,64 +12,37 @@ + exit 1 + fi + +-# viewer application +-GV="" +- +-# check for gnome ghost-view first +-type ggv >/dev/null 2>&1 +-if [ ${?} -eq "0" ]; then +- GV="ggv" +-else +- # TODO: does kde have something? +- +- # try to default back onto gv +- type gv >/dev/null 2>&1 +- if [ ${?} -eq "0" ]; then +- GV="gv" +- else +- # old solaris systems +- type ghostview >/dev/null 2>&1 +- if [ ${?} -eq "0" ]; then +- GV="ghostview" +- else +- # unrecoverable error +- echo "Could not find a suitable PostScript viewer." +- echo "Please install ggv, gv, or ghostview" +- exit 1 +- fi ++if [ -z "$GV" ]; then ++ # determine the viewer application: ++ # - see (let mailcap decide) ++ # - ggv (GNOME Ghostview) ++ # - kghostview (KDE Ghostview) ++ # - gv (Xaw3d Ghostview) ++ # - ghostview (the classic Ghostscript frontend) ++ for GV in see ggv kghostview gv ghostview; do ++ type "$GV" >/dev/null 2>&1 && break ++ done ++ if [ ${?} -ne "0" ]; then ++ # unrecoverable error ++ echo "Could not find a suitable PostScript viewer." ++ echo "Please install ggv, kghostview, gv, or ghostview" ++ exit 1 + fi + fi + +-# temporary PS file, mangled to get some sort +-# of semi-uniqueness +-FILE=`basename ${1}` +-TMPDIR="/tmp/${FILE}-${USER}-${$}" +-TMPPS="$TMPDIR/${FILE}-${USER}-${$}.ps" +- +-mkdir $TMPDIR +- +-# Make sure all graphics go into /tmp as well +-cp ${1} $TMPDIR/$FILE +- +-# Extract graphics +-wvLatex "$TMPDIR/$FILE" "$TMPDIR/$FILE.tex" 2>/dev/null >/dev/null ++# temporary target directory ++t_dir=${TMPDIR:-/tmp}/wvMime-$USER-$$ ++mkdir -m 700 "$t_dir" || exit ++trap 'rm -rf "$t_dir"' 0 1 2 3 15 + +-# Graphics conversion if make_epses.sh installed: +-STEM=$TMPDIR/`basename ${1} .doc` +-type make_epses.sh 2>&1 >/dev/null +- if [ ${?} -eq "0" ]; then +- (cd $TMPDIR; make_epses.sh $STEM) +- fi ++# PS file ++name=`basename "$1" .doc`.ps + +-wvPS $TMPDIR/$FILE ${TMPPS} ++wvPS --targetdir="$t_dir" "$1" "$name" + if [ ${?} -ne "0" ]; then + echo "Could not translate into Postscript" + exit 1 + fi + + # call our ghost-viewer +-${GV} ${TMPPS} +-rm -f ${TMPPS} +- +-cd / +-rm -rf $TMPDIR ++$GV "$t_dir/$name" diff --git a/wvtext-no-graphics.patch b/wvtext-no-graphics.patch new file mode 100644 index 0000000..0b9e05e --- /dev/null +++ b/wvtext-no-graphics.patch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## wvtext-no-graphics.dpatch by Matej Vela +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: wvText.in: Disable graphics output in wvText.xml conversion +## DP: (already disabled in wvHtml conversion). + +@DPATCH@ +diff -urNad wv-1.2.1~/wvText.in wv-1.2.1/wvText.in +--- wv-1.2.1~/wvText.in 2003-11-03 18:03:14.000000000 +0100 ++++ wv-1.2.1/wvText.in 2006-03-18 11:15:17.000000000 +0100 +@@ -78,5 +78,5 @@ + # fall back onto our cruddy output + # this is, admittedly, better than running + # 'strings' on the word document though :) +- wvWare -x ${datadir}/wv/wvText.xml "${1}" > "${2}" ++ wvWare -1 -x ${datadir}/wv/wvText.xml "${1}" > "${2}" + fi diff --git a/wvware-no-placeholder.patch b/wvware-no-placeholder.patch new file mode 100644 index 0000000..56a8448 --- /dev/null +++ b/wvware-no-placeholder.patch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## wvware-no-placeholder.dpatch by Matej Vela +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: wvWare.c (wvStrangeNoGraphicData): Remove dangling reference to +## DP: placeholder.eps (#197979). + +@DPATCH@ +diff -urNad wv-1.2.1~/wvWare.c wv-1.2.1/wvWare.c +--- wv-1.2.1~/wvWare.c 2006-03-17 22:33:32.000000000 +0100 ++++ wv-1.2.1/wvWare.c 2006-03-18 12:11:04.000000000 +0100 +@@ -666,8 +666,7 @@ + if ((strstr (config, "wvLaTeX.xml") != NULL) + || (strstr (config, "wvCleanLaTeX.xml") != NULL)) + printf +- ("\n\\resizebox*{\\baselineskip}{!}{\\includegraphics{placeholder.eps}}\ +- \n-- %#.2x graphic: StrangeNoGraphicData --", ++ ("\n-- %#.2x graphic: StrangeNoGraphicData --", + graphicstype); + else + printf ("\"%#.2x", graphicstype,