public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/antlr-cpp/, dev-cpp/antlr-cpp/files/
@ 2023-01-02 14:52 David Seifert
  0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2023-01-02 14:52 UTC (permalink / raw
  To: gentoo-commits

commit:     4c36d3a0bddc15e3714070f8b7ecbe612412bf35
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  2 14:52:44 2023 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Jan  2 14:52:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c36d3a0

dev-cpp/antlr-cpp: update EAPI 6 -> 8

Closes: https://bugs.gentoo.org/735708
Closes: https://bugs.gentoo.org/842075
Closes: https://bugs.gentoo.org/843170
Closes: https://bugs.gentoo.org/866278
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild   | 105 -----------------
 dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r2.ebuild   |  82 +++++++++++++
 dev-cpp/antlr-cpp/files/2.7.7-autotools.patch | 159 ++++++++++++++++++++++++++
 dev-cpp/antlr-cpp/files/2.7.7-libtool.patch   |  21 ----
 4 files changed, 241 insertions(+), 126 deletions(-)

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
deleted file mode 100644
index c6fa2c9550b5..000000000000
--- a/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r1.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# 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-2.7.7-r2.ebuild b/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r2.ebuild
new file mode 100644
index 000000000000..525a0ee06a08
--- /dev/null
+++ b/dev-cpp/antlr-cpp/antlr-cpp-2.7.7-r2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="public-domain"
+SLOT="2"
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE="doc examples"
+RESTRICT="test" # No tests but test target blows up!
+
+BDEPEND="doc? ( app-doc/doxygen[dot] )"
+
+PATCHES=(
+	"${FILESDIR}"/${PV}-gcc.patch
+
+	# 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.
+	"${FILESDIR}"/${PV}-autotools.patch
+)
+
+src_prepare() {
+	default
+
+	mv -v {aclocal,acinclude}.m4 || die
+
+	# Delete build files from examples
+	find examples -name Makefile.in -delete || die
+
+	eautoreconf
+}
+
+multilib_src_configure() {
+	CONFIG_SHELL="${BASH}" ECONF_SOURCE="${S}" econf \
+		--disable-csharp \
+		--disable-examples \
+		--disable-java \
+		--disable-python \
+		--enable-cxx \
+		--enable-verbose
+}
+
+multilib_src_compile() {
+	default
+
+	if multilib_native_use doc; then
+		cd "${S}"/lib/cpp || die
+		doxygen -u doxygen.cfg || die
+		doxygen doxygen.cfg || die
+		HTML_DOCS=( "${S}"/lib/cpp/gen_doc/html/. )
+	fi
+}
+
+multilib_src_install() {
+	# We only care about the C++ stuff
+	emake -C lib/cpp DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	dodoc lib/cpp/AUTHORS lib/cpp/ChangeLog lib/cpp/README lib/cpp/TODO
+
+	if use examples; then
+		docinto examples
+		dodoc -r examples/cpp/.
+	fi
+
+	find "${ED}" -name '*.la' -delete || die
+}

diff --git a/dev-cpp/antlr-cpp/files/2.7.7-autotools.patch b/dev-cpp/antlr-cpp/files/2.7.7-autotools.patch
new file mode 100644
index 000000000000..5992c06c6ff7
--- /dev/null
+++ b/dev-cpp/antlr-cpp/files/2.7.7-autotools.patch
@@ -0,0 +1,159 @@
+- use libtool+automake for creating shared libraries
+- respect CXXFLAGS/LDFLAGS (#735708)
+- respect nested $(MAKE) (#256880)
+
+--- a/configure.in
++++ b/configure.in
+@@ -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])
+@@ -404,7 +407,7 @@
+ esac
+ 
+ ## Test whether we have cygpath
+-test -z "$CYGPATH"    && AC_PATH_PROGS(CYGPATH, cygpath$EXEEXT )
++AC_PATH_PROGS([CYGPATH], [cygpath$EXEEXT])
+ 
+ AC_SUBST([CYGPATH_M])
+ AC_SUBST([CYGPATH_W])
+@@ -448,7 +451,7 @@
+   ]
+ )
+ 
+-## @MAKE@ shall contain absolut path name of make program found.
++## $(MAKE) shall contain absolut path name of make program found.
+ 
+ ## Search for well known make programs - take user given MAKE
+ ## into account. The result will be a list of valid make prog-
+@@ -714,7 +717,6 @@
+     ## just  overrule what autoconf figured out - we never asked for
+     ## this anyway. Our  handling  of compiler options is done below
+     ## in the fine tuning section.
+-    CXXFLAGS=""
+ 
+     ## 'cxx'  shall  be  the canonical compiler name. For example, gcc
+     ## cl, bcc, CC, etc. Note that this is in general not equal to CXX.
+@@ -807,7 +809,6 @@
+         ;;
+     esac
+ 
+-    LDFLAGS=
+     AX_VAR_HEAD([AR])
+ 
+     ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx##
+@@ -832,7 +833,7 @@
+ esac
+ 
+ ##
+-test -z "$DOXYGEN" && AC_PATH_PROG(DOXYGEN, doxygen, doxygen,  )
++AC_PATH_PROG([DOXYGEN], [doxygen], [doxygen], [])
+ 
+ # This seems to convince configure to use an absolute path to the backup
+ # install-sh script.
+@@ -840,8 +841,7 @@
+ AC_PROG_INSTALL
+ 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 )
++AC_PATH_PROG([MKDIR], [mkdir$EXEEXT], [mkdir$EXEEXT])
+ 
+ AX_PATH_PROGS(
+   [TAR],
+@@ -855,10 +855,10 @@
+   [AX_VAR_HEAD([TOUCH])]
+ )
+ 
+-test -z "$CHMOD" && AC_PATH_PROG(CHMOD, chmod$EXEEXT, chmod$EXEEXT )
+-test -z "$SED"   && AC_PATH_PROG(SED,   sed$EXEEXT, sed$EXEEXT )
+-test -z "$CAT"   && AC_PATH_PROG(CAT,   cat$EXEEXT, cat$EXEEXT )
+-test -z "$GREP"  && AC_PATH_PROG(GREP,  grep$EXEEXT, grep$EXEEXT )
++AC_PATH_PROG([CHMOD], [chmod$EXEEXT], [chmod$EXEEXT])
++AC_PATH_PROG([SED],   [sed$EXEEXT],   [sed$EXEEXT])
++AC_PATH_PROG([CAT],   [cat$EXEEXT],   [cat$EXEEXT])
++AC_PATH_PROG([GREP],  [grep$EXEEXT],  [grep$EXEEXT])
+ 
+ #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#
+ #                             PYTHON                                 #
+--- /dev/null
++++ b/lib/cpp/antlr/Makefile.am
+@@ -0,0 +1,2 @@
++antlr_includedir = $(includedir)/antlr
++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
 p TreeParserSharedInputState.hpp
+--- /dev/null
++++ b/lib/cpp/src/Makefile.am
+@@ -0,0 +1,4 @@
++AM_CPPFLAGS = -I$(abs_top_srcdir)/lib/cpp
++lib_LTLIBRARIES = libantlr.la
++libantlr_la_LDFLAGS = -version-info 2
++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
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -31,7 +31,7 @@
+ 
+ test clean distclean install ::
+ 	@ if test -f examples/Makefile ; then \
+-		@MAKE@ -C examples $@ ; \
++		$(MAKE) -C examples $@ ; \
+ 	fi
+ 
+ # Rule  to  remove  all objects, cores, ANTLR generated,
+--- a/scripts/config.deps.in
++++ b/scripts/config.deps.in
+@@ -119,7 +119,7 @@
+ 	  $$subdir ) ;; \
+ 	  * ) d="@abs_this_builddir@/$$subdir" ; \
+         test -f "$$d/Makefile" && {  \
+-         @MAKE@ -C "$$d" $@ ; \
++         $(MAKE) -C "$$d" $@ ; \
+         } 	\
+         ;; \
+     esac
+@@ -130,7 +130,7 @@
+ 	  $$subdir ) ;; \
+ 	  * ) d="@abs_this_builddir@/$$subdir" ; \
+         test -f "$$d/Makefile" && {  \
+-         @MAKE@ -C "$$d" $@ ; \
++         $(MAKE) -C "$$d" $@ ; \
+         } 	\
+         ;; \
+     esac
+@@ -142,7 +142,7 @@
+ 	  $$subdir ) ;; \
+ 	  * ) d="@abs_this_builddir@/$$subdir" ; \
+         test -f "$$d/Makefile" && {  \
+-         @MAKE@ -C "$$d" $@ ; \
++         $(MAKE) -C "$$d" $@ ; \
+         } 	\
+         ;; \
+     esac
+@@ -154,7 +154,7 @@
+ 	  $$subdir ) ;; \
+ 	  * ) d="@abs_this_builddir@/$$subdir" ; \
+         test -f "$$d/Makefile" && {  \
+-         @MAKE@ -C "$$d" $@ ; \
++         $(MAKE) -C "$$d" $@ ; \
+         } 	\
+         ;; \
+     esac
+--- a/scripts/config.make.in
++++ b/scripts/config.make.in
+@@ -47,9 +47,9 @@
+ 		*) \
+ 		if test -f "$${d}/Makefile" ; then \
+ 		  echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" ; \
+-		  echo ">> @MAKE@ -C $(subdir)/$${d} $@                          " ; \
++		  echo ">> $(MAKE) -C $(subdir)/$${d} $@                          " ; \
+ 			echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" ; \
+-			@MAKE@ -C "$$d" $@ || exit 1 ;\
++			$(MAKE) -C "$$d" $@ || exit 1 ;\
+ 		fi ; \
+ 		;; \
+ 		esac ; \

diff --git a/dev-cpp/antlr-cpp/files/2.7.7-libtool.patch b/dev-cpp/antlr-cpp/files/2.7.7-libtool.patch
deleted file mode 100644
index ea5e809f473f..000000000000
--- a/dev-cpp/antlr-cpp/files/2.7.7-libtool.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-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],


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/antlr-cpp/, dev-cpp/antlr-cpp/files/
@ 2023-01-02 22:02 David Seifert
  0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2023-01-02 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     676a9635b3be275ba6ce4c28b60f37d1ad5a8bf4
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  2 22:01:33 2023 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Jan  2 22:01:33 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=676a9635

dev-cpp/antlr-cpp: add 4.11.1

Bug: https://bugs.gentoo.org/726866
Bug: https://bugs.gentoo.org/881317
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-cpp/antlr-cpp/Manifest                         |   1 +
 dev-cpp/antlr-cpp/antlr-cpp-4.11.1.ebuild          |  29 +++++
 .../antlr-cpp/files/4.11.1-GNUInstallDirs.patch    | 139 +++++++++++++++++++++
 3 files changed, 169 insertions(+)

diff --git a/dev-cpp/antlr-cpp/Manifest b/dev-cpp/antlr-cpp/Manifest
index d2f49651c27d..11c2ebb8722f 100644
--- a/dev-cpp/antlr-cpp/Manifest
+++ b/dev-cpp/antlr-cpp/Manifest
@@ -1,2 +1,3 @@
 DIST antlr-2.7.7.tar.gz 1816180 BLAKE2B 3a9a51070f8651befeb4d22be344b544e119db34a78522828c2ffc3c481c14b9c7784f0a9997a61f6faedde5b6d1fe12214cfd84fb274f7065f3ffe6a44abf1c SHA512 faa72d2ddcba434ef1233e70c1549e63eba67c00793966322e821cf7f015cccb804448cb92d8fbef0429f59928fad65ec954f8ffbda0acbb8e983de0806d349d
+DIST antlr-cpp-4.11.1.zip 534105 BLAKE2B acf854bb8f10f8afdb8df9aa1fa92176edc66bfe3e33ca4b57e138e29f7d8512dc0a31aee057e5997ca9e37ca7934c459ef725e831d34166c189a2ed7e6fbc51 SHA512 47a4f714cf195e454b4f66cace58f6dbaa144f44c25594735fc91b37289e9b3c8b5259c03925316754d3eb33af3e0b3d3fb0c5c9aef818b239799e4f1fb49ce6
 DIST antlr-cpp-4.7.2.zip 1494927 BLAKE2B 007aac6655dc3c4e3a0c2073ca9c8c016b46bdf97dca4494d4ea2c44d27a458bfbb09811b3beb0aec1ce2873c3b62ad6789c6a9e3e7ddc62cde51c8357e9123b SHA512 3298b83a06ddd8d8852462401e46fe2eb83d20af4ba14c722cb31b33d929d1c5a4ffb694ee084495a4ae26ed3246b6781ca6045d11253c94efc09729fa001090

diff --git a/dev-cpp/antlr-cpp/antlr-cpp-4.11.1.ebuild b/dev-cpp/antlr-cpp/antlr-cpp-4.11.1.ebuild
new file mode 100644
index 000000000000..f184f2fc1c2c
--- /dev/null
+++ b/dev-cpp/antlr-cpp/antlr-cpp-4.11.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+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"
+S="${WORKDIR}"
+
+LICENSE="BSD"
+SLOT="4"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-cpp/gtest )"
+BDEPEND="app-arch/unzip"
+
+PATCHES=( "${FILESDIR}"/${PV}-GNUInstallDirs.patch )
+
+src_configure() {
+	local mycmakeargs=(
+		-DANTLR_BUILD_CPP_TESTS=$(usex test)
+	)
+	cmake_src_configure
+}

diff --git a/dev-cpp/antlr-cpp/files/4.11.1-GNUInstallDirs.patch b/dev-cpp/antlr-cpp/files/4.11.1-GNUInstallDirs.patch
new file mode 100644
index 000000000000..c8795e0b033c
--- /dev/null
+++ b/dev-cpp/antlr-cpp/files/4.11.1-GNUInstallDirs.patch
@@ -0,0 +1,139 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -113,11 +113,6 @@
+   set(CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL} /O1 /Oi /Ob2 /Gy /MP /DNDEBUG ${MY_CXX_WARNING_FLAGS}")
+   set(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Oi /Ob2 /Gy /MP /DNDEBUG ${MY_CXX_WARNING_FLGAS}")
+   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /O2 /Oi /Ob2 /Gy /MP /Zi ${MY_CXX_WARNING_FLAGS}")
+-else()
+-  set(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g ${MY_CXX_WARNING_FLAGS}")
+-  set(CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG ${MY_CXX_WARNING_FLAGS}")
+-  set(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG ${MY_CXX_WARNING_FLGAS}")
+-  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g ${MY_CXX_WARNING_FLAGS}")
+ endif()
+ 
+ # Compiler-specific C++17 activation.
+@@ -220,16 +215,8 @@
+ 
+ endif(ANTLR4_INSTALL)
+ 
+-if(EXISTS LICENSE.txt)
+-install(FILES LICENSE.txt
+-        DESTINATION "share/doc/libantlr4")
+-elseif(EXISTS ../../LICENSE.txt)
+-install(FILES ../../LICENSE.txt
+-    DESTINATION "share/doc/libantlr4")
+-endif()
+-
+ install(FILES README.md VERSION
+-    DESTINATION "share/doc/libantlr4")
++    DESTINATION ${CMAKE_INSTALL_DOCDIR})
+ 
+ set(CPACK_PACKAGE_CONTACT "antlr-discussion@googlegroups.com")
+ set(CPACK_PACKAGE_VERSION ${ANTLR_VERSION})
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -26,29 +26,14 @@
+ )
+ 
+ add_library(antlr4_shared SHARED ${libantlrcpp_SRC})
+-add_library(antlr4_static STATIC ${libantlrcpp_SRC})
+ 
+ # Make sure to link against threads (pthreads) library in order to be able to
+ # make use of std::call_once in the code without producing runtime errors
+ # (see also https://github.com/antlr/antlr4/issues/3708 and/or https://stackoverflow.com/q/51584960).
+ find_package(Threads REQUIRED)
+ target_link_libraries(antlr4_shared Threads::Threads)
+-target_link_libraries(antlr4_static Threads::Threads)
+ 
+ if (ANTLR_BUILD_CPP_TESTS)
+-  include(FetchContent)
+-
+-  FetchContent_Declare(
+-    googletest
+-    URL https://github.com/google/googletest/archive/e2239ee6043f73722e7aa812a459f54a28552929.zip
+-  )
+-
+-  if(WITH_STATIC_CRT)
+-    set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+-  endif()
+-
+-  FetchContent_MakeAvailable(googletest)
+-
+   file(GLOB libantlrcpp_TESTS
+     "${PROJECT_SOURCE_DIR}/runtime/tests/*.cpp"
+   )
+@@ -60,8 +45,9 @@
+ 
+   target_link_libraries(
+     antlr4_tests
+-    antlr4_static
++    antlr4_shared
+     gtest_main
++    gtest
+   )
+ 
+   include(GoogleTest)
+@@ -71,7 +57,6 @@
+ 
+ if(APPLE)
+   target_link_libraries(antlr4_shared ${COREFOUNDATION_LIBRARY})
+-  target_link_libraries(antlr4_static ${COREFOUNDATION_LIBRARY})
+ endif()
+ 
+ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+@@ -88,16 +73,11 @@
+ endif()
+ 
+ set(extra_share_compile_flags "")
+-set(extra_static_compile_flags "")
+-set(static_lib_suffix "")
+ 
+ if (WIN32)
+-  set(static_lib_suffix "-static")
+   target_compile_definitions(antlr4_shared PUBLIC ANTLR4CPP_EXPORTS)
+-  target_compile_definitions(antlr4_static PUBLIC ANTLR4CPP_STATIC)
+   if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+     set(extra_share_compile_flags "-MP /wd4251")
+-    set(extra_static_compile_flags "-MP")
+   endif()
+ endif()
+ 
+@@ -107,13 +87,6 @@
+                                  OUTPUT_NAME antlr4-runtime
+                                  COMPILE_FLAGS "${disabled_compile_warnings} ${extra_share_compile_flags}")
+ 
+-set_target_properties(antlr4_static
+-                      PROPERTIES VERSION   ${ANTLR_VERSION}
+-                                 SOVERSION ${ANTLR_VERSION}
+-                                 OUTPUT_NAME "antlr4-runtime${static_lib_suffix}"
+-                                 COMPILE_PDB_NAME "antlr4-runtime${static_lib_suffix}"
+-                                 COMPILE_FLAGS "${disabled_compile_warnings} ${extra_static_compile_flags}")
+-
+ if (ANTLR_BUILD_CPP_TESTS)
+   # Copy the generated binaries to dist folder (required by test suite)
+   add_custom_command(
+@@ -122,24 +95,12 @@
+     COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/dist
+     COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:antlr4_shared> ${CMAKE_HOME_DIRECTORY}/dist
+     COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_LINKER_FILE:antlr4_shared> ${CMAKE_HOME_DIRECTORY}/dist)
+-  
+-  add_custom_command(
+-    TARGET antlr4_static
+-    POST_BUILD
+-    COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/dist
+-    COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:antlr4_static> ${CMAKE_HOME_DIRECTORY}/dist)
+ endif()
+ 
+ install(TARGETS antlr4_shared
+         EXPORT antlr4-targets
+         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+-
+-install(TARGETS antlr4_static
+-        EXPORT antlr4-targets
+-        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+         RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+ install(DIRECTORY "${PROJECT_SOURCE_DIR}/runtime/src/"


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/antlr-cpp/, dev-cpp/antlr-cpp/files/
@ 2015-10-14 15:22 James Le Cuirot
  0 siblings, 0 replies; 3+ messages in thread
From: James Le Cuirot @ 2015-10-14 15:22 UTC (permalink / raw
  To: gentoo-commits

commit:     28eb80ad21b60fd4b785d0397bd8ae00a016c8a9
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 14 13:35:05 2015 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 14 15:22:14 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28eb80ad

dev-cpp/antlr-cpp: New package, split from dev-java/antlr

The old ANTLR 2 ebuild tried to cram all the runtimes together, which
was messy. The C++ runtime does not need any Java components at build
time or runtime so it makes sense to split this out. The C++ runtime
for ANTLR 4 is maintained separately by upstream anyway.

This new package does a better job of building the shared library with
the help of libtool. It also supports multilib.

Package-Manager: portage-2.2.20.1

 dev-cpp/antlr-cpp/Manifest                  |   1 +
 dev-cpp/antlr-cpp/antlr-cpp-2.7.7.ebuild    | 105 ++++++++++++++++++++++++++++
 dev-cpp/antlr-cpp/files/2.7.7-gcc.patch     |  12 ++++
 dev-cpp/antlr-cpp/files/2.7.7-libtool.patch |  21 ++++++
 dev-cpp/antlr-cpp/metadata.xml              |   5 ++
 5 files changed, 144 insertions(+)

diff --git a/dev-cpp/antlr-cpp/Manifest b/dev-cpp/antlr-cpp/Manifest
new file mode 100644
index 0000000..220142f
--- /dev/null
+++ b/dev-cpp/antlr-cpp/Manifest
@@ -0,0 +1 @@
+DIST antlr-2.7.7.tar.gz 1816180 SHA256 853aeb021aef7586bda29e74a6b03006bcb565a755c86b66032d8ec31b67dbb9 SHA512 faa72d2ddcba434ef1233e70c1549e63eba67c00793966322e821cf7f015cccb804448cb92d8fbef0429f59928fad65ec954f8ffbda0acbb8e983de0806d349d WHIRLPOOL def5ac0ddfe5a65f9f7d5489d039048c5d630b46cd5626593bd12e9b393d5ec26884f90b013bcdf58511e26abbf06e0d7b3789a11298b017f7e70af2ec8dde4a

diff --git a/dev-cpp/antlr-cpp/antlr-cpp-2.7.7.ebuild b/dev-cpp/antlr-cpp/antlr-cpp-2.7.7.ebuild
new file mode 100644
index 0000000..b425c2d
--- /dev/null
+++ b/dev-cpp/antlr-cpp/antlr-cpp-2.7.7.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# 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.
+AUTOTOOLS_AUTORECONF=1
+
+inherit eutils autotools-multilib
+
+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 ~ppc ~x86"
+IUSE="doc examples static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )"
+RDEPEND="!!dev-java/antlr:0[cxx]"
+
+S="${WORKDIR}/${MY_P}"
+DOCS=( lib/cpp/AUTHORS lib/cpp/ChangeLog lib/cpp/README lib/cpp/TODO )
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PV}-{gcc,libtool}.patch
+
+	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
+
+	# 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
+
+	autotools-multilib_src_prepare
+}
+
+multilib_src_configure() {
+	local myeconfargs=(
+		--disable-csharp
+		--enable-cxx
+		--disable-examples
+		--disable-java
+		--disable-python
+		--enable-verbose
+	)
+
+	autotools-utils_src_configure
+}
+
+src_compile() {
+	autotools-multilib_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() {
+	autotools-multilib_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/files/2.7.7-gcc.patch b/dev-cpp/antlr-cpp/files/2.7.7-gcc.patch
new file mode 100644
index 0000000..c67d5b6
--- /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 0000000..ea5e809
--- /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 0000000..7303cef
--- /dev/null
+++ b/dev-cpp/antlr-cpp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<herd>java</herd>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-02 22:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-02 14:52 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/antlr-cpp/, dev-cpp/antlr-cpp/files/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2023-01-02 22:02 David Seifert
2015-10-14 15:22 James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox