Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coin-cbc : aded 2.10.8 #15272

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions recipes/coin-cbc/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
14 changes: 10 additions & 4 deletions recipes/coin-cbc/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
13 changes: 13 additions & 0 deletions recipes/coin-cbc/all/patches/0003-no-pkg-config-check.patch
Original file line number Diff line number Diff line change
@@ -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

11 changes: 11 additions & 0 deletions recipes/coin-cbc/all/patches/0004-pthreads4w.patch
Original file line number Diff line number Diff line change
@@ -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

3 changes: 2 additions & 1 deletion recipes/coin-cbc/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from conan.tools.build import cross_building
from conans import ConanFile, CMake, tools
import os

Expand All @@ -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)
2 changes: 2 additions & 0 deletions recipes/coin-cbc/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"2.10.5":
folder: "all"
"2.10.8":
folder: "all"