Date: Mon, 9 Jun 2003 10:02:19 +0200 From: Alexander Leidinger <Alexander@Leidinger.net> To: Joe Marcus Clarke <marcus@freebsd.org> Cc: gnome@freebsd.org Subject: Re: libgda2 autodetecting already installed DBSs (patch) Message-ID: <20030609100219.310bcec6.Alexander@Leidinger.net> In-Reply-To: <20030608175012.Y5841@shumai.marcuscom.com> References: <20030608205841.7f5a4f2b.Alexander@Leidinger.net> <20030608175012.Y5841@shumai.marcuscom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --Multipart_Mon__9_Jun_2003_10:02:19_+0200_08250600 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 8 Jun 2003 17:51:08 -0400 (EDT) Joe Marcus Clarke <marcus@freebsd.org> wrote: > > Is there interest to have more DBSs (FreeTDS, MDB, ODBC, SQLite) > > supported in the same way? > > No complaints from me. Note, ODBC support may be broken until the ODBC > port is updated. New patch attached: - bugfix in plist (firebird) - should now detect FreeTDS, Sybase (via FreeTDS), MDB, ODBC and SQLITE too As with the last patch, I've only tested the MySQL 3.23 part, it would be nice if someone with one of those other DBSs could test it and report back if it works or not. Bye, Alexander. -- Press every key to continue. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 --Multipart_Mon__9_Jun_2003_10:02:19_+0200_08250600 Content-Type: text/plain; name="libgda2.diff" Content-Disposition: attachment; filename="libgda2.diff" Content-Transfer-Encoding: 8bit Index: Makefile =================================================================== RCS file: /big/FreeBSD-CVS/ports/databases/libgda2/Makefile,v retrieving revision 1.40 diff -u -r1.40 Makefile --- Makefile 1 Jun 2003 00:31:46 -0000 1.40 +++ Makefile 9 Jun 2003 07:42:59 -0000 @@ -7,6 +7,7 @@ PORTNAME= libgda2 PORTVERSION= 0.12.0 +PORTREVISION= 1 CATEGORIES= databases gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/0.12 @@ -34,26 +35,99 @@ MAN1= gda-config-tool.1 MAN5= gda-config.5 -.if defined(WITH_MYSQL) +.include <bsd.port.pre.mk> + +.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.10) +WITH_MYSQL3= yes +.endif + +.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.12) +WITH_MYSQL40= yes +.endif + +.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.14) +WITH_MYSQL41= yes +.endif + +.if exists(${LOCALBASE}/lib/libpq.so.3) +WITH_POSTGRES7= yes +.endif + +.if exists(${LOCALBASE}/lib/libpgeasy.so.2) +WITH_POSTGRES72=yes +.endif + +.if exists(${LOCALBASE}/lib/libldap.so.2) +WITH_LDAP=yes +.endif + +.if exists(${LOCALBASE}/firebird/lib/libgds.so.1) +WITH_FIREBIRD= yes +.endif + +.if exists(${LOCALBASE}/lib/libtds.so.2) +WITH_FREETDS= yes +.endif + +.if exists(${LOCALBASE}/lib/libsybdb.so.3) +WITH_SYBASE= yes +.endif + +.if exists(${LOCALBASE}/lib/libmdbsql.so.0) +WITH_MDB= yes +.endif + +.if exists(${LOCALBASE}/lib/libODBC.so.1) +WITH_ODBC= yes +.endif + +.if exists(${LOCALBASE}/lib/libsqlite.so.2) +WITH_SQLITE= yes +.endif + +.if !defined(WITHOUT_MYSQL3) && defined(WITH_MYSQL3) LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client CONFIGURE_ARGS+= --with-mysql=${LOCALBASE} PLIST_SUB= MYSQL="" -.else +.endif + +.if !defined(WITHOUT_MYSQL40) && defined(WITH_MYSQL40) +LIB_DEPENDS+= mysqlclient.12:${PORTSDIR}/databases/mysql40-client +CONFIGURE_ARGS+= --with-mysql=${LOCALBASE} +PLIST_SUB= MYSQL="" +.endif + +.if !defined(WITHOUT_MYSQL41) && defined(WITH_MYSQL41) +LIB_DEPENDS+= mysqlclient.14:${PORTSDIR}/databases/mysql41-client +CONFIGURE_ARGS+= --with-mysql=${LOCALBASE} +PLIST_SUB= MYSQL="" +.endif + +.if !defined(WITH_MYSQL3) && !defined(WITH_MYSQL40) && !defined(WITH_MYSQL41) +PLIST_SUB+= MYSQL="@comment " CONFIGURE_ARGS+= --without-mysql -PLIST_SUB= MYSQL="@comment " .endif -.if defined(WITH_POSTGRES) +.if !defined(WITHOUT_POSTGRES7) && defined(WITH_POSTGRES7) POSTGRESQL_PORT?= databases/postgresql7 LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT} CONFIGURE_ARGS+= --with-postgres=${LOCALBASE} PLIST_SUB+= POSTGRES="" -.else -CONFIGURE_ARGS+= --without-postgres +.endif + +.if !defined(WITHOUT_POSTGRES72) && defined(WITH_POSTGRES72) +POSTGRESQL_PORT?= databases/postgresql72 +LIB_DEPENDS+= pqeasy.2:${PORTSDIR}/${POSTGRESQL_PORT} +CONFIGURE_ARGS+= --with-postgres=${LOCALBASE} +PLIST_SUB+= POSTGRES="" +.endif + +.if !defined(WITH_POSTGRES7) && !defined(WITH_POSTGRES72) PLIST_SUB+= POSTGRES="@comment " +CONFIGURE_ARGS+= --without-postgres .endif -.if defined(WITH_LDAP) +.if !defined(WITHOUT_LDAP) && defined(WITH_LDAP) LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap20 CONFIGURE_ARGS+= --with-ldap=${LOCALBASE} PLIST_SUB+= LDAP="" @@ -62,19 +136,98 @@ PLIST_SUB+= LDAP="@comment " .endif +.if !defined(WITHOUT_FIREBIRD) && defined(WITH_FIREBIRD) +LIB_DEPENDS+= gds.1:${PORTSDIR}/databases/firebird +CONFIGURE_ARGS+= --with-firebird=${LOCALBASE}/firebird +PLIST_SUB+= FIREBIRD:="" +.else +CONFIGURE_ARGS+= --without-interbase +PLIST_SUB+= FIREBIRD:="@comment " +.endif + +.if !defined(WITHOUT_FREETDS) && defined(WITH_FREETDS) +LIB_DEPENDS+= tds.2:${PORTSDIR}/databases/freetds +CONFIGURE_ARGS+= --with-tds=${LOCALBASE} +PLIST_SUB+= FREETDS:="" +.else +CONFIGURE_ARGS+= --without-tds +PLIST_SUB+= FREETDS:="@comment " +.endif + +.if !defined(WITHOUT_SYBASE) && defined(WITH_SYBASE) +LIB_DEPENDS+= sybdb.3:${PORTSDIR}/databases/freetds +CONFIGURE_ARGS+= --with-sybase=${LOCALBASE} +PLIST_SUB+= SYBASE:="" +.else +CONFIGURE_ARGS+= --without-sybase +PLIST_SUB+= SYBASE:="@comment " +.endif + +.if !defined(WITHOUT_MDB) && defined(WITH_MDB) +LIB_DEPENDS+= mdbsql.0:${PORTSDIR}/databases/mdbtools +CONFIGURE_ARGS+= --with-mdb=${LOCALBASE} +PLIST_SUB+= MDB:="" +.else +CONFIGURE_ARGS+= --without-mdb +PLIST_SUB+= MDB:="@comment " +.endif + +.if !defined(WITHOUT_ODBC) && defined(WITH_ODBC) +LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC +CONFIGURE_ARGS+= --with-odbc=${LOCALBASE} +PLIST_SUB+= ODBC:="" +.else +CONFIGURE_ARGS+= --without-odbc +PLIST_SUB+= ODBC:="@comment " +.endif + +.if !defined(WITHOUT_SQLITE) && defined(WITH_SQLITE) +LIB_DEPENDS+= sqlite.2:${PORTSDIR}/databases/sqlite +CONFIGURE_ARGS+= --with-sqlite=${LOCALBASE} +PLIST_SUB+= SQLITE:="" +.else +CONFIGURE_ARGS+= --without-sqlite +PLIST_SUB+= SQLITE:="@comment " +.endif + pre-everything:: -.if !defined(WITH_MYSQL) - @${ECHO_MSG} "You can enable support for MySQL databases by defining WITH_MYSQL." +.if !defined(WITH_MYSQL3) + @${ECHO_MSG} "You can enable support for MySQL 3 databases by defining WITH_MYSQL3." .endif -.if !defined(WITH_POSTGRES) - @${ECHO_MSG} "You can enable support for Postgres databases by defining WITH_POSTGRES." +.if !defined(WITH_MYSQL40) + @${ECHO_MSG} "You can enable support for MySQL 4.0 databases by defining WITH_MYSQL40." +.endif +.if !defined(WITH_MYSQL41) + @${ECHO_MSG} "You can enable support for MySQL 4.1 databases by defining WITH_MYSQL41." +.endif +.if !defined(WITH_POSTGRES7) + @${ECHO_MSG} "You can enable support for Postgres 7.0 databases by defining WITH_POSTGRES7." +.endif +.if !defined(WITH_POSTGRES72) + @${ECHO_MSG} "You can enable support for Postgres 7.2 databases by defining WITH_POSTGRES72." .endif .if !defined(WITH_LDAP) @${ECHO_MSG} "You can enable support for LDAP databases by defining WITH_LDAP." .endif +.if !defined(WITH_FREETDS) + @${ECHO_MSG} "You can enable support for TDS databases by defining WITH_FREETDS." +.endif +.if !defined(WITH_SYBASE) + @${ECHO_MSG} "You can enable support for Sybase databases by defining WITH_SYBASE." +.endif +.if !defined(WITH_MDB) + @${ECHO_MSG} "You can enable support for MDB databases by defining WITH_MDB." +.endif +.if !defined(WITH_ODBC) + @${ECHO_MSG} "You can enable support for ODBC databases by defining WITH_ODBC." +.endif +.if !defined(WITH_SQLITE) + @${ECHO_MSG} "You can enable support for SQLITE databases by defining WITH_SQLITE." +.endif + post-patch: @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \ s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure -.include <bsd.port.mk> +.include <bsd.port.post.mk> Index: pkg-plist =================================================================== RCS file: /big/FreeBSD-CVS/ports/databases/libgda2/pkg-plist,v retrieving revision 1.23 diff -u -r1.23 pkg-plist --- pkg-plist 2 Jun 2003 18:18:02 -0000 1.23 +++ pkg-plist 9 Jun 2003 07:45:58 -0000 @@ -74,9 +74,15 @@ lib/libgdasql.so lib/libgdasql.so.0 lib/libgda/providers/libgda-default.so +%%FIREBIRD%%lib/libgda/providers/libgda-firebird.so +%%FREETDS%%lib/libgda/providers/libgda-freetds.so %%LDAP%%lib/libgda/providers/libgda-ldap.so +%%MDB%%lib/libgda/providers/libgda-mdb.so %%MYSQL%%lib/libgda/providers/libgda-mysql.so +%%ODBC%%lib/libgda/providers/libgda-odbc.so %%POSTGRES%%lib/libgda/providers/libgda-postgres.so +%%SYBASE%%lib/libgda/providers/libgda-sybase.so +%%SQLITE%%lib/libgda/providers/libgda-sqlite.so libdata/pkgconfig/libgda.pc share/doc/libgda/architecture.html share/doc/libgda/c689.html @@ -208,8 +214,8 @@ share/locale/uk/LC_MESSAGES/libgda-2.mo share/locale/vi/LC_MESSAGES/libgda-2.mo share/locale/zh_CN/LC_MESSAGES/libgda-2.mo -@dirrm share/gnome/omf/libgda -@dirrm share/gnome/libgda/xml +@dirrm shart/LC_MESSAGES/libgda-2.mo +share/gnome/libgda/xml @dirrm share/gnome/libgda @dirrm lib/libgda/providers @dirrm lib/libgda --Multipart_Mon__9_Jun_2003_10:02:19_+0200_08250600--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030609100219.310bcec6.Alexander>