diff options
author | John Marino <marino@FreeBSD.org> | 2014-03-25 11:28:38 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2014-03-25 11:28:38 +0000 |
commit | 197ad92ef899fce01003abe1c0b64c729c7884f7 (patch) | |
tree | 179c245b33c07eeb13aeef81420d78258f4718a7 /databases/apq-odbc | |
parent | 54f6007927b54dbe90f962586ae38451242e35dd (diff) | |
download | ports-197ad92ef899fce01003abe1c0b64c729c7884f7.tar.gz ports-197ad92ef899fce01003abe1c0b64c729c7884f7.zip |
Add new Ada database ports: apq, apq-mysql, apq-pgsql, apq-odbc
APQ is a database interface library written in Ada95. This is the base
library, but it is not useful without a driver. There are three drivers
available for PostgreSQL, MySQL, and ODBC in separate ports.
Some features:
* Thick binding
* Strong typing support
* Full BLOB support (PGSQL)
* High performance BLOB I/O via streams
* Full support for NULL Values
* Fully portable (database neutral) code possible
* Four levels of debug tracing
WWW: https://bitbucket.org/kowframework/apq
Notes
Notes:
svn path=/head/; revision=349129
Diffstat (limited to 'databases/apq-odbc')
-rw-r--r-- | databases/apq-odbc/Makefile | 52 | ||||
-rw-r--r-- | databases/apq-odbc/distinfo | 2 | ||||
-rw-r--r-- | databases/apq-odbc/files/patch-src_odbc__lib.c | 61 | ||||
-rw-r--r-- | databases/apq-odbc/files/patch-src_odbc__lib.h | 20 | ||||
-rw-r--r-- | databases/apq-odbc/pkg-descr | 4 | ||||
-rw-r--r-- | databases/apq-odbc/pkg-plist | 14 |
6 files changed, 153 insertions, 0 deletions
diff --git a/databases/apq-odbc/Makefile b/databases/apq-odbc/Makefile new file mode 100644 index 000000000000..82aa3a3a9597 --- /dev/null +++ b/databases/apq-odbc/Makefile @@ -0,0 +1,52 @@ +# Created by: John Marino <marino@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= apq-odbc +PORTVERSION= ${APQ_VERSION} +PORTREVISION= ${DRV_ODBC_PR} +CATEGORIES= databases +MASTER_SITES= LOCAL/marino + +MAINTAINER= marino@FreeBSD.org +COMMENT= APQ Ada95 ODBC database driver + +LICENSE= GPLv2 GMGPL +LICENSE_COMB= multi + +BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \ + gprbuild:${PORTSDIR}/devel/gprbuild \ + ${LOCALBASE}/lib/gnat/apq.gpr:${PORTSDIR}/databases/apq +RUN_DEPENDS= ${LOCALBASE}/lib/gnat/apq.gpr:${PORTSDIR}/databases/apq +LIB_DEPENDS= libodbc.so:${PORTSDIR}/databases/unixODBC + +USES= ada tar:bzip2 +HAS_CONFIGURE= yes +WRKPATH= ${WRKDIR}/build +CONFIGURE_ARGS= --prefix=${PREFIX} \ + --disable-relocatable \ + --work-path=${WRKPATH} \ + --processors=${MAKE_JOBS_NUMBER} + +.include "${.CURDIR}/../apq/Makefile.version" + +post-extract: + ${RM} ${WRKSRC}/src/test.adb + ${ECHO} ${APQ_VERSION} > ${WRKSRC}/version + +post-patch: + ${RM} ${WRKSRC}/src/*.orig + ${REINPLACE_CMD} -e 's|"-march=x86-64",||g' -e '/for Object_Dir/d' \ + ${WRKSRC}/gnat/apq-odbc.gpr.in + +do-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/gnat \ + ${STAGEDIR}${PREFIX}/lib/apq-odbc/static \ + ${STAGEDIR}${PREFIX}/include/apq-odbc + ${INSTALL_DATA} ${WRKPATH}/src/apq-odbc/* \ + ${STAGEDIR}${PREFIX}/include/apq-odbc + ${INSTALL_DATA} ${WRKPATH}/lib/apq-odbc/static/*.a* \ + ${STAGEDIR}${PREFIX}/lib/apq-odbc/static + ${INSTALL_DATA} ${WRKPATH}/lib/gnat/apq-odbc.gpr \ + ${STAGEDIR}${PREFIX}/lib/gnat + +.include <bsd.port.mk> diff --git a/databases/apq-odbc/distinfo b/databases/apq-odbc/distinfo new file mode 100644 index 000000000000..c864d2810b65 --- /dev/null +++ b/databases/apq-odbc/distinfo @@ -0,0 +1,2 @@ +SHA256 (apq-odbc-3.2.0.tar.bz2) = abdcb427d194a75eb8631ea1ff9d8d78a913cc6373971fffdd59d111bc66a808 +SIZE (apq-odbc-3.2.0.tar.bz2) = 18781 diff --git a/databases/apq-odbc/files/patch-src_odbc__lib.c b/databases/apq-odbc/files/patch-src_odbc__lib.c new file mode 100644 index 000000000000..e0e7b28f45c5 --- /dev/null +++ b/databases/apq-odbc/files/patch-src_odbc__lib.c @@ -0,0 +1,61 @@ +--- src/odbc_lib.c.orig 2012-01-10 14:17:05.000000000 -0500 ++++ src/odbc_lib.c +@@ -1,3 +1,5 @@ ++#include <stdlib.h> ++#include <string.h> + #include "odbc_lib.h" + + +@@ -43,10 +45,10 @@ void login_Information_Set_Up (ODBC_Logi + + int get_Login_String_Size (ODBC_Login_Information* login_Information) { + ++ int total_Size = 0; + if (!is_Ready(login_Information)) + return(-1); + +- int total_Size = 0; + total_Size += strlen(login_Information->p_Formatted_User_Name); + total_Size += strlen(login_Information->p_Formatted_Password); + total_Size += strlen(login_Information->p_Formatted_Data_Source); +@@ -75,6 +77,7 @@ int print_Login_String (ODBC_Login_Infor + strcat(destiny, login_Information->p_Formatted_User_Name); + strcat(destiny, login_Information->p_Formatted_Password); + strcat(destiny, login_Information->p_Formatted_Data_Source); ++ return(0); + } + + void reset_Login_Information (ODBC_Login_Information* login_Information) { +@@ -241,7 +244,7 @@ void connect_With_Data_Source (ODBC_Faca + + 1); + + if (SQL_SUCCEEDED(SQLDriverConnect(odbc_Facade->connection_Handle, NULL, +- login_String, SQL_NTS, NULL, 0, NULL, ++ (SQLCHAR*)login_String, SQL_NTS, NULL, 0, NULL, + SQL_DRIVER_NOPROMPT))) + switch_On_Connection(odbc_Facade); + +@@ -273,14 +276,14 @@ ODBC_Query_Results* create_And_Run_SQL_S + //TODO: Return error string instead of printing it? + void p_Print_Error_Information (ODBC_Facade* odbc_Facade) { + +- char ercode[6]; ++ SQLCHAR ercode[6]; + SQLINTEGER err; +- char error[250]; ++ SQLCHAR error[250]; + SQLSMALLINT size; + + SQLGetDiagRec(SQL_HANDLE_DBC, odbc_Facade->environment_Handle, 1, ercode, + &err, error, 250, &size); +- printf ("\n%d, %s - %s\n", err, ercode, error); ++ printf ("\n%d, %s - %s\n", (int)err, ercode, error); + } + + +@@ -289,4 +292,5 @@ void p_Print_Error_Information (ODBC_Fac + char* alloc_String (int size) { + char* return_Value = malloc(sizeof(char) * size); + *return_Value = '\0'; ++ return return_Value; + } diff --git a/databases/apq-odbc/files/patch-src_odbc__lib.h b/databases/apq-odbc/files/patch-src_odbc__lib.h new file mode 100644 index 000000000000..0ba235b168e1 --- /dev/null +++ b/databases/apq-odbc/files/patch-src_odbc__lib.h @@ -0,0 +1,20 @@ +--- src/odbc_lib.h.orig 2012-01-10 14:17:05.000000000 -0500 ++++ src/odbc_lib.h +@@ -43,7 +43,7 @@ struct odbc_login_information { + }; + + //Public methods for ODBC_Login_Information. +-ODBC_Login_Information* new_ODBC_Login_Information (); ++ODBC_Login_Information* new_ODBC_Login_Information (void); + + void set_User_Name (ODBC_Login_Information* login_Information, + char* new_User_Name); +@@ -126,7 +126,7 @@ struct odbc_facade { + ODBC_Login_Information* login_Information; + }; + +-ODBC_Facade* new_ODBC_Facade (); ++ODBC_Facade* new_ODBC_Facade (void); + + void set_Up_Environment_Handle (ODBC_Facade* odbc_Facade); + diff --git a/databases/apq-odbc/pkg-descr b/databases/apq-odbc/pkg-descr new file mode 100644 index 000000000000..7065f7950a41 --- /dev/null +++ b/databases/apq-odbc/pkg-descr @@ -0,0 +1,4 @@ +APQ is a database interface library written in Ada95, and this is the +ODBC driver that is used with it. + +WWW: https://bitbucket.org/kowframework/apq-odbc diff --git a/databases/apq-odbc/pkg-plist b/databases/apq-odbc/pkg-plist new file mode 100644 index 000000000000..0b8f10413852 --- /dev/null +++ b/databases/apq-odbc/pkg-plist @@ -0,0 +1,14 @@ +include/apq-odbc/apq-odbc-client.adb +include/apq-odbc/apq-odbc-client.ads +include/apq-odbc/apq-odbc.adb +include/apq-odbc/apq-odbc.ads +include/apq-odbc/odbc_lib.c +include/apq-odbc/odbc_lib.h +lib/apq-odbc/static/apq-odbc-client.ali +lib/apq-odbc/static/apq-odbc.ali +lib/apq-odbc/static/libapq-odbc.a +lib/gnat/apq-odbc.gpr +@dirrmtry lib/gnat +@dirrm lib/apq-odbc/static +@dirrm lib/apq-odbc +@dirrm include/apq-odbc |