commit: d2f4f02f49acb86e7281e5569db0a0922d5da1b4 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Sun Nov 13 14:10:39 2022 +0000 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> CommitDate: Sat Nov 19 01:44:19 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2f4f02f
gnome-extra/libgda: Detect BerkDB in the right way with configure flags Upstream has a proper way to do this without appending to CPPFLAGS. This method will even work when cross-compiling after db-use.eclass has been fixed. Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> gnome-extra/libgda/libgda-5.2.9-r1.ebuild | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/gnome-extra/libgda/libgda-5.2.9-r1.ebuild b/gnome-extra/libgda/libgda-5.2.9-r1.ebuild index 3cb270db2bec..1aca92fcec07 100644 --- a/gnome-extra/libgda/libgda-5.2.9-r1.ebuild +++ b/gnome-extra/libgda/libgda-5.2.9-r1.ebuild @@ -4,7 +4,7 @@ EAPI=8 GNOME2_EAUTORECONF="yes" -inherit db-use flag-o-matic gnome2 java-pkg-opt-2 vala +inherit db-use gnome2 java-pkg-opt-2 vala DESCRIPTION="GNOME database access library" HOMEPAGE="https://www.gnome-db.org/" @@ -78,8 +78,6 @@ pkg_setup() { } src_prepare() { - use berkdb && append-cppflags "-I$(db_includedir)" - # They need python2 sed -e '/SUBDIRS =/ s/trml2html//' \ -e '/SUBDIRS =/ s/trml2pdf//' \ @@ -114,6 +112,15 @@ src_prepare() { } src_configure() { + local bdbroot bdbinc bdblib + + if use berkdb; then + bdbinc=$(db_includedir) + bdbroot=${bdbinc%/include/*} + bdbinc=${bdbinc#${bdbroot}/} + bdblib=$(get_libdir) + fi + use vala && vala_setup # Upstream broken configure handling for UI library introspection and vala bindings if passing a choice with use_enable - https://gitlab.gnome.org/GNOME/libgda/issues/158 @@ -123,7 +130,9 @@ src_configure() { --disable-default-binary \ --disable-static \ --enable-system-sqlite \ - $(use_with berkdb bdb /usr) \ + $(use_with berkdb bdb "${bdbroot}") \ + $(use_with berkdb bdb-includedir-name "${bdbinc}") \ + $(use_with berkdb bdb-libdir-name "${bdblib}") \ $(use_with canvas goocanvas) \ $(use_enable debug) \ $(use_with firebird firebird /usr) \