summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-12-16 07:07:00 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-12-16 07:07:00 +0000
commitd8a00d85d355a0eca1138816cb5ce9733aa2f172 (patch)
tree50489093eb49dcbf76ddaf5b60a2fa35d382fe21 /dev-util/ragel
parentamd64 stable - 348269 (diff)
downloadhistorical-d8a00d85d355a0eca1138816cb5ce9733aa2f172.tar.gz
historical-d8a00d85d355a0eca1138816cb5ce9733aa2f172.tar.bz2
historical-d8a00d85d355a0eca1138816cb5ce9733aa2f172.zip
Revision bump ragel to fix the generated state machines to work with Ruby 1.9. Also fix both the new and old (stable) ebuild to run econf just once, as it was broken when adding prefix support.
Package-Manager: portage-2.2.0_alpha8/cvs/Linux x86_64
Diffstat (limited to 'dev-util/ragel')
-rw-r--r--dev-util/ragel/ChangeLog8
-rw-r--r--dev-util/ragel/Manifest16
-rw-r--r--dev-util/ragel/files/ragel-6.6-ruby-1.9.2.patch46
-rw-r--r--dev-util/ragel/ragel-6.6-r1.ebuild45
-rw-r--r--dev-util/ragel/ragel-6.6.ebuild5
5 files changed, 114 insertions, 6 deletions
diff --git a/dev-util/ragel/ChangeLog b/dev-util/ragel/ChangeLog
index fb6af8daeabc..1ccce30df720 100644
--- a/dev-util/ragel/ChangeLog
+++ b/dev-util/ragel/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-util/ragel
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/ragel/ChangeLog,v 1.43 2010/12/04 15:29:27 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/ragel/ChangeLog,v 1.44 2010/12/16 07:06:59 flameeyes Exp $
+
+ 16 Dec 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ +files/ragel-6.6-ruby-1.9.2.patch:
+ Revision bump ragel to fix the generated state machines to work with Ruby
+ 1.9. Also fix both the new and old (stable) ebuild to run econf just once, as
+ it was broken when adding prefix support.
04 Dec 2010; Fabian Groffen <grobian@gentoo.org> ragel-6.6.ebuild:
Bump to EAPI=3 for Prefix, add Prefix keywords
diff --git a/dev-util/ragel/Manifest b/dev-util/ragel/Manifest
index face4997ea29..3946ddb1e1e4 100644
--- a/dev-util/ragel/Manifest
+++ b/dev-util/ragel/Manifest
@@ -1,4 +1,16 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX ragel-6.6-ruby-1.9.2.patch 1510 RMD160 e6a10af9c27e07354046e102e5fba631ba333c3d SHA1 f55c5c304ba60145dd142f23b5cc41f073cf649f SHA256 4d87d6f8fba8b0dd15fbb1e99c604f88b5ce63adf4f46cb51cf7ba487cbdadec
DIST ragel-6.6.tar.gz 1091836 RMD160 b0de6eaa6383f5fc9f9121012262685eec408450 SHA1 8c085300c90e23a120684760b5f078fca275bb49 SHA256 a8f38166d57163ff821ad4608ba258ed3b01ac8abb890440e03163cbb835e932
-EBUILD ragel-6.6.ebuild 1127 RMD160 c719ccb27f862e03b92d8292bfec939a7ce354bc SHA1 9c9b3f57628dfce80d8aad051397f0b7827e732e SHA256 90ef9e51c32e80298b4463f9e2de342ebc5c4f0cf6856b74a0d52816afe17499
-MISC ChangeLog 5828 RMD160 73a31c676fca6020e5001df2a3fa39bbadffaae5 SHA1 4a2e1b12bce027ed5a43e725b2c401c5134be0d6 SHA256 4116c0b51d1c225d45e5613da44d797b5d42212304a9d008ad8cd063449d4f9a
+EBUILD ragel-6.6-r1.ebuild 1190 RMD160 4f0f201167fc74170815dcfa33dd28166161f29d SHA1 a31497cd0af256f7faac77a8d7cb6d97ef774120 SHA256 54639c80cf70a5f131a48213b169b6ca1f97137bae93e3c86d22c87a343f8397
+EBUILD ragel-6.6.ebuild 1102 RMD160 fa5c97e5b42ccd031fd122b412e55e77d0281ba3 SHA1 77062e77a2a14dc0562d001192f0d35e6a5bcdd1 SHA256 ee19b36e7cfc8d45e8e4a7df8966c0636b8dae83ecc3419deac87d668bdc94df
+MISC ChangeLog 6124 RMD160 8c66b58a759433b0c673cf61af2b65a325b8adbf SHA1 30945bce91d4addb9b44aeed15ee3d159898bf03 SHA256 e7341779120734f89cc513643557e454ecb664dd979e57bdfe04eb3ba8ecaec1
MISC metadata.xml 302 RMD160 9205fdcfd20baf4dd662ab6ebc1f99703a8ff3bd SHA1 e3da4820729ccfd84d5705065c7f3b70983b5a29 SHA256 2f71f52c17df00296cea96267c2fe72b083db772d619e8616029254e81484abb
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.16 (GNU/Linux)
+
+iEYEARECAAYFAk0JutkACgkQAiZjviIA2XgYbgCg00/nVIvIzR1QM3+fvmjT3IlZ
+G88AoLzkDKDy7kYGtPiv4pDtb9O7yikP
+=MQdj
+-----END PGP SIGNATURE-----
diff --git a/dev-util/ragel/files/ragel-6.6-ruby-1.9.2.patch b/dev-util/ragel/files/ragel-6.6-ruby-1.9.2.patch
new file mode 100644
index 000000000000..1408c50a46f2
--- /dev/null
+++ b/dev-util/ragel/files/ragel-6.6-ruby-1.9.2.patch
@@ -0,0 +1,46 @@
+From 50dee06311df4d795b1473935da3cbc661835b73 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Thu, 16 Dec 2010 07:44:41 +0100
+Subject: [PATCH] Fix generated code for Ruby 1.9 compatibility.
+
+In Ruby 1.9, the String class no longer works as a C-style array of (8-bit)
+characters, but supports multiple encoding. While it is obviously a task
+for the developer to ensure that the data array passed to the
+Ragel-generated code is in a compatible encoding, this also means that the
+simple dereference is not going to work:
+
+% ruby18 -e 'puts "foo"[0].class'
+Fixnum
+% ruby19 -e 'puts "foo"[0].class'
+String
+
+This is easily fixed by calling the #ord method on the dereferenced data,
+which will provide the ASCII ordinal (or UNICODE codepoint) for the single
+character.
+
+The produced code works correctly both on Ruby 1.8 and 1.9.2.
+---
+ ragel/rubycodegen.cpp | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/ragel/rubycodegen.cpp b/ragel/rubycodegen.cpp
+index 5117823..f329587 100644
+--- a/ragel/rubycodegen.cpp
++++ b/ragel/rubycodegen.cpp
+@@ -307,8 +307,11 @@ string RubyCodeGen::GET_KEY()
+ ret << ")";
+ }
+ else {
+- /* Expression for retrieving the key, use simple dereference. */
+- ret << DATA() << "[" << P() << "]";
++ /* Expression for retrieving the key, use dereference
++ * and read ordinal, for compatibility with Ruby
++ * 1.9.
++ */
++ ret << DATA() << "[" << P() << "].ord";
+ }
+ return ret.str();
+ }
+--
+1.7.3.3
+
diff --git a/dev-util/ragel/ragel-6.6-r1.ebuild b/dev-util/ragel/ragel-6.6-r1.ebuild
new file mode 100644
index 000000000000..9f28fd2030b8
--- /dev/null
+++ b/dev-util/ragel/ragel-6.6-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/ragel/ragel-6.6-r1.ebuild,v 1.1 2010/12/16 07:06:59 flameeyes Exp $
+
+EAPI="3"
+
+inherit eutils
+
+DESCRIPTION="Compiles finite state machines from regular languages into executable code."
+HOMEPAGE="http://www.complang.org/ragel/"
+SRC_URI="http://www.complang.org/ragel/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="vim-syntax"
+
+DEPEND=""
+RDEPEND=""
+
+# We need to get the txl language in Portage to have the tests :(
+RESTRICT=test
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-ruby-1.9.2.patch"
+}
+
+src_configure() {
+ econf --docdir="${EPREFIX}"/usr/share/doc/${PF} || die "econf failed"
+}
+
+src_test() {
+ cd "${S}"/test
+ ./runtests.in || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc ChangeLog CREDITS README TODO || die "dodoc failed"
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins ragel.vim || die "doins ragel.vim failed"
+ fi
+}
diff --git a/dev-util/ragel/ragel-6.6.ebuild b/dev-util/ragel/ragel-6.6.ebuild
index 4ecc674fde3a..6d45bc69a923 100644
--- a/dev-util/ragel/ragel-6.6.ebuild
+++ b/dev-util/ragel/ragel-6.6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/ragel/ragel-6.6.ebuild,v 1.12 2010/12/04 15:29:27 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/ragel/ragel-6.6.ebuild,v 1.13 2010/12/16 07:06:59 flameeyes Exp $
EAPI="3"
@@ -19,9 +19,8 @@ RDEPEND=""
# We need to get the txl language in Portage to have the tests :(
RESTRICT=test
-src_compile() {
+src_configure() {
econf --docdir="${EPREFIX}"/usr/share/doc/${PF} || die "econf failed"
- emake || die "emake failed"
}
src_test() {