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: Fri, 28 May 2021 05:29:25
Message-Id: 1622179356.75e1cb09a211a03df312af442eedd6b48c3a8522.graaff@gentoo
1 commit: 75e1cb09a211a03df312af442eedd6b48c3a8522
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 28 05:22:36 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Fri May 28 05:22:36 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75e1cb09
7
8 dev-ruby/nokogiri: add 1.11.6
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.2
11 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
12
13 dev-ruby/nokogiri/Manifest | 1 +
14 dev-ruby/nokogiri/nokogiri-1.11.6.ebuild | 105 +++++++++++++++++++++++++++++++
15 2 files changed, 106 insertions(+)
16
17 diff --git a/dev-ruby/nokogiri/Manifest b/dev-ruby/nokogiri/Manifest
18 index 699f44c4e25..c57fcce8102 100644
19 --- a/dev-ruby/nokogiri/Manifest
20 +++ b/dev-ruby/nokogiri/Manifest
21 @@ -1,3 +1,4 @@
22 DIST nokogiri-1.11.1-git.tgz 5835648 BLAKE2B e8c84fe72063ac3d764ea71fe469a8f7d0499487e523563e0ab737e69e06279b112c666aa254e0075740b27690ba96162a5c6e39f125b58360fbb5720104935d SHA512 47974f05b6788f2e04ef9ed7d0fc33790cdadbd258408e0242a14521cc996b6d42878b5bba3334b4bde2970dbadda0cde93a00e30fcddd100401186a90617502
23 DIST nokogiri-1.11.4-git.tgz 5867481 BLAKE2B d9b0df4d6301a510824f8f31bd51e0f3beaf3cf7d3685a703782ae5fab0667b6276c0ccea20032252efc6c2dd6515577fcb21942f5d27a65815bc48f8af91137 SHA512 ca4bf385b06416f5a5b7f8fd742739181cccf93b42590c7d2d4f666846fd3a25d45c16717ae50bacd85e25644efe8584e195df7174450b8a59f2c6ef47624354
24 DIST nokogiri-1.11.5-git.tgz 5869095 BLAKE2B b5ab85a22adf1a5e6f7f3f57b433c723a34eb17cbfd5d667f56fd439700ff72068212b3a831d5798ed627ebd115d2a0297bd83b54977473ac9f217af04c46296 SHA512 d82f620875416a77727dea600dd17bf0a3c126fdc6f9b9a2cc7cf3f182a8eb14302e167bc397d04dcadcfffbc400369d5aa66f0fee7f5e285414e454059b95ba
25 +DIST nokogiri-1.11.6-git.tgz 5869434 BLAKE2B 222b6b9e871c124a14ac5d9ac3901d9edfa057daaba7e1179853746af50d661bd70568b326603663f890b4b0d80fbb68f8cc22637ca340fa49699f475cce1bec SHA512 a9d2977ba5a12cb252ee615cffbbf043227e78d746ecba4bfcd82fa825f5ef9fdb74feae27115b16cd65da6dd189e4ac88f1d605e776dfbc52aaf2e0e3044381
26
27 diff --git a/dev-ruby/nokogiri/nokogiri-1.11.6.ebuild b/dev-ruby/nokogiri/nokogiri-1.11.6.ebuild
28 new file mode 100644
29 index 00000000000..a12fe2fd24d
30 --- /dev/null
31 +++ b/dev-ruby/nokogiri/nokogiri-1.11.6.ebuild
32 @@ -0,0 +1,105 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +USE_RUBY="ruby25 ruby26 ruby27 ruby30"
39 +
40 +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md ROADMAP.md SECURITY.md"
41 +
42 +RUBY_FAKEGEM_EXTRAINSTALL="ext"
43 +
44 +RUBY_FAKEGEM_GEMSPEC="nokogiri.gemspec"
45 +
46 +RUBY_FAKEGEM_EXTENSIONS=(ext/nokogiri/extconf.rb)
47 +
48 +inherit ruby-fakegem multilib
49 +
50 +DESCRIPTION="Nokogiri is an HTML, XML, SAX, and Reader parser"
51 +HOMEPAGE="https://www.nokogiri.org/"
52 +LICENSE="MIT"
53 +SRC_URI="https://github.com/sparklemotion/nokogiri/archive/v${PV}.tar.gz -> ${P}-git.tgz"
54 +
55 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
56 +SLOT="0"
57 +IUSE=""
58 +
59 +RDEPEND="${RDEPEND}
60 + >=dev-libs/libxml2-2.9.12:=
61 + >=dev-libs/libxslt-1.1.34
62 + virtual/libiconv"
63 +DEPEND="${DEPEND}
64 + >=dev-libs/libxml2-2.9.12
65 + >=dev-libs/libxslt-1.1.34
66 + virtual/libiconv"
67 +
68 +ruby_add_rdepend ">=dev-ruby/racc-1.4:0"
69 +
70 +ruby_add_bdepend "
71 + >=dev-ruby/pkg-config-1.1.7
72 + >=dev-ruby/rexical-1.0.7
73 + dev-ruby/rdoc
74 + test? ( dev-ruby/minitest )"
75 +
76 +all_ruby_prepare() {
77 + sed -i \
78 + -e '/tasks\/cross_compile/s:^:#:' \
79 + -e '/:test.*prerequisites/s:^:#:' \
80 + -e '/license/ s:^:#:' \
81 + Rakefile || die
82 + # Remove the cross compilation options since they interfere with
83 + # native building.
84 + sed -i -e 's/cross_compile = true/cross_compile = false/' Rakefile || die
85 + sed -i -e '/cross_config_options/d' Rakefile || die
86 +
87 + sed -e '/simplecov/,/^end/ s:^:#:' \
88 + -e '/reporters/I s:^:#:' \
89 + -i test/helper.rb || die
90 +
91 + sed -i -e '/mini_portile2/ s:^:#:' ${RUBY_FAKEGEM_GEMSPEC} || die
92 +
93 + # Account for fix making it upstream into our libxml2 system version
94 + sed -i -e '116 s/using_packaged/using_system/ ; 131 s/if/if false and /' test/html/test_comments.rb || die
95 +}
96 +
97 +each_ruby_configure() {
98 + NOKOGIRI_USE_SYSTEM_LIBRARIES=true \
99 + ${RUBY} -Cext/${PN} extconf.rb \
100 + --with-zlib-include="${EPREFIX}"/usr/include \
101 + --with-zlib-lib="${EPREFIX}"/$(get_libdir) \
102 + --with-iconv-include="${EPREFIX}"/usr/include \
103 + --with-iconv-lib="${EPREFIX}"/$(get_libdir) \
104 + --with-xml2-include="${EPREFIX}"/usr/include/libxml2 \
105 + --with-xml2-lib="${EPREFIX}"/usr/$(get_libdir) \
106 + --with-xslt-dir="${EPREFIX}"/usr \
107 + --with-iconvlib=iconv \
108 + || die "extconf.rb failed"
109 +}
110 +
111 +each_ruby_compile() {
112 + if ! [[ -f lib/nokogiri/css/tokenizer.rb ]]; then
113 + ${RUBY} -S rake lib/nokogiri/css/tokenizer.rb || die "rexical failed"
114 + fi
115 +
116 + if ! [[ -f lib/nokogiri/css/parser.rb ]]; then
117 + ${RUBY} -S rake lib/nokogiri/css/parser.rb || die "racc failed"
118 + fi
119 +
120 + emake -Cext/${PN} \
121 + V=1 \
122 + CFLAGS="${CFLAGS} -fPIC" \
123 + archflag="${LDFLAGS}" || die "make extension failed"
124 + cp -l ext/${PN}/${PN}$(get_modname) lib/${PN}/ || die
125 +}
126 +
127 +each_ruby_test() {
128 + ${RUBY} -Ilib:.:test -e 'Dir["test/**/test_*.rb"].each {|f| require f}' || die
129 +}
130 +
131 +each_ruby_install() {
132 + each_fakegem_install
133 +
134 + # Clean up "ext" directory before installing it. nokogumbo expects
135 + # the header files and shared object to be in ext.
136 + rm -rf ext/java ext/nokogiri/*.o ext/nokogiri/{mkmf.log,Makefile} || die
137 +}