mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 22:16:58 +02:00
app-text/xmlto: Sync with Gentoo
It's from Gentoo commit 6545573120c2238469c76b383358f507bfab6e58.
This commit is contained in:
parent
ce2234d4bc
commit
ec301fa581
116
sdk_container/src/third_party/portage-stable/app-text/xmlto/files/xmlto-0.0.28-fix-warnings.patch
vendored
Normal file
116
sdk_container/src/third_party/portage-stable/app-text/xmlto/files/xmlto-0.0.28-fix-warnings.patch
vendored
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
https://bugs.gentoo.org/869080
|
||||||
|
|
||||||
|
https://pagure.io/xmlto/c/1375e2df75530cd198bd16ac3de38e2b0d126276?branch=master
|
||||||
|
https://pagure.io/xmlto/c/412f97cdc00d2bbf7e8121012b49fc07b3fe3d2b?branch=master
|
||||||
|
https://pagure.io/xmlto/c/8e34f087bf410bcc5fe445933d6ad9bae54f24b5?branch=master
|
||||||
|
https://pagure.io/xmlto/c/6fa6a0e07644f20abf2596f78a60112713e11cbe?branch=master
|
||||||
|
|
||||||
|
From 1375e2df75530cd198bd16ac3de38e2b0d126276 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Kuehne <thomas@kuehne.cn>
|
||||||
|
Date: Dec 11 2021 20:45:45 +0000
|
||||||
|
Subject: fix -Wimplicit-int for ifsense
|
||||||
|
|
||||||
|
|
||||||
|
fixes:
|
||||||
|
xmlif/xmlif.l:46:8: warning: type defaults to ‘int’ in declaration of ‘ifsense’ [-Wimplicit-int]
|
||||||
|
46 | static ifsense; /* sense of last `if' or unless seen */
|
||||||
|
| ^~~~~~~
|
||||||
|
|
||||||
|
Signed-off-by: Thomas Kuehne <thomas@kuehne.cn>
|
||||||
|
|
||||||
|
--- a/xmlif/xmlif.l
|
||||||
|
+++ b/xmlif/xmlif.l
|
||||||
|
@@ -43,7 +43,7 @@
|
||||||
|
|
||||||
|
static char **selections; /* selection tokens */
|
||||||
|
static int nselections; /* number of selections */
|
||||||
|
-static ifsense; /* sense of last `if' or unless seen */
|
||||||
|
+static int ifsense; /* sense of last `if' or unless seen */
|
||||||
|
static char *attribute; /* last attribute scanned */
|
||||||
|
|
||||||
|
struct stack_t {
|
||||||
|
|
||||||
|
|
||||||
|
From 412f97cdc00d2bbf7e8121012b49fc07b3fe3d2b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Kuehne <thomas@kuehne.cn>
|
||||||
|
Date: Dec 11 2021 20:45:59 +0000
|
||||||
|
Subject: fix extra ‘;’ outside of a function
|
||||||
|
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
xmlif/xmlif.l:240:24: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
|
||||||
|
240 | int yywrap() {exit(0);};
|
||||||
|
| ^
|
||||||
|
|
||||||
|
Signed-off-by: Thomas Kuehne <thomas@kuehne.cn>
|
||||||
|
|
||||||
|
--- a/xmlif/xmlif.l
|
||||||
|
+++ b/xmlif/xmlif.l
|
||||||
|
@@ -237,7 +237,7 @@ WS [ \t\n]*
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
-int yywrap() {exit(0);};
|
||||||
|
+int yywrap() {exit(0);}
|
||||||
|
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
From 8e34f087bf410bcc5fe445933d6ad9bae54f24b5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Kuehne <thomas@kuehne.cn>
|
||||||
|
Date: Dec 11 2021 20:56:00 +0000
|
||||||
|
Subject: Fix return type of main function
|
||||||
|
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
xmlif/xmlif.l:242:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
|
||||||
|
242 | main(int argc, char *argv[])
|
||||||
|
| ^~~~
|
||||||
|
|
||||||
|
Signed-off-by: Thomas Kuehne <thomas@kuehne.cn>
|
||||||
|
|
||||||
|
--- a/xmlif/xmlif.l
|
||||||
|
+++ b/xmlif/xmlif.l
|
||||||
|
@@ -239,7 +239,7 @@ WS [ \t\n]*
|
||||||
|
|
||||||
|
int yywrap() {exit(0);}
|
||||||
|
|
||||||
|
-main(int argc, char *argv[])
|
||||||
|
+int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
@@ -265,7 +265,7 @@ main(int argc, char *argv[])
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
- yylex();
|
||||||
|
+ return yylex();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
From 6fa6a0e07644f20abf2596f78a60112713e11cbe Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Kuehne <thomas@kuehne.cn>
|
||||||
|
Date: Dec 11 2021 21:03:42 +0000
|
||||||
|
Subject: add strings.h import
|
||||||
|
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
xmlif/xmlif.l:162:13: warning: implicit declaration of function ‘strncasecmp’; did you mean ‘strncmp’? [-Wimplicit-function-declaration]
|
||||||
|
162 | if (strncasecmp(selections[i], attr, eqoffset) == 0)
|
||||||
|
| ^~~~~~~~~~~
|
||||||
|
|
||||||
|
Signed-off-by: Thomas Kuehne <thomas@kuehne.cn>
|
||||||
|
|
||||||
|
--- a/xmlif/xmlif.l
|
||||||
|
+++ b/xmlif/xmlif.l
|
||||||
|
@@ -37,6 +37,7 @@
|
||||||
|
*/
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
+#include <strings.h>
|
||||||
|
|
||||||
|
#define TRUE 1
|
||||||
|
#define FALSE 0
|
@ -1,7 +1,7 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
# Copyright 1999-2023 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=7
|
EAPI=8
|
||||||
|
|
||||||
inherit autotools
|
inherit autotools
|
||||||
|
|
||||||
@ -9,12 +9,13 @@ DESCRIPTION="Script for converting XML and DocBook documents to a variety of out
|
|||||||
HOMEPAGE="https://pagure.io/xmlto"
|
HOMEPAGE="https://pagure.io/xmlto"
|
||||||
SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.bz2"
|
SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.bz2"
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
LICENSE="GPL-2+"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||||
IUSE="latex text"
|
IUSE="latex text"
|
||||||
|
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
|
app-shells/bash:0
|
||||||
app-text/docbook-xsl-stylesheets
|
app-text/docbook-xsl-stylesheets
|
||||||
app-text/docbook-xml-dtd:4.2
|
app-text/docbook-xml-dtd:4.2
|
||||||
dev-libs/libxslt
|
dev-libs/libxslt
|
||||||
@ -22,14 +23,18 @@ RDEPEND="
|
|||||||
text? ( || ( virtual/w3m www-client/elinks www-client/links www-client/lynx ) )
|
text? ( || ( virtual/w3m www-client/elinks www-client/links www-client/lynx ) )
|
||||||
latex? ( dev-texlive/texlive-formatsextra )
|
latex? ( dev-texlive/texlive-formatsextra )
|
||||||
"
|
"
|
||||||
# We only depend on flex when we patch the input lexer.
|
|
||||||
DEPEND="${RDEPEND}"
|
DEPEND="${RDEPEND}"
|
||||||
|
# We only depend on lex when we patch the input lexer.
|
||||||
|
# We touch it in fix-warnings.patch.
|
||||||
|
BDEPEND="app-alternatives/lex"
|
||||||
|
|
||||||
DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS )
|
DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS )
|
||||||
|
|
||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/${PN}-0.0.22-format_fo_passivetex_check.patch
|
"${FILESDIR}"/${PN}-0.0.22-format_fo_passivetex_check.patch
|
||||||
"${FILESDIR}"/${PN}-0.0.28-allow-links.patch
|
"${FILESDIR}"/${PN}-0.0.28-allow-links.patch
|
||||||
|
"${FILESDIR}"/${P}-dont-hardcode-paths.patch
|
||||||
|
"${FILESDIR}"/${P}-fix-warnings.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
@ -44,9 +49,12 @@ src_prepare() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
# We don't want the script to detect /bin/sh if it is bash.
|
|
||||||
export ac_cv_path_BASH="${BASH}"
|
|
||||||
has_version sys-apps/util-linux || export GETOPT=getopt-long
|
has_version sys-apps/util-linux || export GETOPT=getopt-long
|
||||||
|
|
||||||
econf
|
local args=(
|
||||||
|
# Ensure we always get a #!/bin/bash shebang in xmlto, bug 912286
|
||||||
|
BASH="${EPREFIX}/bin/bash"
|
||||||
|
)
|
||||||
|
|
||||||
|
econf "${args[@]}"
|
||||||
}
|
}
|
@ -1,53 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
inherit autotools
|
|
||||||
|
|
||||||
DESCRIPTION="Script for converting XML and DocBook documents to a variety of output formats"
|
|
||||||
HOMEPAGE="https://pagure.io/xmlto"
|
|
||||||
SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE="latex text"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
app-text/docbook-xsl-stylesheets
|
|
||||||
app-text/docbook-xml-dtd:4.2
|
|
||||||
dev-libs/libxslt
|
|
||||||
|| ( sys-apps/util-linux app-misc/getopt )
|
|
||||||
text? ( || ( virtual/w3m www-client/elinks www-client/links www-client/lynx ) )
|
|
||||||
latex? ( dev-texlive/texlive-formatsextra )
|
|
||||||
"
|
|
||||||
# We only depend on flex when we patch the input lexer.
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
|
|
||||||
DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS )
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-0.0.22-format_fo_passivetex_check.patch
|
|
||||||
"${FILESDIR}"/${PN}-0.0.28-allow-links.patch
|
|
||||||
"${FILESDIR}"/${PN}-0.0.28-dont-hardcode-paths.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# fix symbol clash on Solaris
|
|
||||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
|
||||||
sed -i -e 's/\(attrib\|val\)/XMLTO\1/g' xmlif/xmlif.l || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
eautoreconf
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
# We don't want the script to detect /bin/sh if it is bash.
|
|
||||||
export ac_cv_path_BASH="${BASH}"
|
|
||||||
has_version sys-apps/util-linux || export GETOPT=getopt-long
|
|
||||||
|
|
||||||
econf
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user