Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/nokogiri/
Date: Wed, 04 Jul 2018 03:57:06
Message-Id: 1530676454.5fc536e5fd876be9cc4a3b3fa428a2c00bd1ba02.graaff@gentoo
1 commit: 5fc536e5fd876be9cc4a3b3fa428a2c00bd1ba02
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 4 03:54:14 2018 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 4 03:54:14 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fc536e5
7
8 dev-ruby/nokogiri: add 1.8.4
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 dev-ruby/nokogiri/Manifest | 1 +
13 dev-ruby/nokogiri/nokogiri-1.8.4.ebuild | 93 +++++++++++++++++++++++++++++++++
14 2 files changed, 94 insertions(+)
15
16 diff --git a/dev-ruby/nokogiri/Manifest b/dev-ruby/nokogiri/Manifest
17 index 0001491ec5e..f9a63a28604 100644
18 --- a/dev-ruby/nokogiri/Manifest
19 +++ b/dev-ruby/nokogiri/Manifest
20 @@ -1,2 +1,3 @@
21 DIST nokogiri-1.8.1-git.tgz 5747155 BLAKE2B 40eaa7506f646e47caced25e87c125f2650d69e7194491061f734de9d4b58ee3efcab202e528c8d416683bf1642b0f1e7cbeb7268e1fa32549ae2a427d55227d SHA512 fbd5e9c3edb0f7099ed7923ccb8922e778859ee1fb226c756f515f69c5f16cc4103644d4a569e16aa05374c6e94c691572255ea82af0002f95879ed396ccdc4a
22 DIST nokogiri-1.8.2-git.tgz 5749541 BLAKE2B bb3baa299fd27caf43890a752f93cfc1aafd5897f19783cbc6732ce2924bf9c86639ccabad9f26506cf228f5c179afae4cde57150769780c30d9dfc3403359b0 SHA512 5f34f8a055844cd034682b11e4408fb12b60640e52ea64886a13cb5504d94904eace2a85d5047b21f946f1a296ee562ab3677791d53093123ac136062167294d
23 +DIST nokogiri-1.8.4-git.tgz 5754921 BLAKE2B 189dc8ffe4df67b04fa8436799bd6d64e4f8c1f93206b619bda8e153afffb3091fdfab9a3a4da28fcaa2650711aad6e37232e4e948a74c217f7fdc8b061dd4cd SHA512 ed409daeb4e13f93e13bc6901ee27bf5d1155e24fb306b5b9e8ba462517d26d4514413b9728d4a8f2514015c54436b9689a11449030c7bb5826d2ca7bf7eb97a
24
25 diff --git a/dev-ruby/nokogiri/nokogiri-1.8.4.ebuild b/dev-ruby/nokogiri/nokogiri-1.8.4.ebuild
26 new file mode 100644
27 index 00000000000..469b051ba01
28 --- /dev/null
29 +++ b/dev-ruby/nokogiri/nokogiri-1.8.4.ebuild
30 @@ -0,0 +1,93 @@
31 +# Copyright 1999-2018 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +USE_RUBY="ruby23 ruby24 ruby25"
37 +
38 +RUBY_FAKEGEM_RECIPE_DOC="rdoc"
39 +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md ROADMAP.md STANDARD_RESPONSES.md"
40 +
41 +RUBY_FAKEGEM_EXTRAINSTALL="ext"
42 +
43 +inherit ruby-fakegem eutils multilib
44 +
45 +DESCRIPTION="Nokogiri is an HTML, XML, SAX, and Reader parser"
46 +HOMEPAGE="https://www.nokogiri.org/"
47 +LICENSE="MIT"
48 +SRC_URI="https://github.com/sparklemotion/nokogiri/archive/v${PV}.tar.gz -> ${P}-git.tgz"
49 +
50 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
51 +SLOT="0"
52 +IUSE=""
53 +
54 +RDEPEND="${RDEPEND}
55 + >=dev-libs/libxml2-2.9.8:=
56 + >=dev-libs/libxslt-1.1.30
57 + virtual/libiconv"
58 +DEPEND="${DEPEND}
59 + >=dev-libs/libxml2-2.9.8
60 + >=dev-libs/libxslt-1.1.30
61 + virtual/libiconv"
62 +
63 +ruby_add_bdepend "
64 + dev-ruby/hoe
65 + >=dev-ruby/pkg-config-1.1.7
66 + dev-ruby/rexical
67 + dev-ruby/rdoc
68 + dev-ruby/racc
69 + test? ( dev-ruby/minitest )"
70 +
71 +all_ruby_prepare() {
72 + sed -i \
73 + -e '/tasks\/cross_compile/s:^:#:' \
74 + -e '/:test.*prerequisites/s:^:#:' \
75 + -e '/license/ s:^:#:' \
76 + Rakefile || die
77 + # Remove the cross compilation options since they interfere with
78 + # native building.
79 + sed -i -e 's/cross_compile = true/cross_compile = false/' Rakefile || die
80 + sed -i -e '/cross_config_options/d' Rakefile || die
81 +}
82 +
83 +each_ruby_configure() {
84 + NOKOGIRI_USE_SYSTEM_LIBRARIES=true \
85 + ${RUBY} -Cext/${PN} extconf.rb \
86 + --with-zlib-include="${EPREFIX}"/usr/include \
87 + --with-zlib-lib="${EPREFIX}"/$(get_libdir) \
88 + --with-iconv-include="${EPREFIX}"/usr/include \
89 + --with-iconv-lib="${EPREFIX}"/$(get_libdir) \
90 + --with-xml2-include="${EPREFIX}"/usr/include/libxml2 \
91 + --with-xml2-lib="${EPREFIX}"/usr/$(get_libdir) \
92 + --with-xslt-dir="${EPREFIX}"/usr \
93 + --with-iconvlib=iconv \
94 + || die "extconf.rb failed"
95 +}
96 +
97 +each_ruby_compile() {
98 + if ! [[ -f lib/nokogiri/css/tokenizer.rb ]]; then
99 + ${RUBY} -S rake lib/nokogiri/css/tokenizer.rb || die "rexical failed"
100 + fi
101 +
102 + if ! [[ -f lib/nokogiri/css/parser.rb ]]; then
103 + ${RUBY} -S rake lib/nokogiri/css/parser.rb || die "racc failed"
104 + fi
105 +
106 + emake -Cext/${PN} \
107 + V=1 \
108 + CFLAGS="${CFLAGS} -fPIC" \
109 + archflag="${LDFLAGS}" || die "make extension failed"
110 + cp -l ext/${PN}/${PN}$(get_modname) lib/${PN}/ || die
111 +}
112 +
113 +each_ruby_test() {
114 + ${RUBY} -Ilib:.:test -e 'Dir["test/**/test_*.rb"].each {|f| require f}' || die
115 +}
116 +
117 +each_ruby_install() {
118 + # Clean up "ext" directory before installing it. nokogumbo expects
119 + # the header files and shared object to be in ext.
120 + rm -rf ext/java ext/nokogiri/*.o ext/nokogiri/{mkmf.log,Makefile} || die
121 +
122 + each_fakegem_install
123 +}