commit:     790e49caf6e767b4406e51815b22e931bed503f0
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  3 11:37:11 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Sep  3 14:25:57 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=790e49ca

dev-util/ragel: EAPI-8, disable static-libs

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/22203

 .../files/ragel-7.0.4-link-colm-properly.patch     | 51 +++++++++++++++++
 dev-util/ragel/ragel-7.0.4-r1.ebuild               | 66 ++++++++++++++++++++++
 2 files changed, 117 insertions(+)

diff --git a/dev-util/ragel/files/ragel-7.0.4-link-colm-properly.patch 
b/dev-util/ragel/files/ragel-7.0.4-link-colm-properly.patch
new file mode 100644
index 00000000000..f5f12ec4491
--- /dev/null
+++ b/dev-util/ragel/files/ragel-7.0.4-link-colm-properly.patch
@@ -0,0 +1,51 @@
+From: Jan Engelhardt <[email protected]>
+Date: 2021-04-27 18:22:18.718396764 +0200
+
+ragel just completely lacks a block to support system colm.
+
+---
+ configure.ac    |   14 ++++++++------
+ src/Makefile.am |    2 +-
+ 2 files changed, 9 insertions(+), 7 deletions(-)
+
+Index: ragel-7.0.4/configure.ac
+===================================================================
+--- ragel-7.0.4.orig/configure.ac
++++ ragel-7.0.4/configure.ac
+@@ -51,14 +51,16 @@ AC_ARG_WITH(colm,
+               LIBFSM_LA="$withval/lib/libfsm.la"
+               COLM_SHARE="$withval/share"
+       ],
+-      []
++      [
++              COLM=/usr/bin/colm
++              COLM_WRAP=/usr/bin/colm-wrap
++              CPPFLAGS="-I/usr/include/aapl $CPPFLAGS"
++              LIBCOLM_LA=-lcolm
++              LIBFSM_LA=-lfsm
++              COLM_SHARE='${datadir}/colm'
++      ]
+ )
+ 
+-AC_CHECK_FILES(
+-      [$COLM],
+-      [],
+-      [AC_ERROR([colm is required to build ragel])]
+-)
+ AC_SUBST(COLM)
+ AC_SUBST(COLM_WRAP)
+ AC_SUBST(COLM_SHARE)
+Index: ragel-7.0.4/src/Makefile.am
+===================================================================
+--- ragel-7.0.4.orig/src/Makefile.am
++++ ragel-7.0.4/src/Makefile.am
+@@ -39,7 +39,7 @@ nodist_ragel_SOURCES = \
+       parse.c rlreduce.cc
+ 
+ ragel_LDADD = $(LIBFSM_LA) $(LIBCOLM_LA) libragel.la
+-ragel_DEPENDENCIES = $(LIBFSM_LA) $(LIBCOLM_LA) libragel.la
++ragel_DEPENDENCIES = libragel.la
+ 
+ BUILT_SOURCES = \
+       version.h \
+

diff --git a/dev-util/ragel/ragel-7.0.4-r1.ebuild 
b/dev-util/ragel/ragel-7.0.4-r1.ebuild
new file mode 100644
index 00000000000..48a3e7cfcf0
--- /dev/null
+++ b/dev-util/ragel/ragel-7.0.4-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Compiles finite state machines from regular languages into 
executable code"
+HOMEPAGE="https://www.colm.net/open-source/ragel/";
+SRC_URI="https://www.colm.net/files/ragel/${P}.tar.gz";
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 
~sparc ~x86"
+IUSE="doc"
+
+# Notes from bug #766090
+# dev-libs/libxml2's xmllint ends up being called by asciidoc here
+# app-text/dblatex too
+# app-text/ghostscript-gpl too
+BDEPEND="
+       doc? (
+               || ( app-text/asciidoc dev-ruby/asciidoctor )
+               app-text/dblatex
+               app-text/ghostscript-gpl
+               dev-libs/libxml2
+               dev-texlive/texlive-latex
+               dev-python/pygments
+               media-gfx/transfig
+       )
+"
+DEPEND=">=dev-util/colm-0.14.7-r1"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-7.0.4-drop-julia-check.patch
+       "${FILESDIR}"/${PN}-7.0.4-link-colm-properly.patch
+)
+
+src_prepare() {
+       default
+
+       # Fix hardcoded search dir
+       sed -i -e "s:\$withval/lib:\$withval/$(get_libdir):" configure.ac || die
+
+       # Allow either asciidoctor or asciidoc
+       # bug #733426
+       sed -i -e 's/(\[ASCIIDOC\], \[asciidoc\], \[asciidoc\]/S([ASCIIDOC], 
[asciidoc asciidoctor]/' configure.ac || die
+
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               --with-colm="${EPREFIX}/usr" \
+               $(use_enable doc manual)
+}
+
+src_install() {
+       default
+
+       insinto /usr/share/vim/vimfiles/syntax
+       doins ragel.vim
+
+       find "${ED}" -name '*.la' -delete || die
+}

Reply via email to