this repo has no description
1opam-version: "2.0"
2maintainer: "Nikolay Khachatryan <i20.khachatryan.nikolay@etud.ufar.am>"
3homepage: "https://github.com/coin-or/Csdp"
4dev-repo: "git+https://github.com/coin-or/Csdp.git"
5doc: "https://github.com/coin-or/Csdp/blob/master/doc/csdpuser.pdf"
6license: "EPL-2.0"
7bug-reports: "https://github.com/coin-or/Csdp/issues"
8
9synopsis: "Solver for semidefinite programming problems"
10description: """
11CSDP is a library of routines that implements a predictor corrector variant of
12the semidefinite programming algorithm. It is written in C for efficiency and runs
13in parallel on shared memory multi-processor systems.
14See also the conf-csdp opam package (for distributions that provide csdp)
15"""
16authors: [
17 "Brian Borchers <borchers@nmt.edu>"
18 "Joseph Young <josyoun@nmt.edu>"
19 "Aaron Wilson <wilson@nmt.edu>"
20]
21depends: [
22 "conf-gcc"
23 "conf-lapack"
24 "conf-openblas" {os != "macos"}
25]
26depexts: [
27 ["libomp"] {os = "macos" & os-distribution = "homebrew"}
28]
29build: [
30 # Add stdio.h (missing in 6.2.0 git tag)
31 # cf. https://github.com/coin-or/Csdp/blob/0dcf187a159c365b6d4e4e0ed5849f7b706da408/lib/user_exit.c#L16
32 ["sed" "-e" "16i\\\n#include <stdio.h>" "-i.bak" "lib/user_exit.c"]
33 # Use openblas (which seems available on most distributions), and remove -static
34 ["sed" "-e" "/export LIBS=/s/-lblas/-lopenblas/" "-e" "/export LIBS=/s/-static//" "-i.bak" "Makefile"]
35 # Remove -ansi to avoid "error: unknown type name 'inline'" on freebsd and macos
36 ["sed" "-e" "/export CFLAGS=/s/-ansi//" "-i.bak" "Makefile"] {os = "freebsd" | os = "macos"}
37 # Use homebrew's libomp to avoid "error: unsupported option '-fopenmp'" on macos
38 # https://github.com/Macaulay2/homebrew-tap/blob/main/Formula/csdp.rb
39 ["sed" "-e" "/export CFLAGS=/s|-fopenmp|-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include -I/usr/local/opt/libomp/include|" "-e" "/export LIBS=/s|-lopenblas|-L/opt/homebrew/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp -framework Accelerate|" "-i.bak" "Makefile"] {os = "macos" & os-distribution = "homebrew"}
40 ["sed" "-e" "/export CFLAGS=/s|-fopenmp|-fopenmp -I/usr/local/include|" "-e" "/export LIBS=/s|-lsdp|-lsdp -L/usr/local/lib|" "-i.bak" "Makefile"] {os = "freebsd"}
41 # Remove -m64 (not portable and unneeded on amd64 given -march=native)
42 ["sed" "-e" "/export CFLAGS=/s/-m64//" "-i.bak" "Makefile"]
43 # Use -mcpu=native for PowerPC, cf. https://github.com/mfem/mfem/pull/219
44 ["sed" "-e" "/export CFLAGS=/s/-march=native/-mcpu=native/" "-i.bak" "Makefile"] {arch = "ppc64"}
45 [make]
46 [make "unitTest"] {with-test}
47]
48url {
49 src: "https://github.com/coin-or/Csdp/archive/refs/tags/releases/6.2.0.tar.gz"
50 checksum: "sha256=3d341974af1f8ed70e1a37cc896e7ae4a513375875e5b46db8e8f38b7680b32f"
51}
52extra-source "csdp.install" {
53 src:
54 "https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/csdp/csdp.install"
55 checksum:
56 "sha256=3ea2f5d480e233c10d690e6dbe90245ce1788e34cb71a2c188548653bd3df068"
57}