Skip to content

Commit

Permalink
mail/rubygem-mail: Fix dependency with upcoming Ruby 3.1
Browse files Browse the repository at this point in the history
In Ruby 3.1 net/smtp is distributed as bundled gem. On the other hand,
our ruby ports (lang/rubyXY) don't include bandled gems in thier
packages and it also applies to upcoming lang/ruby31. That means
net/smtp isn't include in lang/ruby31 package. So add
mail/rubygem-net-smtp to RUN_DEPENDS so this port works fine with Ruby
3.1.

Note that this depends on bug #258108.
  • Loading branch information
Yasuhiro Kimura authored and Yasuhiro Kimura committed Nov 10, 2021
1 parent 0bb10ed commit 7ee3d53
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mail/rubygem-mail/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Created by: Eric Freeman <[email protected]>

PORTNAME= mail
PORTVERSION= 2.7.1
DISTVERSION= 2.7.1
PORTREVISION= 1
PORTEPOCH= 2
CATEGORIES= mail rubygems
MASTER_SITES= RG
Expand All @@ -12,7 +13,8 @@ COMMENT= Ruby email handler
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/MIT-LICENSE

RUN_DEPENDS= rubygem-mini_mime>=0.1.1:mail/rubygem-mini_mime
RUN_DEPENDS= rubygem-mini_mime>=0.1.1:mail/rubygem-mini_mime \
rubygem-net-smtp>0:mail/rubygem-net-smtp

USES= cpe gem
CPE_VENDOR= ${PORTNAME}_project
Expand Down
18 changes: 18 additions & 0 deletions mail/rubygem-mail/files/patch-mail.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- mail.gemspec.orig 2021-11-10 18:38:59 UTC
+++ mail.gemspec
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
end

if s.respond_to? :add_runtime_dependency then
+ s.add_runtime_dependency(%q<net-smtp>.freeze, [">= 0"])
s.add_runtime_dependency(%q<mini_mime>.freeze, [">= 0.1.1"])
s.add_development_dependency(%q<bundler>.freeze, [">= 1.0.3"])
s.add_development_dependency(%q<rake>.freeze, ["> 0.8.7"])
@@ -31,6 +32,7 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<rdoc>.freeze, [">= 0"])
s.add_development_dependency(%q<rufo>.freeze, [">= 0"])
else
+ s.add_dependency(%q<net-smtp>.freeze, [">= 0"])
s.add_dependency(%q<mini_mime>.freeze, [">= 0.1.1"])
s.add_dependency(%q<bundler>.freeze, [">= 1.0.3"])
s.add_dependency(%q<rake>.freeze, ["> 0.8.7"])

0 comments on commit 7ee3d53

Please sign in to comment.