Сравнение antlr-cpp-2.7.7-r2 с antlr-cpp-4.11.1

/usr/portage/dev-cpp/antlr-cpp/antlr-cpp-4.11.1.ebuild 2023-10-09 14:52:29.300368345 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
inherit autotools multilib-minimal
6
inherit cmake
7 7

  
8
MY_P="${PN%-cpp}-${PV}"
8
DESCRIPTION="The ANTLR 4 C++ Runtime"
9
HOMEPAGE="https://www.antlr.org/"
10
SRC_URI="https://www.antlr.org/download/antlr4-cpp-runtime-${PV}-source.zip -> ${P}.zip"
11
S="${WORKDIR}"
9 12

  
10
DESCRIPTION="The ANTLR 2 C++ Runtime"
11
HOMEPAGE="https://www.antlr2.org/"
12
SRC_URI="https://www.antlr2.org/download/${MY_P}.tar.gz"
13
S="${WORKDIR}/${MY_P}"
14

  
15
LICENSE="public-domain"
16
SLOT="2"
13
LICENSE="BSD"
14
SLOT="4"
17 15
KEYWORDS="amd64 ~arm ppc x86"
18
IUSE="doc examples"
19
RESTRICT="test" # No tests but test target blows up!
20

  
21
BDEPEND="doc? ( app-doc/doxygen[dot] )"
22

  
23
PATCHES=(
24
	"${FILESDIR}"/${PV}-gcc.patch
25

  
26
	# Upstream only installs a static library. The original antlr ebuild
27
	# built a shared library manually, which isn't so great either. This
28
	# ebuild applies libtool instead and therefore an autoreconf is
29
	# required. A couple of errors concerning tr have been seen but the
30
	# final result still looks good. This also sidesteps bug #554344 plus
31
	# the need to call einstall.
32
	"${FILESDIR}"/${PV}-autotools.patch
33
)
16
IUSE="test"
17
RESTRICT="!test? ( test )"
34 18

  
35
src_prepare() {
36
	default
37

  
38
	mv -v {aclocal,acinclude}.m4 || die
39

  
40
	# Delete build files from examples
41
	find examples -name Makefile.in -delete || die
42

  
43
	eautoreconf
44
}
45

  
46
multilib_src_configure() {
47
	CONFIG_SHELL="${BASH}" ECONF_SOURCE="${S}" econf \
48
		--disable-csharp \
49
		--disable-examples \
50
		--disable-java \
51
		--disable-python \
52
		--enable-cxx \
53
		--enable-verbose
54
}
55

  
56
multilib_src_compile() {
57
	default
58

  
59
	if multilib_native_use doc; then
60
		cd "${S}"/lib/cpp || die
61
		doxygen -u doxygen.cfg || die
62
		doxygen doxygen.cfg || die
63
		HTML_DOCS=( "${S}"/lib/cpp/gen_doc/html/. )
64
	fi
65
}
66

  
67
multilib_src_install() {
68
	# We only care about the C++ stuff
69
	emake -C lib/cpp DESTDIR="${D}" install
70
}
19
DEPEND="test? ( dev-cpp/gtest )"
20
BDEPEND="app-arch/unzip"
71 21

  
72
multilib_src_install_all() {
73
	einstalldocs
74
	dodoc lib/cpp/AUTHORS lib/cpp/ChangeLog lib/cpp/README lib/cpp/TODO
75

  
76
	if use examples; then
77
		docinto examples
78
		dodoc -r examples/cpp/.
79
	fi
22
PATCHES=( "${FILESDIR}"/${PV}-GNUInstallDirs.patch )
80 23

  
81
	find "${ED}" -name '*.la' -delete || die
24
src_configure() {
25
	local mycmakeargs=(
26
		-DANTLR_BUILD_CPP_TESTS=$(usex test)
27
	)
28
	cmake_src_configure
82 29
}
Спасибо!