From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0DD141395E2 for ; Mon, 5 Dec 2016 21:47:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2B22421C200; Mon, 5 Dec 2016 21:47:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BA90521C200 for ; Mon, 5 Dec 2016 21:47:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4883034102B for ; Mon, 5 Dec 2016 21:47:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A00A3495 for ; Mon, 5 Dec 2016 21:47:32 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1480974429.4a7cc97647e358a76e530d205cb383ad18f98e7f.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/antlr-cpp/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild X-VCS-Directories: dev-cpp/antlr-cpp/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: 4a7cc97647e358a76e530d205cb383ad18f98e7f X-VCS-Branch: master Date: Mon, 5 Dec 2016 21:47:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d6a92211-d9f5-4aee-9af5-0a0bbad05238 X-Archives-Hash: f7891af7dd0d652a41e94403e0d95594 commit: 4a7cc97647e358a76e530d205cb383ad18f98e7f Author: James Le Cuirot gentoo org> AuthorDate: Mon Dec 5 21:47:09 2016 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Mon Dec 5 21:47:09 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a7cc976 dev-cpp/antlr-cpp: EAPI bump, migration away from autotools-multilib Package-Manager: portage-2.3.2 dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild | 106 ++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) 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 new file mode 100644 index 00000000..f25d87c --- /dev/null +++ b/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +# Upstream only installs a static library. The original antlr ebuild +# built a shared library manually, which isn't so great either. This +# ebuild applies libtool instead and therefore an autoreconf is +# required. A couple of errors concerning tr have been seen but the +# final result still looks good. This also sidesteps bug #554344 plus +# the need to call einstall. + +inherit autotools multilib-minimal + +MY_P="${PN%-cpp}-${PV}" +DESCRIPTION="The ANTLR 2 C++ Runtime" +HOMEPAGE="http://www.antlr2.org/" +SRC_URI="http://www.antlr2.org/download/${MY_P}.tar.gz" +LICENSE="public-domain" +SLOT="2" +KEYWORDS="~amd64 ~arm ~ppc ~x86" +IUSE="doc examples static-libs" +RESTRICT="test" # No tests but test target blows up! + +DEPEND="doc? ( app-doc/doxygen )" +RDEPEND="!dev-java/antlr:0[cxx]" + +S="${WORKDIR}/${MY_P}" +ECONF_SOURCE="${S}" +PATCHES=( "${FILESDIR}"/${PV}-{gcc,libtool}.patch ) +DOCS=( lib/cpp/AUTHORS lib/cpp/ChangeLog lib/cpp/README lib/cpp/TODO ) + +src_prepare() { + # Turn Makefile.in files into libtool-style Makefile.am + # files. Countable.hpp is actually missing. + local HPP=$(grep -E -o "\w+\.hpp" lib/cpp/antlr/Makefile.in | grep -v "Countable\.hpp" | tr "\n" " " || die) + local CPP=$(grep -E -o "\w+\.cpp" lib/cpp/src/Makefile.in | tr "\n" " " || die) + + cat < lib/cpp/antlr/Makefile.am || die +antlr_includedir = \$(includedir)/antlr +antlr_include_HEADERS = ${HPP} +EOF + + cat < lib/cpp/src/Makefile.am || die +AM_CPPFLAGS = -I\$(abs_top_srcdir)/lib/cpp +lib_LTLIBRARIES = libantlr.la +libantlr_la_LDFLAGS = -version-info 2 +libantlr_la_SOURCES = ${CPP} +EOF + + default + + mv -v configure.in configure.ac || die + mv -v aclocal.m4 acinclude.m4 || die + + # These silly test -z lines break badly under recent autoconfs. + sed -i '/AC_PATH_PROG/s/test -z "\$[^"]*" *&& *//' configure.ac || die + + # Delete build files from examples. + find examples -name Makefile.in -delete || die + + # Fix make invocations. See bug #256880. + find -name "*.in" -exec sed -i 's/@MAKE@/$(MAKE)/g' {} + || die + + eautoreconf +} + +multilib_src_configure() { + econf \ + --disable-csharp \ + --enable-cxx \ + --disable-examples \ + --disable-java \ + --disable-python \ + --enable-shared \ + --enable-verbose \ + $(use_enable static-libs static) +} + +src_compile() { + multilib-minimal_src_compile + + if use doc; then + cd "${S}/lib/cpp" || die + doxygen -u doxygen.cfg || die + doxygen doxygen.cfg || die + fi +} + +multilib_src_install() { + # We only care about the C++ stuff. + emake -C lib/cpp install DESTDIR="${D}" +} + +src_install() { + multilib-minimal_src_install + + cd "${S}" || die + use doc && dohtml -r lib/cpp/gen_doc/html/ + + if use examples; then + docinto examples + dodoc -r examples/cpp/* + fi +}