public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-db/unixODBC/files/, dev-db/unixODBC/
@ 2018-02-27 22:41 Patrice Clement
  0 siblings, 0 replies; 4+ messages in thread
From: Patrice Clement @ 2018-02-27 22:41 UTC (permalink / raw
  To: gentoo-commits

commit:     af28844cc92f8edd1fcd049e357d169a3dddc176
Author:     Michael Vetter <jubalh <AT> iodoru <DOT> org>
AuthorDate: Tue Feb 27 16:04:39 2018 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Feb 27 22:41:35 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af28844c

dev-db/unixODBC: add fix against CVE-2018-7485.

Adding a patch based on
https://github.com/lurcher/unixODBC/commit/45ef78e037f578b15fc58938a3a3251655e71d6f

Without the changes for 2.3.6 in ChangeLog and configure.ac.

Package-Manager: Portage-2.3.19, Repoman-2.3.6
Closes: https://github.com/gentoo/gentoo/pull/7300

 .../files/unixODBC-2.3.5-CVE-2018-7485.patch       | 135 +++++++++++++++++++++
 dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild           |  65 ++++++++++
 2 files changed, 200 insertions(+)

diff --git a/dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch b/dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch
new file mode 100644
index 00000000000..2c4178cda48
--- /dev/null
+++ b/dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch
@@ -0,0 +1,135 @@
+From 45ef78e037f578b15fc58938a3a3251655e71d6f Mon Sep 17 00:00:00 2001
+From: Nick Gorham <nick@lurcher.ink.org>
+Date: Mon, 8 Jan 2018 11:12:39 +0000
+Subject: [PATCH] New Pre Source
+
+diff --git a/DriverManager/SQLGetDiagRecW.c b/DriverManager/SQLGetDiagRecW.c
+index a6368d7..be89120 100644
+--- a/DriverManager/SQLGetDiagRecW.c
++++ b/DriverManager/SQLGetDiagRecW.c
+@@ -98,6 +98,8 @@
+ 
+ static char const rcsid[]= "$RCSfile: SQLGetDiagRecW.c,v $";
+ 
++extern int __is_env( EHEAD * head );        /* in SQLGetDiagRec.c */
++
+ static SQLRETURN extract_sql_error_rec_w( EHEAD *head,
+         SQLWCHAR *sqlstate,
+         SQLINTEGER rec_number,
+diff --git a/DriverManager/SQLSetDescField.c b/DriverManager/SQLSetDescField.c
+index 333d786..0e2f67c 100644
+--- a/DriverManager/SQLSetDescField.c
++++ b/DriverManager/SQLSetDescField.c
+@@ -306,7 +306,7 @@ SQLRETURN SQLSetDescField( SQLHDESC descriptor_handle,
+         return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+     }
+ 
+-    if ( field_identifier == SQL_DESC_COUNT && (SQLINTEGER)value < 0 )
++    if ( field_identifier == SQL_DESC_COUNT && (intptr_t)value < 0 )
+     {
+         __post_internal_error( &descriptor -> error,
+                 ERROR_07009, NULL,
+@@ -315,9 +315,9 @@ SQLRETURN SQLSetDescField( SQLHDESC descriptor_handle,
+         return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+     }
+     
+-    if ( field_identifier == SQL_DESC_PARAMETER_TYPE && value != SQL_PARAM_INPUT
+-        && value != SQL_PARAM_OUTPUT && value != SQL_PARAM_INPUT_OUTPUT &&
+-        value != SQL_PARAM_INPUT_OUTPUT_STREAM && value != SQL_PARAM_OUTPUT_STREAM )
++    if ( field_identifier == SQL_DESC_PARAMETER_TYPE && (intptr_t)value != SQL_PARAM_INPUT
++        && (intptr_t)value != SQL_PARAM_OUTPUT && (intptr_t)value != SQL_PARAM_INPUT_OUTPUT &&
++        (intptr_t)value != SQL_PARAM_INPUT_OUTPUT_STREAM && (intptr_t)value != SQL_PARAM_OUTPUT_STREAM )
+     {
+         __post_internal_error( &descriptor -> error,
+                 ERROR_HY105, NULL,
+diff --git a/DriverManager/SQLSetDescFieldW.c b/DriverManager/SQLSetDescFieldW.c
+index 5e066ac..45125ff 100644
+--- a/DriverManager/SQLSetDescFieldW.c
++++ b/DriverManager/SQLSetDescFieldW.c
+@@ -288,7 +288,7 @@ SQLRETURN SQLSetDescFieldW( SQLHDESC descriptor_handle,
+         return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+     }
+ 
+-    if ( field_identifier == SQL_DESC_COUNT && (SQLINTEGER)value < 0 )
++    if ( field_identifier == SQL_DESC_COUNT && (intptr_t)value < 0 )
+     {
+         __post_internal_error( &descriptor -> error,
+                 ERROR_07009, NULL,
+@@ -297,9 +297,9 @@ SQLRETURN SQLSetDescFieldW( SQLHDESC descriptor_handle,
+         return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+     }
+ 
+-    if ( field_identifier == SQL_DESC_PARAMETER_TYPE && value != SQL_PARAM_INPUT
+-        && value != SQL_PARAM_OUTPUT && value != SQL_PARAM_INPUT_OUTPUT &&
+-        value != SQL_PARAM_INPUT_OUTPUT_STREAM && value != SQL_PARAM_OUTPUT_STREAM )
++    if ( field_identifier == SQL_DESC_PARAMETER_TYPE && (intptr_t)value != SQL_PARAM_INPUT
++        && (intptr_t)value != SQL_PARAM_OUTPUT && (intptr_t)value != SQL_PARAM_INPUT_OUTPUT &&
++        (intptr_t)value != SQL_PARAM_INPUT_OUTPUT_STREAM && (intptr_t)value != SQL_PARAM_OUTPUT_STREAM )
+     {
+         __post_internal_error( &descriptor -> error,
+                 ERROR_HY105, NULL,
+diff --git a/exe/iusql.c b/exe/iusql.c
+index aac5329..484a889 100644
+--- a/exe/iusql.c
++++ b/exe/iusql.c
+@@ -413,7 +413,6 @@ static int ExecuteSQL( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNa
+             if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt );
+             fprintf( stderr, "[ISQL]ERROR: Could not SQLExecDirect\n" );
+             SQLFreeStmt( hStmt, SQL_DROP );
+-            free(szSepLine);
+             return 0;
+         }
+     }
+diff --git a/odbcinst/SQLCreateDataSource.c b/odbcinst/SQLCreateDataSource.c
+index a9fa735..83a1e9e 100644
+--- a/odbcinst/SQLCreateDataSource.c
++++ b/odbcinst/SQLCreateDataSource.c
+@@ -26,7 +26,7 @@ char* _multi_string_alloc_and_copy( LPCWSTR in )
+ 
+     if ( !in )
+     {
+-        return in;
++        return NULL;
+     }
+ 
+     while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
+@@ -55,7 +55,7 @@ char* _single_string_alloc_and_copy( LPCWSTR in )
+ 
+     if ( !in )
+     {
+-        return in;
++        return NULL;
+     }
+ 
+     while ( in[ len ] != 0 )
+@@ -83,7 +83,7 @@ SQLWCHAR* _multi_string_alloc_and_expand( LPCSTR in )
+ 
+     if ( !in )
+     {
+-        return in;
++        return NULL;
+     }
+     
+     while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
+@@ -112,7 +112,7 @@ SQLWCHAR* _single_string_alloc_and_expand( LPCSTR in )
+ 
+     if ( !in )
+     {
+-        return in;
++        return NULL;
+     }
+ 
+     while ( in[ len ] != 0 )
+diff --git a/odbcinst/SQLWriteFileDSN.c b/odbcinst/SQLWriteFileDSN.c
+index c2f987b..e225796 100644
+--- a/odbcinst/SQLWriteFileDSN.c
++++ b/odbcinst/SQLWriteFileDSN.c
+@@ -21,7 +21,7 @@ BOOL SQLWriteFileDSN(			LPCSTR	pszFileName,
+ 
+ 	if ( pszFileName[0] == '/' )
+ 	{
+-		strncpy( szFileName, sizeof(szFileName) - 5, pszFileName );
++		strncpy( szFileName, pszFileName, sizeof(szFileName) - 5 );
+ 	}
+ 	else
+ 	{	

diff --git a/dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild b/dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild
new file mode 100644
index 00000000000..502428bed7f
--- /dev/null
+++ b/dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit libtool ltprune multilib-minimal
+
+DESCRIPTION="A 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 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-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}/${PN}-2.3.5-CVE-2018-7485.patch"
+)
+
+multilib_src_configure() {
+	# --enable-driver-conf is --enable-driverc as per configure.in
+	myeconfargs=(
+		--sysconfdir="${EPREFIX}"/etc/${PN}
+		--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*
+	prune_libtool_files
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/unixODBC/files/, dev-db/unixODBC/
@ 2023-04-15  6:17 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-04-15  6:17 UTC (permalink / raw
  To: gentoo-commits

commit:     b10f18036ee61ba88ecd2f24b680f0c7a8c4724a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 15 06:13:35 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 15 06:13:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b10f1803

dev-db/unixODBC: fix build w/ clang 16

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/unixODBC/files/unixODBC-2.3.9-clang16.patch | 345 +++++++++++++++++++++
 dev-db/unixODBC/unixODBC-2.3.9-r1.ebuild           |  68 ++++
 2 files changed, 413 insertions(+)

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 <fweimer@redhat.com>
+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 <stdio.h>
+ #include <string.h>
+--- 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 <stdio.h>
+ 
+--- 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 <stdio.h>
+ #include <string.h>
+--- 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 <kejin@visigenic.com>
+-	Enhanced for unixODBC (1999) by Peter Harvey <pharvey@codebydesign.com>
+-	
+-    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 <config.h>
+-#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	<pwd.h>
++# include	<unistd.h>
+ # 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 <config.h>
+ #include	<nnconfig.h>
++#include "driver.h"
+ 
+ int	upper_strneq(
+ 	char*	s1,
+--- a/Drivers/nn/nncol.c
++++ b/Drivers/nn/nncol.c
+@@ -18,6 +18,7 @@
+ 
+ #include	<nncol.h>
+ #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	<nnconfig.h>
+ 
+ #include	<nndate.h>
++#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    <string.h>
+ #include	<errno.h>
+ #include	<nntp.h>
++#include	"driver.h"
+ 
+ # include	"nntp.ci"
+ 
+@@ -28,6 +29,8 @@
+ # include	<sys/socket.h>
+ # include	<netdb.h>
+ # include	<netinet/in.h>
++# include	<arpa/inet.h>
++# include	<unistd.h>
+ 
+ #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	<stdio.h>
+ #include	<ctype.h>
+ 
++#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 <config.h>
+ #include "driver.h"
++#if	!defined(WINDOWS) && !defined(WIN32) && !defined(OS2)
++#include	<unistd.h>
++#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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/unixODBC/files/, dev-db/unixODBC/
@ 2023-05-06 13:13 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-05-06 13:13 UTC (permalink / raw
  To: gentoo-commits

commit:     ce5c52a0de38d71d1b3824b5589917234d3490d3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May  6 13:12:49 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May  6 13:13:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce5c52a0

dev-db/unixODBC: fix patch & install

I'm sorry, I must have tested the old version instead.

Closes: https://bugs.gentoo.org/905819
Fixes: 57836a8512f5f787c78608bbccb8a949020db044
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/unixODBC-2.3.11-config-no-install.patch  | 33 ++++++++++++++++++++++
 dev-db/unixODBC/unixODBC-2.3.11.ebuild             | 14 +++++++--
 2 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/dev-db/unixODBC/files/unixODBC-2.3.11-config-no-install.patch b/dev-db/unixODBC/files/unixODBC-2.3.11-config-no-install.patch
new file mode 100644
index 000000000000..f7b276523f83
--- /dev/null
+++ b/dev-db/unixODBC/files/unixODBC-2.3.11-config-no-install.patch
@@ -0,0 +1,33 @@
+https://github.com/lurcher/unixODBC/commit/685df9e2b4fbbd191ab081a2020956aa78295fe0
+
+From 685df9e2b4fbbd191ab081a2020956aa78295fe0 Mon Sep 17 00:00:00 2001
+From: Hugh McMaster <hugh.mcmaster@outlook.com>
+Date: Fri, 13 May 2022 22:03:37 +1000
+Subject: [PATCH] Makefile.am: Do not install config.h
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,4 @@
+-ACLOCAL_AMFLAGS=-I m4 
++ACLOCAL_AMFLAGS=-I m4
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = \
+@@ -21,7 +21,7 @@ SUBDIRS = \
+ 	include \
+ 	doc \
+ 	man \
+-	samples 
++	samples
+ 
+ EXTRA_DIST = \
+ 	README.OSX \
+@@ -47,7 +47,7 @@ EXTRA_DIST = \
+ 
+ include_HEADERS = unixodbc.h
+ 
+-pkginclude_HEADERS = unixodbc_conf.h config.h
++pkginclude_HEADERS = unixodbc_conf.h
+ 
+ install-data-hook:
+ 	-$(MKDIR_P) $(DESTDIR)$(sysconfdir)/ODBCDataSources

diff --git a/dev-db/unixODBC/unixODBC-2.3.11.ebuild b/dev-db/unixODBC/unixODBC-2.3.11.ebuild
index 3ab410c7e80e..f6277a5282a5 100644
--- a/dev-db/unixODBC/unixODBC-2.3.11.ebuild
+++ b/dev-db/unixODBC/unixODBC-2.3.11.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit multilib-minimal
+inherit autotools multilib-minimal
 
 DESCRIPTION="Complete ODBC driver manager"
 HOMEPAGE="https://www.unixodbc.org/"
@@ -27,12 +27,20 @@ DEPEND="
 "
 
 MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
-MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/unixODBC/unixodbc_conf.h /usr/include/unixodbc.h )
 
 PATCHES=(
-	"${FILESDIR}"/${P}-clang16.patch
+	"${FILESDIR}"/${PN}-2.3.9-clang16.patch
+	"${FILESDIR}"/${P}-config-no-install.patch
 )
 
+src_prepare() {
+	default
+
+	# Only needed for config.h install patch
+	eautoreconf
+}
+
 multilib_src_configure() {
 	# Needs flex, bison
 	export LEX=flex


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/unixODBC/files/, dev-db/unixODBC/
@ 2024-09-08 18:34 Petr Vaněk
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vaněk @ 2024-09-08 18:34 UTC (permalink / raw
  To: gentoo-commits

commit:     05d92c6f436887730321ed168988d15b2984a9e7
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  8 18:32:46 2024 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Sun Sep  8 18:34:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05d92c6f

dev-db/unixODBC: drop 2.3.11

Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 dev-db/unixODBC/Manifest                           |   1 -
 .../files/unixODBC-2.3.11-config-no-install.patch  |  33 --
 dev-db/unixODBC/files/unixODBC-2.3.9-clang16.patch | 345 ---------------------
 dev-db/unixODBC/unixODBC-2.3.11.ebuild             |  79 -----
 4 files changed, 458 deletions(-)

diff --git a/dev-db/unixODBC/Manifest b/dev-db/unixODBC/Manifest
index 1e34e2941e3d..8b54ea772251 100644
--- a/dev-db/unixODBC/Manifest
+++ b/dev-db/unixODBC/Manifest
@@ -1,2 +1 @@
-DIST unixODBC-2.3.11.tar.gz 1752585 BLAKE2B fa1502d7b83c8c10ee9d54b23281096156a3e3ec893b81acf125cd95c1de0f4ae7657ab3b4c5214a5c6a0fc9209e53cd9acdf6f99e65840e0a05366182af5600 SHA512 dddc32f90a7962e6988e1130a8093c6fb8b9ff532cad270d572250324aecbc739f45f9d8021d217313910bab25b08e69009b4f87456575535e93be1f46f5f13d
 DIST unixODBC-2.3.12.tar.gz 1753915 BLAKE2B 9da9b0fb5ff962db8ec1483b700aca5d4adf88f3349b22010bd0b4b4ec1fe2e7a51d761527e3b9e49b08286a00e55aadc38c320a6db512ba52f491aecad7fd83 SHA512 ca9d8db943195679a44db1fc09391dc6662ab1721112c93d448f04011e98502462ffe14b8364eb03707d851db456eced20eb61a22370392ca88d917038d45b56

diff --git a/dev-db/unixODBC/files/unixODBC-2.3.11-config-no-install.patch b/dev-db/unixODBC/files/unixODBC-2.3.11-config-no-install.patch
deleted file mode 100644
index f7b276523f83..000000000000
--- a/dev-db/unixODBC/files/unixODBC-2.3.11-config-no-install.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://github.com/lurcher/unixODBC/commit/685df9e2b4fbbd191ab081a2020956aa78295fe0
-
-From 685df9e2b4fbbd191ab081a2020956aa78295fe0 Mon Sep 17 00:00:00 2001
-From: Hugh McMaster <hugh.mcmaster@outlook.com>
-Date: Fri, 13 May 2022 22:03:37 +1000
-Subject: [PATCH] Makefile.am: Do not install config.h
-
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,4 +1,4 @@
--ACLOCAL_AMFLAGS=-I m4 
-+ACLOCAL_AMFLAGS=-I m4
- 
- pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = \
-@@ -21,7 +21,7 @@ SUBDIRS = \
- 	include \
- 	doc \
- 	man \
--	samples 
-+	samples
- 
- EXTRA_DIST = \
- 	README.OSX \
-@@ -47,7 +47,7 @@ EXTRA_DIST = \
- 
- include_HEADERS = unixodbc.h
- 
--pkginclude_HEADERS = unixodbc_conf.h config.h
-+pkginclude_HEADERS = unixodbc_conf.h
- 
- install-data-hook:
- 	-$(MKDIR_P) $(DESTDIR)$(sysconfdir)/ODBCDataSources

diff --git a/dev-db/unixODBC/files/unixODBC-2.3.9-clang16.patch b/dev-db/unixODBC/files/unixODBC-2.3.9-clang16.patch
deleted file mode 100644
index 0e594487e666..000000000000
--- a/dev-db/unixODBC/files/unixODBC-2.3.9-clang16.patch
+++ /dev/null
@@ -1,345 +0,0 @@
-https://github.com/lurcher/unixODBC/pull/138
-
-From d4782b9eea043de2a08519af3f1c49f56d917022 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-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 <stdio.h>
- #include <string.h>
---- 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 <stdio.h>
- 
---- 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 <stdio.h>
- #include <string.h>
---- 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 <kejin@visigenic.com>
--	Enhanced for unixODBC (1999) by Peter Harvey <pharvey@codebydesign.com>
--	
--    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 <config.h>
--#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	<pwd.h>
-+# include	<unistd.h>
- # 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 <config.h>
- #include	<nnconfig.h>
-+#include "driver.h"
- 
- int	upper_strneq(
- 	char*	s1,
---- a/Drivers/nn/nncol.c
-+++ b/Drivers/nn/nncol.c
-@@ -18,6 +18,7 @@
- 
- #include	<nncol.h>
- #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	<nnconfig.h>
- 
- #include	<nndate.h>
-+#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    <string.h>
- #include	<errno.h>
- #include	<nntp.h>
-+#include	"driver.h"
- 
- # include	"nntp.ci"
- 
-@@ -28,6 +29,8 @@
- # include	<sys/socket.h>
- # include	<netdb.h>
- # include	<netinet/in.h>
-+# include	<arpa/inet.h>
-+# include	<unistd.h>
- 
- #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	<stdio.h>
- #include	<ctype.h>
- 
-+#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 <config.h>
- #include "driver.h"
-+#if	!defined(WINDOWS) && !defined(WIN32) && !defined(OS2)
-+#include	<unistd.h>
-+#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.11.ebuild b/dev-db/unixODBC/unixODBC-2.3.11.ebuild
deleted file mode 100644
index 4f2306d56f48..000000000000
--- a/dev-db/unixODBC/unixODBC-2.3.11.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools multilib-minimal
-
-DESCRIPTION="Complete ODBC driver manager"
-HOMEPAGE="https://www.unixodbc.org/"
-SRC_URI="https://www.unixodbc.org/unixODBC-${PV}.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 ~x64-solaris"
-IUSE="+minimal odbcmanual static-libs unicode"
-
-RDEPEND="
-	dev-libs/libltdl:0[${MULTILIB_USEDEP}]
-	>=sys-libs/readline-6.2_p5-r1:=[${MULTILIB_USEDEP}]
-	>=sys-libs/ncurses-5.9-r3:=[${MULTILIB_USEDEP}]
-	>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-"
-DEPEND="
-	${RDEPEND}
-	sys-devel/bison
-	sys-devel/flex
-"
-
-MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
-MULTILIB_WRAPPED_HEADERS=( /usr/include/unixODBC/unixodbc_conf.h /usr/include/unixodbc.h )
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-2.3.9-clang16.patch
-	"${FILESDIR}"/${P}-config-no-install.patch
-)
-
-src_prepare() {
-	default
-
-	# Only needed for config.h install patch
-	eautoreconf
-}
-
-multilib_src_configure() {
-	# Needs flex, bison
-	export LEX=flex
-	unset YACC
-
-	# --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
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-08 18:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-27 22:41 [gentoo-commits] repo/gentoo:master commit in: dev-db/unixODBC/files/, dev-db/unixODBC/ Patrice Clement
  -- strict thread matches above, loose matches on Subject: below --
2023-04-15  6:17 Sam James
2023-05-06 13:13 Sam James
2024-09-08 18:34 Petr Vaněk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox