From 04fc7f10cec12efb1240344a0090b539e24ad0f3 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 15 Apr 2023 11:48:08 +0100 Subject: gentoo auto-resync : 15:04:2023 - 11:48:08 --- dev-db/unixODBC/Manifest | 2 + dev-db/unixODBC/files/unixODBC-2.3.9-clang16.patch | 345 +++++++++++++++++++++ dev-db/unixODBC/unixODBC-2.3.9-r1.ebuild | 68 ++++ 3 files changed, 415 insertions(+) create mode 100644 dev-db/unixODBC/files/unixODBC-2.3.9-clang16.patch create mode 100644 dev-db/unixODBC/unixODBC-2.3.9-r1.ebuild (limited to 'dev-db/unixODBC') diff --git a/dev-db/unixODBC/Manifest b/dev-db/unixODBC/Manifest index 147d119f01fb..746bb23699a7 100644 --- a/dev-db/unixODBC/Manifest +++ b/dev-db/unixODBC/Manifest @@ -1,3 +1,5 @@ +AUX unixODBC-2.3.9-clang16.patch 9332 BLAKE2B 8037f82286ae4a94698803530647ffb6d29c9b85da60320cbee27c60aa4bf6e004cba99abb5d5fc209be67a6fe016c6ed572fd179a75c5fe50b6403962fd11f7 SHA512 e1f92c192c6d441a4c3cf051fbb4929af403552c21a23adcf30657ad4bcbd4ca416322ea2e1bec6d1b1f0fb9883b243b1b84460746d56a8b28015f801af6b157 DIST unixODBC-2.3.9.tar.gz 1676145 BLAKE2B f4078f9266cea753b6f78d234290efe95a6fa9551088a6ce352b0b6ac5391bf2724f872dcc2df0368e98befd24f995ab4eb6958a34bb080b0f6d08993991a0b7 SHA512 6637eab751401522e0af775cb104cd07693b82927453a98e5af28e079f4b9f40e1cfab8cb36f509c46dced89b45244bc5ed1a3dda17ba5a52a844e8e82f187bb +EBUILD unixODBC-2.3.9-r1.ebuild 1879 BLAKE2B d4f7ec96bf359d222da4d2b6e361fd921ff9db45dcee93264e016eca3e33d69479238a21910d39a76faba402bda9d2a1ba9a98cf106fe11a667477cb8bfc4634 SHA512 8c502c34319a9ecdb7f75a82c22172ad11df3f87d98069fc7b75b7b5cfccb32d146ffc1ffc0b79291db2247953f1c979d82ebb303ab5e249a7b6014a8770fcf6 EBUILD unixODBC-2.3.9.ebuild 1823 BLAKE2B eb9beb124808cc49f19ced7301b4ced73451ae73b1551a250e163d1081658f8531a21e6c3165067f46d88ea09914a6329dae880a7486c7a41797535b66d26f7a SHA512 75250bf39439732fca97e50ca4df4973027a0f08022e5ae5ebea51f3c436a0e3c53f66e7221a84ec2396833b991fbbd0e9b05f3b6b6cd77d5ad01a89bbfeca89 MISC metadata.xml 394 BLAKE2B 3757c7cab01702b3ae8504d808ae045c9db61d6e2b395cfc5818db0cde33384bb7935d56155191751eba837b034aad71462d146fd0b914e3c5c1d4558770cfca SHA512 0814f6cec2a7a42c28a2b9c0bc74adf57861885ce1645437d217f777d1f2c6f507df2c28dc15d153a07a6a1e1e3d98589497c192ccf33684cf190b9d62b5ee8e diff --git a/dev-db/unixODBC/files/unixODBC-2.3.9-clang16.patch b/dev-db/unixODBC/files/unixODBC-2.3.9-clang16.patch new file mode 100644 index 000000000000..0e594487e666 --- /dev/null +++ b/dev-db/unixODBC/files/unixODBC-2.3.9-clang16.patch @@ -0,0 +1,345 @@ +https://github.com/lurcher/unixODBC/pull/138 + +From d4782b9eea043de2a08519af3f1c49f56d917022 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Wed, 12 Apr 2023 21:28:26 +0200 +Subject: [PATCH] Avoid implicit function declarations, for C99 compatibility + +Add additional prototypes and #include directives for system headers, so +that builds will not fail with compilers which do not support implicit +function declarations by default. +--- a/Drivers/Postgre7.1/bind.h ++++ b/Drivers/Postgre7.1/bind.h +@@ -44,4 +44,8 @@ struct ParameterInfoClass_ { + BindInfoClass *create_empty_bindings(int num_columns); + void extend_bindings(StatementClass *stmt, int num_columns); + ++RETCODE SQL_API PG_SQLBindCol(HSTMT hstmt, UWORD icol, SWORD fCType, ++ PTR rgbValue, SQLLEN cbValueMax, ++ SQLLEN *pcbValue); ++ + #endif +--- a/Drivers/Postgre7.1/connection.c ++++ b/Drivers/Postgre7.1/connection.c +@@ -20,6 +20,7 @@ + #include "statement.h" + #include "qresult.h" + #include "lobj.h" ++#include "misc.h" + #include "dlg_specific.h" + #include + #include +--- a/Drivers/Postgre7.1/execute.c ++++ b/Drivers/Postgre7.1/execute.c +@@ -34,10 +34,10 @@ + #include "convert.h" + #include "bind.h" + #include "lobj.h" ++#include "misc.h" + + extern GLOBAL_VALUES globals; + +-RETCODE SQL_API PG_SQLExecute( HSTMT hstmt); + SQLRETURN PG_SQLPrepare(SQLHSTMT hstmt, + SQLCHAR *szSqlStr , SQLINTEGER cbSqlStr); + +--- a/Drivers/Postgre7.1/misc.h ++++ b/Drivers/Postgre7.1/misc.h +@@ -106,4 +106,17 @@ int my_strlen(char *s, int len); + + int my_strcpy(char *dst, int dst_len, char *src, int src_len); + ++RETCODE SQL_API PG_SQLExecDirect(HSTMT hstmt, UCHAR FAR *szSqlStr, ++ SDWORD cbSqlStr); ++RETCODE SQL_API PG_SQLExecute(HSTMT hstmt); ++RETCODE SQL_API PG_SQLGetData(HSTMT hstmt, UWORD icol, SWORD fCType, ++ PTR rgbValue, SDWORD cbValueMax, ++ SDWORD FAR *pcbValue); ++RETCODE SQL_API PG_SQLFetch(HSTMT hstmt); ++RETCODE SQL_API PG_SQLColumns(HSTMT hstmt, UCHAR FAR * szTableQualifier, ++ SWORD cbTableQualifier, ++ UCHAR FAR * szTableOwner, SWORD cbTableOwner, ++ UCHAR FAR * szTableName, SWORD cbTableName, ++ UCHAR FAR * szColumnName, SWORD cbColumnName); ++ + #endif +--- a/Drivers/Postgre7.1/parse.c ++++ b/Drivers/Postgre7.1/parse.c +@@ -29,6 +29,7 @@ + #include "connection.h" + #include "qresult.h" + #include "pgtypes.h" ++#include "misc.h" + + #ifndef WIN32 + #ifndef HAVE_STRICMP +--- a/Drivers/Postgre7.1/results.c ++++ b/Drivers/Postgre7.1/results.c +@@ -29,6 +29,7 @@ + #include "qresult.h" + #include "convert.h" + #include "pgtypes.h" ++#include "misc.h" + + #include + +--- a/Drivers/Postgre7.1/statement.c ++++ b/Drivers/Postgre7.1/statement.c +@@ -22,6 +22,7 @@ + #include "qresult.h" + #include "convert.h" + #include "environ.h" ++#include "misc.h" + + #include + #include +--- a/Drivers/Postgre7.1/statement.h ++++ b/Drivers/Postgre7.1/statement.h +@@ -220,5 +220,7 @@ void SC_free_params(StatementClass *self, char option); + void SC_log_error(char *func, char *desc, StatementClass *self); + unsigned long SC_get_bookmark(StatementClass *self); + ++RETCODE SQL_API PG_SQLAllocStmt(HDBC hdbc, HSTMT FAR *phstmt); ++RETCODE SQL_API PG_SQLFreeStmt(HSTMT hstmt, UWORD fOption); + + #endif +--- a/Drivers/nn/SQLBindParameter.c ++++ b/Drivers/nn/SQLBindParameter.c +@@ -126,3 +126,26 @@ RETCODE SQL_API SQLBindParameter( + } + + ++RETCODE SQL_API SQLSetParam ( ++ HSTMT hstmt, ++ UWORD ipar, ++ SWORD fCType, ++ SWORD fSqlType, ++ UDWORD cbColDef, ++ SWORD ibScale, ++ PTR rgbValue, ++ SDWORD FAR *pcbValue) ++{ ++ return SQLBindParameter(hstmt, ++ ipar, ++ (SWORD)SQL_PARAM_INPUT_OUTPUT, ++ fCType, ++ fSqlType, ++ cbColDef, ++ ibScale, ++ rgbValue, ++ SQL_SETPARAM_VALUE_MAX, ++ pcbValue ); ++} ++ ++ +--- a/Drivers/nn/SQLDriverConnect.c ++++ b/Drivers/nn/SQLDriverConnect.c +@@ -61,12 +61,7 @@ RETCODE SQL_API SQLDriverConnect( + break; + /* to next case */ + case SQL_DRIVER_PROMPT: +- if ( nnodbc_conndialog( hwnd, buf, sizeof(buf)) ) +- { +- sqlstat = en_IM008; +- break; +- } +- server = buf; ++ sqlstat = en_IM008; + break; + + default: +--- a/Drivers/nn/SQLSetParam.c ++++ b/Drivers/nn/SQLSetParam.c +@@ -1,40 +1 @@ +-/** +- Copyright (C) 1995, 1996 by Ke Jin +- Enhanced for unixODBC (1999) by Peter Harvey +- +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 2 of the License, or +- (at your option) any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. +-**/ +-#include +-#include "driver.h" +- +-RETCODE SQL_API SQLSetParam ( +- HSTMT hstmt, +- UWORD ipar, +- SWORD fCType, +- SWORD fSqlType, +- UDWORD cbColDef, +- SWORD ibScale, +- PTR rgbValue, +- SDWORD FAR *pcbValue) +-{ +- return SQLBindParameter(hstmt, +- ipar, +- (SWORD)SQL_PARAM_INPUT_OUTPUT, +- fCType, +- fSqlType, +- cbColDef, +- ibScale, +- rgbValue, +- SQL_SETPARAM_VALUE_MAX, +- pcbValue ); +-} +- +- ++/* Moved to SQLBindParameter.c. */ +--- a/Drivers/nn/connect.c ++++ b/Drivers/nn/connect.c +@@ -129,6 +129,7 @@ readtoken( + + #if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2) + # include ++# include + # define UNIX_PWD + #endif + +--- a/Drivers/nn/driver.h ++++ b/Drivers/nn/driver.h +@@ -113,6 +113,11 @@ char* getkeyvalinstr( + char* value, + int size ); + ++int sqlputdata (stmt_t* pstmt, int ipar, char* data); ++int sqlexecute (stmt_t* pstmt); ++ ++int upper_strneq (char* s1, char* s2, int n); ++ + #endif + + +--- a/Drivers/nn/herr.h ++++ b/Drivers/nn/herr.h +@@ -113,6 +113,7 @@ enum { + extern void* nnodbc_pusherr (void* stack, int code, char* msg); + extern void nnodbc_poperr (void* stack); + extern int nnodbc_errstkempty (void* stack); ++extern void nnodbc_errstkunset (void* stack); + extern int nnodbc_getsqlstatcode (void* stack); + extern char* nnodbc_getsqlstatstr (void* stack); + extern char* nnodbc_getsqlstatmsg (void* stack); +--- a/Drivers/nn/misc.c ++++ b/Drivers/nn/misc.c +@@ -15,6 +15,7 @@ + + #include + #include ++#include "driver.h" + + int upper_strneq( + char* s1, +--- a/Drivers/nn/nncol.c ++++ b/Drivers/nn/nncol.c +@@ -18,6 +18,7 @@ + + #include + #include "nncol.ci" ++#include "driver.h" + + int nnsql_getcolidxbyname( char* col_name ) + { +--- a/Drivers/nn/nndate.c ++++ b/Drivers/nn/nndate.c +@@ -16,6 +16,7 @@ + #include + + #include ++#include "driver.h" + + static char* month_name[] = + { "Jan", "Feb", "Mar", "Apr", "May", "Jun", +--- a/Drivers/nn/nntp.c ++++ b/Drivers/nn/nntp.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include "driver.h" + + # include "nntp.ci" + +@@ -28,6 +29,8 @@ + # include + # include + # include ++# include ++# include + + #else + +--- a/Drivers/nn/nntp.h ++++ b/Drivers/nn/nntp.h +@@ -78,6 +78,7 @@ extern int nntp_end_post ( void* hcndes ); + + extern int nntp_cancel ( void* hcndes, char* group, char* sender, + char* from, char* msgid); ++extern int nntp_postok ( void* hcndes ); + + extern int nntp_getaccmode( void* hcndes ); + extern void nntp_setaccmode( void* hcndes, int mode ); +--- a/Drivers/nn/yyenv.h ++++ b/Drivers/nn/yyenv.h +@@ -37,4 +37,7 @@ typedef struct + # define YYINITDEPTH (512) + # endif + ++void nnsql_yyinit(yyenv_t* penv, yystmt_t* yystmt); ++int nnsql_yyparse(yyenv_t* pyyenv); ++ + #endif +--- a/Drivers/nn/yylex.c ++++ b/Drivers/nn/yylex.c +@@ -27,6 +27,8 @@ + #include + #include + ++#include "driver.h" ++ + static int getcmpopidxbyname(char* name) + { + int i, size; +--- a/Drivers/nn/yyparse.y ++++ b/Drivers/nn/yyparse.y +@@ -39,6 +39,9 @@ static char sccsid[] + #else + # define yylex() nnsql_yylex(&yylval, pyyenv) + #endif ++union YYSTYPE; ++int nnsql_yylex(union YYSTYPE* pyylval, yyenv_t* penv); ++ + + #define yyparse(x) nnsql_yyparse (yyenv_t* pyyenv) + #define yyerror(msg) nnsql_yyerror (pyyenv, msg) +--- a/Drivers/nn/yystmt.c ++++ b/Drivers/nn/yystmt.c +@@ -14,6 +14,9 @@ + **/ + #include + #include "driver.h" ++#if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2) ++#include ++#endif + + static char sccsid[] + = "@(#)NNSQL(NetNews SQL) v0.5, Copyright(c) 1995, 1996 by Ke Jin"; +--- a/Drivers/nn/yystmt.h ++++ b/Drivers/nn/yystmt.h +@@ -151,4 +151,9 @@ typedef struct { + long artnum_max; + } yystmt_t; + ++void nnsql_getrange(void* hstmt, long* pmin, long* pmax); ++int nnsql_strlike(char* str, char* pattern, char esc, int flag); ++int nnsql_srchtree_evl(void* hstmt); ++int nnsql_srchtree_tchk(void* hstmt); ++ + #endif + diff --git a/dev-db/unixODBC/unixODBC-2.3.9-r1.ebuild b/dev-db/unixODBC/unixODBC-2.3.9-r1.ebuild new file mode 100644 index 000000000000..d36b94d25c94 --- /dev/null +++ b/dev-db/unixODBC/unixODBC-2.3.9-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal + +DESCRIPTION="complete ODBC driver manager" +HOMEPAGE="http://www.unixodbc.org/" +SRC_URI="ftp://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+minimal odbcmanual static-libs unicode" + +RDEPEND=" + || ( + dev-libs/libltdl:0[${MULTILIB_USEDEP}] + >=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}] + ) + >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] + >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] +" +DEPEND="${RDEPEND} + sys-devel/flex +" + +MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config ) +MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h ) + +PATCHES=( + "${FILESDIR}"/${P}-clang16.patch +) + +multilib_src_configure() { + # --enable-driver-conf is --enable-driverc as per configure.in + local myeconfargs=( + --cache-file="${BUILD_DIR}"/config.cache + --sysconfdir="${EPREFIX}"/etc/${PN} + --disable-editline + --disable-static + --enable-iconv + --enable-shared + $(use_enable static-libs static) + $(use_enable !minimal drivers) + $(use_enable !minimal driverc) + $(use_with unicode iconv-char-enc UTF8) + $(use_with unicode iconv-ucode-enc UTF16LE) + ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_install_all() { + einstalldocs + + if use odbcmanual ; then + # We could simply run "make install-html" if we'd not had + # out-of-source builds here. + docinto html + dodoc -r doc/. + find "${ED}/usr/share/doc/${PF}/html" -name "Makefile*" -delete || die + fi + + use prefix && dodoc README* + find "${ED}" -type f -name '*.la' -delete || die +} -- cgit v1.2.3