1 |
commit: f046a2ab06555b7cdfd47f03cf12337b18effa5e |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 30 07:36:38 2021 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 30 07:37:01 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f046a2ab |
7 |
|
8 |
dev-util/re2c: tweak ./configure for dash |
9 |
|
10 |
Matt noticed errors when running ./configure on dash: |
11 |
./configure: 5339: test: x: unexpected operator |
12 |
./configure: 5386: test: x: unexpected operator |
13 |
|
14 |
The change is to use POSIX '=' comparison instead of bash-specific ==. |
15 |
|
16 |
Patch-by: Matt Whitlock |
17 |
Bug: https://bugs.gentoo.org/779187 |
18 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
19 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
20 |
|
21 |
dev-util/re2c/files/re2c-2.1.1-sh.patch | 48 +++++++++++++++++++++++++++++++++ |
22 |
dev-util/re2c/re2c-2.1.1-r1.ebuild | 29 ++++++++++++++++++++ |
23 |
2 files changed, 77 insertions(+) |
24 |
|
25 |
diff --git a/dev-util/re2c/files/re2c-2.1.1-sh.patch b/dev-util/re2c/files/re2c-2.1.1-sh.patch |
26 |
new file mode 100644 |
27 |
index 00000000000..7caa5d7d1a0 |
28 |
--- /dev/null |
29 |
+++ b/dev-util/re2c/files/re2c-2.1.1-sh.patch |
30 |
@@ -0,0 +1,48 @@ |
31 |
+Matt noticed errors when running ./configure on dash: |
32 |
+ ./configure: 5339: test: x: unexpected operator |
33 |
+ ./configure: 5386: test: x: unexpected operator |
34 |
+ |
35 |
+The change is to use POSIX '=' comparison instead of bash-specific ==. |
36 |
+ |
37 |
+Patch-by: Matt Whitlock |
38 |
+https://bugs.gentoo.org/779187 |
39 |
+--- a/configure.ac 2021-03-27 18:25:24.000000000 +0000 |
40 |
++++ b/configure.ac 2021-03-30 01:34:01.993467424 +0000 |
41 |
+@@ -65,7 +65,7 @@ |
42 |
+ # --enable-benchmarks |
43 |
+ AC_ARG_ENABLE([benchmarks], [AS_HELP_STRING([--enable-benchmarks], |
44 |
+ [build benchmarks])]) |
45 |
+-AM_CONDITIONAL([WITH_BENCHMARKS], [test "x$enable_benchmarks" == "xyes"]) |
46 |
++AM_CONDITIONAL([WITH_BENCHMARKS], [test "x$enable_benchmarks" = "xyes"]) |
47 |
+ AM_COND_IF([WITH_BENCHMARKS], [ |
48 |
+ AC_LANG_PUSH([C++]) |
49 |
+ AC_CHECK_HEADERS([benchmark/benchmark.h], [], |
50 |
+@@ -79,7 +79,7 @@ |
51 |
+ [AS_HELP_STRING([--enable-benchmarks-regenerate], |
52 |
+ [regenerate C code for benchmarks])]) |
53 |
+ AM_CONDITIONAL([REGEN_BENCHMARKS], |
54 |
+- [test "x$enable_benchmarks_regenerate" == "xyes"]) |
55 |
++ [test "x$enable_benchmarks_regenerate" = "xyes"]) |
56 |
+ |
57 |
+ |
58 |
+ # checks for programs |
59 |
+--- a/configure |
60 |
++++ b/configure |
61 |
+@@ -5336,7 +5336,7 @@ if test "${enable_benchmarks+set}" = set; then : |
62 |
+ enableval=$enable_benchmarks; |
63 |
+ fi |
64 |
+ |
65 |
+- if test "x$enable_benchmarks" == "xyes"; then |
66 |
++ if test "x$enable_benchmarks" = "xyes"; then |
67 |
+ WITH_BENCHMARKS_TRUE= |
68 |
+ WITH_BENCHMARKS_FALSE='#' |
69 |
+ else |
70 |
+@@ -5383,7 +5383,7 @@ if test "${enable_benchmarks_regenerate+set}" = set; then : |
71 |
+ enableval=$enable_benchmarks_regenerate; |
72 |
+ fi |
73 |
+ |
74 |
+- if test "x$enable_benchmarks_regenerate" == "xyes"; then |
75 |
++ if test "x$enable_benchmarks_regenerate" = "xyes"; then |
76 |
+ REGEN_BENCHMARKS_TRUE= |
77 |
+ REGEN_BENCHMARKS_FALSE='#' |
78 |
+ else |
79 |
|
80 |
diff --git a/dev-util/re2c/re2c-2.1.1-r1.ebuild b/dev-util/re2c/re2c-2.1.1-r1.ebuild |
81 |
new file mode 100644 |
82 |
index 00000000000..76f85099676 |
83 |
--- /dev/null |
84 |
+++ b/dev-util/re2c/re2c-2.1.1-r1.ebuild |
85 |
@@ -0,0 +1,29 @@ |
86 |
+# Copyright 1999-2021 Gentoo Authors |
87 |
+# Distributed under the terms of the GNU General Public License v2 |
88 |
+ |
89 |
+EAPI=7 |
90 |
+ |
91 |
+DESCRIPTION="tool for generating C-based recognizers from regular expressions" |
92 |
+HOMEPAGE="http://re2c.org/" |
93 |
+SRC_URI="https://github.com/skvadrik/re2c/releases/download/${PV}/${P}.tar.xz" |
94 |
+ |
95 |
+LICENSE="public-domain" |
96 |
+SLOT="0" |
97 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
98 |
+IUSE="debug" |
99 |
+ |
100 |
+PATCHES=("${FILESDIR}"/${P}-sh.patch) |
101 |
+ |
102 |
+src_configure() { |
103 |
+ econf \ |
104 |
+ --enable-golang \ |
105 |
+ ac_cv_path_BISON="no" \ |
106 |
+ $(use_enable debug) |
107 |
+} |
108 |
+ |
109 |
+src_install() { |
110 |
+ default |
111 |
+ |
112 |
+ docompress -x /usr/share/doc/${PF}/examples |
113 |
+ dodoc -r README.md CHANGELOG examples |
114 |
+} |