Skip to content

Commit ec301fa

Browse files
committed
app-text/xmlto: Sync with Gentoo
It's from Gentoo commit 6545573120c2238469c76b383358f507bfab6e58.
1 parent ce2234d commit ec301fa

File tree

3 files changed

+132
-61
lines changed

3 files changed

+132
-61
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
https://bugs.gentoo.org/869080
2+
3+
https://pagure.io/xmlto/c/1375e2df75530cd198bd16ac3de38e2b0d126276?branch=master
4+
https://pagure.io/xmlto/c/412f97cdc00d2bbf7e8121012b49fc07b3fe3d2b?branch=master
5+
https://pagure.io/xmlto/c/8e34f087bf410bcc5fe445933d6ad9bae54f24b5?branch=master
6+
https://pagure.io/xmlto/c/6fa6a0e07644f20abf2596f78a60112713e11cbe?branch=master
7+
8+
From 1375e2df75530cd198bd16ac3de38e2b0d126276 Mon Sep 17 00:00:00 2001
9+
From: Thomas Kuehne <thomas@kuehne.cn>
10+
Date: Dec 11 2021 20:45:45 +0000
11+
Subject: fix -Wimplicit-int for ifsense
12+
13+
14+
fixes:
15+
xmlif/xmlif.l:46:8: warning: type defaults to ‘int’ in declaration of ‘ifsense’ [-Wimplicit-int]
16+
46 | static ifsense; /* sense of last `if' or unless seen */
17+
| ^~~~~~~
18+
19+
Signed-off-by: Thomas Kuehne <thomas@kuehne.cn>
20+
21+
--- a/xmlif/xmlif.l
22+
+++ b/xmlif/xmlif.l
23+
@@ -43,7 +43,7 @@
24+
25+
static char **selections; /* selection tokens */
26+
static int nselections; /* number of selections */
27+
-static ifsense; /* sense of last `if' or unless seen */
28+
+static int ifsense; /* sense of last `if' or unless seen */
29+
static char *attribute; /* last attribute scanned */
30+
31+
struct stack_t {
32+
33+
34+
From 412f97cdc00d2bbf7e8121012b49fc07b3fe3d2b Mon Sep 17 00:00:00 2001
35+
From: Thomas Kuehne <thomas@kuehne.cn>
36+
Date: Dec 11 2021 20:45:59 +0000
37+
Subject: fix extra ‘;’ outside of a function
38+
39+
40+
Fixes:
41+
xmlif/xmlif.l:240:24: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
42+
240 | int yywrap() {exit(0);};
43+
| ^
44+
45+
Signed-off-by: Thomas Kuehne <thomas@kuehne.cn>
46+
47+
--- a/xmlif/xmlif.l
48+
+++ b/xmlif/xmlif.l
49+
@@ -237,7 +237,7 @@ WS [ \t\n]*
50+
51+
#include "config.h"
52+
53+
-int yywrap() {exit(0);};
54+
+int yywrap() {exit(0);}
55+
56+
main(int argc, char *argv[])
57+
{
58+
59+
60+
From 8e34f087bf410bcc5fe445933d6ad9bae54f24b5 Mon Sep 17 00:00:00 2001
61+
From: Thomas Kuehne <thomas@kuehne.cn>
62+
Date: Dec 11 2021 20:56:00 +0000
63+
Subject: Fix return type of main function
64+
65+
66+
Fixes:
67+
xmlif/xmlif.l:242:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
68+
242 | main(int argc, char *argv[])
69+
| ^~~~
70+
71+
Signed-off-by: Thomas Kuehne <thomas@kuehne.cn>
72+
73+
--- a/xmlif/xmlif.l
74+
+++ b/xmlif/xmlif.l
75+
@@ -239,7 +239,7 @@ WS [ \t\n]*
76+
77+
int yywrap() {exit(0);}
78+
79+
-main(int argc, char *argv[])
80+
+int main(int argc, char *argv[])
81+
{
82+
int i;
83+
84+
@@ -265,7 +265,7 @@ main(int argc, char *argv[])
85+
exit(1);
86+
}
87+
88+
- yylex();
89+
+ return yylex();
90+
}
91+
92+
/*
93+
94+
From 6fa6a0e07644f20abf2596f78a60112713e11cbe Mon Sep 17 00:00:00 2001
95+
From: Thomas Kuehne <thomas@kuehne.cn>
96+
Date: Dec 11 2021 21:03:42 +0000
97+
Subject: add strings.h import
98+
99+
100+
Fixes:
101+
xmlif/xmlif.l:162:13: warning: implicit declaration of function ‘strncasecmp’; did you mean ‘strncmp’? [-Wimplicit-function-declaration]
102+
162 | if (strncasecmp(selections[i], attr, eqoffset) == 0)
103+
| ^~~~~~~~~~~
104+
105+
Signed-off-by: Thomas Kuehne <thomas@kuehne.cn>
106+
107+
--- a/xmlif/xmlif.l
108+
+++ b/xmlif/xmlif.l
109+
@@ -37,6 +37,7 @@
110+
*/
111+
#include <string.h>
112+
#include <stdlib.h>
113+
+#include <strings.h>
114+
115+
#define TRUE 1
116+
#define FALSE 0
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
1-
# Copyright 1999-2021 Gentoo Authors
1+
# Copyright 1999-2023 Gentoo Authors
22
# Distributed under the terms of the GNU General Public License v2
33

4-
EAPI=7
4+
EAPI=8
55

66
inherit autotools
77

88
DESCRIPTION="Script for converting XML and DocBook documents to a variety of output formats"
99
HOMEPAGE="https://pagure.io/xmlto"
1010
SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.bz2"
1111

12-
LICENSE="GPL-2"
12+
LICENSE="GPL-2+"
1313
SLOT="0"
14-
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"
14+
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"
1515
IUSE="latex text"
1616

1717
RDEPEND="
18+
app-shells/bash:0
1819
app-text/docbook-xsl-stylesheets
1920
app-text/docbook-xml-dtd:4.2
2021
dev-libs/libxslt
2122
|| ( sys-apps/util-linux app-misc/getopt )
2223
text? ( || ( virtual/w3m www-client/elinks www-client/links www-client/lynx ) )
2324
latex? ( dev-texlive/texlive-formatsextra )
2425
"
25-
# We only depend on flex when we patch the input lexer.
2626
DEPEND="${RDEPEND}"
27+
# We only depend on lex when we patch the input lexer.
28+
# We touch it in fix-warnings.patch.
29+
BDEPEND="app-alternatives/lex"
2730

2831
DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS )
2932

3033
PATCHES=(
3134
"${FILESDIR}"/${PN}-0.0.22-format_fo_passivetex_check.patch
3235
"${FILESDIR}"/${PN}-0.0.28-allow-links.patch
36+
"${FILESDIR}"/${P}-dont-hardcode-paths.patch
37+
"${FILESDIR}"/${P}-fix-warnings.patch
3338
)
3439

3540
src_prepare() {
@@ -44,9 +49,12 @@ src_prepare() {
4449
}
4550

4651
src_configure() {
47-
# We don't want the script to detect /bin/sh if it is bash.
48-
export ac_cv_path_BASH="${BASH}"
4952
has_version sys-apps/util-linux || export GETOPT=getopt-long
5053

51-
econf
54+
local args=(
55+
# Ensure we always get a #!/bin/bash shebang in xmlto, bug 912286
56+
BASH="${EPREFIX}/bin/bash"
57+
)
58+
59+
econf "${args[@]}"
5260
}

sdk_container/src/third_party/portage-stable/app-text/xmlto/xmlto-0.0.28-r8.ebuild

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)