guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 2b0411f1e67343221990be74627b5266f0166fc5
Author: Liliana Marie Prikler <[email protected]>
AuthorDate: Tue Jul 21 20:25:51 2026 +0200
gnu: Update esmini to 3.5.0.
* gnu/packages/patches/esmini-use-pkgconfig.patch: Remove file.
* gnu/local.mk (dist_patch_DATA): Unregister it.
* gnu/packages/simulation.scm (esmini): Update to 3.5.0.
[source]<snippet>: Also patch CMakeLists to use pkg-config.
Allow “yaml” to be vendored.
[arguments]<#:configure-flags>: Add “-DDOWNLOAD_EXTERNALS=FALSE”.
[inputs]: Add fmt. Use one line per input.
Signed-off-by: Liliana Marie Prikler <[email protected]>
---
gnu/local.mk | 1 -
gnu/packages/patches/esmini-use-pkgconfig.patch | 253 ------------------------
gnu/packages/simulation.scm | 95 ++++++---
3 files changed, 73 insertions(+), 276 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 843e50e5f9..25e639fdbb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1280,7 +1280,6 @@ dist_patch_DATA =
\
%D%/packages/patches/erlang-binpp-disable-failing-tests.patch \
%D%/packages/patches/erlang-man-path.patch \
%D%/packages/patches/erlang-mochiweb-disable-known-to-fail-tests.patch
\
- %D%/packages/patches/esmini-use-pkgconfig.patch \
%D%/packages/patches/esmtp-add-lesmtp.patch \
%D%/packages/patches/esound-c99.patch \
%D%/packages/patches/exercism-disable-self-update.patch \
diff --git a/gnu/packages/patches/esmini-use-pkgconfig.patch
b/gnu/packages/patches/esmini-use-pkgconfig.patch
deleted file mode 100644
index 7f7dafbc55..0000000000
--- a/gnu/packages/patches/esmini-use-pkgconfig.patch
+++ /dev/null
@@ -1,253 +0,0 @@
-Find dependencies via pkg-config.
-
----
- CMakeLists.txt | 72 +++----------------
- .../Applications/esmini/main.cpp | 2 +
- EnvironmentSimulator/CMakeLists.txt | 3 -
- .../Modules/Controllers/ControllerSumo.cpp | 1 -
- .../Modules/RoadManager/CMakeLists.txt | 7 +-
- .../Modules/ScenarioEngine/CMakeLists.txt | 17 +----
- 6 files changed, 16 insertions(+), 86 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index aec4cf55..c9689b44 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -13,6 +13,8 @@ else()
- FATAL_ERROR)
- endif()
-
-+include(FindPkgConfig)
-+
- # ############################# Project generate options
###########################################################
-
- project(
-@@ -138,75 +140,26 @@ set_special_build_flags()
-
include(${CMAKE_CURRENT_SOURCE_DIR}/support/cmake/utils/get_subdirectories.cmake)
- include(${CMAKE_CURRENT_SOURCE_DIR}/support/cmake/utils/set_folder.cmake)
-
--# ############################### Downloading cloud packages
#########################################################
--
--include(${CMAKE_CURRENT_SOURCE_DIR}/support/cmake/cloud/set_cloud_links.cmake)
--set_cloud_links()
--
--include(${CMAKE_CURRENT_SOURCE_DIR}/support/cmake/cloud/download.cmake)
--
--message(STATUS "Downloading dependencies...")
--
--download(
-- osg
-- ${EXTERNALS_OSG_PATH}
-- ${EXTERNALS_OSG_OS_SPECIFIC_PATH}
-- "${OSG_PACKAGE_URL}")
--
--download(
-- osi
-- ${EXTERNALS_OSI_PATH}
-- ${EXTERNALS_OSI_OS_SPECIFIC_PATH}
-- "${OSI_PACKAGE_URL}")
--
--download(
-- sumo
-- ${EXTERNALS_SUMO_PATH}
-- ${EXTERNALS_SUMO_OS_SPECIFIC_PATH}
-- "${SUMO_PACKAGE_URL}")
--
--download(
-- implot
-- ${EXTERNALS_IMPLOT_PATH}
-- ${EXTERNALS_IMPLOT_OS_SPECIFIC_PATH}
-- "${IMPLOT_PACKAGE_URL}")
--
--download(
-- models
-- ${RESOURCES_PATH}
-- ${MODELS_PATH}
-- "${MODELS_PACKAGE_URL}")
--
--if(NOT
-- (APPLE
-- OR MINGW))
-- download(
-- googletest
-- ${EXTERNALS_GOOGLETEST_PATH}
-- ${EXTERNALS_GOOGLETEST_OS_SPECIFIC_PATH}
-- ${GTEST_PACKAGE_URL})
--endif()
--
- # ############################### Loading external packages
##########################################################
-
- if(USE_GTEST)
-- include(${CMAKE_CURRENT_SOURCE_DIR}/support/cmake/external/gtest.cmake)
-- set_gtest_libs()
-+ find_package(GTest REQUIRED)
- endif()
-
- if(USE_OSG)
-- include(${CMAKE_CURRENT_SOURCE_DIR}/support/cmake/external/osg.cmake)
-- set_osg_libs()
-+ pkg_check_modules(OSG REQUIRED openscenegraph osgdb_jpeg osgdb_osg
-+ osgdb_serializers_osg
-+ osgdb_serializers_osgsim)
- endif()
-
- if(USE_OSI)
-- include(${CMAKE_CURRENT_SOURCE_DIR}/support/cmake/external/osi.cmake)
-- set_osi_libs()
-+ find_package(open_simulation_interface REQUIRED)
-+ set(EXTERNALS_OSI_INCLUDES "${OPEN_SIMULATION_INTERFACE_INCLUDE_DIRS}")
-+ set(OSI_LIBRARIES open_simulation_interface::open_simulation_interface)
- endif()
-
- if(USE_SUMO)
-- include(${CMAKE_CURRENT_SOURCE_DIR}/support/cmake/external/sumo.cmake)
-- set_sumo_libs()
-+ set ( SUMO_LIBRARIES sumocpp tracicpp )
- endif()
-
- if(USE_IMPLOT)
-@@ -229,10 +182,7 @@ if(NOT
- endif()
-
- # Add variables to global scope, e.g. when esmini is used as submodule
--set(EXTERNALS_PUGIXML_PATH
-- ${EXTERNALS_PUGIXML_PATH}
-- CACHE INTERNAL
-- "")
-+find_package(pugixml)
- set(EXTERNALS_EXPR_PATH
- ${EXTERNALS_EXPR_PATH}
- CACHE INTERNAL
-diff --git a/EnvironmentSimulator/Applications/esmini/main.cpp
b/EnvironmentSimulator/Applications/esmini/main.cpp
-index 84f38c7f..943c42c8 100644
---- a/EnvironmentSimulator/Applications/esmini/main.cpp
-+++ b/EnvironmentSimulator/Applications/esmini/main.cpp
-@@ -13,7 +13,9 @@
- #include "playerbase.hpp"
- #include "CommonMini.cpp"
- #include "OSCParameterDistribution.hpp"
-+#if _USE_IMPLOT
- #include "Plot.hpp"
-+#endif
- #include <osgViewer/ViewerEventHandlers>
- #include <signal.h>
-
-diff --git a/EnvironmentSimulator/CMakeLists.txt
b/EnvironmentSimulator/CMakeLists.txt
-index 87e1dd98..3db513a0 100644
---- a/EnvironmentSimulator/CMakeLists.txt
-+++ b/EnvironmentSimulator/CMakeLists.txt
-@@ -57,9 +57,6 @@ set_folder(
- set_folder(
- ScenarioEngine
- ${ModulesFolder})
--set_folder(
-- Externals
-- ${ModulesFolder})
- set_folder(
- RoadManager
- ${ModulesFolder})
-diff --git a/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp
b/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp
-index 92b40c90..764d2d3b 100644
---- a/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp
-+++ b/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp
-@@ -16,7 +16,6 @@
- #include "ScenarioGateway.hpp"
- #include "pugixml.hpp"
-
--#include <utils/geom/PositionVector.h>
- #include <libsumo/Simulation.h>
- #include <libsumo/Vehicle.h>
- #include <libsumo/TraCIDefs.h>
-diff --git a/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt
b/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt
-index afb77338..b8beba48 100644
---- a/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt
-+++ b/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt
-@@ -20,9 +20,6 @@ set(SOURCES
- odrSpiral.cpp
- LaneIndependentRouter.cpp)
-
--set(SRC_ADDITIONAL
-- ${EXTERNALS_PUGIXML_PATH}/pugixml.cpp)
--
- source_group(
- "External Libraries"
- FILES ${SRC_ADDITIONAL})
-@@ -44,6 +41,7 @@ add_library(
- target_link_libraries(
- ${TARGET}
- PRIVATE CommonMini
-+ pugixml
- # project_options
- )
-
-@@ -54,8 +52,7 @@ target_include_directories(
- target_include_directories(
- ${TARGET}
- SYSTEM
-- PUBLIC ${EXTERNALS_PUGIXML_PATH}
-- ${ROAD_MANAGER_PATH})
-+ PUBLIC ${ROAD_MANAGER_PATH})
-
- disable_static_analysis(${TARGET})
- disable_iwyu(${TARGET})
-diff --git a/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt
b/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt
-index 5089dfc1..4b95a071 100644
---- a/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt
-+++ b/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt
-@@ -3,9 +3,6 @@
- set(TARGET
- ScenarioEngine)
-
--set(EXTERNAL_TARGET
-- Externals)
--
- # ############################### Loading desired rules
##############################################################
-
- include(${CMAKE_SOURCE_DIR}/support/cmake/rule/disable_static_analysis.cmake)
-@@ -40,26 +37,15 @@ endif(
- NOT
- USE_OSI)
-
--set(SRC_ADDITIONAL
-- ${EXTERNALS_PUGIXML_PATH}/pugixml.cpp)
--
- source_group(
- OSCTypeDefs
- FILES ${SRC_OSCTYPEDEFS})
- source_group(
- "Source Files"
- FILES ${SRC_SOURCEFILES})
--source_group(
-- "External Libraries"
-- FILES ${SRC_ADDITIONAL})
-
- # ############################### Creating library
###################################################################
-
--add_library(
-- ${EXTERNAL_TARGET}
-- STATIC
-- ${SRC_ADDITIONAL})
--
- add_library(
- ${TARGET}
- STATIC
-@@ -68,7 +54,7 @@ add_library(
-
- target_link_libraries(
- ${TARGET}
-- PRIVATE project_options)
-+ PRIVATE project_options pugixml)
-
- target_include_directories(
- ${TARGET}
-@@ -84,7 +70,6 @@ target_include_directories(
- PUBLIC ${ROAD_MANAGER_PATH}
- ${EXTERNALS_OSI_INCLUDES}
- ${EXTERNALS_SUMO_INCLUDES}
-- ${EXTERNALS_PUGIXML_PATH}
- ${EXTERNALS_EXPR_PATH})
-
- target_link_libraries(
---
-2.45.1
-
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 8c051f6a46..2bda36bda3 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -708,31 +708,78 @@ functions in virtual scenarios.")
(define-public esmini
(package
(name "esmini")
- (version "2.37.11")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/esmini/esmini")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (patches (search-patches "esmini-use-pkgconfig.patch"))
- (modules '((guix build utils) (ice-9 ftw)))
- (snippet
- #~(with-directory-excursion "externals"
- (for-each
- (lambda (dir) (unless (member dir '("." ".." "expr"))
- (delete-file-recursively dir)))
- (scandir "."))))
- (sha256
- (base32
- "07pwa34nf0b4ihb9fn1pvfi0b39hd8r630nfa6v3a17dsy66a730"))))
+ (version "3.5.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/esmini/esmini")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils) (ice-9 ftw)))
+ (snippet
+ #~(begin
+ (with-directory-excursion "externals"
+ (for-each
+ (lambda (dir) (unless (member dir '("." ".." "expr" "yaml"))
+ (delete-file-recursively dir)))
+ (scandir ".")))
+ (substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(externals/fmt\\)") "")
+ (("set_.*_libs\\(\\)") ""))
+ (with-directory-excursion "EnvironmentSimulator"
+ (with-directory-excursion "Applications/esmini-dyn/"
+ (substitute* "CMakeLists.txt"
+ (("\\$ORIGIN") "$ORIGIN/../lib")))
+ (with-directory-excursion "Modules/RoadManager"
+ (substitute* (find-files "." "CMakeLists\\.txt$")
+ (("\\$\\{EXTERNALS_.*\\}/[^ )\n]*") "")
+ (("add_library\\(\n") "add_library("))
+ (substitute* (find-files "." "CMakeLists\\.txt$")
+ (("add_library\\(.*pugixml_lib") "find_package(pugixml")
+ (("pugixml_lib") "pugixml")))
+ (with-directory-excursion "Modules/Controllers"
+ (substitute* "ControllerSumo.cpp"
+ (("#include <utils/geom/PositionVector\\.h>") ""))))
+ (with-directory-excursion "support/cmake/external"
+ (for-each make-file-writable (scandir "."))
+ (call-with-output-file "gtest.cmake"
+ (lambda (out)
+ (display "find_package(GTest REQUIRED)" out)))
+ (call-with-output-file "osg.cmake"
+ (lambda (out)
+ (display "include_guard()\n" out)
+ (display "include(FindPkgConfig)\n" out)
+ (format out "pkg_check_modules(OSG REQUIRED~@{ ~a~})"
+ "openscenegraph"
+ "osgdb_jpeg"
+ "osgdb_png"
+ "osgdb_osg"
+ "osgdb_serializers_osg"
+ "osgdb_serializers_osgsim")))
+ (call-with-output-file "osi.cmake"
+ (lambda (out)
+ (display "\
+find_package(open_simulation_interface REQUIRED)
+set(EXTERNALS_OSI_INCLUDES \"${OPEN_SIMULATION_INTERFACE_INCLUDE_DIRS}\")
+set(OSI_LIBRARIES open_simulation_interface::open_simulation_interface)
+" out)
+ ))
+ (call-with-output-file "sumo.cmake"
+ (lambda (out)
+ (display "set(SUMO_LIBRARIES sumocpp tracicpp)"
+ out))))))
+ (sha256
+ (base32
+ "13xlkhg6z2z1j99l0j5m77lkcvsqkgmy19yjikqy32x1r0hm17df"))))
(build-system cmake-build-system)
(arguments
(list
#:configure-flags
#~(list "-DDYN_PROTOBUF=TRUE"
;; Missing implot package
- "-DUSE_IMPLOT=FALSE")
+ "-DUSE_IMPLOT=FALSE"
+ "-DDOWNLOAD_EXTERNALS=FALSE")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-cmake
@@ -754,10 +801,14 @@ functions in virtual scenarios.")
(rename-file f (string-append out "/lib/"
(basename f))))
(find-files "." "\\.(a|so)$")))))))))
- (inputs (list mesa
- openscenegraph `(,openscenegraph "pluginlib")
+ (inputs (list fmt
+ mesa
+ openscenegraph
+ `(,openscenegraph "pluginlib")
open-simulation-interface
- protobuf pugixml sumo))
+ protobuf
+ pugixml
+ sumo))
(native-inputs (list googletest pkg-config))
(home-page "https://github.com/esmini/esmini")
(synopsis "Basic OpenSCENARIO player")