Skip to content
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
10 changes: 10 additions & 0 deletions packages/conf-gmp/conf-gmp.5/files/test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <gmp.h>
#ifndef __GMP_H__
#error "No GMP header"
#endif

void test(void) {
mpz_t n;
mpz_init(n);
mpz_clear(n);
}
45 changes: 45 additions & 0 deletions packages/conf-gmp/conf-gmp.5/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
opam-version: "2.0"
maintainer: "nbraud"
homepage: "http://gmplib.org/"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
license: "GPL-1.0-or-later"
build: [
["sh" "-exc" "cc -c $CFLAGS -I/usr/local/include test.c"] {os != "macos" & os != "win32"}
[
"sh"
"-exc"
"$(ocamlc -config-var c_compiler) -c $CFLAGS -I/usr/local/include test.c"
] {os = "win32" & os-distribution = "cygwinports"}
[
"sh"
"-exc"
"cc -c $CFLAGS -I/opt/local/include -I/usr/local/include test.c"
] {os = "macos" & os-distribution != "homebrew" & os-distribution != "macports"}
["pkg-config" "gmp"] {os = "macos" & os-distribution = "homebrew"}
["pkg-config" "gmp"] {os = "macos" & os-distribution = "macports"}
]
depends: [
"conf-pkg-config" {build & os = "macos" & os-distribution = "homebrew"}
"conf-pkg-config" {build & os = "macos" & os-distribution = "macports"}
]
depexts: [
["libgmp-dev"] {os-family = "debian"}
["libgmp-dev"] {os-family = "ubuntu"}
["gmp"] {os = "macos" & os-distribution = "homebrew"}
["gmp"] {os = "macos" & os-distribution = "macports"}
["gmp" "gmp-devel"] {os-distribution = "centos"}
["gmp" "gmp-devel"] {os-distribution = "fedora"}
["gmp" "gmp-devel"] {os-distribution = "ol"}
["gmp"] {os = "openbsd"}
["gmp"] {os = "freebsd"}
["gmp-dev"] {os-distribution = "alpine"}
["gmp-devel"] {os-family = "suse"}
["gmp"] {os = "win32" & os-distribution = "cygwinports"}
["gmp"] {os-distribution = "nixos"}
]
synopsis: "Virtual package relying on a GMP lib system installation"
description:
"This package can only install if the GMP lib is installed on the system."
authors: "nbraud"
extra-files: ["test.c" "md5=2fd2970c293c36222a6d299ec155823f"]
flags: conf
52 changes: 52 additions & 0 deletions packages/zarith/zarith.1.12-1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
opam-version: "2.0"
maintainer: "Xavier Leroy <xavier.leroy@inria.fr>"
authors: [
"Antoine Miné"
"Xavier Leroy"
"Pascal Cuoq"
]
homepage: "https://github.com/ocaml/Zarith"
bug-reports: "https://github.com/ocaml/Zarith/issues"
dev-repo: "git+https://github.com/ocaml/Zarith.git"
license: "LGPL-2.0-only WITH OCaml-LGPL-linking-exception"
build: [
["./configure"] {os != "openbsd" & os != "freebsd" & os != "macos"}
[
"sh"
"-exc"
"LDFLAGS=\"$LDFLAGS -L/usr/local/lib\" CFLAGS=\"$CFLAGS -I/usr/local/include\" ./configure"
] {os = "openbsd" | os = "freebsd"}
[
"sh"
"-exc"
"LDFLAGS=\"$LDFLAGS -L/opt/local/lib -L/usr/local/lib\" CFLAGS=\"$CFLAGS -I/opt/local/include -I/usr/local/include\" ./configure"
] {os = "macos" & os-distribution != "homebrew" & os-distribution != "macports"}
[
"sh"
"-exc"
"LDFLAGS=\"$LDFLAGS $(pkg-config --libs-only-L gmp)\" CFLAGS=\"$CFLAGS $(pkg-config --cflags gmp)\" ./configure"
] {os = "macos" & (os-distribution = "homebrew" | os-distribution = "macports")}
[make]
]
install: [
[make "install"]
]
depends: [
"ocaml" {>= "4.04.0"}
"ocamlfind"
"conf-gmp"
]
synopsis:
"Implements arithmetic and logical operations over arbitrary-precision integers"
description: """
The Zarith library implements arithmetic and logical operations over
arbitrary-precision integers. It uses GMP to efficiently implement
arithmetic over big integers. Small integers are represented as Caml
unboxed integers, for speed and space economy."""
url {
src: "https://github.com/ocaml/Zarith/archive/release-1.12.tar.gz"
checksum: [
"md5=bf368f3d9e20b6b446d54681afc05a04"
"sha512=8075573ae65579a2606b37dd1b213032a07d220d28c733f9288ae80d36f8a2cc4d91632806df2503c130ea9658dc207ee3a64347c21aa53969050a208f5b2bb4"
]
}