initial import of ocaml-postgresql-1.3.3

--
This OCaml library provides an interface to PostgreSQL (tested with
versions 7.0.2, 7.1.3 and 7.4.1), an efficient and reliable, open
source, relational database.

Almost all functionality available through the C-API (libpq) is
replicated in a type-safe way. This library uses objects for
representing database connections and results of queries.
This commit is contained in:
avsm 2004-06-12 22:03:12 +00:00
parent bb7427aea9
commit 78f00ac44c
13 changed files with 199 additions and 0 deletions

View File

@ -0,0 +1,48 @@
# $OpenBSD: Makefile,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
COMMENT= "Objective Caml bindings for PostgreSQL"
CATEGORIES= databases
V= 1.3.3
DISTNAME= postgresql-ocaml-${V}
PKGNAME= ocaml-postgresql-${V}
MASTER_SITES= http://www.oefai.at/~markus/ocaml_sources/
MAINTAINER= Anil Madhavapeddy <avsm@openbsd.org>
HOMEPAGE= http://www.oefai.at/~markus/ocaml_sources/
# LGPL
PERMIT_PACKAGE_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
MODULES= ocaml
NO_REGRESS= Yes
ALL_TARGET= all ${MODOCAML_NATIVE:S,Yes,allopt,:S,No,,}
USE_GMAKE= Yes
LIB_DEPENDS= pq.3::databases/postgresql
BUILD_DEPENDS= ::sysutils/findlib
RUN_DEPENDS= ::sysutils/findlib
MY_CFLAGS= ${CFLAGS} -I${LOCALBASE}/include/postgresql
MY_LIBDIRS= ${LOCALBASE]/lib
FINDLIB_DIR= ${PREFIX}/lib/ocaml/site-lib
EXAMPLES_DIR= ${PREFIX}/share/examples/ocaml-postgresql
MAKE_ENV= MY_CFLAGS="${MY_CFLAGS}" MY_LIBDIRS="${MY_LIBDIRS}" \
MY_INSTDIR=${DESTDIR}${FINDLIB_DIR}
pre-fake:
${INSTALL_DATA_DIR} ${FINDLIB_DIR}
post-install:
${INSTALL_DATA_DIR} ${EXAMPLES_DIR}
@cp -R ${WRKSRC}/examples/* ${EXAMPLES_DIR}
@echo INCDIRS := $$\(shell ocamlfind query postgresql\) >> ${EXAMPLES_DIR}/OCamlMakefile
@echo LIBDIRS = ${LOCALBASE}/lib >> ${EXAMPLES_DIR}/OCamlMakefile
@cat ${WRKSRC}/OCamlMakefile >> ${EXAMPLES_DIR}/OCamlMakefile
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (postgresql-ocaml-1.3.3.tar.gz) = 4cb542dcf79a8eb3700b28eb6826bfa4
RMD160 (postgresql-ocaml-1.3.3.tar.gz) = 46aaf9114aaa922c94cffcb78ad56a70f6e405e8
SHA1 (postgresql-ocaml-1.3.3.tar.gz) = 08fc8854dd6046230a8f4436e193a121c92d9140

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
--- Makefile.orig 2004-06-12 11:19:59.000000000 +0100
+++ Makefile 2004-06-12 11:20:28.000000000 +0100
@@ -2,9 +2,12 @@
EXAMPLES = $(filter-out examples/CVS, $(wildcard examples/*))
-.PHONY: all
+.PHONY: all allopt
all:
- @cd lib && $(MAKE) byte-code-library native-code-library
+ @cd lib && $(MAKE) byte-code-library
+
+allopt:
+ @cd lib && $(MAKE) native-code-library
.PHONY: examples
examples:

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-OCamlMakefile,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
--- OCamlMakefile.orig 2004-06-12 17:06:05.000000000 +0100
+++ OCamlMakefile 2004-06-12 17:10:38.000000000 +0100
@@ -998,7 +998,7 @@ subprojs:
.PHONY: libinstall
libinstall: all
$(QUIET)printf "\nInstalling library with ocamlfind\n"
- $(OCAMLFIND) install $(RESULT) META $(LIBINSTALL_FILES)
+ $(OCAMLFIND) install -destdir $(INSTDIR) $(RESULT) META $(LIBINSTALL_FILES)
$(QUIET)printf "\nInstallation successful.\n"
.PHONY: libuninstall

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-examples_dump_Makefile,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
--- examples/dump/Makefile.orig 2004-06-12 18:52:07.000000000 +0100
+++ examples/dump/Makefile 2004-06-12 18:52:54.000000000 +0100
@@ -1,8 +1,7 @@
-OCAMLMAKEFILE = ../../OCamlMakefile
+OCAMLMAKEFILE = ../OCamlMakefile
SOURCES = dump.ml
-INCDIRS = ../../lib
-LIBDIRS = ../../lib
+LIBDIRS = $(shell ocamlfind query postgresql)
LIBS = postgresql
RESULT = dump

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-examples_populate_Makefile,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
--- examples/populate/Makefile.orig 2004-06-12 19:14:09.000000000 +0100
+++ examples/populate/Makefile 2004-06-12 19:14:20.000000000 +0100
@@ -1,8 +1,6 @@
-OCAMLMAKEFILE = ../../OCamlMakefile
+OCAMLMAKEFILE = ../OCamlMakefile
SOURCES = populate.ml
-INCDIRS = ../../lib
-LIBDIRS = ../../lib
LIBS = postgresql
RESULT = populate

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-examples_prompt_Makefile,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
--- examples/prompt/Makefile.orig 2004-06-12 19:14:26.000000000 +0100
+++ examples/prompt/Makefile 2004-06-12 19:14:34.000000000 +0100
@@ -1,8 +1,6 @@
-OCAMLMAKEFILE = ../../OCamlMakefile
+OCAMLMAKEFILE = ../OCamlMakefile
SOURCES = prompt.ml
-INCDIRS = ../../lib
-LIBDIRS = ../../lib
LIBS = postgresql
THREADS = yes
RESULT = prompt

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-examples_prompt_gtk_Makefile,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
--- examples/prompt_gtk/Makefile.orig 2004-06-12 19:14:41.000000000 +0100
+++ examples/prompt_gtk/Makefile 2004-06-12 19:14:55.000000000 +0100
@@ -1,8 +1,6 @@
-OCAMLMAKEFILE = ../../OCamlMakefile
+OCAMLMAKEFILE = ../OCamlMakefile
SOURCES = prompt_gtk.ml
-INCDIRS = ../../lib
-LIBDIRS = ../../lib
LIBS = postgresql
PACKS = lablgtk
OCAMLBLDFLAGS = gtkInit.cmo

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-examples_test_lo_Makefile,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
--- examples/test_lo/Makefile.orig 2004-06-12 19:15:00.000000000 +0100
+++ examples/test_lo/Makefile 2004-06-12 19:15:06.000000000 +0100
@@ -1,8 +1,6 @@
-OCAMLMAKEFILE = ../../OCamlMakefile
+OCAMLMAKEFILE = ../OCamlMakefile
SOURCES = test_lo.ml
-INCDIRS = ../../lib
-LIBDIRS = ../../lib
LIBS = postgresql
RESULT = test_lo

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-lib_Makefile,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
--- lib/Makefile.orig 2004-04-27 10:17:34.000000000 +0100
+++ lib/Makefile 2004-06-12 18:44:23.000000000 +0100
@@ -1,7 +1,10 @@
OCAMLMAKEFILE = ../OCamlMakefile
SOURCES = postgresql_stubs.c postgresql.mli postgresql.ml
-CFLAGS = -O2
+CFLAGS = ${MY_CFLAGS}
+LIBDIRS = ${MY_LIBDIRS}
+INSTDIR = ${MY_INSTDIR}
+STATIC = Yes
CLIBS = pq
RESULT = postgresql

View File

@ -0,0 +1,7 @@
This OCaml library provides an interface to PostgreSQL (tested with
versions 7.0.2, 7.1.3 and 7.4.1), an efficient and reliable, open
source, relational database.
Almost all functionality available through the C-API (libpq) is
replicated in a type-safe way. This library uses objects for
representing database connections and results of queries.

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PFRAG.native,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
lib/ocaml/site-lib/postgresql/postgresql.a
lib/ocaml/site-lib/postgresql/postgresql.cmxa

View File

@ -0,0 +1,27 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/06/12 22:03:12 avsm Exp $
%%native%%
lib/ocaml/site-lib/postgresql/META
lib/ocaml/site-lib/postgresql/libpostgresql_stubs.a
lib/ocaml/site-lib/postgresql/postgresql.cma
lib/ocaml/site-lib/postgresql/postgresql.cmi
lib/ocaml/site-lib/postgresql/postgresql.mli
share/examples/ocaml-postgresql/OCamlMakefile
share/examples/ocaml-postgresql/dump/Makefile
share/examples/ocaml-postgresql/dump/dump.ml
share/examples/ocaml-postgresql/populate/Makefile
share/examples/ocaml-postgresql/populate/populate.ml
share/examples/ocaml-postgresql/prompt/Makefile
share/examples/ocaml-postgresql/prompt/prompt.ml
share/examples/ocaml-postgresql/prompt_gtk/Makefile
share/examples/ocaml-postgresql/prompt_gtk/prompt_gtk.ml
share/examples/ocaml-postgresql/test_lo/Makefile
share/examples/ocaml-postgresql/test_lo/test_lo.ml
@dirrm share/examples/ocaml-postgresql/test_lo
@dirrm share/examples/ocaml-postgresql/prompt_gtk
@dirrm share/examples/ocaml-postgresql/prompt
@dirrm share/examples/ocaml-postgresql/populate
@dirrm share/examples/ocaml-postgresql/dump
@dirrm share/examples/ocaml-postgresql
@dirrm lib/ocaml/site-lib/postgresql
@dirrm lib/ocaml/site-lib
@dirrm lib/ocaml