diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-cpp/antlr-cpp | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'dev-cpp/antlr-cpp')
| -rw-r--r-- | dev-cpp/antlr-cpp/Manifest | 2 | ||||
| -rw-r--r-- | dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild | 105 | ||||
| -rw-r--r-- | dev-cpp/antlr-cpp/antlr-cpp-4.7.2.ebuild | 27 | ||||
| -rw-r--r-- | dev-cpp/antlr-cpp/files/2.7.7-gcc.patch | 12 | ||||
| -rw-r--r-- | dev-cpp/antlr-cpp/files/2.7.7-libtool.patch | 21 | ||||
| -rw-r--r-- | dev-cpp/antlr-cpp/metadata.xml | 12 |
6 files changed, 179 insertions, 0 deletions
diff --git a/dev-cpp/antlr-cpp/Manifest b/dev-cpp/antlr-cpp/Manifest new file mode 100644 index 000000000000..d2f49651c27d --- /dev/null +++ b/dev-cpp/antlr-cpp/Manifest @@ -0,0 +1,2 @@ +DIST antlr-2.7.7.tar.gz 1816180 BLAKE2B 3a9a51070f8651befeb4d22be344b544e119db34a78522828c2ffc3c481c14b9c7784f0a9997a61f6faedde5b6d1fe12214cfd84fb274f7065f3ffe6a44abf1c SHA512 faa72d2ddcba434ef1233e70c1549e63eba67c00793966322e821cf7f015cccb804448cb92d8fbef0429f59928fad65ec954f8ffbda0acbb8e983de0806d349d +DIST antlr-cpp-4.7.2.zip 1494927 BLAKE2B 007aac6655dc3c4e3a0c2073ca9c8c016b46bdf97dca4494d4ea2c44d27a458bfbb09811b3beb0aec1ce2873c3b62ad6789c6a9e3e7ddc62cde51c8357e9123b SHA512 3298b83a06ddd8d8852462401e46fe2eb83d20af4ba14c722cb31b33d929d1c5a4ffb694ee084495a4ae26ed3246b6781ca6045d11253c94efc09729fa001090 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 000000000000..c6fa2c9550b5 --- /dev/null +++ b/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +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="https://www.antlr2.org/" +SRC_URI="https://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 <<EOF > lib/cpp/antlr/Makefile.am || die +antlr_includedir = \$(includedir)/antlr +antlr_include_HEADERS = ${HPP} +EOF + + cat <<EOF > 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() { + CONFIG_SHELL="${BASH}" 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 +} diff --git a/dev-cpp/antlr-cpp/antlr-cpp-4.7.2.ebuild b/dev-cpp/antlr-cpp/antlr-cpp-4.7.2.ebuild new file mode 100644 index 000000000000..37ace99caa9e --- /dev/null +++ b/dev-cpp/antlr-cpp/antlr-cpp-4.7.2.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils + +DESCRIPTION="The ANTLR 4 C++ Runtime" +HOMEPAGE="https://www.antlr.org/" +SRC_URI="https://www.antlr.org/download/antlr4-cpp-runtime-${PV}-source.zip -> ${P}.zip" +LICENSE="BSD" +SLOT="4" +KEYWORDS="amd64 ~arm ~ppc x86" + +DEPEND="app-arch/zip" + +S="${WORKDIR}" + +src_prepare() { + sed -i -e "s#DESTINATION lib#DESTINATION $(get_libdir)#" \ + "${S}"/runtime/CMakeLists.txt || die "failed sed" + + sed -i -e "s#share/doc/libantlr4#share/doc/${P}#g" \ + "${S}"/CMakeLists.txt || die "failed sed" + + cmake-utils_src_prepare +} diff --git a/dev-cpp/antlr-cpp/files/2.7.7-gcc.patch b/dev-cpp/antlr-cpp/files/2.7.7-gcc.patch new file mode 100644 index 000000000000..c67d5b6dfcf9 --- /dev/null +++ b/dev-cpp/antlr-cpp/files/2.7.7-gcc.patch @@ -0,0 +1,12 @@ +diff -Naur antlr-2.7.7.orig/lib/cpp/antlr/CharScanner.hpp antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp +--- antlr-2.7.7.orig/lib/cpp/antlr/CharScanner.hpp 2006-11-01 21:37:17.000000000 +0000 ++++ antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp 2015-10-06 23:01:53.083655950 +0100 +@@ -10,6 +10,8 @@ + + #include <antlr/config.hpp> + ++#include <cstdio> ++#include <cstring> + #include <map> + + #ifdef HAS_NOT_CCTYPE_H diff --git a/dev-cpp/antlr-cpp/files/2.7.7-libtool.patch b/dev-cpp/antlr-cpp/files/2.7.7-libtool.patch new file mode 100644 index 000000000000..ea5e809f473f --- /dev/null +++ b/dev-cpp/antlr-cpp/files/2.7.7-libtool.patch @@ -0,0 +1,21 @@ +diff -Naur antlr-2.7.7.orig/configure.in antlr-2.7.7/configure.in +--- antlr-2.7.7.orig/configure.in 2006-11-01 21:37:18.000000000 +0000 ++++ antlr-2.7.7/configure.in 2015-10-11 13:49:09.166308712 +0100 +@@ -13,6 +13,9 @@ + AC_CONFIG_SRCDIR([LICENSE.txt]) + AC_CONFIG_AUX_DIR(scripts) + ++LT_INIT ++AM_INIT_AUTOMAKE ++ + ## This shall be the very first config file. Do not change + ## this. + AC_CONFIG_FILES([scripts/config.vars]) +@@ -841,7 +844,6 @@ + AC_PROG_RANLIB + + test -z "$MKDIR" && AC_PATH_PROG(MKDIR, mkdir$EXEEXT, mkdir$EXEEXT ) +-test -z "$RM" && AC_PATH_PROG(RM, rm$EXEEXT, rm$EXEEXT ) + + AX_PATH_PROGS( + [TAR], diff --git a/dev-cpp/antlr-cpp/metadata.xml b/dev-cpp/antlr-cpp/metadata.xml new file mode 100644 index 000000000000..97cde93b4249 --- /dev/null +++ b/dev-cpp/antlr-cpp/metadata.xml @@ -0,0 +1,12 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</name> + </maintainer> + <upstream> + <remote-id type="github">antlr/antlr3</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> |
