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 <grobian@gentoo.org>
This commit is contained in:
Fabian Groffen
2025-02-23 11:28:36 +01:00
parent 40c2dd2304
commit aff5919e4a

View File

@@ -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