public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-db/unixODBC/, dev-db/unixODBC/files/
@ 2024-12-13  9:24 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-12-13  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     66c770686606b0a7a1b5954617f3880e6c0d42e9
Author:     Jan-Espen Oversand <sigsegv <AT> radiotube <DOT> org>
AuthorDate: Thu Dec 12 13:44:00 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 13 09:24:13 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66c77068

dev-db/unixODBC: fix incorrect types with use -minimal

Closes: https://bugs.gentoo.org/936060
Signed-off-by: Jan-Espen Oversand <sigsegv <AT> radiotube.org>
Closes: https://github.com/gentoo/gentoo/pull/39694
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/unixODBC-2.3.12-bug-936060.patch         | 33 +++++++++
 dev-db/unixODBC/unixODBC-2.3.12-r1.ebuild          | 78 ++++++++++++++++++++++
 2 files changed, 111 insertions(+)

diff --git a/dev-db/unixODBC/files/unixODBC-2.3.12-bug-936060.patch b/dev-db/unixODBC/files/unixODBC-2.3.12-bug-936060.patch
new file mode 100644
index 000000000000..55131a34e851
--- /dev/null
+++ b/dev-db/unixODBC/files/unixODBC-2.3.12-bug-936060.patch
@@ -0,0 +1,33 @@
+This issue has been reported and fixed upstream, but not yet released. See links below.
+
+https://bugs.gentoo.org/936060
+https://github.com/lurcher/unixODBC/issues/158
+https://github.com/lurcher/unixODBC/commit/45f501e1be2db6b017cc242c79bfb9de32b332a1
+--- a/Drivers/Postgre7.1/info.c
++++ b/Drivers/Postgre7.1/info.c
+@@ -1779,14 +1779,14 @@
+ char index_name[MAX_INFO_STRING];
+ short fields_vector[8];
+ char isunique[10], isclustered[10];
+-SDWORD index_name_len, fields_vector_len;
++SQLLEN index_name_len, fields_vector_len;
+ TupleNode *row;
+ int i;
+ HSTMT hcol_stmt;
+ StatementClass *col_stmt, *indx_stmt;
+ char column_name[MAX_INFO_STRING], relhasrules[MAX_INFO_STRING];
+ char **column_names = 0;
+-Int4 column_name_len;
++SQLLEN column_name_len;
+ int total_columns = 0;
+ char error = TRUE;
+ ConnInfo *ci;
+@@ -2136,7 +2136,7 @@
+ StatementClass *tbl_stmt;
+ char tables_query[STD_STATEMENT_LEN];
+ char attname[MAX_INFO_STRING];
+-SDWORD attname_len;
++SQLLEN attname_len;
+ char pktab[MAX_TABLE_LEN + 1];
+ Int2 result_cols;
+ 

diff --git a/dev-db/unixODBC/unixODBC-2.3.12-r1.ebuild b/dev-db/unixODBC/unixODBC-2.3.12-r1.ebuild
new file mode 100644
index 000000000000..87141847f80b
--- /dev/null
+++ b/dev-db/unixODBC/unixODBC-2.3.12-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2024 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 ~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
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-bug-936060.patch
+)
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/unixODBC/unixodbc_conf.h /usr/include/unixodbc.h )
+
+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] only message in thread

only message in thread, other threads:[~2024-12-13  9:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13  9:24 [gentoo-commits] repo/gentoo:master commit in: dev-db/unixODBC/, dev-db/unixODBC/files/ Sam James

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