summaryrefslogtreecommitdiff
path: root/databases/unixodbc/Makefile.common
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-11-06 04:08:33 +0000
committerjlam <jlam@pkgsrc.org>2001-11-06 04:08:33 +0000
commit9586b5668779cc3696503a80cb8b5fe3c3aaeed1 (patch)
tree15e5bba54578930affc66b9733d9b2e085dd3f34 /databases/unixodbc/Makefile.common
parent823ce591bc3b023a484165e1f7e2897b37349c45 (diff)
downloadpkgsrc-9586b5668779cc3696503a80cb8b5fe3c3aaeed1.tar.gz
databases/unixodbc - ODBC 2.x/3.x driver manager
The unixODBC project provides UNIX applications with the same ODBC 3.51 API and facilities available under MS Windows. It provides a Driver Manager that supports the full ODBC API and performs the ODBC 3 to ODBC 2 translations with UNICODE to ANSI conversion. It also includes a collection of ODBC drivers including a simple text-based driver, an NNTP driver, a Postgres driver and others, and a selection of templates and libraries that to aid in the construction of ODBC drivers. It works with MySQL, Postgres, StarOffice, Applixware, iHTML, PHP, Perl DBD::ODBC, Paradox 9, and many other applications and drivers. Connection pooling is also provided to increase performance with applications such as PHP.
Diffstat (limited to 'databases/unixodbc/Makefile.common')
-rw-r--r--databases/unixodbc/Makefile.common65
1 files changed, 65 insertions, 0 deletions
diff --git a/databases/unixodbc/Makefile.common b/databases/unixodbc/Makefile.common
new file mode 100644
index 00000000000..72be4dd2b1b
--- /dev/null
+++ b/databases/unixodbc/Makefile.common
@@ -0,0 +1,65 @@
+# $NetBSD: Makefile.common,v 1.1.1.1 2001/11/06 04:08:34 jlam Exp $
+
+DISTNAME= unixODBC-${ODBC_DIST_VERS}
+CATEGORIES= databases
+MASTER_SITES= http://www.unixodbc.org/
+
+MAINTAINER?= jlam@netbsd.org
+HOMEPAGE?= http://www.unixodbc.org/
+
+# Version numbering scheme:
+#
+# ODBC_DIST_VERS version number on the php distfile
+# ODBC_BASE_VERS pkgsrc-mangled version number (convert pl -> .)
+# ODBC_PKG_VERS pkgsrc revisions of php (nbX, etc.)
+# ODBC_VERS pkgsrc version number of package
+#
+ODBC_DIST_VERS= 2.0.11
+ODBC_BASE_VERS= ${ODBC_DIST_VERS}
+ODBC_PKG_VERS?= # empty
+ODBC_VERS= ${ODBC_BASE_VERS}${ODBC_PKG_VERS}
+
+USE_LIBTOOL= YES
+LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
+
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS+= --sysconfdir=/etc
+CONFIGURE_ARGS+= --enable-threads
+CONFIGURE_ARGS+= --enable-gnuthreads
+CONFIGURE_ARGS+= --with-pth=${BUILDLINK_DIR}
+
+# Override the local definitions that point to the self-contained libtool
+# convenience library. We want the one installed by pkgsrc. Also override
+# the variable pointing to the (static) libfl.a, which won't link with a
+# shared library. The sources define all the relevant symbols (yywrap), so
+# libfl.a isn't needed.
+#
+MAKE_FLAGS+= LIBLTDL="-lltdl"
+MAKE_FLAGS+= INCLTDL="-I${BUILDLINK_DIR}/include"
+MAKE_FLAGS+= LEXLIB=""
+
+UNIXODBC_DRIVERS_DIR= lib/unixodbc
+
+post-patch: fix-ltdl-and-lexlib
+
+fix-driver-installation:
+ cd ${WRKSRC}; \
+ files=`${FIND} ODBCConfig DRVConfig Drivers -name Makefile.in`; \
+ for file in $${files}; do \
+ ${SED} -e "s|^\(libdir =\).*|\1 ${PREFIX}/${UNIXODBC_DRIVERS_DIR}|g" \
+ $${file} >> $${file}.fixed; \
+ ${MV} -f $${file}.fixed $${file}; \
+ done
+
+fix-ltdl-and-lexlib:
+ cd ${WRKSRC}; \
+ files=`${FIND} . -name Makefile.in`; \
+ for file in $${files}; do \
+ ${SED} -e "/DEPENDENCIES/s|\$$(LIBLTDL)||g" \
+ -e "/LIBADD/s|@LEXLIB@|\$$(LEXLIB)|g" \
+ $${file} >> $${file}.fixed; \
+ ${MV} -f $${file}.fixed $${file}; \
+ done
+
+.include "../../devel/libtool/buildlink.mk"
+.include "../../devel/pth/buildlink.mk"