diff options
author | Brahmajit Das <brahmajit.xyz@gmail.com> | 2023-09-23 17:57:56 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-12-20 15:18:40 +0000 |
commit | b2e1041ed376765bfd59dfcbddbd58c1cefc98af (patch) | |
tree | 3e10b3dd7589e1d0a7603b7ef24bfa27ba6dcc7f /dev-db | |
parent | net-ftp/proftpd: add 1.3.8b (diff) | |
download | gentoo-b2e1041ed376765bfd59dfcbddbd58c1cefc98af.tar.gz gentoo-b2e1041ed376765bfd59dfcbddbd58c1cefc98af.tar.bz2 gentoo-b2e1041ed376765bfd59dfcbddbd58c1cefc98af.zip |
dev-db/libdbi-drivers: Fix incompatible function pointer types
And update EAPI 7 -> 8
Closes: https://bugs.gentoo.org/894750
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33013
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-clang16-build-fix.patch | 33 | ||||
-rw-r--r-- | dev-db/libdbi-drivers/libdbi-drivers-0.9.0-r2.ebuild | 87 |
2 files changed, 120 insertions, 0 deletions
diff --git a/dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-clang16-build-fix.patch b/dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-clang16-build-fix.patch new file mode 100644 index 000000000000..243c912a00c7 --- /dev/null +++ b/dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-clang16-build-fix.patch @@ -0,0 +1,33 @@ +Bug: https://bugs.gentoo.org/894750 +--- a/tests/cgreen/src/constraint.c ++++ b/tests/cgreen/src/constraint.c +@@ -101,7 +101,7 @@ Constraint *with_(const char *parameter, const char* matcher_name, int (*matcher + + constraint->parameter = parameter; + constraint->compare = &compare_using_matcher; +- constraint->test = &test_with_matcher; ++ constraint->test = (void *)&test_with_matcher; + constraint->name = matcher_name; + constraint->expected = (intptr_t)matcher_function; + return constraint; +@@ -164,8 +164,8 @@ static void test_want_double(Constraint *constraint, const char *function, intpt + } + + static int compare_using_matcher(Constraint *constraint, intptr_t actual) { +- int (*matches)(const void*) = constraint->expected; +- return matches(actual); ++ int (*matches)(const void*) = (void *)constraint->expected; ++ return matches((int *)actual); + } + + static void test_with_matcher(Constraint *constraint, const char *function, const char* matcher_name, intptr_t matcher_function, const char *test_file, int test_line, TestReporter *reporter) { +--- a/tests/cgreen/src/unit.c ++++ b/tests/cgreen/src/unit.c +@@ -9,6 +9,7 @@ + #include <stdarg.h> + #include <unistd.h> + #include <signal.h> ++#include <sys/wait.h> + + enum {test_function, test_suite}; + diff --git a/dev-db/libdbi-drivers/libdbi-drivers-0.9.0-r2.ebuild b/dev-db/libdbi-drivers/libdbi-drivers-0.9.0-r2.ebuild new file mode 100644 index 000000000000..243151ab44aa --- /dev/null +++ b/dev-db/libdbi-drivers/libdbi-drivers-0.9.0-r2.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="The libdbi-drivers project maintains drivers for libdbi" +HOMEPAGE="https://libdbi-drivers.sourceforge.net/" +SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${P}/${P}.tar.gz" + +LICENSE="LGPL-2.1+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="doc firebird mysql oci8 postgres +sqlite static-libs" + +REQUIRED_USE="|| ( mysql postgres sqlite firebird oci8 )" +RESTRICT="firebird? ( bindist )" + +RDEPEND=" + >=dev-db/libdbi-0.9.0 + firebird? ( dev-db/firebird ) + mysql? ( dev-db/mysql-connector-c:= ) + postgres? ( dev-db/postgresql:* ) + sqlite? ( dev-db/sqlite:3 ) +" +DEPEND="${RDEPEND}" +BDEPEND="doc? ( app-text/openjade )" + +DOCS=( AUTHORS ChangeLog NEWS README README.osx TODO ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.9.0-doc-build-fix.patch + "${FILESDIR}"/${PN}-0.9.0-slibtool-libdir.patch + "${FILESDIR}"/${PN}-0.9.0-clang16-build-fix.patch +) + +pkg_setup() { + use oci8 && [[ -z "${ORACLE_HOME}" ]] && die "\$ORACLE_HOME is not set!" +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myconf="" + # WARNING: the configure script does NOT work correctly + # --without-$driver does NOT work + # so do NOT use `use_with...` + # Future additions: + # msql + # freetds + # ingres + # db2 + use mysql && myconf+=" --with-mysql" + use postgres && myconf+=" --with-pgsql" + use sqlite && myconf+=" --with-sqlite3" + use firebird && myconf+=" --with-firebird" + if use oci8; then + [[ -z "${ORACLE_HOME}" ]] && die "\$ORACLE_HOME is not set!" + myconf+=" --with-oracle-dir=${ORACLE_HOME} --with-oracle" + fi + + econf \ + $(use_enable doc docs) \ + $(use_enable static-libs static) \ + --with-dbi-libdir=/usr/$(get_libdir) \ + ${myconf} +} + +src_test() { + if [[ -z "${WANT_INTERACTIVE_TESTS}" ]]; then + ewarn "Tests disabled due to interactivity." + ewarn "Run with WANT_INTERACTIVE_TESTS=1 if you want them." + return 0 + fi + einfo "Running interactive tests" + emake check +} + +src_install() { + default + + find "${ED}" -name '*.la' -type f -delete || die +} |