From 8144cb92504d26bd655d0ef663ebb076aa79dfaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Apestegu=C3=ADa?= Date: Fri, 21 Aug 2020 10:49:35 +0000 Subject: [PATCH] textproc/xlhtml: Fix build with '-fno-common' Fix build with '-fno-common', default of GCC 10 and Clang 11 While here, pet linters. PR: 248774 Submitted by: yasu@utahime.org --- textproc/xlhtml/Makefile | 11 ++++++----- textproc/xlhtml/files/patch-xlhtml_ascii.c | 15 +++++++++++++++ textproc/xlhtml/files/patch-xlhtml_html.c | 13 +++++++++++++ textproc/xlhtml/files/patch-xlhtml_xml.c | 11 +++++++++++ 4 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 textproc/xlhtml/files/patch-xlhtml_ascii.c create mode 100644 textproc/xlhtml/files/patch-xlhtml_html.c create mode 100644 textproc/xlhtml/files/patch-xlhtml_xml.c diff --git a/textproc/xlhtml/Makefile b/textproc/xlhtml/Makefile index d7c7ea97da79..7cce6725afe6 100644 --- a/textproc/xlhtml/Makefile +++ b/textproc/xlhtml/Makefile @@ -14,11 +14,16 @@ COMMENT= Convert Excel and PowerPoint files to HTML and text LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -GNU_CONFIGURE= yes USES= autoreconf gmake tar:tgz +GNU_CONFIGURE= yes + OPTIONS_DEFINE= DOCS +post-build: + @${STRIP_CMD} ${WRKSRC}/xlhtml/xlhtml + @${STRIP_CMD} ${WRKSRC}/ppthtml/ppthtml + post-install-DOCS-on: .for dir in xlhtml ppthtml @${MKDIR} ${STAGEDIR}${DOCSDIR}/${dir} @@ -27,8 +32,4 @@ post-install-DOCS-on: ${STAGEDIR}${DOCSDIR}/${dir} .endfor -post-build: - @${STRIP_CMD} ${WRKSRC}/xlhtml/xlhtml - @${STRIP_CMD} ${WRKSRC}/ppthtml/ppthtml - .include diff --git a/textproc/xlhtml/files/patch-xlhtml_ascii.c b/textproc/xlhtml/files/patch-xlhtml_ascii.c new file mode 100644 index 000000000000..f32e27a44c2c --- /dev/null +++ b/textproc/xlhtml/files/patch-xlhtml_ascii.c @@ -0,0 +1,15 @@ +--- xlhtml/ascii.c.orig 2002-04-11 03:25:17 UTC ++++ xlhtml/ascii.c +@@ -48,9 +48,9 @@ extern void output_cell( cell *, int); + extern uni_string author; + extern int null_string(U8 *); + extern int Csv; +-work_sheet **ws_array; +-font_attr **font_array; +-xf_attr **xf_array; ++extern work_sheet **ws_array; ++extern font_attr **font_array; ++extern xf_attr **xf_array; + + extern int IsCellNumeric(cell *); + extern int IsCellSafe(cell *); diff --git a/textproc/xlhtml/files/patch-xlhtml_html.c b/textproc/xlhtml/files/patch-xlhtml_html.c new file mode 100644 index 000000000000..87cb76a0a00c --- /dev/null +++ b/textproc/xlhtml/files/patch-xlhtml_html.c @@ -0,0 +1,13 @@ +--- xlhtml/html.c.orig 2002-04-11 04:01:05 UTC ++++ xlhtml/html.c +@@ -47,8 +47,8 @@ extern void output_cell( cell *, int); + extern uni_string author; + extern int null_string(U8 *); + extern unsigned int next_font; +-work_sheet **ws_array; +-font_attr **font_array; ++extern work_sheet **ws_array; ++extern font_attr **font_array; + + void output_header(void); + void output_footer(void); diff --git a/textproc/xlhtml/files/patch-xlhtml_xml.c b/textproc/xlhtml/files/patch-xlhtml_xml.c new file mode 100644 index 000000000000..b2f3db90096c --- /dev/null +++ b/textproc/xlhtml/files/patch-xlhtml_xml.c @@ -0,0 +1,11 @@ +--- xlhtml/xml.c.orig 2002-04-11 03:25:17 UTC ++++ xlhtml/xml.c +@@ -33,7 +33,7 @@ extern void update_default_alignment(unsigned int, int + extern void output_cell( cell *, int); + extern uni_string author; + +-work_sheet **ws_array; ++extern work_sheet **ws_array; + + + void OutputTableXML(void)