|
|
@@ -44,8 +44,8 @@ build_invercargill() {
|
|
|
|
|
|
pushd "$src_dir" >/dev/null || return 1
|
|
|
|
|
|
- # Configure with meson
|
|
|
- if ! meson setup src builddir --prefix="$prefix" -Ddefault_library=static >"$output_redirect" 2>&1; then
|
|
|
+ # Configure with meson (force libdir=lib for consistency across platforms)
|
|
|
+ if ! meson setup src builddir --prefix="$prefix" --libdir=lib -Ddefault_library=static >"$output_redirect" 2>&1; then
|
|
|
log_error "Failed to configure Invercargill"
|
|
|
[[ "$VERBOSE" != "true" ]] && log_info "Run with --verbose for details"
|
|
|
popd >/dev/null
|
|
|
@@ -81,8 +81,8 @@ build_invercargill_json() {
|
|
|
|
|
|
pushd "$src_dir" >/dev/null || return 1
|
|
|
|
|
|
- # Configure with meson
|
|
|
- if ! meson setup src builddir --prefix="$prefix" -Ddefault_library=static >"$output_redirect" 2>&1; then
|
|
|
+ # Configure with meson (force libdir=lib for consistency across platforms)
|
|
|
+ if ! meson setup src builddir --prefix="$prefix" --libdir=lib -Ddefault_library=static >"$output_redirect" 2>&1; then
|
|
|
log_error "Failed to configure Invercargill-Json"
|
|
|
[[ "$VERBOSE" != "true" ]] && log_info "Run with --verbose for details"
|
|
|
popd >/dev/null
|
|
|
@@ -118,8 +118,11 @@ build_usm() {
|
|
|
|
|
|
pushd "$src_dir" >/dev/null || return 1
|
|
|
|
|
|
- # Configure with meson (USM's meson.build is at root, not in src/)
|
|
|
- if ! meson setup builddir --prefix="$prefix" >"$output_redirect" 2>&1; then
|
|
|
+ # Set PKG_CONFIG_PATH to find bundled Invercargill libraries
|
|
|
+ export PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$prefix/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
|
|
+
|
|
|
+ # Configure with meson (USM's meson.build is at root, force libdir=lib for consistency)
|
|
|
+ if ! meson setup builddir --prefix="$prefix" --libdir=lib >"$output_redirect" 2>&1; then
|
|
|
log_error "Failed to configure USM"
|
|
|
[[ "$VERBOSE" != "true" ]] && log_info "Run with --verbose for details"
|
|
|
popd >/dev/null
|
|
|
@@ -183,7 +186,8 @@ install_shim() {
|
|
|
log_step "Installing shim to $shim_path..."
|
|
|
|
|
|
local shim_content="#!/bin/bash
|
|
|
-exec ${target_dir}/bin/usm \"\$@\"
|
|
|
+export LD_LIBRARY_PATH=\"${target_dir}/lib\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}\"
|
|
|
+exec \"${target_dir}/bin/usm\" \"\$@\"
|
|
|
"
|
|
|
|
|
|
if [[ -n "$sudo" ]]; then
|