git: 660d8817f472 - main - misc/sdformat: Unbreak by patching the port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 05 Dec 2025 18:46:02 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=660d8817f472dcf9b68cd10ea113405e57ad167c
commit 660d8817f472dcf9b68cd10ea113405e57ad167c
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-12-05 18:45:29 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-12-05 18:45:54 +0000
misc/sdformat: Unbreak by patching the port
---
misc/sdformat/Makefile | 2 --
misc/sdformat/files/patch-tools_xmlschema.rb | 31 ++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/misc/sdformat/Makefile b/misc/sdformat/Makefile
index 038326573ff2..a67550627613 100644
--- a/misc/sdformat/Makefile
+++ b/misc/sdformat/Makefile
@@ -10,8 +10,6 @@ WWW= https://bitbucket.org/osrf/sdformat/src/default/
LICENSE= APACHE20
-BROKEN= tools/xmlschema.rb:268:in `<main>': undefined method `exists?' for File:Class (NoMethodError)
-
BUILD_DEPENDS= ignition-cmake==2:devel/ignition-cmake \
ignition-tools>0:devel/ignition-tools \
rubygem-rexml>0:textproc/rubygem-rexml
diff --git a/misc/sdformat/files/patch-tools_xmlschema.rb b/misc/sdformat/files/patch-tools_xmlschema.rb
new file mode 100644
index 000000000000..86cd3de949ef
--- /dev/null
+++ b/misc/sdformat/files/patch-tools_xmlschema.rb
@@ -0,0 +1,31 @@
+- fix Ruby incompatibilities with File.exists? and Dir.exists?
+
+--- tools/xmlschema.rb.orig 2025-12-05 10:37:39.966228000 -0800
++++ tools/xmlschema.rb 2025-12-05 10:37:39.966839000 -0800
+@@ -265,7 +265,7 @@
+ if infile.nil?
+ puts "Missing option -i."
+ exit
+-elsif !File.exists?(infile)
++elsif !File.exist?(infile)
+ puts "Input file[#{infile}] does not exist\n"
+ exit
+ end
+@@ -273,7 +273,7 @@
+ if $path.nil?
+ puts "Missing option -s."
+ exit
+-elsif !Dir.exists?($path)
++elsif !Dir.exist?($path)
+ puts "SDF source dir[#{$path}] does not exist\n"
+ exit
+ end
+@@ -281,7 +281,7 @@
+ if outdir.nil?
+ puts "Missing output directory, option -o."
+ exit
+-elsif !Dir.exists?(outdir)
++elsif !Dir.exist?(outdir)
+ Dir.mkdir(outdir)
+ end
+