diff options
Diffstat (limited to 'dev-ruby/brotli')
-rw-r--r-- | dev-ruby/brotli/Manifest | 2 | ||||
-rw-r--r-- | dev-ruby/brotli/brotli-0.6.0-r1.ebuild | 39 | ||||
-rw-r--r-- | dev-ruby/brotli/files/brotli-0.6.0-definemethod.patch | 46 |
3 files changed, 87 insertions, 0 deletions
diff --git a/dev-ruby/brotli/Manifest b/dev-ruby/brotli/Manifest index c77f25d9a07b..da90b79e0605 100644 --- a/dev-ruby/brotli/Manifest +++ b/dev-ruby/brotli/Manifest @@ -1,5 +1,7 @@ +AUX brotli-0.6.0-definemethod.patch 2343 BLAKE2B c7843eab1168e5dd226e1722a2eced07a8183b6ae2309f8872f20afefa4db8ab4cc7091f6527a33e6581ac4b9d2c317dbd5ef43dd4fc9a3ea41c4e6aa965102e SHA512 f62fd18a372788e2806079ce1798513522638f62c03215a987c847dceb82e1d13e9b297cc3c2e78b5a6520c0c5d01f35eda14610b233b310e1950bae5cceb360 DIST brotli-0.4.0.tar.gz 9460 BLAKE2B b5d5e490c3ab086d6817c1ecc9143aefe88487d65d6774bda939b25bdb6aaaea4e28d99e01d49b90dbbccceba6643c0b5fdab0cea930eaf1661454996e61fab7 SHA512 7d1d2a1343aec11e840d840358d7d27b4ef93954bc17170d581b16d46191902b6fdf6380344f0d172e5e7f3fc0948146312659a44dc95973ec30ac3344f4a656 DIST brotli-0.6.0.tar.gz 9546 BLAKE2B 82e6bf5d49466b1f08c3ffdf6d4607e9af33d2e5ae8b1e006c518a1effadd294068aac94ac2566a81930168525c0e55ffc6274c5a90d7429be6599734b948fa5 SHA512 b48dad753d823a4a26ca98614a681ac14b2191b0d4ea3be2a8bdc3f457ddf21504ad1703ab307821d408785301e1554ac91f8ffed35609c89a9e9a38b1640760 EBUILD brotli-0.4.0-r2.ebuild 874 BLAKE2B a1c0bdca9d4d9e9fbea0cb120f428a78151ef280b93325179bc60a24e97847ec2af25f7b622dc224f8a2f6d39f9cb02caf375d8c64224078c1d07293c06b6708 SHA512 6865caae1a0f242b3520c889a98dd01de0e3a99bb74e383972b84fe743b6ae3a0f597acc315ddaca852f20d042266f97eed40a8590210cfceb4922e11f50702f +EBUILD brotli-0.6.0-r1.ebuild 916 BLAKE2B db5435ab6f0046de593674ae98db7e9e45bd4144570be5771b21744398e3a8a37c7f1184fcb7398046cf3d69e106f97d0eae5e3ff21257c280656526ae30761f SHA512 ae403dbb67c1694ceedf3a045a1b4ead7289d8d3958c93fbc95bde525a661e4ace4283a15670c49effc8d9fc0765ba922644526eb531b7f84aaece526e627380 EBUILD brotli-0.6.0.ebuild 864 BLAKE2B 9591c7428b0a4fa7ce31e40fa3a8f4f72924dcece46d8704987f795fc9bbbdbba6df9ecb5231057735ca8f730bd226eb29b44bcd0cbf06aed8d4e3b4b0e9e142 SHA512 93487b708083e8c970d732a1456aa69fc7a66954ce5fdddbcb36988fb26c5a3bb56b0df5c2287b6315856a3c5c40663e57dd123e6d9e961a802306ce3aa260ba MISC metadata.xml 340 BLAKE2B 25156a37a996a4091ff75bb3cc45ba8d9fc65653fab708f0779a6606113492f0b0723b914d43e9dea4a6eb0d06325c5b4a31212b1389b82f845ef1a541a0f2fe SHA512 0b7485f8ba6fa314acda731d7f5cca43dbca1fab14cc928d2c239635b91dae19a10c2680b3c9526e6018c6f515d57ec87354e2e76ad75863408c38b9d5153ecc diff --git a/dev-ruby/brotli/brotli-0.6.0-r1.ebuild b/dev-ruby/brotli/brotli-0.6.0-r1.ebuild new file mode 100644 index 000000000000..82a17cf60d1f --- /dev/null +++ b/dev-ruby/brotli/brotli-0.6.0-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +USE_RUBY="ruby31 ruby32 ruby33" + +RUBY_FAKEGEM_EXTRADOC="README.md" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" + +RUBY_FAKEGEM_BINWRAP="" + +RUBY_FAKEGEM_GEMSPEC="brotli.gemspec" + +RUBY_FAKEGEM_EXTENSIONS=(ext/brotli/extconf.rb) + +inherit ruby-fakegem + +DESCRIPTION="Brotli compressor/decompressor" +HOMEPAGE="https://github.com/miyucy/brotli" +SRC_URI="https://github.com/miyucy/brotli/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64" + +RDEPEND=" >=app-arch/brotli-1.1.0" +DEPEND=" >=app-arch/brotli-1.1.0" + +# Depends on the test data in app-arch/brotli +RESTRICT="test" + +PATCHES=( "${FILESDIR}/${P}-definemethod.patch" ) + +all_ruby_prepare() { + sed -e 's/git ls-files -z -- spec/find spec -print0/' \ + -e 's/git ls-files -z/find * -print0/' \ + -i ${RUBY_FAKEGEM_GEMSPEC} || die +} diff --git a/dev-ruby/brotli/files/brotli-0.6.0-definemethod.patch b/dev-ruby/brotli/files/brotli-0.6.0-definemethod.patch new file mode 100644 index 000000000000..1338c5bf3be2 --- /dev/null +++ b/dev-ruby/brotli/files/brotli-0.6.0-definemethod.patch @@ -0,0 +1,46 @@ +From 8e589adb92a7d5c8c9e8d35bb116ad5ab0686e30 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= + <shyouhei@ruby-lang.org> +Date: Tue, 26 Nov 2024 13:42:54 +0900 +Subject: [PATCH] stop worrying and just pass bare function + +`rb_define_method` etc. already take care arities. You don't have +to apply RUBY_METHOD_FUNC. +--- + ext/brotli/brotli.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/ext/brotli/brotli.c b/ext/brotli/brotli.c +index cb69500..a9cc23d 100644 +--- a/ext/brotli/brotli.c ++++ b/ext/brotli/brotli.c +@@ -475,9 +475,9 @@ Init_brotli(void) + rb_mBrotli = rb_define_module("Brotli"); + rb_eBrotli = rb_define_class_under(rb_mBrotli, "Error", rb_eStandardError); + rb_global_variable(&rb_eBrotli); +- rb_define_singleton_method(rb_mBrotli, "deflate", RUBY_METHOD_FUNC(brotli_deflate), -1); +- rb_define_singleton_method(rb_mBrotli, "inflate", RUBY_METHOD_FUNC(brotli_inflate), 1); +- rb_define_singleton_method(rb_mBrotli, "version", RUBY_METHOD_FUNC(brotli_version), 0); ++ rb_define_singleton_method(rb_mBrotli, "deflate", brotli_deflate, -1); ++ rb_define_singleton_method(rb_mBrotli, "inflate", brotli_inflate, 1); ++ rb_define_singleton_method(rb_mBrotli, "version", brotli_version, 0); + id_read = rb_intern("read"); + // Brotli::Writer + id_write = rb_intern("write"); +@@ -485,9 +485,9 @@ Init_brotli(void) + id_close = rb_intern("close"); + rb_Writer = rb_define_class_under(rb_mBrotli, "Writer", rb_cObject); + rb_define_alloc_func(rb_Writer, rb_writer_alloc); +- rb_define_method(rb_Writer, "initialize", RUBY_METHOD_FUNC(rb_writer_initialize), -1); +- rb_define_method(rb_Writer, "write", RUBY_METHOD_FUNC(rb_writer_write), 1); +- rb_define_method(rb_Writer, "finish", RUBY_METHOD_FUNC(rb_writer_finish), 0); +- rb_define_method(rb_Writer, "flush", RUBY_METHOD_FUNC(rb_writer_flush), 0); +- rb_define_method(rb_Writer, "close", RUBY_METHOD_FUNC(rb_writer_close), 0); ++ rb_define_method(rb_Writer, "initialize", rb_writer_initialize, -1); ++ rb_define_method(rb_Writer, "write", rb_writer_write, 1); ++ rb_define_method(rb_Writer, "finish", rb_writer_finish, 0); ++ rb_define_method(rb_Writer, "flush", rb_writer_flush, 0); ++ rb_define_method(rb_Writer, "close", rb_writer_close, 0); + } +-- +2.47.0 |