mirror of
https://git.freebsd.org/ports.git
synced 2025-06-14 17:20:29 -04:00
- 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
127 lines
3.7 KiB
Text
127 lines
3.7 KiB
Text
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
|