diff --git a/recipes/coin-cbc/all/conandata.yml b/recipes/coin-cbc/all/conandata.yml index 99a9ed92100b1..67502e957e9c5 100644 --- a/recipes/coin-cbc/all/conandata.yml +++ b/recipes/coin-cbc/all/conandata.yml @@ -2,9 +2,17 @@ sources: "2.10.5": url: "https://github.com/coin-or/Cbc/archive/releases/2.10.5.tar.gz" sha256: "cc44c1950ff4615e7791d7e03ea34318ca001d3cac6dc3f7f5ee392459ce6719" + "2.10.8": + url: "https://github.com/coin-or/Cbc/archive/releases/2.10.8.tar.gz" + sha256: "8525abb541ee1b8e6ff03b00411b66e98bbc58f95be1aefd49d2bca571be2eaf" patches: "2.10.5": - patch_file: "patches/0001-no-pkg-config-check.patch" base_path: "source_subfolder" - patch_file: "patches/0002-pthreads4w.patch" base_path: "source_subfolder" + "2.10.8": + - patch_file: "patches/0003-no-pkg-config-check.patch" + base_path: "source_subfolder" + - patch_file: "patches/0004-pthreads4w.patch" + base_path: "source_subfolder" diff --git a/recipes/coin-cbc/all/conanfile.py b/recipes/coin-cbc/all/conanfile.py index ffea985fa3a7d..805d9ee35f2e1 100644 --- a/recipes/coin-cbc/all/conanfile.py +++ b/recipes/coin-cbc/all/conanfile.py @@ -53,10 +53,16 @@ def configure(self): del self.options.fPIC def requirements(self): - self.requires("coin-utils/2.11.4") - self.requires("coin-osi/0.108.6") - self.requires("coin-clp/1.17.6") - self.requires("coin-cgl/0.60.3") + if self.version == "2.10.5": + self.requires("coin-utils/2.11.4") + self.requires("coin-osi/0.108.6") + self.requires("coin-clp/1.17.6") + self.requires("coin-cgl/0.60.3") + else: + self.requires("coin-utils/2.11.6") + self.requires("coin-osi/0.108.7") + self.requires("coin-clp/1.17.7") + self.requires("coin-cgl/0.60.6") if self.settings.compiler == "Visual Studio" and self.options.parallel: self.requires("pthreads4w/3.0.0") diff --git a/recipes/coin-cbc/all/patches/0003-no-pkg-config-check.patch b/recipes/coin-cbc/all/patches/0003-no-pkg-config-check.patch new file mode 100644 index 0000000000000..94c6642c4bf0e --- /dev/null +++ b/recipes/coin-cbc/all/patches/0003-no-pkg-config-check.patch @@ -0,0 +1,13 @@ +--- Cbc/Makefile.in ++++ Cbc/Makefile.in +@@ -1011,8 +1011,8 @@ + + install-data-hook: + @$(mkdir_p) "$(addlibsdir)" +-@COIN_HAS_PKGCONFIG_TRUE@ PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@:$(DESTDIR)$(pkgconfiglibdir) \ +-@COIN_HAS_PKGCONFIG_TRUE@ $(PKG_CONFIG) --libs cbc > $(addlibsdir)/cbc_addlibs.txt ++@COIN_HAS_PKGCONFIG_TRUE@ #PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@:$(DESTDIR)$(pkgconfiglibdir) \ ++@COIN_HAS_PKGCONFIG_TRUE@ #$(PKG_CONFIG) --libs cbc > $(addlibsdir)/cbc_addlibs.txt + @COIN_CXX_IS_CL_TRUE@@COIN_HAS_PKGCONFIG_FALSE@ echo "-libpath:`$(CYGPATH_W) @abs_lib_dir@` libCbc.lib @CBCLIB_LIBS_INSTALLED@" > $(addlibsdir)/cbc_addlibs.txt + @COIN_CXX_IS_CL_FALSE@@COIN_HAS_PKGCONFIG_FALSE@ echo -L@abs_lib_dir@ -lCbcSolver -lCbc @CBCLIB_LIBS_INSTALLED@ > $(addlibsdir)/cbc_addlibs.txt + diff --git a/recipes/coin-cbc/all/patches/0004-pthreads4w.patch b/recipes/coin-cbc/all/patches/0004-pthreads4w.patch new file mode 100644 index 0000000000000..77808979b2817 --- /dev/null +++ b/recipes/coin-cbc/all/patches/0004-pthreads4w.patch @@ -0,0 +1,11 @@ +--- a/Cbc/configure ++++ b/Cbc/configure +@@ -30979,7 +30979,7 @@ cat >>confdefs.h <<\_ACEOF + #define CBC_THREAD 1 + _ACEOF + +- if test $coin_cxx_is_cl = true ; ++ if test "${with_pthreadsw32_lib+set}" = set ; + then + # TODO we should check whether the library works and pthread.h is indeed there + diff --git a/recipes/coin-cbc/all/test_package/conanfile.py b/recipes/coin-cbc/all/test_package/conanfile.py index 9ade272b0a40d..b06a10c4e543f 100644 --- a/recipes/coin-cbc/all/test_package/conanfile.py +++ b/recipes/coin-cbc/all/test_package/conanfile.py @@ -1,3 +1,4 @@ +from conan.tools.build import cross_building from conans import ConanFile, CMake, tools import os @@ -15,6 +16,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): + if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) diff --git a/recipes/coin-cbc/config.yml b/recipes/coin-cbc/config.yml index 339963dc57456..bf34e29239748 100644 --- a/recipes/coin-cbc/config.yml +++ b/recipes/coin-cbc/config.yml @@ -1,3 +1,5 @@ versions: "2.10.5": folder: "all" + "2.10.8": + folder: "all"