git: 5236f0143e19 - 2025Q4 - www/rubygem-ethon-gitlab: Add rubygem-ethon-gitlab 0.17.0 (copied from rubygem-ethon)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 12 Dec 2025 05:13:36 UTC
The branch 2025Q4 has been updated by mfechner:
URL: https://cgit.FreeBSD.org/ports/commit/?id=5236f0143e1910210fb89e3dcf1e60ad319528c3
commit 5236f0143e1910210fb89e3dcf1e60ad319528c3
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2025-11-29 23:20:52 +0000
Commit: Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2025-12-12 04:56:56 +0000
www/rubygem-ethon-gitlab: Add rubygem-ethon-gitlab 0.17.0 (copied from rubygem-ethon)
(cherry picked from commit 8fae933c936aea599cdad00de2fe1137e29e0626)
---
www/Makefile | 1 +
www/rubygem-ethon-gitlab/Makefile | 21 +++++++++++++++++++++
www/rubygem-ethon-gitlab/distinfo | 3 +++
www/rubygem-ethon-gitlab/files/patch-typhoeus | 18 ++++++++++++++++++
www/rubygem-ethon-gitlab/pkg-descr | 1 +
5 files changed, 44 insertions(+)
diff --git a/www/Makefile b/www/Makefile
index 90eb19547e00..a88ac782cd33 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -2139,6 +2139,7 @@
SUBDIR += rubygem-erubi
SUBDIR += rubygem-erubis
SUBDIR += rubygem-ethon
+ SUBDIR += rubygem-ethon-gitlab
SUBDIR += rubygem-eventmachine_httpserver
SUBDIR += rubygem-faraday
SUBDIR += rubygem-faraday-em_http
diff --git a/www/rubygem-ethon-gitlab/Makefile b/www/rubygem-ethon-gitlab/Makefile
new file mode 100644
index 000000000000..22890c4e8f19
--- /dev/null
+++ b/www/rubygem-ethon-gitlab/Makefile
@@ -0,0 +1,21 @@
+PORTNAME= ethon
+PORTVERSION= 0.17.0
+CATEGORIES= www rubygems
+MASTER_SITES= RG
+PKGNAMESUFFIX= -gitlab
+
+MAINTAINER= mfechner@FreeBSD.org
+COMMENT= Very lightweight libcurl wrapper
+WWW= https://github.com/typhoeus/ethon
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libcurl.so:ftp/curl
+RUN_DEPENDS= rubygem-ffi>=1.15.0:devel/rubygem-ffi
+
+USES= gem
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/www/rubygem-ethon-gitlab/distinfo b/www/rubygem-ethon-gitlab/distinfo
new file mode 100644
index 000000000000..f88bdd76a796
--- /dev/null
+++ b/www/rubygem-ethon-gitlab/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1757122078
+SHA256 (rubygem/ethon-0.17.0.gem) = 2a467db7620243af86aaf146aaa5b2cb7228a5646a013d8558cd240f7cf6e3b4
+SIZE (rubygem/ethon-0.17.0.gem) = 39936
diff --git a/www/rubygem-ethon-gitlab/files/patch-typhoeus b/www/rubygem-ethon-gitlab/files/patch-typhoeus
new file mode 100644
index 000000000000..0ce1d896cd3c
--- /dev/null
+++ b/www/rubygem-ethon-gitlab/files/patch-typhoeus
@@ -0,0 +1,18 @@
+Obtained from: https://github.com/typhoeus/ethon/commit/4a1700c2856de9e139cbd2c91a787c1ff88edd36
+Reference: https://github.com/typhoeus/typhoeus/issues/739
+
+--- lib/ethon/easy/callbacks.rb.orig 2025-10-05 21:07:34 UTC
++++ lib/ethon/easy/callbacks.rb
+@@ -37,10 +37,10 @@ module Ethon
+ # @return [ Proc ] The callback.
+ def body_write_callback
+ @body_write_callback ||= proc do |stream, size, num, object|
+- headers
++ headers_user_callback_result = headers
+ result = body(chunk = stream.read_string(size * num))
+ @response_body << chunk if result == :unyielded
+- result != :abort ? size * num : -1
++ (result != :abort && headers_user_callback_result != :abort) ? size * num : -1
+ end
+ end
+
diff --git a/www/rubygem-ethon-gitlab/pkg-descr b/www/rubygem-ethon-gitlab/pkg-descr
new file mode 100644
index 000000000000..d54b8eaf018f
--- /dev/null
+++ b/www/rubygem-ethon-gitlab/pkg-descr
@@ -0,0 +1 @@
+Very lightweight libcurl wrapper