From aff5919e4a0167b9f565ab4064b3c0884e4f5630 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 23 Feb 2025 11:28:36 +0100 Subject: [PATCH] dev-db/sqlite-3.49.1: implement "legacy soname" handling for Mach-O passing --soname=legacy breaks for Mach-O targets as it emits soname options which are not understood. Fix up the install_name manually instead as there is no --install_name=legacy equivalent. Signed-off-by: Fabian Groffen --- dev-db/sqlite/sqlite-3.49.1.ebuild | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dev-db/sqlite/sqlite-3.49.1.ebuild b/dev-db/sqlite/sqlite-3.49.1.ebuild index 3deeb24b18ab5..ce81dc0b27888 100644 --- a/dev-db/sqlite/sqlite-3.49.1.ebuild +++ b/dev-db/sqlite/sqlite-3.49.1.ebuild @@ -322,8 +322,10 @@ multilib_src_configure() { fi fi - # set SONAME for the library - options+=( --soname=legacy ) + if [[ ${CHOST} != *-darwin* ]] ; then + # set SONAME for the library + options+=( --soname=legacy ) + fi # https://sqlite.org/forum/forumpost/4f4d06a9f6683bb9 tc-export_build_env BUILD_CC @@ -374,6 +376,15 @@ multilib_src_test() { multilib_src_install() { emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install + if [[ ${CHOST} == *-darwin* ]] ; then + # fix install_name, soname=legacy doesn't work for this (but + # breaks the build instead) + install_name_tool \ + -id "${EPREFIX}/usr/$(get_libdir)/libsqlite3$(get_libname 0)" \ + "${ED}/usr/$(get_libdir)/libsqlite3$(get_libname ${PV})" \ + || die "failed to fix install_name" + fi + if use tools && multilib_is_native_abi; then install_tool() { if [[ -f ".libs/${1}" ]]; then