aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authoralepulver <alepulver@FreeBSD.org>2006-10-10 02:51:19 +0800
committeralepulver <alepulver@FreeBSD.org>2006-10-10 02:51:19 +0800
commit5e198bf94f3e6b23a33d2dfc68777cf7a493b208 (patch)
treed7619084dda179e916005c4f3cf1fe3f39b325fe /databases
parenta307069f8cc543544bbbef28105f063360d8ffca (diff)
downloadfreebsd-ports-gnome-5e198bf94f3e6b23a33d2dfc68777cf7a493b208.tar.gz
freebsd-ports-gnome-5e198bf94f3e6b23a33d2dfc68777cf7a493b208.tar.zst
freebsd-ports-gnome-5e198bf94f3e6b23a33d2dfc68777cf7a493b208.zip
- 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)
Diffstat (limited to 'databases')
-rw-r--r--databases/libodbc++/Makefile16
-rw-r--r--databases/mysql-connector-odbc/Makefile18
-rw-r--r--databases/p5-DBD-ODBC/Makefile19
-rw-r--r--databases/postgresql-odbc/Makefile21
4 files changed, 47 insertions, 27 deletions
diff --git a/databases/libodbc++/Makefile b/databases/libodbc++/Makefile
index 447494b012f5..6c93347aa4f7 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 c83351d49048..f66f80cfdd07 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 4f8110c4066e..5d9e26cd2437 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 0150fc3c565f..cf5b99650fec 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