Skip to content

Commit

Permalink
glpk@5.0 (#1893)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 committed Apr 29, 2024
1 parent a1b6a87 commit 1b6d77e
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/glpk/5.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module(
name = "glpk",
version = "5.0",
)

bazel_dep(
name = "zlib",
version = "1.2.13",
)
54 changes: 54 additions & 0 deletions modules/glpk/5.0/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,51 @@
+# Copyright 2010-2024 Google LLC
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+cc_library(
+ name = "glpk",
+ srcs = glob(
+ [
+ "glpk-5.0/src/*.c",
+ "glpk-5.0/src/*/*.c",
+ "glpk-5.0/src/*.h",
+ "glpk-5.0/src/*/*.h",
+ ],
+ exclude = [
+ "glpk-5.0/src/proxy/main.c",
+ "glpk-5.0/src/zlib/*",
+ ],
+ ),
+ hdrs = [
+ "glpk-5.0/src/glpk.h",
+ ],
+ copts = [
+ "-w",
+ "-Iexternal/glpk/glpk-5.0/src",
+ "-Iexternal/glpk/glpk-5.0/src/amd",
+ "-Iexternal/glpk/glpk-5.0/src/api",
+ "-Iexternal/glpk/glpk-5.0/src/bflib",
+ "-Iexternal/glpk/glpk-5.0/src/colamd",
+ "-Iexternal/glpk/glpk-5.0/src/draft",
+ "-Iexternal/glpk/glpk-5.0/src/env",
+ "-Iexternal/glpk/glpk-5.0/src/intopt",
+ "-Iexternal/glpk/glpk-5.0/src/minisat",
+ "-Iexternal/glpk/glpk-5.0/src/misc",
+ "-Iexternal/glpk/glpk-5.0/src/mpl",
+ "-Iexternal/glpk/glpk-5.0/src/npp",
+ "-Iexternal/glpk/glpk-5.0/src/proxy",
+ "-Iexternal/glpk/glpk-5.0/src/simplex",
+ ],
+ deps = ["@zlib"],
+ includes = ["glpk-5.0/src"],
+ visibility = ["//visibility:public"],
+)
12 changes: 12 additions & 0 deletions modules/glpk/5.0/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,9 @@
+module(
+ name = "glpk",
+ version = "5.0",
+)
+
+bazel_dep(
+ name = "zlib",
+ version = "1.2.13",
+)
17 changes: 17 additions & 0 deletions modules/glpk/5.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
- windows
bazel:
- 7.x
- 6.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@glpk//:glpk'
10 changes: 10 additions & 0 deletions modules/glpk/5.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "http://ftp.gnu.org/gnu/glpk/glpk-5.0.tar.gz",
"integrity": "sha256-ShAT7rtQ9yj8YBvdgzsLKHAzPDs+WoFu66kh2VvsbxU=",
"strip_prefix": "glpk-5.0",
"patches": {
"add_build_file.patch": "sha256-DJz/uPmrDbCnR2fH2XAsXl1c+hWxchjlX5JiONVeD+Q=",
"module_dot_bazel.patch": "sha256-sYqimCvy7px6dLp1/BOK7+ihC9WxQcTMGljouvWclTc="
},
"patch_strip": 0
}
14 changes: 14 additions & 0 deletions modules/glpk/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"homepage": "https://www.gnu.org/software/glpk/glpk.html",
"maintainers": [
{
"email": "bcr-maintainers@bazel.build",
"name": "No Maintainer Specified"
}
],
"repository": [],
"versions": [
"5.0"
],
"yanked_versions": {}
}

0 comments on commit 1b6d77e

Please sign in to comment.