diff options
author | alepulver <alepulver@FreeBSD.org> | 2006-10-09 18:51:19 +0000 |
---|---|---|
committer | alepulver <alepulver@FreeBSD.org> | 2006-10-09 18:51:19 +0000 |
commit | 5e198bf94f3e6b23a33d2dfc68777cf7a493b208 (patch) | |
tree | d7619084dda179e916005c4f3cf1fe3f39b325fe | |
parent | a307069f8cc543544bbbef28105f063360d8ffca (diff) | |
download | FreeBSD-ports-5e198bf94f3e6b23a33d2dfc68777cf7a493b208.zip FreeBSD-ports-5e198bf94f3e6b23a33d2dfc68777cf7a493b208.tar.gz |
- Unify the way to choose between ODBC flavors (WITH_IODBC / WITH_UNIXODBC).
PR: ports/103293
Submitted by: Ganael Laplanche <ganael.laplanche@martymac.com>
Approved by: girgen (databases/postgresql-odbc), fjoe (databases/libodbc++),
sergey@network-asp.biz
(databases/mysql-connector-odbc, timeout),
delphij@FreeBSD.org (net/openldap23-server),
mat@FreeBSD.org (databases/p5-DBD-ODBC)
-rw-r--r-- | databases/libodbc++/Makefile | 16 | ||||
-rw-r--r-- | databases/mysql-connector-odbc/Makefile | 18 | ||||
-rw-r--r-- | databases/p5-DBD-ODBC/Makefile | 19 | ||||
-rw-r--r-- | databases/postgresql-odbc/Makefile | 21 | ||||
-rw-r--r-- | lang/q/Makefile | 17 | ||||
-rw-r--r-- | net/openldap23-server/Makefile | 15 |
6 files changed, 68 insertions, 38 deletions
diff --git a/databases/libodbc++/Makefile b/databases/libodbc++/Makefile index 447494b..6c93347 100644 --- a/databases/libodbc++/Makefile +++ b/databases/libodbc++/Makefile @@ -23,14 +23,20 @@ CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --with-isqlxx # libodbc++ needs an ODBC driver manager to be installed, and it supports -# both iODBC and unixODBC. The following variable may be set at build-time -# to either "iodbc" or "unixodbc", with the latter being the default: -DRIVER_MANAGER?= unixodbc +# both iODBC and unixODBC. -.if ${DRIVER_MANAGER} == "iodbc" +.if defined(WITH_IODBC) && defined(WITH_UNIXODBC) +IGNORE= selected mutually exclusive options: WITH_IODBC and WITH_UNIXODBC +.endif + +.if !defined(WITH_IODBC) && !defined(WITH_UNIXODBC) +WITH_IODBC?= yes +.endif + +.if defined(WITH_IODBC) LIB_DEPENDS= iodbc.3:${PORTSDIR}/databases/libiodbc CONFIGURE_ARGS+= --with-iodbc=${LOCALBASE} -.else # assume we're using unixODBC +.elif defined(WITH_UNIXODBC) LIB_DEPENDS= odbc.1:${PORTSDIR}/databases/unixODBC CONFIGURE_ARGS+= --with-odbc=${LOCALBASE} CONFIGURE_ENV= LIBS="${PTHREAD_LIBS}" diff --git a/databases/mysql-connector-odbc/Makefile b/databases/mysql-connector-odbc/Makefile index c83351d..f66f80c 100644 --- a/databases/mysql-connector-odbc/Makefile +++ b/databases/mysql-connector-odbc/Makefile @@ -32,22 +32,30 @@ PLIST_SUB= VER=${PORTVERSION} PORTDOCS= README # MyODBC needs an ODBC driver manager to be installed, and it supports both -# iODBC and unixODBC. The following variable may be set at built-time to -# either "iodbc" or "unixodbc", with the former being the default: -DRIVER_MANAGER?= unixodbc +# iODBC and unixODBC. -.if ${DRIVER_MANAGER} == "unixodbc" +.if defined(WITH_IODBC) && defined(WITH_UNIXODBC) +IGNORE= selected mutually exclusive options: WITH_IODBC and WITH_UNIXODBC +.endif + +.if !defined(WITH_IODBC) && !defined(WITH_UNIXODBC) +WITH_UNIXODBC?= yes +.endif + +.if defined(WITH_UNIXODBC) LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC CONFIGURE_ARGS+= --with-odbc-ini=${LOCALBASE}/etc/odbc.ini \ --with-unixODBC=${LOCALBASE} CFLAGS+= ${PTHREAD_LIBS} -.else # assume we're using iodbc +DRIVER_MANAGER= unixodbc +.elif defined(WITH_IODBC) LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc CONFIGURE_ARGS+= --with-iODBC=${LOCALBASE} \ --with-iodbc-includes=${LOCALBASE}/include \ --with-iodbc-libs=${LOCALBASE}/lib \ --with-odbc-ini=${LOCALBASE}/etc/libiodbc/odbc.ini EXTRA_PATCHES= ${PATCHDIR}/myodbc-iodbc-patch +DRIVER_MANAGER= iodbc .endif post-patch: diff --git a/databases/p5-DBD-ODBC/Makefile b/databases/p5-DBD-ODBC/Makefile index 4f8110c..5d9e26c 100644 --- a/databases/p5-DBD-ODBC/Makefile +++ b/databases/p5-DBD-ODBC/Makefile @@ -21,23 +21,24 @@ CONFIGURE_ARGS+= -o ${LOCALBASE} MAN3= DBD::ODBC.3 -OPTIONS= IODBC "Link with libiodbc" on \ - ODBC "Link with unixODBC (Only with 5.x+)" off - .include <bsd.port.pre.mk> -.if defined(WITH_IODBC) && defined(WITH_ODBC) -BROKEN= "Should only select one of ODBC and IODBC" +.if defined(WITH_IODBC) && defined(WITH_UNIXODBC) +IGNORE= selected mutually exclusive options: WITH_IODBC and WITH_UNIXODBC +.endif + +.if !defined(WITH_IODBC) && !defined(WITH_UNIXODBC) +WITH_IODBC?= yes .endif -.if defined(WITH_ODBC) && ${OSVERSION} < 500016 + +.if defined(WITH_UNIXODBC) && ${OSVERSION} < 500016 IGNORE= Due to some obscure -pthread things, you can not have this work .endif -.if !defined(WITHOUT_IODBC) +.if defined(WITH_IODBC) LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc MYODBC= iodbc -.endif -.if defined(WITH_ODBC) +.elif defined(WITH_UNIXODBC) LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC MYODBC= unixodbc post-configure: diff --git a/databases/postgresql-odbc/Makefile b/databases/postgresql-odbc/Makefile index 0150fc3..cf5b996 100644 --- a/databases/postgresql-odbc/Makefile +++ b/databases/postgresql-odbc/Makefile @@ -19,23 +19,28 @@ MAINTAINER= girgen@FreeBSD.org COMMENT= PostgreSQL ODBC client support # PostgreSQL ODBC support needs an ODBC driver manager to be -# installed, and it supports both iODBC and unixODBC. The following -# variable may be set at built-time to either "iodbc" or "unixodbc", -# with the former being the default: -DRIVER_MANAGER?= iodbc +# installed, and it supports both iODBC and unixODBC. + +.if defined(WITH_IODBC) && defined(WITH_UNIXODBC) +IGNORE= selected mutually exclusive options: WITH_IODBC and WITH_UNIXODBC +.endif + +.if !defined(WITH_IODBC) && !defined(WITH_UNIXODBC) +WITH_IODBC?= yes +.endif # Note that there is a potential conflict between unixODBC's and # postgres' libodbcpsql.so. unixODBC installs versions `1' & `2' of # the named lib, while postgres installs version `0'. The postgres # folks say their is the best, so you might be better off removing # the others? -.if ${DRIVER_MANAGER} == "unixodbc" +.if defined(WITH_IODBC) +LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc +CONFIGURE_ARGS+= --with-iodbc --with-odbcinst=${LOCALBASE}/etc/libiodbc +.elif defined(WITH_UNIXODBC) PKGNAMESUFFIX= -unixodbc CONFIGURE_ARGS+= --with-unixodbc LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC -.else # assume we're using iodbc -LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc -CONFIGURE_ARGS+= --with-iodbc --with-odbcinst=${LOCALBASE}/etc/libiodbc .endif USE_GMAKE= YES diff --git a/lang/q/Makefile b/lang/q/Makefile index 4299c6e..eec9dc5 100644 --- a/lang/q/Makefile +++ b/lang/q/Makefile @@ -57,15 +57,20 @@ CONFIGURE_ARGS+= --with-pthread="${PTHREAD_LIBS}" .endif # The odbc module needs an ODBC driver manager to be installed, and it -# supports both iODBC and unixODBC. The following variable may be set at -# build-time to either "iodbc" or "unixodbc", with the former being the -# default: -ODBC?= iodbc +# supports both iODBC and unixODBC. -.if ${ODBC} == "unixodbc" +.if defined(WITH_IODBC) && defined(WITH_UNIXODBC) +IGNORE= selected mutually exclusive options: WITH_IODBC and WITH_UNIXODBC +.endif + +.if !defined(WITH_IODBC) && !defined(WITH_UNIXODBC) +WITH_IODBC?= yes +.endif + +.if defined(WITH_UNIXODBC) LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC CONFIGURE_ARGS+= --with-odbc=-lodbc -.else # assume we're using iodbc +.elif defined(WITH_IODBC) LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc CONFIGURE_ARGS+= --with-odbc=-liodbc .endif diff --git a/net/openldap23-server/Makefile b/net/openldap23-server/Makefile index 7d6da49..f7d99e1 100644 --- a/net/openldap23-server/Makefile +++ b/net/openldap23-server/Makefile @@ -316,16 +316,21 @@ PLIST_SUB+= BACK_PERL="@comment " CONFIGURE_ARGS+= --enable-spasswd .endif +.if defined(WITH_IODBC) && defined(WITH_UNIXODBC) +IGNORE= selected mutually exclusive options: WITH_IODBC and WITH_UNIXODBC +.endif + +.if !defined(WITH_IODBC) && !defined(WITH_UNIXODBC) +WITH_IODBC?= yes +.endif + .if defined(WITH_ODBC) CONFIGURE_ARGS+= --enable-sql=${BACKEND_ENABLE} PLIST_SUB+= BACK_SQL=${BACKEND_PLIST} -WITH_ODBC_TYPE?= iODBC -.if ${WITH_ODBC_TYPE:L} == iodbc +.if defined(WITH_IODBC) LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc -.elif ${WITH_ODBC_TYPE:L} == unixodbc +.elif defined(WITH_UNIXODBC) LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC -.else -BROKEN= choose either iODBC or unixODBC for WITH_ODBC_TYPE .endif .else PLIST_SUB+= BACK_SQL="@comment " |