Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/ragel/files/, dev-util/ragel/
Date: Fri, 03 Sep 2021 14:27:03
Message-Id: 1630679157.790e49caf6e767b4406e51815b22e931bed503f0.juippis@gentoo
1 commit: 790e49caf6e767b4406e51815b22e931bed503f0
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 3 11:37:11 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 3 14:25:57 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=790e49ca
7
8 dev-util/ragel: EAPI-8, disable static-libs
9
10 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
11 Closes: https://github.com/gentoo/gentoo/pull/22203
12
13 .../files/ragel-7.0.4-link-colm-properly.patch | 51 +++++++++++++++++
14 dev-util/ragel/ragel-7.0.4-r1.ebuild | 66 ++++++++++++++++++++++
15 2 files changed, 117 insertions(+)
16
17 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
18 new file mode 100644
19 index 00000000000..f5f12ec4491
20 --- /dev/null
21 +++ b/dev-util/ragel/files/ragel-7.0.4-link-colm-properly.patch
22 @@ -0,0 +1,51 @@
23 +From: Jan Engelhardt <jengelh@××××.de>
24 +Date: 2021-04-27 18:22:18.718396764 +0200
25 +
26 +ragel just completely lacks a block to support system colm.
27 +
28 +---
29 + configure.ac | 14 ++++++++------
30 + src/Makefile.am | 2 +-
31 + 2 files changed, 9 insertions(+), 7 deletions(-)
32 +
33 +Index: ragel-7.0.4/configure.ac
34 +===================================================================
35 +--- ragel-7.0.4.orig/configure.ac
36 ++++ ragel-7.0.4/configure.ac
37 +@@ -51,14 +51,16 @@ AC_ARG_WITH(colm,
38 + LIBFSM_LA="$withval/lib/libfsm.la"
39 + COLM_SHARE="$withval/share"
40 + ],
41 +- []
42 ++ [
43 ++ COLM=/usr/bin/colm
44 ++ COLM_WRAP=/usr/bin/colm-wrap
45 ++ CPPFLAGS="-I/usr/include/aapl $CPPFLAGS"
46 ++ LIBCOLM_LA=-lcolm
47 ++ LIBFSM_LA=-lfsm
48 ++ COLM_SHARE='${datadir}/colm'
49 ++ ]
50 + )
51 +
52 +-AC_CHECK_FILES(
53 +- [$COLM],
54 +- [],
55 +- [AC_ERROR([colm is required to build ragel])]
56 +-)
57 + AC_SUBST(COLM)
58 + AC_SUBST(COLM_WRAP)
59 + AC_SUBST(COLM_SHARE)
60 +Index: ragel-7.0.4/src/Makefile.am
61 +===================================================================
62 +--- ragel-7.0.4.orig/src/Makefile.am
63 ++++ ragel-7.0.4/src/Makefile.am
64 +@@ -39,7 +39,7 @@ nodist_ragel_SOURCES = \
65 + parse.c rlreduce.cc
66 +
67 + ragel_LDADD = $(LIBFSM_LA) $(LIBCOLM_LA) libragel.la
68 +-ragel_DEPENDENCIES = $(LIBFSM_LA) $(LIBCOLM_LA) libragel.la
69 ++ragel_DEPENDENCIES = libragel.la
70 +
71 + BUILT_SOURCES = \
72 + version.h \
73 +
74
75 diff --git a/dev-util/ragel/ragel-7.0.4-r1.ebuild b/dev-util/ragel/ragel-7.0.4-r1.ebuild
76 new file mode 100644
77 index 00000000000..48a3e7cfcf0
78 --- /dev/null
79 +++ b/dev-util/ragel/ragel-7.0.4-r1.ebuild
80 @@ -0,0 +1,66 @@
81 +# Copyright 1999-2021 Gentoo Authors
82 +# Distributed under the terms of the GNU General Public License v2
83 +
84 +EAPI=8
85 +
86 +inherit autotools
87 +
88 +DESCRIPTION="Compiles finite state machines from regular languages into executable code"
89 +HOMEPAGE="https://www.colm.net/open-source/ragel/"
90 +SRC_URI="https://www.colm.net/files/ragel/${P}.tar.gz"
91 +
92 +LICENSE="MIT"
93 +SLOT="0"
94 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
95 +IUSE="doc"
96 +
97 +# Notes from bug #766090
98 +# dev-libs/libxml2's xmllint ends up being called by asciidoc here
99 +# app-text/dblatex too
100 +# app-text/ghostscript-gpl too
101 +BDEPEND="
102 + doc? (
103 + || ( app-text/asciidoc dev-ruby/asciidoctor )
104 + app-text/dblatex
105 + app-text/ghostscript-gpl
106 + dev-libs/libxml2
107 + dev-texlive/texlive-latex
108 + dev-python/pygments
109 + media-gfx/transfig
110 + )
111 +"
112 +DEPEND=">=dev-util/colm-0.14.7-r1"
113 +RDEPEND="${DEPEND}"
114 +
115 +PATCHES=(
116 + "${FILESDIR}"/${PN}-7.0.4-drop-julia-check.patch
117 + "${FILESDIR}"/${PN}-7.0.4-link-colm-properly.patch
118 +)
119 +
120 +src_prepare() {
121 + default
122 +
123 + # Fix hardcoded search dir
124 + sed -i -e "s:\$withval/lib:\$withval/$(get_libdir):" configure.ac || die
125 +
126 + # Allow either asciidoctor or asciidoc
127 + # bug #733426
128 + sed -i -e 's/(\[ASCIIDOC\], \[asciidoc\], \[asciidoc\]/S([ASCIIDOC], [asciidoc asciidoctor]/' configure.ac || die
129 +
130 + eautoreconf
131 +}
132 +
133 +src_configure() {
134 + econf \
135 + --with-colm="${EPREFIX}/usr" \
136 + $(use_enable doc manual)
137 +}
138 +
139 +src_install() {
140 + default
141 +
142 + insinto /usr/share/vim/vimfiles/syntax
143 + doins ragel.vim
144 +
145 + find "${ED}" -name '*.la' -delete || die
146 +}