commit: df81c9e5e6761833464fe2e1e9d1103c24f55454
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 15 18:15:30 2025 +0000
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sun Mar 16 07:40:38 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df81c9e5
dev-ruby/llhttp-ffi: add 0.5.1
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
dev-ruby/llhttp-ffi/llhttp-ffi-0.5.1.ebuild | 51 +++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/dev-ruby/llhttp-ffi/llhttp-ffi-0.5.1.ebuild
b/dev-ruby/llhttp-ffi/llhttp-ffi-0.5.1.ebuild
new file mode 100644
index 000000000000..1bc1e6e1d3ee
--- /dev/null
+++ b/dev-ruby/llhttp-ffi/llhttp-ffi-0.5.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby31 ruby32 ruby33"
+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/bryanp/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/bryanp/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 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="test"
+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
+)"
+
+DEPEND="test? ( net-misc/curl )"
+
+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
+}