Skip to content

Commit

Permalink
Merge pull request ocaml#11195 from Leonidas-from-XIV/dbm-1.1
Browse files Browse the repository at this point in the history
Add dbm 1.1
mseri authored Jan 8, 2018
2 parents 9f87803 + 8828201 commit 32f494d
Showing 4 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/dbm/dbm.1.1/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Binding to the NDBM/GDBM Unix "databases"
26 changes: 26 additions & 0 deletions packages/dbm/dbm.1.1/files/include_local_fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 6c11b9255e5fc116714f7ee4fd3d7f9175b262f5 Mon Sep 17 00:00:00 2001
From: Ion Alberdi <nolaridebi@gmail.com>
Date: Mon, 8 May 2017 21:23:37 +0200
Subject: [PATCH] Look for ndbm.h in /usr/local/include too

In macOS 10.12.4
% brew install gdbm --with-libgdbm-compat

puts ndbm.h in /usr/local/include.
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 7786275..00b763f 100755
--- a/configure
+++ b/configure
@@ -42,7 +42,7 @@ dbm_include="not found"
dbm_link="not found"
dbm_defines=""

-for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do
+for dir in /usr/include /usr/include/db1 /usr/include/gdbm /usr/local/include; do
if test -f $dir/ndbm.h; then
dbm_include=$dir
if hasgot $dir ndbm.h; then
35 changes: 35 additions & 0 deletions packages/dbm/dbm.1.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
opam-version: "1.2"
maintainer: "https://github.com/ocaml/opam-repository/issues"
authors: ["Francois Rouaix"]
homepage: "https://github.com/ocaml/dbm"
bug-reports: "https://github.com/ocaml/dbm/issues"
dev-repo: "https://github.com/ocaml/dbm.git"
license: "LGPL-v2 with OCaml linking exception"
build: [
["mkdir" "-p" "%{lib}%/dbm"]
["./configure"]
[make "all"]
[make "test"]
]
depends: ["ocamlfind"]
depexts: [
[["debian"] ["libgdbm-dev"]]
[["ubuntu"] ["libgdbm-dev"]]
[["nixpkgs"] ["gdbm"]]
[["centos"] ["gdbm-devel"]]
[["rhel"] ["gdbm-devel"]]
[["fedora"] ["gdbm-devel"]]
[["alpine"] ["gdbm-dev"]]
[["osx" "homebrew"] ["gdbm"]]
]
patches: [
"include_local_fix.patch"
]
install: [
[make "install" "STUBLIBDIR=%{lib}%/stublibs" "LIBDIR=%{lib}%/dbm"]
["cp" "META" "%{lib}%/dbm"]
]
remove: [
["rm" "-f" "%{lib}%/stublibs/dllcamldbm.so"]
["rm" "-f" "%{lib}%/dbm"]
]
2 changes: 2 additions & 0 deletions packages/dbm/dbm.1.1/url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
archive: "https://github.com/ocaml/dbm/archive/camldbm-1.1.tar.gz"
checksum: "d21a65d7f744677e074600b938195630"

0 comments on commit 32f494d

Please sign in to comment.