summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
Diffstat (limited to 'databases')
-rw-r--r--databases/ocaml-dbm/Makefile37
-rw-r--r--databases/ocaml-dbm/distinfo5
-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
-rw-r--r--databases/ocaml-dbm/pkg-plist19
-rw-r--r--databases/ocaml-mysql/Makefile2
-rw-r--r--databases/ocaml-sqlite3/Makefile2
8 files changed, 165 insertions, 64 deletions
diff --git a/databases/ocaml-dbm/Makefile b/databases/ocaml-dbm/Makefile
index d85b05101b5b..ba9edf623e9b 100644
--- a/databases/ocaml-dbm/Makefile
+++ b/databases/ocaml-dbm/Makefile
@@ -1,31 +1,40 @@
PORTNAME= dbm
-PORTVERSION= 1.0
-PORTREVISION= 2
+PORTVERSION= 1.3
+DISTVERSIONPREFIX= camldbm-
CATEGORIES= databases
-MASTER_SITES= https://forge.ocamlcore.org/frs/download.php/728/
PKGNAMEPREFIX= ocaml-
-DISTNAME= caml${PORTNAME}-${PORTVERSION}
+
+EXTRA_PATCHES= ${PATCHDIR}/3bb91d6-revised-configuration:-p1
MAINTAINER= ports@FreeBSD.org
COMMENT= OCaml binding to the NDBM and GDBM database library
-WWW= https://forge.ocamlcore.org/projects/camldbm/
+WWW= https://github.com/ocaml/dbm
-LICENSE= LGPL20
+LICENSE= LGPL20 # with a special exception to clause 6
-CONFLICTS= ocaml-[0-3]* ocaml-nox11-[0-3]*
+USE_GITHUB= yes
+USE_OCAML= yes
+GH_ACCOUNT= ocaml
+USE_OCAML_LDCONFIG= yes
-USES= tar:tgz
+DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
HAS_CONFIGURE= yes
-USE_OCAML= yes
-DOCSDIR= ${PREFIX}/share/doc/ocaml/${PORTNAME}
-MAKE_ENV+= DESTDIR="${STAGEDIR}"
+MAKE_ENV+= LIBDIR="${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/dbm" \
+ STUBLIBDIR="${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/dbm"
+
+post-patch:
+ @${REINPLACE_CMD} \
+ -E 's/^(LIBDIR|STUBLIBDIR)=/\1?=/' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} \
+ -e 's/^version =.*/version = "${PORTVERSION}"/' ${WRKSRC}/META
pre-install:
- @${MKDIR} ${STAGEDIR}${PREFIX}/lib/ocaml/site-lib/dbm \
- ${STAGEDIR}${PREFIX}/lib/ocaml/stublibs
+ @${MKDIR} ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/dbm
post-install:
- ${INSTALL_DATA} ${WRKSRC}/META \
+ @${STRIP_CMD} \
+ ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/dbm/dllcamldbm.so
+ @${INSTALL_DATA} ${WRKSRC}/META \
${STAGEDIR}${PREFIX}/lib/ocaml/site-lib/dbm
.include <bsd.port.mk>
diff --git a/databases/ocaml-dbm/distinfo b/databases/ocaml-dbm/distinfo
index 4e0c76d57473..cf6e5e81d030 100644
--- a/databases/ocaml-dbm/distinfo
+++ b/databases/ocaml-dbm/distinfo
@@ -1,2 +1,3 @@
-SHA256 (camldbm-1.0.tgz) = 19741fa7827c306ae43b18170b01f5547326ec7ea6c2f4bd80c93439b5ff538f
-SIZE (camldbm-1.0.tgz) = 14397
+TIMESTAMP = 1710705889
+SHA256 (ocaml-dbm-camldbm-1.3_GH0.tar.gz) = 126fd020be0dd13be7e8854fcd3637392ff039c8b865243bb4dad15a954a0da7
+SIZE (ocaml-dbm-camldbm-1.3_GH0.tar.gz) = 14831
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)
diff --git a/databases/ocaml-dbm/pkg-plist b/databases/ocaml-dbm/pkg-plist
index 07d1ce85afd3..e28986fc4c85 100644
--- a/databases/ocaml-dbm/pkg-plist
+++ b/databases/ocaml-dbm/pkg-plist
@@ -1,9 +1,10 @@
-lib/ocaml/dbm.a
-lib/ocaml/dbm.cma
-lib/ocaml/dbm.cmi
-lib/ocaml/dbm.cmxa
-lib/ocaml/dbm.cmxs
-lib/ocaml/dbm.mli
-lib/ocaml/libcamldbm.a
-lib/ocaml/site-lib/dbm/META
-lib/ocaml/stublibs/dllcamldbm.so
+%%OCAML_SITELIBDIR%%/dbm/META
+%%OCAML_SITELIBDIR%%/dbm/dbm.a
+%%OCAML_SITELIBDIR%%/dbm/dbm.cma
+%%OCAML_SITELIBDIR%%/dbm/dbm.cmi
+%%OCAML_SITELIBDIR%%/dbm/dbm.cmx
+%%OCAML_SITELIBDIR%%/dbm/dbm.cmxa
+%%OCAML_SITELIBDIR%%/dbm/dbm.cmxs
+%%OCAML_SITELIBDIR%%/dbm/dbm.mli
+%%OCAML_SITELIBDIR%%/dbm/dllcamldbm.so
+%%OCAML_SITELIBDIR%%/dbm/libcamldbm.a
diff --git a/databases/ocaml-mysql/Makefile b/databases/ocaml-mysql/Makefile
index 7783983b5fb1..8767d52e7b20 100644
--- a/databases/ocaml-mysql/Makefile
+++ b/databases/ocaml-mysql/Makefile
@@ -1,6 +1,6 @@
PORTNAME= mysql
PORTVERSION= 1.2.4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases
MASTER_SITES= http://ygrek.org.ua/p/release/ocaml-mysql/
PKGNAMEPREFIX= ocaml-
diff --git a/databases/ocaml-sqlite3/Makefile b/databases/ocaml-sqlite3/Makefile
index a039f89f262f..c9eb0e19baf7 100644
--- a/databases/ocaml-sqlite3/Makefile
+++ b/databases/ocaml-sqlite3/Makefile
@@ -1,7 +1,7 @@
PORTNAME= sqlite3
PORTVERSION= 4.0.5
DISTVERSIONPREFIX= v
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases
PKGNAMEPREFIX= ocaml-