diff --git a/misc/sdformat/Makefile b/misc/sdformat/Makefile index 038326573ff2..a67550627613 100644 --- a/misc/sdformat/Makefile +++ b/misc/sdformat/Makefile @@ -1,43 +1,41 @@ PORTNAME= sdformat DISTVERSION= 8.0.0 PORTREVISION= 7 CATEGORIES= misc MASTER_SITES= https://bitbucket.org/${BB_ACCOUNT}/${BB_PROJECT}/get/${BB_COMMIT}.tar.gz?dummy=/ MAINTAINER= yuri@FreeBSD.org COMMENT= Simulation Description Format (SDF) parser and description files WWW= https://bitbucket.org/osrf/sdformat/src/default/ LICENSE= APACHE20 -BROKEN= tools/xmlschema.rb:268:in `
': 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 LIB_DEPENDS= libignition-math6.so:math/ignition-math \ libconsole_bridge.so:devel/ros-console_bridge \ libtinyxml2.so:textproc/tinyxml2 \ liburdfdom_world.so:devel/ros-urdfdom RUN_DEPENDS= ignition-tools>0:devel/ignition-tools USES= cmake compiler:c++17-lang pkgconfig ruby:build USE_LDCONFIG= yes CMAKE_OFF= BUILD_TESTING BB_ACCOUNT= osrf BB_PROJECT= ${PORTNAME} BB_COMMIT= f555f9a69f8f WRKSRC= ${WRKDIR}/${BB_ACCOUNT}-${BB_PROJECT}-${BB_COMMIT} PLIST_SUB+= INCSUBDIR=${PORTNAME}-${DISTVERSION:R} do-test: @cd ${BUILD_WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DBUILD_TESTING:BOOL=ON ${CMAKE_SOURCE_PATH} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test .include 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 +