Skip to content

Commit 02b9e50

Browse files
authored
dlib: bump dependencies and patch to fix errors with newer compilers (#28766)
* Bump dependencies versions Signed-off-by: Uilian Ries <[email protected]> * Trigger CI Signed-off-by: Uilian Ries <[email protected]> * Backport patch for template argument error on Clang Signed-off-by: Uilian Ries <[email protected]> * Re-use backport patch for 19.24 Signed-off-by: Uilian Ries <[email protected]> * Re-use backport patch for 19.23 Signed-off-by: Uilian Ries <[email protected]> * Drop <=19.21 due patch incompatibility Signed-off-by: Uilian Ries <[email protected]> --------- Signed-off-by: Uilian Ries <[email protected]>
1 parent c39b5fc commit 02b9e50

File tree

4 files changed

+40
-14
lines changed

4 files changed

+40
-14
lines changed

recipes/dlib/all/conandata.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ sources:
88
"19.23":
99
url: "https://github.com/davisking/dlib/archive/v19.23.tar.gz"
1010
sha256: "0fc74a39d2046ad15819bab25a695333a63e740c91ed3c620c8594381c132e88"
11-
"19.21":
12-
url: "https://github.com/davisking/dlib/archive/v19.21.tar.gz"
13-
sha256: "116f52e58be04b47dab52057eaad4b5c4d5c3032d927fe23d55b0741fc4107a0"
14-
"19.19":
15-
url: "https://github.com/davisking/dlib/archive/v19.19.tar.gz"
16-
sha256: "7af455bb422d3ae5ef369c51ee64e98fa68c39435b0fa23be2e5d593a3d45b87"
11+
patches:
12+
"19.24.2":
13+
- patch_file: "patches/19.24.2-0001-fix-template-arg-error.patch"
14+
"19.24":
15+
- patch_file: "patches/19.24.2-0001-fix-template-arg-error.patch"
16+
"19.23":
17+
- patch_file: "patches/19.24.2-0001-fix-template-arg-error.patch"

recipes/dlib/all/conanfile.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from conan import ConanFile
22
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
3-
from conan.tools.files import get, replace_in_file, copy, rmdir, collect_libs, rm
3+
from conan.tools.files import get, replace_in_file, copy, rmdir, collect_libs, rm, apply_conandata_patches, export_conandata_patches
44
from conan.tools.build import check_min_cppstd
55
from conan.tools.microsoft import is_msvc
66
from conan.tools.scm import Version
@@ -69,6 +69,9 @@ def _compilers_minimum_version(self):
6969
def _has_with_webp_option(self):
7070
return Version(self.version) >= "19.24"
7171

72+
def export_sources(self):
73+
export_conandata_patches(self)
74+
7275
def config_options(self):
7376
if self.settings.os == "Windows":
7477
self.options.rm_safe("fPIC")
@@ -90,15 +93,15 @@ def requirements(self):
9093
if self.options.with_gif:
9194
self.requires("giflib/5.2.1")
9295
if self.options.with_jpeg:
93-
self.requires("libjpeg/9e")
96+
self.requires("libjpeg/[>=9e]")
9497
if self.options.with_png:
9598
self.requires("libpng/[>=1.6 <2]")
9699
if self.options.get_safe("with_webp"):
97100
self.requires("libwebp/1.3.2")
98101
if self.options.with_sqlite3:
99-
self.requires("sqlite3/3.45.0")
102+
self.requires("sqlite3/[>=3.45.0 <4]")
100103
if self.options.with_openblas:
101-
self.requires("openblas/0.3.26")
104+
self.requires("openblas/0.3.30")
102105

103106
def validate(self):
104107
if self.settings.compiler.cppstd:
@@ -113,6 +116,7 @@ def validate(self):
113116

114117
def source(self):
115118
get(self, **self.conan_data["sources"][self.version], strip_root=True)
119+
apply_conandata_patches(self)
116120

117121
def _patch_sources(self):
118122
dlib_cmakelists = os.path.join(self.source_folder, "dlib", "CMakeLists.txt")
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 123029b0abde8d3074681acab44f14ce4c5ef8ea Mon Sep 17 00:00:00 2001
2+
From: Drew Risinger <[email protected]>
3+
Date: Mon, 24 Jun 2024 11:19:21 -0700
4+
Subject: [PATCH] global_optimization: add template argument list
5+
6+
Fixes error (-Wmissing-template-arg-list-after-template-kw) from clang-19 compiler.
7+
8+
https://github.com/davisking/dlib/pull/2973
9+
---
10+
dlib/global_optimization/find_max_global.h | 2 +-
11+
1 file changed, 1 insertion(+), 1 deletion(-)
12+
13+
diff --git a/dlib/global_optimization/find_max_global.h b/dlib/global_optimization/find_max_global.h
14+
index 12e496e698..8a05ae9050 100644
15+
--- a/dlib/global_optimization/find_max_global.h
16+
+++ b/dlib/global_optimization/find_max_global.h
17+
@@ -58,7 +58,7 @@ namespace dlib
18+
}
19+
20+
template <typename T>
21+
- static auto go(T&& f, const matrix<double,0,1>& a) -> decltype(call_function_and_expand_args<max_unpack-1>::template go(std::forward<T>(f),a))
22+
+ static auto go(T&& f, const matrix<double,0,1>& a) -> decltype(call_function_and_expand_args<max_unpack-1>::template go<T>(std::forward<T>(f),a))
23+
{
24+
return call_function_and_expand_args<max_unpack-1>::go(std::forward<T>(f),a);
25+
}

recipes/dlib/config.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,3 @@ versions:
55
folder: all
66
"19.23":
77
folder: all
8-
"19.21":
9-
folder: all
10-
"19.19":
11-
folder: all

0 commit comments

Comments
 (0)