Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/xml2doc/, app-text/xml2doc/files/
Date: Tue, 21 Jan 2020 21:51:33
Message-Id: 1579643460.c447ada00e666dae75b0730511ccf3741b2230c9.soap@gentoo
1 commit: c447ada00e666dae75b0730511ccf3741b2230c9
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 21 21:51:00 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 21 21:51:00 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c447ada0
7
8 app-text/xml2doc: Port to EAPI 7
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: David Seifert <soap <AT> gentoo.org>
12
13 .../xml2doc/files/xml2doc-20030510-makefile.patch | 100 +++++++++++++++++++++
14 app-text/xml2doc/xml2doc-20030510-r1.ebuild | 39 +++-----
15 2 files changed, 114 insertions(+), 25 deletions(-)
16
17 diff --git a/app-text/xml2doc/files/xml2doc-20030510-makefile.patch b/app-text/xml2doc/files/xml2doc-20030510-makefile.patch
18 new file mode 100644
19 index 00000000000..1023352d0a7
20 --- /dev/null
21 +++ b/app-text/xml2doc/files/xml2doc-20030510-makefile.patch
22 @@ -0,0 +1,100 @@
23 +--- a/src/Makefile.in
24 ++++ b/src/Makefile.in
25 +@@ -9,19 +9,16 @@
26 + DEBUG=@DEBUG@
27 + PREFIX=@PREFIX@
28 +
29 +-CC=gcc
30 + OBJ=main.o defs.o parse.o parse_include.o parse_info.o parse_img.o parse_t.o parse_page.o parse_default.o parse_bookmark.o parse_add.o parse_list.o parse_sep.o output_t.o output_doc.o output_img.o output_info.o output_page.o output_sep.o output_list.o parm.o
31 + IPATH=-I/usr/pkg/include/libxml2 -I/usr/include/libxml2 -I. -I/usr/pkg/include -I/usr/local/include
32 + LPATH=-L/usr/pkg/lib -L/usr/local/lib
33 + CFLAGS+=-Wall -c $(IPATH) $(I_PDF)\
34 + -DVERSION=\"$(VERSION)\" $(DEBUG)\
35 +- -fno-asm -funroll-all-loops -fstrength-reduce -frerun-loop-opt \
36 + -x c -fshort-enums
37 + LFLAGS=-lxml2 $(L_PDF) $(LPATH)
38 + BIN=xml2doc
39 +
40 +-all:
41 +- @printf "\e[32mUse make in the parent directory :)\e[0m\n"
42 ++all: build
43 +
44 + install: build
45 + @printf "\e[32mInstalling binaries...\e[0m\n"
46 +@@ -34,75 +31,49 @@
47 +
48 + build: $(OBJ)
49 + @printf "\n\e[32mLinking objects...\e[0m\n"
50 +- $(CC) $(LFLAGS) $(OBJ) -o $(BIN)
51 +- @if ( test -z "$(DEBUG)" ); then \
52 +- echo "Stripping symbols..."; \
53 +- strip -s $(BIN); \
54 +- fi
55 +- @printf "\n\n\e[32mCompilation process done.\e[0m\n"
56 ++ $(CC) $(LDFLAGS) $(L_PDF) $^ -lxml2 -o $(BIN)
57 +
58 + main.o: main.c main.h
59 +- $(CC) $(CFLAGS) main.c
60 +
61 + parm.o: parm.c parm.h
62 +- $(CC) $(CFLAGS) parm.c
63 +
64 + output_doc.o: output_doc.c output.h
65 +- $(CC) $(CFLAGS) output_doc.c
66 +
67 + output_img.o: output_img.c output.h
68 +- $(CC) $(CFLAGS) output_img.c
69 +
70 + output_info.o: output_info.c output.h
71 +- $(CC) $(CFLAGS) output_info.c
72 +
73 + output_page.o: output_page.c output.h
74 +- $(CC) $(CFLAGS) output_page.c
75 +
76 + output_sep.o: output_sep.c output.h
77 +- $(CC) $(CFLAGS) output_sep.c
78 +
79 + output_list.o: output_list.c output.h
80 +- $(CC) $(CFLAGS) output_list.c
81 +
82 + output_t.o: output_t.c output.h
83 +- $(CC) $(CFLAGS) output_t.c
84 +
85 + parse_add.o: parse_add.c defs.h
86 +- $(CC) $(CFLAGS) parse_add.c
87 +
88 + parse_sep.o: parse_sep.c defs.h
89 +- $(CC) $(CFLAGS) parse_sep.c
90 +
91 + defs.o: defs.c defs.h
92 +- $(CC) $(CFLAGS) defs.c
93 +
94 + parse.o: parse.c defs.h
95 +- $(CC) $(CFLAGS) parse.c
96 +
97 + parse_include.o: parse_include.c defs.h
98 +- $(CC) $(CFLAGS) parse_include.c
99 +
100 + parse_info.o: parse_info.c defs.h
101 +- $(CC) $(CFLAGS) parse_info.c
102 +
103 + parse_img.o: parse_img.c defs.h
104 +- $(CC) $(CFLAGS) parse_img.c
105 +
106 + parse_t.o: parse_t.c defs.h
107 +- $(CC) $(CFLAGS) parse_t.c
108 +
109 + parse_page.o: parse_page.c defs.h
110 +- $(CC) $(CFLAGS) parse_page.c
111 +
112 + parse_default.o: parse_default.c defs.h
113 +- $(CC) $(CFLAGS) parse_default.c
114 +
115 + parse_bookmark.o: parse_bookmark.c defs.h
116 +- $(CC) $(CFLAGS) parse_bookmark.c
117 +
118 + parse_list.o: parse_list.c defs.h
119 +- $(CC) $(CFLAGS) parse_list.c
120 +
121 + clean:
122 + rm -rf $(OBJ) $(BIN) *.o a.out *~ DEADJOE .*.swp *.txt *.pdf *.html *.xml
123
124 diff --git a/app-text/xml2doc/xml2doc-20030510-r1.ebuild b/app-text/xml2doc/xml2doc-20030510-r1.ebuild
125 index 481bd3d247e..3c962351552 100644
126 --- a/app-text/xml2doc/xml2doc-20030510-r1.ebuild
127 +++ b/app-text/xml2doc/xml2doc-20030510-r1.ebuild
128 @@ -1,59 +1,48 @@
129 -# Copyright 1999-2012 Gentoo Foundation
130 +# Copyright 1999-2020 Gentoo Authors
131 # Distributed under the terms of the GNU General Public License v2
132
133 -EAPI=4
134 +EAPI=7
135
136 -inherit eutils toolchain-funcs
137 +inherit toolchain-funcs
138
139 DESCRIPTION="Tool to convert simple XML to a variety of formats (pdf, html, txt, manpage)"
140 -
141 HOMEPAGE="http://xml2doc.sourceforge.net"
142 SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
143
144 LICENSE="GPL-2"
145 -IUSE=""
146 SLOT="0"
147 -
148 KEYWORDS="alpha amd64 ~hppa ia64 ~mips ppc ppc64 sparc x86"
149
150 -DEPEND=">=dev-libs/libxml2-2.5"
151 +DEPEND="dev-libs/libxml2:2"
152 RDEPEND="${DEPEND}"
153
154 -S=${WORKDIR}/${PN}
155 -
156 -src_prepare() {
157 - # Fix pointer-related bug detected by a QA notice.
158 - epatch "${FILESDIR}/${PN}-pointer_fix.patch"
159 +S="${WORKDIR}/${PN}"
160
161 +PATCHES=(
162 + # Fix pointer-related bug detected by a QA notice
163 + "${FILESDIR}"/${PN}-pointer_fix.patch
164 # Don't strip symbols from binary (bug #152266)
165 - sed -i -e '/^\s*strip/d' \
166 - -e 's/^\t$(CC) $(LFLAGS).*/\t$(LINK.o) $(L_PDF) $^ -lxml2 -o $(BIN)/' \
167 - -e '/^\t$(CC) $(CFLAGS) /d' \
168 - src/Makefile.in
169 -}
170 + "${FILESDIR}"/${P}-makefile.patch
171 +)
172
173 src_configure() {
174 + tc-export CC
175 econf --disable-pdf
176 }
177
178 src_compile() {
179 - emake CC="$(tc-getCC)"
180 + default
181
182 - cd "${S}/doc"
183 + cd doc || die
184 "${S}"/src/xml2doc -oM manpage.xml xml2doc.1 || die
185 }
186
187 src_install() {
188 - # xml2doc's make install is unfortunately broken
189 -
190 - # binary
191 dobin src/xml2doc
192
193 - # documentation
194 - dodoc BUGS README TODO
195 + einstalldocs
196 docinto examples
197 dodoc examples/*.{xml,png}
198
199 - # manpage
200 doman doc/xml2doc.1
201 }