From c7d768d562fd677054e3be1147b4ffec405c0514 Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Wed, 1 Jan 2025 19:04:03 +0100 Subject: [PATCH 1/8] fix soplex deps; add boost dependency; add cc_binary target --- modules/soplex/metadata.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/soplex/metadata.json b/modules/soplex/metadata.json index bcc2e336b04..67dcfac0262 100644 --- a/modules/soplex/metadata.json +++ b/modules/soplex/metadata.json @@ -10,7 +10,8 @@ "github:scipopt/soplex" ], "versions": [ - "7.1.2" + "7.1.2", + "7.1.2.bcr.1" ], "yanked_versions": {} } From a3818d0a26dc3696b714cbf0b3b4ec011976e9f3 Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Wed, 1 Jan 2025 19:10:28 +0100 Subject: [PATCH 2/8] missing files --- modules/soplex/7.1.2.bcr.1/MODULE.bazel | 31 +++++++++++ .../soplex/7.1.2.bcr.1/overlay/BUILD.bazel | 53 +++++++++++++++++++ .../soplex/7.1.2.bcr.1/overlay/MODULE.bazel | 1 + .../patches/add_config_dot_h.patch | 24 +++++++++ .../patches/add_git_hash_dot_cpp.patch | 7 +++ .../7.1.2.bcr.1/patches/fmt_dot_hpp.patch | 15 ++++++ modules/soplex/7.1.2.bcr.1/presubmit.yml | 17 ++++++ modules/soplex/7.1.2.bcr.1/source.json | 15 ++++++ 8 files changed, 163 insertions(+) create mode 100644 modules/soplex/7.1.2.bcr.1/MODULE.bazel create mode 100644 modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel create mode 120000 modules/soplex/7.1.2.bcr.1/overlay/MODULE.bazel create mode 100644 modules/soplex/7.1.2.bcr.1/patches/add_config_dot_h.patch create mode 100644 modules/soplex/7.1.2.bcr.1/patches/add_git_hash_dot_cpp.patch create mode 100644 modules/soplex/7.1.2.bcr.1/patches/fmt_dot_hpp.patch create mode 100644 modules/soplex/7.1.2.bcr.1/presubmit.yml create mode 100644 modules/soplex/7.1.2.bcr.1/source.json diff --git a/modules/soplex/7.1.2.bcr.1/MODULE.bazel b/modules/soplex/7.1.2.bcr.1/MODULE.bazel new file mode 100644 index 00000000000..867b74be5c5 --- /dev/null +++ b/modules/soplex/7.1.2.bcr.1/MODULE.bazel @@ -0,0 +1,31 @@ +module( + name = "soplex", + version = "7.1.2.bcr.1", + compatibility_level = 1, +) + +bazel_dep( + name = "platforms", + version = "0.0.10", +) + +bazel_dep( + name = "fmt", + version = "11.1.1", +) + +bazel_dep( + name = "boost.multiprecision", + version = "1.83.0.bcr.1", +) + +bazel_dep( + name = "boost.serialization", + version = "1.83.0.bcr.1", +) + +bazel_dep( + name = "zlib", + version = "1.3.1.bcr.3", +) + diff --git a/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel b/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel new file mode 100644 index 00000000000..9cf9f07df5f --- /dev/null +++ b/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel @@ -0,0 +1,53 @@ +# Description: +# Soplex is a LP solver, a common tool in Operations Research.git + +cc_library( + name = "zstr", + hdrs = glob(["src/soplex/external/zstr/*.hpp"]), + includes = ["src/soplex/external"], + visibility = ["//visibility:public"], +) + +cc_library( + name = "libsoplex", + srcs = glob( + ["src/soplex/*.cpp"], + exclude = ["src/git_hash.cpp"], + ), + hdrs = glob( + [ + "src/soplex/*.h", + "src/soplex/*.hpp", + ], + ) + [ + "src/soplex.h", + "src/soplex.hpp", + "src/soplex/git_hash.cpp", + ], + copts = select({ + "@platforms//os:windows": ["-utf-8"], + "//conditions:default": [], + }) + [ + "-Isrc/soplex/external", + ], + includes = [ + "src", + ], + visibility = ["//visibility:public"], + deps = [ + ":zstr", + "@boost.multiprecision", + "@boost.serialization", + "@fmt", + ], +) + +cc_binary( + name = "soplex", + srcs = ["src/soplexmain.cpp"], + deps = [ + ":libsoplex", + "@boost.multiprecision", + "@zlib", + ], +) diff --git a/modules/soplex/7.1.2.bcr.1/overlay/MODULE.bazel b/modules/soplex/7.1.2.bcr.1/overlay/MODULE.bazel new file mode 120000 index 00000000000..9b599e3ad9c --- /dev/null +++ b/modules/soplex/7.1.2.bcr.1/overlay/MODULE.bazel @@ -0,0 +1 @@ +../MODULE.bazel \ No newline at end of file diff --git a/modules/soplex/7.1.2.bcr.1/patches/add_config_dot_h.patch b/modules/soplex/7.1.2.bcr.1/patches/add_config_dot_h.patch new file mode 100644 index 00000000000..a9165675618 --- /dev/null +++ b/modules/soplex/7.1.2.bcr.1/patches/add_config_dot_h.patch @@ -0,0 +1,24 @@ +diff --git a/src/soplex/config.h b/src/soplex/config.h +new file mode 100644 +index 00000000..e465106c +--- /dev/null ++++ b/src/soplex/config.h +@@ -0,0 +1,18 @@ ++#ifndef __SPXCONFIG_H__ ++#define __SPXCONFIG_H__ ++ ++#define CMAKE_BUILD_TYPE "Release" ++ ++#define SOPLEX_VERSION_MAJOR 7 ++#define SOPLEX_VERSION_MINOR 1 ++#define SOPLEX_VERSION_PATCH 2 ++#define SOPLEX_VERSION_SUB 0 ++#define SOPLEX_WITH_BOOST ++#define SOPLEX_WITH_CPPMPF ++/* #undef SOPLEX_WITH_FLOAT128 */ ++/* #undef SOPLEX_WITH_GMP */ ++/* #undef SOPLEX_WITH_MPFR */ ++/* #undef SOPLEX_WITH_PAPILO */ ++#define SOPLEX_WITH_ZLIB ++ ++#endif diff --git a/modules/soplex/7.1.2.bcr.1/patches/add_git_hash_dot_cpp.patch b/modules/soplex/7.1.2.bcr.1/patches/add_git_hash_dot_cpp.patch new file mode 100644 index 00000000000..b4b4d5248a3 --- /dev/null +++ b/modules/soplex/7.1.2.bcr.1/patches/add_git_hash_dot_cpp.patch @@ -0,0 +1,7 @@ +diff --git a/src/soplex/git_hash.cpp b/src/soplex/git_hash.cpp +new file mode 100644 +index 00000000..bc2d689d +--- /dev/null ++++ b/src/soplex/git_hash.cpp +@@ -0,0 +1 @@ ++#define SPX_GITHASH "NoGitInfo" diff --git a/modules/soplex/7.1.2.bcr.1/patches/fmt_dot_hpp.patch b/modules/soplex/7.1.2.bcr.1/patches/fmt_dot_hpp.patch new file mode 100644 index 00000000000..30de05ac12e --- /dev/null +++ b/modules/soplex/7.1.2.bcr.1/patches/fmt_dot_hpp.patch @@ -0,0 +1,15 @@ +diff --git a/src/soplex/fmt.hpp b/src/soplex/fmt.hpp +index 934cb085..c3a31bb8 100644 +--- a/src/soplex/fmt.hpp ++++ b/src/soplex/fmt.hpp +@@ -49,8 +49,8 @@ + + /* to provide backwards compatibility use fmt of PaPILO <= 2.3 due to breaking changes in fmt 7 */ + #if !defined(SOPLEX_WITH_PAPILO) || PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR > 3) +-#include "soplex/external/fmt/format.h" +-#include "soplex/external/fmt/ostream.h" ++#include "fmt/format.h" ++#include "fmt/ostream.h" + #else + #include "papilo/external/fmt/format.h" + #include "papilo/external/fmt/ostream.h" diff --git a/modules/soplex/7.1.2.bcr.1/presubmit.yml b/modules/soplex/7.1.2.bcr.1/presubmit.yml new file mode 100644 index 00000000000..4414b24cd53 --- /dev/null +++ b/modules/soplex/7.1.2.bcr.1/presubmit.yml @@ -0,0 +1,17 @@ +matrix: + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + - windows + bazel: + - 8.x + - 7.x +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - '@soplex//...' diff --git a/modules/soplex/7.1.2.bcr.1/source.json b/modules/soplex/7.1.2.bcr.1/source.json new file mode 100644 index 00000000000..89aaed109d5 --- /dev/null +++ b/modules/soplex/7.1.2.bcr.1/source.json @@ -0,0 +1,15 @@ +{ + "url": "https://github.com/scipopt/soplex/archive/refs/tags/release-712.tar.gz", + "integrity": "sha256-oafX9+MNHbZVSLMvddby7ZvQvyifY560SB09FBxnozI=", + "strip_prefix": "soplex-release-712", + "patches": { + "add_config_dot_h.patch": "sha256-b7x5Pyms8oDiaXQc1u7BLgo33kbDyAXJPsf0XGVfv6s=", + "add_git_hash_dot_cpp.patch": "sha256-QVgHvann6fzS5c58GflysP/vryBJT1C8wADUZ44dTWo=", + "fmt_dot_hpp.patch": "sha256-l3uQmHQOXJhsyGfBArkMIUI0n3t1BsvGD2r3d0CtVrc=" + }, + "patch_strip": 1, + "overlay": { + "BUILD.bazel": "sha256-u8+431jtHNbHXszeueXdBV6aR6Mu8EBf+tBw8D00Res=", + "MODULE.bazel": "sha256-ohssuS7/XCoDoU/kSSQZ81hiKq1xkvtknPaydLfrquM=" + } +} From c7e511ee11516e9d178df07bf1a431d9f6ff803c Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Wed, 1 Jan 2025 19:15:13 +0100 Subject: [PATCH 3/8] add myself as interim maintainer --- modules/soplex/metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/soplex/metadata.json b/modules/soplex/metadata.json index 67dcfac0262..b38a55c1a72 100644 --- a/modules/soplex/metadata.json +++ b/modules/soplex/metadata.json @@ -2,8 +2,8 @@ "homepage": "https://github.com/scipopt/soplex", "maintainers": [ { - "email": "bcr-maintainers@bazel.build", - "name": "No Maintainer Specified" + "email": "lperron@google.com", + "name": "Laurent Perron" } ], "repository": [ From 063cf7abd06fd15f1921570d1cd453ca2e96c597 Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Wed, 1 Jan 2025 22:47:09 +0100 Subject: [PATCH 4/8] set correct githash --- modules/soplex/7.1.2.bcr.1/patches/add_git_hash_dot_cpp.patch | 2 +- modules/soplex/7.1.2.bcr.1/source.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/soplex/7.1.2.bcr.1/patches/add_git_hash_dot_cpp.patch b/modules/soplex/7.1.2.bcr.1/patches/add_git_hash_dot_cpp.patch index b4b4d5248a3..51c4e80064e 100644 --- a/modules/soplex/7.1.2.bcr.1/patches/add_git_hash_dot_cpp.patch +++ b/modules/soplex/7.1.2.bcr.1/patches/add_git_hash_dot_cpp.patch @@ -4,4 +4,4 @@ index 00000000..bc2d689d --- /dev/null +++ b/src/soplex/git_hash.cpp @@ -0,0 +1 @@ -+#define SPX_GITHASH "NoGitInfo" ++#define SPX_GITHASH "b040369c" diff --git a/modules/soplex/7.1.2.bcr.1/source.json b/modules/soplex/7.1.2.bcr.1/source.json index 89aaed109d5..e653ab237e9 100644 --- a/modules/soplex/7.1.2.bcr.1/source.json +++ b/modules/soplex/7.1.2.bcr.1/source.json @@ -4,7 +4,7 @@ "strip_prefix": "soplex-release-712", "patches": { "add_config_dot_h.patch": "sha256-b7x5Pyms8oDiaXQc1u7BLgo33kbDyAXJPsf0XGVfv6s=", - "add_git_hash_dot_cpp.patch": "sha256-QVgHvann6fzS5c58GflysP/vryBJT1C8wADUZ44dTWo=", + "add_git_hash_dot_cpp.patch": "sha256-dr5ytJPP3IfeKS/F5fnGp37XRvb3HyADwp4TIx7aiXE=", "fmt_dot_hpp.patch": "sha256-l3uQmHQOXJhsyGfBArkMIUI0n3t1BsvGD2r3d0CtVrc=" }, "patch_strip": 1, From 02d46791102e02e053f45c91541f0444cba8176b Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Thu, 2 Jan 2025 10:32:32 +0100 Subject: [PATCH 5/8] use external zstr package --- modules/soplex/7.1.2.bcr.1/MODULE.bazel | 5 +++++ modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel | 9 +-------- modules/soplex/7.1.2.bcr.1/source.json | 7 ++++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/modules/soplex/7.1.2.bcr.1/MODULE.bazel b/modules/soplex/7.1.2.bcr.1/MODULE.bazel index 867b74be5c5..3c52a03cc15 100644 --- a/modules/soplex/7.1.2.bcr.1/MODULE.bazel +++ b/modules/soplex/7.1.2.bcr.1/MODULE.bazel @@ -29,3 +29,8 @@ bazel_dep( version = "1.3.1.bcr.3", ) +bazel_dep( + name = "zstr", + version = "1.0.7", +) + diff --git a/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel b/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel index 9cf9f07df5f..59f20e5a94e 100644 --- a/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel +++ b/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel @@ -1,13 +1,6 @@ # Description: # Soplex is a LP solver, a common tool in Operations Research.git -cc_library( - name = "zstr", - hdrs = glob(["src/soplex/external/zstr/*.hpp"]), - includes = ["src/soplex/external"], - visibility = ["//visibility:public"], -) - cc_library( name = "libsoplex", srcs = glob( @@ -35,10 +28,10 @@ cc_library( ], visibility = ["//visibility:public"], deps = [ - ":zstr", "@boost.multiprecision", "@boost.serialization", "@fmt", + "@zstr", ], ) diff --git a/modules/soplex/7.1.2.bcr.1/source.json b/modules/soplex/7.1.2.bcr.1/source.json index e653ab237e9..abacb4bb6d2 100644 --- a/modules/soplex/7.1.2.bcr.1/source.json +++ b/modules/soplex/7.1.2.bcr.1/source.json @@ -5,11 +5,12 @@ "patches": { "add_config_dot_h.patch": "sha256-b7x5Pyms8oDiaXQc1u7BLgo33kbDyAXJPsf0XGVfv6s=", "add_git_hash_dot_cpp.patch": "sha256-dr5ytJPP3IfeKS/F5fnGp37XRvb3HyADwp4TIx7aiXE=", - "fmt_dot_hpp.patch": "sha256-l3uQmHQOXJhsyGfBArkMIUI0n3t1BsvGD2r3d0CtVrc=" + "fmt_dot_hpp.patch": "sha256-l3uQmHQOXJhsyGfBArkMIUI0n3t1BsvGD2r3d0CtVrc=", + "spxfileio_dot_h.patch": "sha256-g3qdN7pcA2Ef64Kx3vb2xjyNJrKRjLIPJCI6dLkj/N8=" }, "patch_strip": 1, "overlay": { - "BUILD.bazel": "sha256-u8+431jtHNbHXszeueXdBV6aR6Mu8EBf+tBw8D00Res=", - "MODULE.bazel": "sha256-ohssuS7/XCoDoU/kSSQZ81hiKq1xkvtknPaydLfrquM=" + "BUILD.bazel": "sha256-iChG1nWE8G5adFDB20qXvfVyODJvq4S2fC/fhcZCmto=", + "MODULE.bazel": "sha256-JSEr3bYeVvq0K35PrwOYgKqGixoRZiH7pZQetttBs5M=" } } From 140b4fbf6139c53a810bcabc01fe914586c87992 Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Thu, 2 Jan 2025 10:33:52 +0100 Subject: [PATCH 6/8] missing --- .../7.1.2.bcr.1/patches/spxfileio_dot_h.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 modules/soplex/7.1.2.bcr.1/patches/spxfileio_dot_h.patch diff --git a/modules/soplex/7.1.2.bcr.1/patches/spxfileio_dot_h.patch b/modules/soplex/7.1.2.bcr.1/patches/spxfileio_dot_h.patch new file mode 100644 index 00000000000..e32a7459235 --- /dev/null +++ b/modules/soplex/7.1.2.bcr.1/patches/spxfileio_dot_h.patch @@ -0,0 +1,13 @@ +diff --git a/src/soplex/spxfileio.h b/src/soplex/spxfileio.h +index 035b30e0..4bff223c 100644 +--- a/src/soplex/spxfileio.h ++++ b/src/soplex/spxfileio.h +@@ -41,7 +41,7 @@ + *----------------------------------------------------------------------------- + */ + #ifdef SOPLEX_WITH_ZLIB +-#include "soplex/external/zstr/zstr.hpp" ++#include "zstr.hpp" + #endif // WITH_GSZSTREAM + + namespace soplex From a4fa73958dd615984258ba677b7bbce9e3542b1f Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Thu, 2 Jan 2025 17:46:05 +0100 Subject: [PATCH 7/8] address comments --- modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel | 16 ++++++---------- modules/soplex/7.1.2.bcr.1/source.json | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel b/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel index 59f20e5a94e..52a2a7ad387 100644 --- a/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel +++ b/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel @@ -1,8 +1,8 @@ # Description: -# Soplex is a LP solver, a common tool in Operations Research.git +# Soplex is a LP solver, a common tool in Operations Research. cc_library( - name = "libsoplex", + name = "soplex", srcs = glob( ["src/soplex/*.cpp"], exclude = ["src/git_hash.cpp"], @@ -20,12 +20,8 @@ cc_library( copts = select({ "@platforms//os:windows": ["-utf-8"], "//conditions:default": [], - }) + [ - "-Isrc/soplex/external", - ], - includes = [ - "src", - ], + }), + includes = ["src"], visibility = ["//visibility:public"], deps = [ "@boost.multiprecision", @@ -36,10 +32,10 @@ cc_library( ) cc_binary( - name = "soplex", + name = "soplex_interactive", srcs = ["src/soplexmain.cpp"], deps = [ - ":libsoplex", + ":soplex", "@boost.multiprecision", "@zlib", ], diff --git a/modules/soplex/7.1.2.bcr.1/source.json b/modules/soplex/7.1.2.bcr.1/source.json index abacb4bb6d2..e21b218d87e 100644 --- a/modules/soplex/7.1.2.bcr.1/source.json +++ b/modules/soplex/7.1.2.bcr.1/source.json @@ -10,7 +10,7 @@ }, "patch_strip": 1, "overlay": { - "BUILD.bazel": "sha256-iChG1nWE8G5adFDB20qXvfVyODJvq4S2fC/fhcZCmto=", + "BUILD.bazel": "sha256-0PyNd35GEc05BSknQjzs8frwGBufXi1cpmzvmfEc5Xg=", "MODULE.bazel": "sha256-JSEr3bYeVvq0K35PrwOYgKqGixoRZiH7pZQetttBs5M=" } } From 22125ca27e1309fb1d66871036abf39ab3120424 Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Thu, 2 Jan 2025 18:00:19 +0100 Subject: [PATCH 8/8] fix windows --- modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel | 6 +++++- modules/soplex/7.1.2.bcr.1/source.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel b/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel index 52a2a7ad387..4ddb070d763 100644 --- a/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel +++ b/modules/soplex/7.1.2.bcr.1/overlay/BUILD.bazel @@ -18,7 +18,7 @@ cc_library( "src/soplex/git_hash.cpp", ], copts = select({ - "@platforms//os:windows": ["-utf-8"], + "@platforms//os:windows": ["/utf-8"], "//conditions:default": [], }), includes = ["src"], @@ -34,6 +34,10 @@ cc_library( cc_binary( name = "soplex_interactive", srcs = ["src/soplexmain.cpp"], + copts = select({ + "@platforms//os:windows": ["/utf-8"], + "//conditions:default": [], + }), deps = [ ":soplex", "@boost.multiprecision", diff --git a/modules/soplex/7.1.2.bcr.1/source.json b/modules/soplex/7.1.2.bcr.1/source.json index e21b218d87e..70bda97319a 100644 --- a/modules/soplex/7.1.2.bcr.1/source.json +++ b/modules/soplex/7.1.2.bcr.1/source.json @@ -10,7 +10,7 @@ }, "patch_strip": 1, "overlay": { - "BUILD.bazel": "sha256-0PyNd35GEc05BSknQjzs8frwGBufXi1cpmzvmfEc5Xg=", + "BUILD.bazel": "sha256-xFOmYj3tIpHXZOeEhuPEMYrKo8AEOZvgv0lYcKchBY0=", "MODULE.bazel": "sha256-JSEr3bYeVvq0K35PrwOYgKqGixoRZiH7pZQetttBs5M=" } }