New port: oracle_odbc_driver 0.5.5

Oracle Open Source ODBC driver.
This commit is contained in:
Max Khon 2005-08-31 19:03:43 +00:00
parent 1e36813e5b
commit 04225b60bf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=141618
7 changed files with 148 additions and 0 deletions

View File

@ -0,0 +1,48 @@
# New ports collection makefile for: oracle_odbc_driver
# Date created: 8 Aug 2005
# Whom: Max Khon <fjoe@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= oracle_odbc_driver
PORTVERSION= 0.5.5
CATEGORIES= databases
MASTER_SITES= http://fndapl.fnal.gov/~dbox/oracle/odbc/
MASTER_SITE_SUBDIR= fjoe
DISTNAME= ${PORTNAME}.${PORTVERSION}
MAINTAINER= fjoe@FreeBSD.org
COMMENT= Oracle Open Source ODBC driver
OPTIONS= UNIXODBC "Build with unixODBC" on \
IODBC "Build with iODBC" off \
.if !defined(WITH_UNIXODBC) && !defined(WITH_IODBC)
WITH_UNIXODBC= yes
.endif
.if defined(WITH_UNIXODBC)
LIB_DEPENDS= odbc:${PORTSDIR}/databases/unixODBC
CONFIGURE_ARGS= --with-unixODBC=${LOCALBASE}
.endif
.if defined(WITH_IODBC)
LIB_DEPENDS= iodbc:${PORTSDIR}/databases/libiodbc
CONFIGURE_ARGS= --without-unixODBC
.endif
BUILD_DEPENDS= ${ORACLE_HOME}/lib/libclntst8.a:${PORTSDIR}/databases/oracle8-client
RUN_DEPENDS= ${BUILD_DEPENDS}
WRKSRC= ${WRKDIR}/${PORTNAME}
ORACLE_HOME= ${LOCALBASE}/oracle8-client
GNU_CONFIGURE= yes
CONFIGURE_ENV= ORACLE_HOME="${ORACLE_HOME}" \
LIBS="`${CAT} ${ORACLE_HOME}/lib/sysliblist`"
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
USE_AUTOTOOLS= libtool:13
INSTALLS_SHLIB= yes
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
MD5 (oracle_odbc_driver.0.5.5.tar.gz) = 77a576b947437e915491ecd30f036c85
SIZE (oracle_odbc_driver.0.5.5.tar.gz) = 483118

View File

@ -0,0 +1,38 @@
--- configure.orig Thu Jun 9 07:30:50 2005
+++ configure Thu Jun 9 19:03:32 2005
@@ -4719,7 +4719,7 @@
echo $ECHO_N "checking for libclntsh.so ... $ECHO_C" >&6
for d in $oraclehome/lib /usr/lib /usr/local/lib
do
-if test -f $d/libclntsh.so || test -f $d/libclntsh.a
+if test -f $d/libclntsh.so || test -f $d/libclntsh.a || test -f $d/libclntst8.a
then
echo "$as_me:$LINENO: result: found libclntsh.so in $d" >&5
echo "${ECHO_T}found libclntsh.so in $d" >&6
@@ -4756,7 +4756,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lclntsh "-L$oraldir" $LIBS"
+LIBS="-lclntst8 "-L$oraldir" $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@@ -4812,7 +4812,7 @@
fi
- ORALIB="-lclntsh"
+ ORALIB="-lclntst8 -lcompat -lpthread -lm"
@@ -4822,7 +4822,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lclntsh "-L$oraldir" $LIBS"
+LIBS="-lclntst8 "-L$oraldir" $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */

View File

@ -0,0 +1,18 @@
--- src/oracle_functions.c.orig Wed Jun 8 19:39:20 2005
+++ src/oracle_functions.c Wed Jun 8 19:39:32 2005
@@ -48,6 +48,7 @@
long local_min(long a, long b){if(a<b)return a; return b;}
+#if 0
int epc_exit_handler()
{
/* in oracle 8.1.6 and 8.1.7 libclntsh.so registers an
@@ -65,6 +66,7 @@
printf("neener neener caught the exit handler bug!\n");
return 0;
}
+#endif
#ifdef UNIX_DEBUG
/*

View File

@ -0,0 +1,35 @@
--- src/string_functions.c.orig Thu Jun 9 18:18:53 2005
+++ src/string_functions.c Thu Jun 9 18:18:36 2005
@@ -81,19 +81,25 @@
{
char *local_str=NULL;
int i;
- if(str_len==SQL_NTS){
- if(str&&str[0])
- for(i=0; i<strlen(str); i++)
- str[i]=toupper(str[i]);
- return((char*)str);
- }
+
+ if(str_len==SQL_NTS)
+ {
+ if(!str || !str[0])
+ return((char*)str);
+
+ /*
+ * always copy to malloc'ed string because str
+ * may point to read-only memory
+ */
+ str_len = strlen(str);
+ }
if(str_len>=0)
{
local_str=ORAMALLOC(str_len+1);
memcpy(local_str,str,str_len);
local_str[str_len] = '\0';
}
- for(i=0; i<str_len; i++)local_str[i]=toupper(local_str[i]);
+ for(i=0; i<str_len; i++)local_str[i]=toupper((unsigned char) local_str[i]);
return(local_str);
}

View File

@ -0,0 +1,3 @@
Oracle Open Source ODBC driver
WWW: http://fndapl.fnal.gov/~dbox/oracle/odbc/

View File

@ -0,0 +1,4 @@
lib/liboraodbc.a
lib/liboraodbc.la
lib/liboraodbc.so
lib/liboraodbc.so.1