public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/re2c/files/, dev-util/re2c/
Date: Tue, 30 Mar 2021 07:37:04 +0000 (UTC)	[thread overview]
Message-ID: <1617089821.f046a2ab06555b7cdfd47f03cf12337b18effa5e.slyfox@gentoo> (raw)

commit:     f046a2ab06555b7cdfd47f03cf12337b18effa5e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 30 07:36:38 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Mar 30 07:37:01 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f046a2ab

dev-util/re2c: tweak ./configure for dash

Matt noticed errors when running ./configure on dash:
    ./configure: 5339: test: x: unexpected operator
    ./configure: 5386: test: x: unexpected operator

The change is to use POSIX '=' comparison instead of bash-specific ==.

Patch-by: Matt Whitlock
Bug: https://bugs.gentoo.org/779187
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-util/re2c/files/re2c-2.1.1-sh.patch | 48 +++++++++++++++++++++++++++++++++
 dev-util/re2c/re2c-2.1.1-r1.ebuild      | 29 ++++++++++++++++++++
 2 files changed, 77 insertions(+)

diff --git a/dev-util/re2c/files/re2c-2.1.1-sh.patch b/dev-util/re2c/files/re2c-2.1.1-sh.patch
new file mode 100644
index 00000000000..7caa5d7d1a0
--- /dev/null
+++ b/dev-util/re2c/files/re2c-2.1.1-sh.patch
@@ -0,0 +1,48 @@
+Matt noticed errors when running ./configure on dash:
+    ./configure: 5339: test: x: unexpected operator
+    ./configure: 5386: test: x: unexpected operator
+
+The change is to use POSIX '=' comparison instead of bash-specific ==.
+
+Patch-by: Matt Whitlock
+https://bugs.gentoo.org/779187
+--- a/configure.ac	2021-03-27 18:25:24.000000000 +0000
++++ b/configure.ac	2021-03-30 01:34:01.993467424 +0000
+@@ -65,7 +65,7 @@
+ # --enable-benchmarks
+ AC_ARG_ENABLE([benchmarks], [AS_HELP_STRING([--enable-benchmarks],
+     [build benchmarks])])
+-AM_CONDITIONAL([WITH_BENCHMARKS], [test "x$enable_benchmarks" == "xyes"])
++AM_CONDITIONAL([WITH_BENCHMARKS], [test "x$enable_benchmarks" = "xyes"])
+ AM_COND_IF([WITH_BENCHMARKS], [
+     AC_LANG_PUSH([C++])
+     AC_CHECK_HEADERS([benchmark/benchmark.h], [],
+@@ -79,7 +79,7 @@
+     [AS_HELP_STRING([--enable-benchmarks-regenerate],
+     [regenerate C code for benchmarks])])
+ AM_CONDITIONAL([REGEN_BENCHMARKS],
+-    [test "x$enable_benchmarks_regenerate" == "xyes"])
++    [test "x$enable_benchmarks_regenerate" = "xyes"])
+ 
+ 
+ # checks for programs
+--- a/configure
++++ b/configure
+@@ -5336,7 +5336,7 @@ if test "${enable_benchmarks+set}" = set; then :
+   enableval=$enable_benchmarks;
+ fi
+ 
+- if test "x$enable_benchmarks" == "xyes"; then
++ if test "x$enable_benchmarks" = "xyes"; then
+   WITH_BENCHMARKS_TRUE=
+   WITH_BENCHMARKS_FALSE='#'
+ else
+@@ -5383,7 +5383,7 @@ if test "${enable_benchmarks_regenerate+set}" = set; then :
+   enableval=$enable_benchmarks_regenerate;
+ fi
+ 
+- if test "x$enable_benchmarks_regenerate" == "xyes"; then
++ if test "x$enable_benchmarks_regenerate" = "xyes"; then
+   REGEN_BENCHMARKS_TRUE=
+   REGEN_BENCHMARKS_FALSE='#'
+ else

diff --git a/dev-util/re2c/re2c-2.1.1-r1.ebuild b/dev-util/re2c/re2c-2.1.1-r1.ebuild
new file mode 100644
index 00000000000..76f85099676
--- /dev/null
+++ b/dev-util/re2c/re2c-2.1.1-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="tool for generating C-based recognizers from regular expressions"
+HOMEPAGE="http://re2c.org/"
+SRC_URI="https://github.com/skvadrik/re2c/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="public-domain"
+SLOT="0"
+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"
+IUSE="debug"
+
+PATCHES=("${FILESDIR}"/${P}-sh.patch)
+
+src_configure() {
+	econf \
+		--enable-golang \
+		ac_cv_path_BISON="no" \
+		$(use_enable debug)
+}
+
+src_install() {
+	default
+
+	docompress -x /usr/share/doc/${PF}/examples
+	dodoc -r README.md CHANGELOG examples
+}


             reply	other threads:[~2021-03-30  7:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30  7:37 Sergei Trofimovich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-10  8:32 [gentoo-commits] repo/gentoo:master commit in: dev-util/re2c/files/, dev-util/re2c/ Sergei Trofimovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1617089821.f046a2ab06555b7cdfd47f03cf12337b18effa5e.slyfox@gentoo \
    --to=slyfox@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox