summaryrefslogtreecommitdiff
path: root/databases/ocaml-dbm/files
diff options
context:
space:
mode:
authorBenjamin Jacobs <freebsd@dev.thsi.be>2024-05-22 19:06:27 +0200
committerGuido Falsi <madpilot@FreeBSD.org>2024-05-22 19:16:28 +0200
commitbb2bea65dbac365184f0efd68e9b79201fe5c533 (patch)
treeb5ab1616201cd2b8dad95d0d0f6a3c52fba7a88a /databases/ocaml-dbm/files
parentdevel/ninja: Roll back to 1.11.1 (diff)
ocaml: Updates to ocaml compiler and several ocaml ports
- Update devel/ocaml to 4.14.2 [1] - Specify runtime dependency on GNU AS as full path, this fixes build on armv6 - armv7 [1] [2] - converters/ocaml-base64: Update to 3.5.1, add LICENSE, other improvements - converters/ocaml-jsonm: Strip shared objects [3] - databases/ocaml-dbm: Update to 1.3, move to gitlub, other improvements - devel/menhir: Update to 20231231 - devel/ocaml-base: Unbreak non-x86 [2] - devel/ocaml-camlp-streams: Silence patch and strip commands - devel/ocaml-ipaddr: Update to 5.5.0 - devel/ocaml-lwt: Update to 5.7.0 [4] - devel/ocaml-result: Set package version, strip shared objects [5] - devel/ocaml-sexplib: Resurrect and update to 0.16.0. - devel/ocaml-stdio: Update to 0.17.0 - security/ocaml-cryptokit: Update to 1.19, add LICENSE, other improvements - security/ocaml-ssl: Update to 0.7.0, install stublibs in package directory [6] - x11-toolkits/ocaml-graphics: Reorder Makefile, silence patch command - Bump PORTREVISION on ports requiring it after update. Adding ports: - devel/ocaml-cstruct - devel/ocaml-compiler-libs [7] - devel/ocaml-ppx_derivers [7] - devel/ocaml-ppxlib [7] - devel/ocaml-domain-name - devel/ocaml-ocplib-endian [8] - devel/ocaml-parsexp - devel/ocaml-ppx_sexp_conv - security/ocaml-lwt_ssl [9] Resetting maintainership from michipili@gmail.com due to multiple timeouts and long term unresponsiveness. Assigning maintainership of lang/ocaml to author of this patch. Many thanks to him for his work! PR: 278300 [1], 278791 [2], 277818 [3], 277781 [4], 277775 [6], 277779 [7], 277780 [8], 277782 [9] Approved by: michipili@gmail.com (maintainer timeout) [1], danfe@FreeBSD.org (maintainer timeout) [3] [4] [6], fixit, avoid breakage [5] Differential Revision: https://reviews.freebsd.org/D45254
Diffstat (limited to 'databases/ocaml-dbm/files')
-rw-r--r--databases/ocaml-dbm/files/3bb91d6-revised-configuration127
-rw-r--r--databases/ocaml-dbm/files/patch-META10
-rw-r--r--databases/ocaml-dbm/files/patch-Makefile27
3 files changed, 127 insertions, 37 deletions
diff --git a/databases/ocaml-dbm/files/3bb91d6-revised-configuration b/databases/ocaml-dbm/files/3bb91d6-revised-configuration
new file mode 100644
index 000000000000..fc1dcc2275d4
--- /dev/null
+++ b/databases/ocaml-dbm/files/3bb91d6-revised-configuration
@@ -0,0 +1,127 @@
+From 3bb91d6ffd700f9211a84dd2fc80c428bfcf5510 Mon Sep 17 00:00:00 2001
+From: Xavier Leroy <xavierleroy@users.noreply.github.com>
+Date: Wed, 20 Jul 2022 11:18:18 +0200
+Subject: [PATCH] Revised autoconfiguration (#16)
+
+- Let the C compiler find the ndbm.h or gdbm.h files
+ (instead of looking for them in specific directories).
+- Don't use the gdbm-ndbm.h compatibility mode, it no longer exists.
+---
+ cldbm.c | 4 +---
+ configure | 69 ++++++++++++++++++++++---------------------------------
+ 2 files changed, 29 insertions(+), 44 deletions(-)
+
+diff --git a/cldbm.c b/cldbm.c
+index 34e2d37..0fa4d13 100644
+--- a/cldbm.c
++++ b/cldbm.c
+@@ -21,9 +21,7 @@
+ #include <caml/fail.h>
+ #include <caml/callback.h>
+
+-#ifdef DBM_USES_GDBM_NDBM
+-#include <gdbm-ndbm.h>
+-#elif defined DBM_COMPAT
++#ifdef DBM_COMPAT
+ #include <ndbm.h>
+ #else
+ #include <gdbm.h>
+diff --git a/configure b/configure
+index 9a3d094..e049218 100755
+--- a/configure
++++ b/configure
+@@ -36,7 +36,7 @@ hasgot() {
+ fi
+ echo ' return 0;'
+ echo '}') > hasgot.c
+- ${CC:-cc} -I$1 -o hasgot.exe hasgot.c $3 $4
++ ${CC:-cc} $1 -o hasgot.exe hasgot.c $3 2>/dev/null
+ res=$?
+ rm -f hasgot.c hasgot.exe
+ return $res
+@@ -46,58 +46,45 @@ dbm_include="not found"
+ dbm_link="not found"
+ dbm_defines=""
+
+-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
+- dbm_defines="-DDBM_COMPAT"
+- if hasgot $dir ndbm.h; then
+- dbm_link=""
+- elif hasgot $dir ndbm.h -lndbm; then
+- dbm_link="-lndbm"
+- elif hasgot $dir ndbm.h -ldb1; then
+- dbm_link="-ldb1"
+- elif hasgot $dir ndbm.h -lgdbm; then
+- dbm_link="-lgdbm"
+- elif hasgot $dir ndbm.h -lgdbm_compat -lgdbm; then
+- dbm_link="-lgdbm_compat -lgdbm"
++for include in \
++ "" \
++ "-I/usr/include/db1" \
++ "-I/usr/include/gdbm" \
++ "-I/usr/local/include" \
++ "-I/opt/homebrew/include" ; do
++ if hasgot "$include" ndbm.h ""; then
++ dbm_include="$include"
++ dbm_defines="-DDBM_COMPAT"
++ dbm_link=""
++ break
++ elif hasgot "$include" gdbm.h -lgdbm; then
++ dbm_include="$include"
++ dbm_link="-lgdbm"
++ break
++ elif hasgot "$include" ndbm.h -lndbm; then
++ dbm_include="$include"
++ dbm_defines="-DDBM_COMPAT"
++ dbm_link="-lndbm"
++ break
++ elif hasgot "$include" ndbm.h -ldb1; then
++ dbm_include="$include"
++ dbm_defines="-DDBM_COMPAT"
++ dbm_link="-ldb1"
++ break
+ fi
+- break
+- fi
+- if test -f $dir/gdbm-ndbm.h; then
+- dbm_include=$dir
+- dbm_defines="-DDBM_COMPAT -DDBM_USES_GDBM_NDBM"
+- if hasgot $dir gdbm-ndbm.h -lgdbm_compat -lgdbm; then
+- dbm_link="-lgdbm_compat -lgdbm"
+- fi
+- break
+- fi
+- if test -f $dir/gdbm.h; then
+- dbm_include=$dir
+- if hasgot $dir gdbm.h -lgdbm; then
+- dbm_link="-lgdbm"
+- fi
+- break
+- fi
+ done
+ if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
+- echo "NDBM not found, the \"camldbm\" library cannot be built."
++ echo "NDBM and GDBM not found, the \"camldbm\" library cannot be built."
+ exit 2
+ fi
+
+ echo "Configuration for the \"camldbm\" library:"
+-echo " headers found in ......... $dbm_include"
+-echo " options for compiling .... $dbm_defines"
++echo " options for compiling .... $dbm_include $dbm_defines"
+ echo " options for linking ...... $dbm_link"
+ echo
+ echo "Configuration successful"
+ echo
+
+-if test "$dbm_include" = "/usr/include"; then
+- dbm_include=""
+-else
+- dbm_include="-I$dbm_include"
+-fi
+-
+ echo "OCAML_STDLIB=$stdlib" > Makefile.config
+ echo "DBM_INCLUDES=$dbm_include" >> Makefile.config
+ echo "DBM_LINK=$dbm_link" >> Makefile.config
diff --git a/databases/ocaml-dbm/files/patch-META b/databases/ocaml-dbm/files/patch-META
deleted file mode 100644
index 861715dffc1e..000000000000
--- a/databases/ocaml-dbm/files/patch-META
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-META,v 1.1 2013/07/21 17:04:29 jaapb Exp $
-
-point to correct directory for library files
---- META.orig 2011-11-22 15:56:49.000000000 +0000
-+++ META
-@@ -3,3 +3,4 @@ requires = ""
- version = "1.0"
- archive(byte) = "dbm.cma"
- archive(native) = "dbm.cmxa"
-+directory = "^"
diff --git a/databases/ocaml-dbm/files/patch-Makefile b/databases/ocaml-dbm/files/patch-Makefile
deleted file mode 100644
index c1e15f46971f..000000000000
--- a/databases/ocaml-dbm/files/patch-Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-Makefile,v 1.1 2012/12/15 10:25:52 jaapb Exp $
-
-Install into DESTDIR
---- Makefile.orig 2011-11-22 15:56:49.000000000 +0000
-+++ Makefile
-@@ -57,13 +57,14 @@ depend:
- $(OCAMLDEP) *.ml *.mli > .depend
-
- install::
-- if test -f dllcamldbm.$(SO); then cp dllcamldbm.$(SO) $(STUBLIBDIR)/; fi
-- cp libcamldbm.$(A) $(LIBDIR)/
-- cd $(LIBDIR) && ranlib libcamldbm.$(A)
-- cp dbm.cma dbm.cmxa dbm.cmi dbm.mli $(LIBDIR)/
-- cp dbm.$(A) $(LIBDIR)/
-- cd $(LIBDIR) && ranlib dbm.$(A)
-- if test -f dbm.cmxs; then cp dbm.cmxs $(LIBDIR)/; fi
-+ if test -f dllcamldbm.$(SO); then cp dllcamldbm.$(SO) \
-+ $(DESTDIR)/$(STUBLIBDIR)/; fi
-+ cp libcamldbm.$(A) $(DESTDIR)/$(LIBDIR)/
-+ cd $(DESTDIR)/$(LIBDIR) && ranlib libcamldbm.$(A)
-+ cp dbm.cma dbm.cmxa dbm.cmi dbm.mli $(DESTDIR)/$(LIBDIR)/
-+ cp dbm.$(A) $(DESTDIR)/$(LIBDIR)/
-+ cd $(DESTDIR)/$(LIBDIR) && ranlib dbm.$(A)
-+ if test -f dbm.cmxs; then cp dbm.cmxs $(DESTDIR)/$(LIBDIR)/; fi
-
- clean::
- rm -f *.cm* *.$(O) *.$(A) *.$(SO)