diff options
-rw-r--r-- | dev-ruby/nokogiri/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/nokogiri/nokogiri-1.13.3.ebuild | 96 |
2 files changed, 97 insertions, 0 deletions
diff --git a/dev-ruby/nokogiri/Manifest b/dev-ruby/nokogiri/Manifest index d2dcc0b9b81e..15f1fb85ae4d 100644 --- a/dev-ruby/nokogiri/Manifest +++ b/dev-ruby/nokogiri/Manifest @@ -2,3 +2,4 @@ DIST nokogiri-1.11.7-git.tgz 5871407 BLAKE2B c0449b5cb8210d22be31f1f9a43c0c13c7a DIST nokogiri-1.12.5-git.tgz 6158880 BLAKE2B 994fd89c5163d92110de40e2dc654698b11d5a18524cc4b7b668ec1475e7167014e1c7604932686e6ad888f352b04ac26a7fbe526d814b20e686c5d9da95c5df SHA512 36d233df250213c4614c34d045c4fbea099e81e991a6da49067c165bc95f36b281c58cc79deb3b6a8aaccc50743a79efa27969e067cc2b546bef7615b139d79b DIST nokogiri-1.13.0-git.tgz 6188433 BLAKE2B ec603e4202b03cc74ce73c540cfccab51f0910b24a3cde0ecbc6267a83c0c4898bc40614261727f7c7e52561d0dec679e00d97a9a0066ac436037a1681a4125b SHA512 f11169ab0dfec9b16e9fc32c066910dcc71325795283fac1372a67383535ddfd09bf342e2a82b129b71c058153f338cba30000ef16f85225f24b6d0c769c98cf DIST nokogiri-1.13.1-git.tgz 6190499 BLAKE2B daea484ee0e5bff581ae67528f1688002f1e2f550eb55e3164b631f9e87b188ec4152347aaa0ae6253feafbdae9182c54c92cb709c223ce04120ddd1b340cd17 SHA512 febb7b8a701c9be4f7b60a8b43bc24d17a37d39a8557ea4fc76d1490e7f9973d2a4516560f3335ba5d2405ae487e040e47fe24387a25e6c170e34719e9dd230c +DIST nokogiri-1.13.3-git.tgz 6187128 BLAKE2B 7ab47b7e5d87a83eeaf9c5e10684199f67be1af80a5fa5d616cb4a3ffe91a9598be0576dc23d8f0cc6d143f8ce601a868e44af6411615f377cd43773659b25b8 SHA512 69666c1f62124a20fcfe3fa58091a463ed64d5a9c98355572c5822944ba6992fe1e150b694fa883d23605999f14065c5c59d7a34e2273041d9de416e42d75fb6 diff --git a/dev-ruby/nokogiri/nokogiri-1.13.3.ebuild b/dev-ruby/nokogiri/nokogiri-1.13.3.ebuild new file mode 100644 index 000000000000..331172177036 --- /dev/null +++ b/dev-ruby/nokogiri/nokogiri-1.13.3.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby26 ruby27 ruby30" + +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md ROADMAP.md SECURITY.md" + +RUBY_FAKEGEM_GEMSPEC="nokogiri.gemspec" + +RUBY_FAKEGEM_EXTENSIONS=(ext/nokogiri/extconf.rb) + +inherit ruby-fakegem multilib + +DESCRIPTION="Nokogiri is an HTML, XML, SAX, and Reader parser" +HOMEPAGE="https://www.nokogiri.org/" +LICENSE="MIT" +SRC_URI="https://github.com/sparklemotion/nokogiri/archive/v${PV}.tar.gz -> ${P}-git.tgz" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +SLOT="0" +IUSE="" + +RDEPEND="${RDEPEND} + >=dev-libs/libxml2-2.9.13:= + >=dev-libs/libxslt-1.1.35 + sys-libs/zlib + virtual/libiconv" +DEPEND="${DEPEND} + >=dev-libs/libxml2-2.9.13 + >=dev-libs/libxslt-1.1.35 + sys-libs/zlib + virtual/libiconv" + +ruby_add_rdepend ">=dev-ruby/racc-1.4:0" + +ruby_add_bdepend " + dev-ruby/mini_portile2:2.8 + >=dev-ruby/pkg-config-1.1.7 + >=dev-ruby/rexical-1.0.7 + dev-ruby/rdoc + test? ( dev-ruby/minitest )" + +all_ruby_prepare() { + sed -i \ + -e '/tasks\/cross_compile/s:^:#:' \ + -e '/:test.*prerequisites/s:^:#:' \ + -e '/license/ s:^:#:' \ + Rakefile || die + # Remove the cross compilation options since they interfere with + # native building. + sed -i -e 's/cross_compile = true/cross_compile = false/' Rakefile || die + sed -i -e '/cross_config_options/d' Rakefile || die + + sed -e '/simplecov/,/^end/ s:^:#:' \ + -e '/reporters/I s:^:#:' \ + -i test/helper.rb || die + + # There is no need for mini_portile2 to be a runtime dependency on Gentoo + sed -i -e '/mini_portile2/ s:^:#:' ${RUBY_FAKEGEM_GEMSPEC} || die +} + +each_ruby_configure() { + NOKOGIRI_USE_SYSTEM_LIBRARIES=true \ + ${RUBY} -Cext/${PN} extconf.rb \ + --with-zlib-include="${EPREFIX}"/usr/include \ + --with-zlib-lib="${EPREFIX}"/$(get_libdir) \ + --with-iconv-include="${EPREFIX}"/usr/include \ + --with-iconv-lib="${EPREFIX}"/$(get_libdir) \ + --with-xml2-include="${EPREFIX}"/usr/include/libxml2 \ + --with-xml2-lib="${EPREFIX}"/usr/$(get_libdir) \ + --with-xslt-dir="${EPREFIX}"/usr \ + --with-iconvlib=iconv \ + || die "extconf.rb failed" +} + +each_ruby_compile() { + if ! [[ -f lib/nokogiri/css/tokenizer.rb ]]; then + ${RUBY} -S rake lib/nokogiri/css/tokenizer.rb || die "rexical failed" + fi + + if ! [[ -f lib/nokogiri/css/parser.rb ]]; then + ${RUBY} -S rake lib/nokogiri/css/parser.rb || die "racc failed" + fi + + emake -Cext/${PN} \ + V=1 \ + CFLAGS="${CFLAGS} -fPIC" \ + archflag="${LDFLAGS}" || die "make extension failed" + cp -l ext/${PN}/${PN}$(get_modname) lib/${PN}/ || die +} + +each_ruby_test() { + ${RUBY} -Ilib:.:test -e 'Dir["test/**/test_*.rb"].each {|f| require f}' || die +} |