Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/antlr-cpp/, dev-cpp/antlr-cpp/files/
Date: Mon, 02 Jan 2023 14:53:00
Message-Id: 1672671164.4c36d3a0bddc15e3714070f8b7ecbe612412bf35.soap@gentoo
1 commit: 4c36d3a0bddc15e3714070f8b7ecbe612412bf35
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 14:52:44 2023 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 14:52:44 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c36d3a0
7
8 dev-cpp/antlr-cpp: update EAPI 6 -> 8
9
10 Closes: https://bugs.gentoo.org/735708
11 Closes: https://bugs.gentoo.org/842075
12 Closes: https://bugs.gentoo.org/843170
13 Closes: https://bugs.gentoo.org/866278
14 Signed-off-by: David Seifert <soap <AT> gentoo.org>
15
16 dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild | 105 -----------------
17 dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r2.ebuild | 82 +++++++++++++
18 dev-cpp/antlr-cpp/files/2.7.7-autotools.patch | 159 ++++++++++++++++++++++++++
19 dev-cpp/antlr-cpp/files/2.7.7-libtool.patch | 21 ----
20 4 files changed, 241 insertions(+), 126 deletions(-)
21
22 diff --git a/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild b/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild
23 deleted file mode 100644
24 index c6fa2c9550b5..000000000000
25 --- a/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild
26 +++ /dev/null
27 @@ -1,105 +0,0 @@
28 -# Copyright 1999-2019 Gentoo Authors
29 -# Distributed under the terms of the GNU General Public License v2
30 -
31 -EAPI=6
32 -
33 -# Upstream only installs a static library. The original antlr ebuild
34 -# built a shared library manually, which isn't so great either. This
35 -# ebuild applies libtool instead and therefore an autoreconf is
36 -# required. A couple of errors concerning tr have been seen but the
37 -# final result still looks good. This also sidesteps bug #554344 plus
38 -# the need to call einstall.
39 -
40 -inherit autotools multilib-minimal
41 -
42 -MY_P="${PN%-cpp}-${PV}"
43 -DESCRIPTION="The ANTLR 2 C++ Runtime"
44 -HOMEPAGE="https://www.antlr2.org/"
45 -SRC_URI="https://www.antlr2.org/download/${MY_P}.tar.gz"
46 -LICENSE="public-domain"
47 -SLOT="2"
48 -KEYWORDS="amd64 ~arm ppc x86"
49 -IUSE="doc examples static-libs"
50 -RESTRICT="test" # No tests but test target blows up!
51 -
52 -DEPEND="doc? ( app-doc/doxygen )"
53 -RDEPEND="!dev-java/antlr:0[cxx]"
54 -
55 -S="${WORKDIR}/${MY_P}"
56 -ECONF_SOURCE="${S}"
57 -PATCHES=( "${FILESDIR}"/${PV}-{gcc,libtool}.patch )
58 -DOCS=( lib/cpp/AUTHORS lib/cpp/ChangeLog lib/cpp/README lib/cpp/TODO )
59 -
60 -src_prepare() {
61 - # Turn Makefile.in files into libtool-style Makefile.am
62 - # files. Countable.hpp is actually missing.
63 - local HPP=$(grep -E -o "\w+\.hpp" lib/cpp/antlr/Makefile.in | grep -v "Countable\.hpp" | tr "\n" " " || die)
64 - local CPP=$(grep -E -o "\w+\.cpp" lib/cpp/src/Makefile.in | tr "\n" " " || die)
65 -
66 - cat <<EOF > lib/cpp/antlr/Makefile.am || die
67 -antlr_includedir = \$(includedir)/antlr
68 -antlr_include_HEADERS = ${HPP}
69 -EOF
70 -
71 - cat <<EOF > lib/cpp/src/Makefile.am || die
72 -AM_CPPFLAGS = -I\$(abs_top_srcdir)/lib/cpp
73 -lib_LTLIBRARIES = libantlr.la
74 -libantlr_la_LDFLAGS = -version-info 2
75 -libantlr_la_SOURCES = ${CPP}
76 -EOF
77 -
78 - default
79 -
80 - mv -v configure.in configure.ac || die
81 - mv -v aclocal.m4 acinclude.m4 || die
82 -
83 - # These silly test -z lines break badly under recent autoconfs.
84 - sed -i '/AC_PATH_PROG/s/test -z "\$[^"]*" *&& *//' configure.ac || die
85 -
86 - # Delete build files from examples.
87 - find examples -name Makefile.in -delete || die
88 -
89 - # Fix make invocations. See bug #256880.
90 - find -name "*.in" -exec sed -i 's/@MAKE@/$(MAKE)/g' {} + || die
91 -
92 - eautoreconf
93 -}
94 -
95 -multilib_src_configure() {
96 - CONFIG_SHELL="${BASH}" econf \
97 - --disable-csharp \
98 - --enable-cxx \
99 - --disable-examples \
100 - --disable-java \
101 - --disable-python \
102 - --enable-shared \
103 - --enable-verbose \
104 - $(use_enable static-libs static)
105 -}
106 -
107 -src_compile() {
108 - multilib-minimal_src_compile
109 -
110 - if use doc; then
111 - cd "${S}/lib/cpp" || die
112 - doxygen -u doxygen.cfg || die
113 - doxygen doxygen.cfg || die
114 - fi
115 -}
116 -
117 -multilib_src_install() {
118 - # We only care about the C++ stuff.
119 - emake -C lib/cpp install DESTDIR="${D}"
120 -}
121 -
122 -src_install() {
123 - multilib-minimal_src_install
124 -
125 - cd "${S}" || die
126 - use doc && dohtml -r lib/cpp/gen_doc/html/
127 -
128 - if use examples; then
129 - docinto examples
130 - dodoc -r examples/cpp/*
131 - fi
132 -}
133
134 diff --git a/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r2.ebuild b/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r2.ebuild
135 new file mode 100644
136 index 000000000000..525a0ee06a08
137 --- /dev/null
138 +++ b/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r2.ebuild
139 @@ -0,0 +1,82 @@
140 +# Copyright 1999-2023 Gentoo Authors
141 +# Distributed under the terms of the GNU General Public License v2
142 +
143 +EAPI=8
144 +
145 +inherit autotools multilib-minimal
146 +
147 +MY_P="${PN%-cpp}-${PV}"
148 +
149 +DESCRIPTION="The ANTLR 2 C++ Runtime"
150 +HOMEPAGE="https://www.antlr2.org/"
151 +SRC_URI="https://www.antlr2.org/download/${MY_P}.tar.gz"
152 +S="${WORKDIR}/${MY_P}"
153 +
154 +LICENSE="public-domain"
155 +SLOT="2"
156 +KEYWORDS="amd64 ~arm ppc x86"
157 +IUSE="doc examples"
158 +RESTRICT="test" # No tests but test target blows up!
159 +
160 +BDEPEND="doc? ( app-doc/doxygen[dot] )"
161 +
162 +PATCHES=(
163 + "${FILESDIR}"/${PV}-gcc.patch
164 +
165 + # Upstream only installs a static library. The original antlr ebuild
166 + # built a shared library manually, which isn't so great either. This
167 + # ebuild applies libtool instead and therefore an autoreconf is
168 + # required. A couple of errors concerning tr have been seen but the
169 + # final result still looks good. This also sidesteps bug #554344 plus
170 + # the need to call einstall.
171 + "${FILESDIR}"/${PV}-autotools.patch
172 +)
173 +
174 +src_prepare() {
175 + default
176 +
177 + mv -v {aclocal,acinclude}.m4 || die
178 +
179 + # Delete build files from examples
180 + find examples -name Makefile.in -delete || die
181 +
182 + eautoreconf
183 +}
184 +
185 +multilib_src_configure() {
186 + CONFIG_SHELL="${BASH}" ECONF_SOURCE="${S}" econf \
187 + --disable-csharp \
188 + --disable-examples \
189 + --disable-java \
190 + --disable-python \
191 + --enable-cxx \
192 + --enable-verbose
193 +}
194 +
195 +multilib_src_compile() {
196 + default
197 +
198 + if multilib_native_use doc; then
199 + cd "${S}"/lib/cpp || die
200 + doxygen -u doxygen.cfg || die
201 + doxygen doxygen.cfg || die
202 + HTML_DOCS=( "${S}"/lib/cpp/gen_doc/html/. )
203 + fi
204 +}
205 +
206 +multilib_src_install() {
207 + # We only care about the C++ stuff
208 + emake -C lib/cpp DESTDIR="${D}" install
209 +}
210 +
211 +multilib_src_install_all() {
212 + einstalldocs
213 + dodoc lib/cpp/AUTHORS lib/cpp/ChangeLog lib/cpp/README lib/cpp/TODO
214 +
215 + if use examples; then
216 + docinto examples
217 + dodoc -r examples/cpp/.
218 + fi
219 +
220 + find "${ED}" -name '*.la' -delete || die
221 +}
222
223 diff --git a/dev-cpp/antlr-cpp/files/2.7.7-autotools.patch b/dev-cpp/antlr-cpp/files/2.7.7-autotools.patch
224 new file mode 100644
225 index 000000000000..5992c06c6ff7
226 --- /dev/null
227 +++ b/dev-cpp/antlr-cpp/files/2.7.7-autotools.patch
228 @@ -0,0 +1,159 @@
229 +- use libtool+automake for creating shared libraries
230 +- respect CXXFLAGS/LDFLAGS (#735708)
231 +- respect nested $(MAKE) (#256880)
232 +
233 +--- a/configure.in
234 ++++ b/configure.in
235 +@@ -13,6 +13,9 @@
236 + AC_CONFIG_SRCDIR([LICENSE.txt])
237 + AC_CONFIG_AUX_DIR(scripts)
238 +
239 ++LT_INIT
240 ++AM_INIT_AUTOMAKE
241 ++
242 + ## This shall be the very first config file. Do not change
243 + ## this.
244 + AC_CONFIG_FILES([scripts/config.vars])
245 +@@ -404,7 +407,7 @@
246 + esac
247 +
248 + ## Test whether we have cygpath
249 +-test -z "$CYGPATH" && AC_PATH_PROGS(CYGPATH, cygpath$EXEEXT )
250 ++AC_PATH_PROGS([CYGPATH], [cygpath$EXEEXT])
251 +
252 + AC_SUBST([CYGPATH_M])
253 + AC_SUBST([CYGPATH_W])
254 +@@ -448,7 +451,7 @@
255 + ]
256 + )
257 +
258 +-## @MAKE@ shall contain absolut path name of make program found.
259 ++## $(MAKE) shall contain absolut path name of make program found.
260 +
261 + ## Search for well known make programs - take user given MAKE
262 + ## into account. The result will be a list of valid make prog-
263 +@@ -714,7 +717,6 @@
264 + ## just overrule what autoconf figured out - we never asked for
265 + ## this anyway. Our handling of compiler options is done below
266 + ## in the fine tuning section.
267 +- CXXFLAGS=""
268 +
269 + ## 'cxx' shall be the canonical compiler name. For example, gcc
270 + ## cl, bcc, CC, etc. Note that this is in general not equal to CXX.
271 +@@ -807,7 +809,6 @@
272 + ;;
273 + esac
274 +
275 +- LDFLAGS=
276 + AX_VAR_HEAD([AR])
277 +
278 + ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx##
279 +@@ -832,7 +833,7 @@
280 + esac
281 +
282 + ##
283 +-test -z "$DOXYGEN" && AC_PATH_PROG(DOXYGEN, doxygen, doxygen, )
284 ++AC_PATH_PROG([DOXYGEN], [doxygen], [doxygen], [])
285 +
286 + # This seems to convince configure to use an absolute path to the backup
287 + # install-sh script.
288 +@@ -840,8 +841,7 @@
289 + AC_PROG_INSTALL
290 + AC_PROG_RANLIB
291 +
292 +-test -z "$MKDIR" && AC_PATH_PROG(MKDIR, mkdir$EXEEXT, mkdir$EXEEXT )
293 +-test -z "$RM" && AC_PATH_PROG(RM, rm$EXEEXT, rm$EXEEXT )
294 ++AC_PATH_PROG([MKDIR], [mkdir$EXEEXT], [mkdir$EXEEXT])
295 +
296 + AX_PATH_PROGS(
297 + [TAR],
298 +@@ -855,10 +855,10 @@
299 + [AX_VAR_HEAD([TOUCH])]
300 + )
301 +
302 +-test -z "$CHMOD" && AC_PATH_PROG(CHMOD, chmod$EXEEXT, chmod$EXEEXT )
303 +-test -z "$SED" && AC_PATH_PROG(SED, sed$EXEEXT, sed$EXEEXT )
304 +-test -z "$CAT" && AC_PATH_PROG(CAT, cat$EXEEXT, cat$EXEEXT )
305 +-test -z "$GREP" && AC_PATH_PROG(GREP, grep$EXEEXT, grep$EXEEXT )
306 ++AC_PATH_PROG([CHMOD], [chmod$EXEEXT], [chmod$EXEEXT])
307 ++AC_PATH_PROG([SED], [sed$EXEEXT], [sed$EXEEXT])
308 ++AC_PATH_PROG([CAT], [cat$EXEEXT], [cat$EXEEXT])
309 ++AC_PATH_PROG([GREP], [grep$EXEEXT], [grep$EXEEXT])
310 +
311 + #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#
312 + # PYTHON #
313 +--- /dev/null
314 ++++ b/lib/cpp/antlr/Makefile.am
315 +@@ -0,0 +1,2 @@
316 ++antlr_includedir = $(includedir)/antlr
317 ++antlr_include_HEADERS = ANTLRException.hpp ANTLRUtil.hpp ASTArray.hpp ASTFactory.hpp AST.hpp ASTNULLType.hpp ASTPair.hpp ASTRefCount.hpp BaseAST.hpp BitSet.hpp CharBuffer.hpp CharInputBuffer.hpp CharScanner.hpp CharStreamException.hpp CharStreamIOException.hpp CircularQueue.hpp CommonAST.hpp CommonASTWithHiddenTokens.hpp CommonHiddenStreamToken.hpp CommonToken.hpp config.hpp InputBuffer.hpp IOException.hpp LexerSharedInputState.hpp LLkParser.hpp MismatchedCharException.hpp MismatchedTokenException.hpp NoViableAltException.hpp NoViableAltForCharException.hpp Parser.hpp ParserSharedInputState.hpp RecognitionException.hpp RefCount.hpp SemanticException.hpp String.hpp TokenBuffer.hpp Token.hpp TokenRefCount.hpp TokenStreamBasicFilter.hpp TokenStreamException.hpp TokenStreamHiddenTokenFilter.hpp TokenStream.hpp TokenStreamIOException.hpp TokenStreamRecognitionException.hpp TokenStreamRetryException.hpp TokenStreamRewriteEngine.hpp TokenStreamSelector.hpp TokenWithIndex.hpp TreeParser.hp
318 p TreeParserSharedInputState.hpp
319 +--- /dev/null
320 ++++ b/lib/cpp/src/Makefile.am
321 +@@ -0,0 +1,4 @@
322 ++AM_CPPFLAGS = -I$(abs_top_srcdir)/lib/cpp
323 ++lib_LTLIBRARIES = libantlr.la
324 ++libantlr_la_LDFLAGS = -version-info 2
325 ++libantlr_la_SOURCES = ANTLRUtil.cpp ASTFactory.cpp ASTNULLType.cpp ASTRefCount.cpp BaseAST.cpp BitSet.cpp CharBuffer.cpp CharScanner.cpp CommonAST.cpp CommonASTWithHiddenTokens.cpp CommonHiddenStreamToken.cpp CommonToken.cpp InputBuffer.cpp LLkParser.cpp MismatchedCharException.cpp MismatchedTokenException.cpp NoViableAltException.cpp NoViableAltForCharException.cpp Parser.cpp RecognitionException.cpp String.cpp Token.cpp TokenBuffer.cpp TokenStreamBasicFilter.cpp TokenStreamHiddenTokenFilter.cpp TokenStreamSelector.cpp TokenStreamRewriteEngine.cpp TreeParser.cpp TokenRefCount.cpp
326 +--- a/Makefile.in
327 ++++ b/Makefile.in
328 +@@ -31,7 +31,7 @@
329 +
330 + test clean distclean install ::
331 + @ if test -f examples/Makefile ; then \
332 +- @MAKE@ -C examples $@ ; \
333 ++ $(MAKE) -C examples $@ ; \
334 + fi
335 +
336 + # Rule to remove all objects, cores, ANTLR generated,
337 +--- a/scripts/config.deps.in
338 ++++ b/scripts/config.deps.in
339 +@@ -119,7 +119,7 @@
340 + $$subdir ) ;; \
341 + * ) d="@abs_this_builddir@/$$subdir" ; \
342 + test -f "$$d/Makefile" && { \
343 +- @MAKE@ -C "$$d" $@ ; \
344 ++ $(MAKE) -C "$$d" $@ ; \
345 + } \
346 + ;; \
347 + esac
348 +@@ -130,7 +130,7 @@
349 + $$subdir ) ;; \
350 + * ) d="@abs_this_builddir@/$$subdir" ; \
351 + test -f "$$d/Makefile" && { \
352 +- @MAKE@ -C "$$d" $@ ; \
353 ++ $(MAKE) -C "$$d" $@ ; \
354 + } \
355 + ;; \
356 + esac
357 +@@ -142,7 +142,7 @@
358 + $$subdir ) ;; \
359 + * ) d="@abs_this_builddir@/$$subdir" ; \
360 + test -f "$$d/Makefile" && { \
361 +- @MAKE@ -C "$$d" $@ ; \
362 ++ $(MAKE) -C "$$d" $@ ; \
363 + } \
364 + ;; \
365 + esac
366 +@@ -154,7 +154,7 @@
367 + $$subdir ) ;; \
368 + * ) d="@abs_this_builddir@/$$subdir" ; \
369 + test -f "$$d/Makefile" && { \
370 +- @MAKE@ -C "$$d" $@ ; \
371 ++ $(MAKE) -C "$$d" $@ ; \
372 + } \
373 + ;; \
374 + esac
375 +--- a/scripts/config.make.in
376 ++++ b/scripts/config.make.in
377 +@@ -47,9 +47,9 @@
378 + *) \
379 + if test -f "$${d}/Makefile" ; then \
380 + echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" ; \
381 +- echo ">> @MAKE@ -C $(subdir)/$${d} $@ " ; \
382 ++ echo ">> $(MAKE) -C $(subdir)/$${d} $@ " ; \
383 + echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" ; \
384 +- @MAKE@ -C "$$d" $@ || exit 1 ;\
385 ++ $(MAKE) -C "$$d" $@ || exit 1 ;\
386 + fi ; \
387 + ;; \
388 + esac ; \
389
390 diff --git a/dev-cpp/antlr-cpp/files/2.7.7-libtool.patch b/dev-cpp/antlr-cpp/files/2.7.7-libtool.patch
391 deleted file mode 100644
392 index ea5e809f473f..000000000000
393 --- a/dev-cpp/antlr-cpp/files/2.7.7-libtool.patch
394 +++ /dev/null
395 @@ -1,21 +0,0 @@
396 -diff -Naur antlr-2.7.7.orig/configure.in antlr-2.7.7/configure.in
397 ---- antlr-2.7.7.orig/configure.in 2006-11-01 21:37:18.000000000 +0000
398 -+++ antlr-2.7.7/configure.in 2015-10-11 13:49:09.166308712 +0100
399 -@@ -13,6 +13,9 @@
400 - AC_CONFIG_SRCDIR([LICENSE.txt])
401 - AC_CONFIG_AUX_DIR(scripts)
402 -
403 -+LT_INIT
404 -+AM_INIT_AUTOMAKE
405 -+
406 - ## This shall be the very first config file. Do not change
407 - ## this.
408 - AC_CONFIG_FILES([scripts/config.vars])
409 -@@ -841,7 +844,6 @@
410 - AC_PROG_RANLIB
411 -
412 - test -z "$MKDIR" && AC_PATH_PROG(MKDIR, mkdir$EXEEXT, mkdir$EXEEXT )
413 --test -z "$RM" && AC_PATH_PROG(RM, rm$EXEEXT, rm$EXEEXT )
414 -
415 - AX_PATH_PROGS(
416 - [TAR],