1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

x11-wm/subtle: unbreak the port's build against new Ruby versions

File.exists? method has been deprecated and removed in Ruby 3.2.0,
adjust the code accordingly.

PR:	269177
This commit is contained in:
Alexey Dokuchaev 2023-01-28 04:31:32 +00:00
parent c62f08d937
commit 08a80171eb
2 changed files with 11 additions and 0 deletions

View File

@ -21,6 +21,8 @@ ALL_TARGET= build
post-patch:
@${REINPLACE_CMD} -e 1d ${WRKSRC}/data/subtler/runner.rb
@${REINPLACE_CMD} -e 's,File\.exists\?,File.exist?,' \
${WRKSRC}/data/sur/server.rb
@${REINPLACE_CMD} -e 's,/etc/xdg,${LOCALBASE}&,' \
${WRKSRC}/src/subtle/ruby.c

View File

@ -42,6 +42,15 @@
end
checksums
@@ -282,7 +282,7 @@ task(:config) do
end
# Get revision
- if File.exists?(".hg") and (hg = find_executable0("hg"))
+ if File.exist?(".hg") and (hg = find_executable0("hg"))
match = `#{hg} tip`.match(/^[^:]+:\s*(\d+).*/)
if !match.nil? and 2 == match.size
@@ -396,7 +396,10 @@ task(:config) do
checking_for("X11/Xft/Xft.h") do
ret = false