From 1f4401a28ff5f026a7cdf52051c6941a8e0fa89d Mon Sep 17 00:00:00 2001 From: Ion-Mihai Tetcu Date: Sun, 9 Jul 2006 14:26:40 +0000 Subject: [PATCH] OpenDBX is an extremely lightweight but extensible C library for accessing databases with a single API. It provides a clean and simple interface across all supported databases that leads to an elegant code design automatically. Currently MySQL, PostgreSQL and SQLite are supported and backends for more native database APIs can be written easily. If you want your application to support different databases with little effort, this is definitively the right thing for you! License: LGPL WWW: http://www.linuxnetworks.de/opendbx/ PR: ports/95005 Submitted by: tremere at cainites.net --- databases/Makefile | 1 + databases/opendbx/Makefile | 81 +++++++++++++++++++++++++++++++++++++ databases/opendbx/distinfo | 3 ++ databases/opendbx/pkg-descr | 11 +++++ databases/opendbx/pkg-plist | 23 +++++++++++ 5 files changed, 119 insertions(+) create mode 100644 databases/opendbx/Makefile create mode 100644 databases/opendbx/distinfo create mode 100644 databases/opendbx/pkg-descr create mode 100644 databases/opendbx/pkg-plist diff --git a/databases/Makefile b/databases/Makefile index 38447520ac12..88f3423d22ce 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -152,6 +152,7 @@ SUBDIR += mysqltcl SUBDIR += mytop SUBDIR += namazu2 + SUBDIR += opendbx SUBDIR += oracle7-client SUBDIR += oracle8-client SUBDIR += oracle_odbc_driver diff --git a/databases/opendbx/Makefile b/databases/opendbx/Makefile new file mode 100644 index 000000000000..c6355b836d7e --- /dev/null +++ b/databases/opendbx/Makefile @@ -0,0 +1,81 @@ +# New ports collection makefile for: opendbx +# Date Created: 17 March 2006 +# Whom: tremere@cainites.net +# +# $FreeBSD$ +# + +PORTNAME= opendbx +PORTVERSION= 1.0.0 +CATEGORIES= databases +MASTER_SITES= http://www.linuxnetworks.de/opendbx/download/ +DISTNAME= ${PORTNAME}-${PORTVERSION} + +MAINTAINER= tremere@cainites.net +COMMENT= A C library for accessing databases with a single API + +USE_GMAKE= YES +USE_AUTOTOOLS= libtool:15 +USE_GETTEXT= yes + +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +CONFIGURE_ARGS+= --with-backends="${CONFIGURE_MODULES}" --disable-nls +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" + +USE_LDCONFIG= ${PREFIX}/lib/opendbx + +OPTIONS= MYSQL "Support for the MySQL database" off \ + PGSQL "Support for the PostgreSQL database" on \ + SQLITE2 "Support for the SQLite 2 database" off \ + SQLITE "Support for the SQLite 3 database" off + +.include + +.if ${OSVERSION} < 500000 +IGNORE= doesn't build on FreeBSd < 5.x +#post-patch: +# ${REINPLACE_CMD} 's/stdint.h/inttypes.h/' ${WRKSRC}/lib/odbxlib.h +# ${REINPLACE_CMD} 's/stdint.h/inttypes.h/' ${WRKSRC}/lib/odbx.h +.endif + +.if !defined(WITH_MYSQL) && !defined(WITH_PGSQL) && !defined(WITH_SQLITE2) && !defined(WITH_SQLITE) +IGNORE= you need to select at least one database +.endif + +.if defined(WITH_MYSQL) +USE_MYSQL?= YES +CONFIGURE_MODULES+= "mysql" +CPPFLAGS+= -I${LOCALBASE}/include/mysql +LDFLAGS+= -L${LOCALBASE}/lib/mysql +PLIST_SUB+= WITHMYSQL="" +.else +PLIST_SUB+= WITHMYSQL="@comment " +.endif + +.if !defined(WITHOUT_PGSQL) +USE_PGSQL?= YES +CONFIGURE_MODULES+= "pgsql" +PLIST_SUB+= WITHPGSQL="" +.else +PLIST_SUB+= WITHPGSQL="@comment " +.endif + +.if defined(WITH_SQLITE2) +USE_SQLITE?= 2 +CONFIGURE_MODULES+= "sqlite" +PLIST_SUB+= WITHSQLITE="" +.else +PLIST_SUB+= WITHSQLITE="@comment " +.endif + +.if defined(WITH_SQLITE) +USE_SQLITE?= 3 +CONFIGURE_MODULES+= "sqlite3" +PLIST_SUB+= WITHSQLITE3="" +.else +PLIST_SUB+= WITHSQLITE3="@comment " +.endif + +.include diff --git a/databases/opendbx/distinfo b/databases/opendbx/distinfo new file mode 100644 index 000000000000..7a4a00d754ba --- /dev/null +++ b/databases/opendbx/distinfo @@ -0,0 +1,3 @@ +MD5 (opendbx-1.0.0.tar.gz) = 7b966fdd58ebe30201d912079ce38980 +SHA256 (opendbx-1.0.0.tar.gz) = 44734717c5ee9eb4f8a72c4354b8855437d299b06f40acf5f10c9e0a3514e90b +SIZE (opendbx-1.0.0.tar.gz) = 398367 diff --git a/databases/opendbx/pkg-descr b/databases/opendbx/pkg-descr new file mode 100644 index 000000000000..ac7f52c994db --- /dev/null +++ b/databases/opendbx/pkg-descr @@ -0,0 +1,11 @@ +OpenDBX is an extremely lightweight but extensible C library for +accessing databases with a single API. It provides a clean and simple +interface across all supported databases that leads to an elegant +code design automatically. Currently MySQL, PostgreSQL and SQLite are +supported and backends for more native database APIs can be written +easily. If you want your application to support different databases +with little effort, this is definitively the right thing for you! + +License: LGPL + +WWW: http://www.linuxnetworks.de/opendbx/ diff --git a/databases/opendbx/pkg-plist b/databases/opendbx/pkg-plist new file mode 100644 index 000000000000..8af1d9d531a6 --- /dev/null +++ b/databases/opendbx/pkg-plist @@ -0,0 +1,23 @@ +bin/odbxtest +include/odbx.h +lib/libopendbx.a +lib/libopendbx.la +lib/libopendbx.so +lib/libopendbx.so.1 +%%WITHPGSQL%%lib/opendbx/libpgsqlbackend.a +%%WITHPGSQL%%lib/opendbx/libpgsqlbackend.la +%%WITHPGSQL%%lib/opendbx/libpgsqlbackend.so +%%WITHPGSQL%%lib/opendbx/libpgsqlbackend.so.1 +%%WITHMYSQL%%lib/opendbx/libmysqlbackend.a +%%WITHMYSQL%%lib/opendbx/libmysqlbackend.la +%%WITHMYSQL%%lib/opendbx/libmysqlbackend.so +%%WITHMYSQL%%lib/opendbx/libmysqlbackend.so.1 +%%WITHSQLITE%%lib/opendbx/libsqlitebackend.a +%%WITHSQLITE%%lib/opendbx/libsqlitebackend.la +%%WITHSQLITE%%lib/opendbx/libsqlitebackend.so +%%WITHSQLITE%%lib/opendbx/libsqlitebackend.so.1 +%%WITHSQLITE3%%lib/opendbx/libsqlite3backend.a +%%WITHSQLITE3%%lib/opendbx/libsqlite3backend.la +%%WITHSQLITE3%%lib/opendbx/libsqlite3backend.so +%%WITHSQLITE3%%lib/opendbx/libsqlite3backend.so.1 +@dirrm lib/opendbx