summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2016-05-27 14:07:15 +0200
committerHans de Graaff <graaff@gentoo.org>2016-05-27 14:07:37 +0200
commit85a5115d2a6378095328422cd36297fd8182c36e (patch)
treeda0b14f83c2e853eed7bd4bc7f59382a03ad3944 /dev-ruby/hpricot
parentsci-libs/libcerf-1.4-r0: add alpha keyword (diff)
downloadgentoo-85a5115d2a6378095328422cd36297fd8182c36e.tar.gz
gentoo-85a5115d2a6378095328422cd36297fd8182c36e.tar.bz2
gentoo-85a5115d2a6378095328422cd36297fd8182c36e.zip
restore -r3 which was removed by accident in previous commit
Package-Manager: portage-2.2.28 RepoMan-Options: --force
Diffstat (limited to 'dev-ruby/hpricot')
-rw-r--r--dev-ruby/hpricot/hpricot-0.8.6-r3.ebuild61
-rw-r--r--dev-ruby/hpricot/hpricot-0.8.6-r4.ebuild3
2 files changed, 61 insertions, 3 deletions
diff --git a/dev-ruby/hpricot/hpricot-0.8.6-r3.ebuild b/dev-ruby/hpricot/hpricot-0.8.6-r3.ebuild
new file mode 100644
index 000000000000..08f61fe35ef9
--- /dev/null
+++ b/dev-ruby/hpricot/hpricot-0.8.6-r3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+USE_RUBY="ruby20 ruby21 ruby22 ruby23"
+
+RUBY_FAKEGEM_DOCDIR="doc"
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.md"
+
+inherit ruby-fakegem eutils
+
+DESCRIPTION="A fast and liberal HTML parser for Ruby"
+HOMEPAGE="https://wiki.github.com/hpricot/hpricot"
+
+LICENSE="MIT"
+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=""
+
+ruby_add_bdepend "dev-ruby/rake
+ dev-ruby/rake-compiler"
+
+ruby_add_rdepend "dev-ruby/fast_xs"
+
+# Probably needs the same jdk as JRuby but I'm not sure how to express
+# that just yet.
+DEPEND+=" dev-util/ragel"
+
+all_ruby_prepare() {
+ sed -i -e '/[Bb]undler/ s:^:#:' Rakefile || die
+
+ # Fix encoding assumption of environment for Ruby 1.9.
+ # https://github.com/hpricot/hpricot/issues/52
+ # sed -i -e '1 iEncoding.default_external=Encoding::UTF_8 if RUBY_VERSION =~ /1.9/' test/load_files.rb || die
+
+ # Avoid unneeded dependency on git.
+ sed -i -e '/^REV/ s/.*/REV = "6"/' Rakefile || die
+
+ # Fix int size warning
+ sed -i -e 's/te - ts/(int)(te - ts)/' ext/hpricot_scan/hpricot_css.rl || die
+}
+
+each_ruby_prepare() {
+ pushd .. &>/dev/null
+ epatch "${FILESDIR}"/${P}-fast_xs.patch
+ popd .. &>/dev/null
+}
+
+each_ruby_configure() {
+ ${RUBY} -Cext/hpricot_scan extconf.rb || die "hpricot_scan/extconf.rb failed"
+}
+
+each_ruby_compile() {
+ local modname=$(get_modname)
+
+ ${RUBY} -S rake ragel || die
+ emake V=1 -Cext/hpricot_scan CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}" || die "make hpricot_scan failed"
+ cp ext/hpricot_scan/hpricot_scan${modname} lib/ || die
+}
diff --git a/dev-ruby/hpricot/hpricot-0.8.6-r4.ebuild b/dev-ruby/hpricot/hpricot-0.8.6-r4.ebuild
index c4adaa7666c1..bee3d092ca1b 100644
--- a/dev-ruby/hpricot/hpricot-0.8.6-r4.ebuild
+++ b/dev-ruby/hpricot/hpricot-0.8.6-r4.ebuild
@@ -37,9 +37,6 @@ all_ruby_prepare() {
# Avoid unneeded dependency on git.
sed -i -e '/^REV/ s/.*/REV = "6"/' Rakefile || die
-
- # Fix int size warning
- sed -i -e 's/te - ts/(int)(te - ts)/' ext/hpricot_scan/hpricot_css.rl || die
}
each_ruby_prepare() {