diff options
author | 2023-04-09 00:13:44 +0100 | |
---|---|---|
committer | 2023-04-09 00:19:28 +0100 | |
commit | dfa888cb3ce344c9159576338fff77aa90894c9d (patch) | |
tree | 0fc6612cebf804674e908176569739ce5b59a953 /dev-ruby/llhttp-ffi | |
parent | dev-ruby/roadie-rails: enable ruby31 (diff) | |
download | gentoo-dfa888cb3ce344c9159576338fff77aa90894c9d.tar.gz gentoo-dfa888cb3ce344c9159576338fff77aa90894c9d.tar.bz2 gentoo-dfa888cb3ce344c9159576338fff77aa90894c9d.zip |
dev-ruby/llhttp-ffi: add 0.5.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ruby/llhttp-ffi')
-rw-r--r-- | dev-ruby/llhttp-ffi/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/llhttp-ffi/files/llhttp-ffi-0.5.0-fix-rake-clean.patch | 18 | ||||
-rw-r--r-- | dev-ruby/llhttp-ffi/llhttp-ffi-0.5.0.ebuild | 49 |
3 files changed, 68 insertions, 0 deletions
diff --git a/dev-ruby/llhttp-ffi/Manifest b/dev-ruby/llhttp-ffi/Manifest index edd8ef0da00a..d0446b884529 100644 --- a/dev-ruby/llhttp-ffi/Manifest +++ b/dev-ruby/llhttp-ffi/Manifest @@ -1 +1,2 @@ DIST llhttp-0.4.0.tar.gz 98406 BLAKE2B 9f7358d988ed00558a36ae80e3c7d38cabb41a2233f32f4e3e6e9ed49a205f85ed84cb76cb07984f3b73b0a67eade4844ed5f4ee98b2453fa5c25d36fcb0082c SHA512 56a491763500b1619492173a83a227e3228847f4b85b8dadab1a9de34d65d5c662615c18d6cc6d5e11226df83381fd7f79f67e12f89f0e437ada8f9fd083ec26 +DIST llhttp-2023-03-29.tar.gz 114103 BLAKE2B 7af75703a748518c2c4b8840ac08089d3c3e79f9652278bd41e591f09b9091f5fa8195c530992e51811f065004adbc533b92d49097e9f05a2aa98b44b47da9ac SHA512 058bf8a8bd7de6bf29794bc60bd9811d769acc9488cfc535d619ee24a79ba37edf3bcbdbffd40d747576024e7aca3c99cb71d9db1aa5af00991d7672c5f4bb70 diff --git a/dev-ruby/llhttp-ffi/files/llhttp-ffi-0.5.0-fix-rake-clean.patch b/dev-ruby/llhttp-ffi/files/llhttp-ffi-0.5.0-fix-rake-clean.patch new file mode 100644 index 000000000000..23d85a4a3bbe --- /dev/null +++ b/dev-ruby/llhttp-ffi/files/llhttp-ffi-0.5.0-fix-rake-clean.patch @@ -0,0 +1,18 @@ +https://github.com/bryanp/llhttp/commit/89551cd7fa539d7073e62ba8f6ba1dd70e73c36a + +From 89551cd7fa539d7073e62ba8f6ba1dd70e73c36a Mon Sep 17 00:00:00 2001 +From: Bryan Powell <bryan@metabahn.com> +Date: Wed, 29 Mar 2023 07:27:08 -0700 +Subject: [PATCH] Fix ffi clean + +--- a/Rakefile ++++ b/Rakefile +@@ -16,6 +16,8 @@ task :clean do + [ + "./lib/llhttp/llhttp_ext.bundle" + ].each do |file| ++ next unless File.exist?(file) ++ + FileUtils.rm(file) + end + end diff --git a/dev-ruby/llhttp-ffi/llhttp-ffi-0.5.0.ebuild b/dev-ruby/llhttp-ffi/llhttp-ffi-0.5.0.ebuild new file mode 100644 index 000000000000..d8fa4fa3f6be --- /dev/null +++ b/dev-ruby/llhttp-ffi/llhttp-ffi-0.5.0.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby27 ruby30 ruby31 ruby32" +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md" +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +inherit ruby-fakegem + +MY_PV="2023-03-29" +DESCRIPTION="Ruby FFI bindings for llhttp" +HOMEPAGE="https://github.com/metabahn/llhttp" +# Use -> ${MY_PV} in SRC_URI here to help spot forgotten MY_PV updates +# (pkgcheck will warn on matching checksums) +SRC_URI="https://github.com/metabahn/llhttp/archive/refs/tags/${MY_PV}.tar.gz -> llhttp-${MY_PV}.tar.gz" + +LICENSE="MPL-2.0" +SLOT="$(ver_cut 1)/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" +RUBY_S="llhttp-${MY_PV}/ffi" + +ruby_add_rdepend "=dev-ruby/ffi-compiler-1*" + +ruby_add_bdepend "test? ( + dev-ruby/async-io + dev-ruby/rspec:3 +)" + +PATCHES=( + "${FILESDIR}"/${PN}-0.5.0-fix-rake-clean.patch +) + +all_ruby_prepare() { + sed -i -e 's/gem "rake-compiler"//g' "Gemfile" || die +} + +each_ruby_compile() { + cd ext && "${RUBY}" -S rake || die + local FFI_PLATFORM_NAME="$(${RUBY} --disable=did_you_mean -e "require 'ffi' ; p \"#{FFI::Platform::ARCH}-#{FFI::Platform::OS}\"" | tr -d "\"")" + install -D "${FFI_PLATFORM_NAME}/libllhttp-ext.so" "../lib/${FFI_PLATFORM_NAME}/libllhttp-ext.so" || die +} + +each_ruby_install() { + each_fakegem_install + ruby_fakegem_extensions_installed +} |