summaryrefslogtreecommitdiff
path: root/dev-ruby/hpricot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-ruby/hpricot
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-ruby/hpricot')
-rw-r--r--dev-ruby/hpricot/Manifest4
-rw-r--r--dev-ruby/hpricot/files/hpricot-0.8.6-fast_xs.patch24
-rw-r--r--dev-ruby/hpricot/hpricot-0.8.6-r5.ebuild61
-rw-r--r--dev-ruby/hpricot/metadata.xml8
4 files changed, 97 insertions, 0 deletions
diff --git a/dev-ruby/hpricot/Manifest b/dev-ruby/hpricot/Manifest
new file mode 100644
index 000000000000..d2997ef010eb
--- /dev/null
+++ b/dev-ruby/hpricot/Manifest
@@ -0,0 +1,4 @@
+AUX hpricot-0.8.6-fast_xs.patch 650 BLAKE2B 5ad93195325fa1e26c2d207fefec83c8e01bbcbfdf933e6925a10bcf74a56c94b8517c7000a3c1aecff091b4d5d1cb3c29c9c899af7a5a5f5f0a17b1967118da SHA512 cbb1aa6138ec98e2eac9bcad8d06ed7c435a8ca503e062776576cfdddb944b294b270dd30e2c2924441ea527445df149e7ce34d085652ca6f184c4e66d209b8d
+DIST hpricot-0.8.6.gem 293888 BLAKE2B 5c054c6fcd5c3365dbf44f3c502bc4c1c3885f4aa43fd1fd15365aea19600ef0ef48157c39ef1709386bda0bc3fb6bba6d98862e8e28bdb5c173429969ef5ab9 SHA512 f0ea9168ae79d099cdb751dd5a205e0896dfb229759e499fff833e94209d1497aa97becb285176dcbcc1fee19bc11913ca3ac0d7a467067e5d837c1eb6e310ad
+EBUILD hpricot-0.8.6-r5.ebuild 1719 BLAKE2B 7b0bb5771289beb025c91c096839d8a7579609044b85a6a99469ae51b3cf0a6817aec38eb97dea0e0c38d41deeb68077745c09cf29d500089893f1f1b23d0897 SHA512 d97947ec9b92adef83543775afb394a746e32837290eeebd3bc94477014e94894e04298fda4d8596bddde035d0ea6ec412b605cd6bfea1a38bc8b6024a630fbb
+MISC metadata.xml 247 BLAKE2B 7717702c51c35b2a20983332abc6218047b2b5036e6b4c09d3d58b4339e8f9e776879cd116cfda60d3bcf4188859993fb9f3f779aaf595f155d53e85288f3dcc SHA512 ea4c044637b751a2c28c6ac226121e74ef18196af4b594e60413fec907bbab29c6b0c7735c3f503485df16dcfb36ddb86038394d92e2cd18c8f04626628e9f09
diff --git a/dev-ruby/hpricot/files/hpricot-0.8.6-fast_xs.patch b/dev-ruby/hpricot/files/hpricot-0.8.6-fast_xs.patch
new file mode 100644
index 000000000000..0b16b6c61b93
--- /dev/null
+++ b/dev-ruby/hpricot/files/hpricot-0.8.6-fast_xs.patch
@@ -0,0 +1,24 @@
+Index: hpricot-0.8.6/metadata
+===================================================================
+--- hpricot-0.8.6.orig/metadata
++++ hpricot-0.8.6/metadata
+@@ -16,7 +16,18 @@ bindir: bin
+ cert_chain: []
+
+ date: 2012-01-17 00:00:00 Z
+-dependencies: []
++dependencies:
++- !ruby/object:Gem::Dependency
++ name: fast_xs
++ prerelease: false
++ requirement: &id003 !ruby/object:Gem::Requirement
++ none: false
++ requirements:
++ - - ">="
++ - !ruby/object:Gem::Version
++ version: 0.7.3
++ type: :runtime
++ version_requirements: *id003
+
+ description: a swift, liberal HTML parser with a fantastic library
+ email: why@ruby-lang.org
diff --git a/dev-ruby/hpricot/hpricot-0.8.6-r5.ebuild b/dev-ruby/hpricot/hpricot-0.8.6-r5.ebuild
new file mode 100644
index 000000000000..ea8137161db8
--- /dev/null
+++ b/dev-ruby/hpricot/hpricot-0.8.6-r5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+USE_RUBY="ruby23 ruby24 ruby25"
+
+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 ~arm64 ~hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE=""
+
+ruby_add_bdepend "dev-ruby/rake
+ dev-ruby/rdoc
+ 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/metadata.xml b/dev-ruby/hpricot/metadata.xml
new file mode 100644
index 000000000000..28ab0c15f206
--- /dev/null
+++ b/dev-ruby/hpricot/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+</maintainer>
+</pkgmetadata>