Repository: conan-io/conan-center-index

Issue:
[request] onnx/1.13.1
### Package Name/Version

onnx/1.13.1

### Changelog

https://github.com/onnx/onnx/releases/tag/v1.13.1

### Context about the new update

The above-mentioned version is newly released by the upstream project and not yet available as a recipe.
Please add this version.

Other release notes compared to onnx/1.11.0
- https://github.com/onnx/onnx/releases/tag/v1.12.0
- https://github.com/onnx/onnx/releases/tag/v1.13.0


Discussion:

Resolving patch:
diff --git a/recipes/onnx/all/conanfile.py b/recipes/onnx/all/conanfile.py
--- a/recipes/onnx/all/conanfile.py
+++ b/recipes/onnx/all/conanfile.py
@@ -32,6 +32,12 @@ class OnnxConan(ConanFile):
         "fPIC": True,
     }
 
+    @property
+    def _min_cppstd(self):
+        if Version(self.version) >= "1.13.0" and is_msvc(self):
+            return 17
+        return 11
+
     @property
     def _protobuf_version(self):
         # onnx < 1.9.0 doesn't support protobuf >= 3.18
@@ -56,7 +62,7 @@ def requirements(self):
 
     def validate(self):
         if self.settings.compiler.get_safe("cppstd"):
-            check_min_cppstd(self, 11)
+            check_min_cppstd(self, self._min_cppstd)
         if is_msvc(self) and self.options.shared:
             raise ConanInvalidConfiguration("onnx shared is broken with Visual Studio")
 
@@ -82,9 +88,10 @@ def generate(self):
         tc.variables["ONNX_COVERAGE"] = False
         tc.variables["ONNX_BUILD_TESTS"] = False
         tc.variables["ONNX_USE_LITE_PROTO"] = False
-        tc.variables["ONNXIFI_ENABLE_EXT"] = False
         tc.variables["ONNX_ML"] = True
-        tc.variables["ONNXIFI_DUMMY_BACKEND"] = False
+        if Version(self.version) < "1.13.0":
+            tc.variables["ONNXIFI_ENABLE_EXT"] = False
+            tc.variables["ONNXIFI_DUMMY_BACKEND"] = False
         tc.variables["ONNX_VERIFY_PROTO3"] = Version(self.dependencies.host["protobuf"].ref.version).major == "3"
         if is_msvc(self):
             tc.variables["ONNX_USE_MSVC_STATIC_RUNTIME"] = is_msvc_static_runtime(self)
@@ -140,25 +147,30 @@ def _onnx_components(self):
                 "libs": ["onnx_proto"],
                 "defines": ["ONNX_NAMESPACE=onnx", "ONNX_ML=1"],
                 "requires": ["protobuf::libprotobuf"]
-            },
-            "onnxifi": {
-                "target": "onnxifi",
-                "system_libs": [(self.settings.os in ["Linux", "FreeBSD"], ["dl"])],
-            },
-            "onnxifi_dummy": {
-                "target": "onnxifi_dummy",
-                "libs": ["onnxifi_dummy"],
-                "requires": ["onnxifi"]
-            },
-            "onnxifi_loader": {
-                "target": "onnxifi_loader",
-                "libs": ["onnxifi_loader"],
-                "requires": ["onnxifi"]
-            },
-            "onnxifi_wrapper": {
-                "target": "onnxifi_wrapper"
             }
         }
+        if Version(self.version) < "1.13.0":
+            components.update(
+                {
+                    "onnxifi": {
+                        "target": "onnxifi",
+                        "system_libs": [(self.settings.os in ["Linux", "FreeBSD"], ["dl"])],
+                    },
+                    "onnxifi_dummy": {
+                        "target": "onnxifi_dummy",
+                        "libs": ["onnxifi_dummy"],
+                        "requires": ["onnxifi"]
+                    },
+                    "onnxifi_loader": {
+                        "target": "onnxifi_loader",
+                        "libs": ["onnxifi_loader"],
+                        "requires": ["onnxifi"]
+                    },
+                    "onnxifi_wrapper": {
+                        "target": "onnxifi_wrapper"
+                    }
+                }
+            )
         if Version(self.version) >= "1.11.0":
             components["libonnx"]["defines"].append("__STDC_FORMAT_MACROS")
         return components


Test patch: