diff --git a/scripts.d/99-rpath.sh b/scripts.d/99-rpath.sh new file mode 100644 index 0000000..448c98c --- /dev/null +++ b/scripts.d/99-rpath.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +ffbuild_enabled() { + [[ $TARGET == linux* ]] +} + +ffbuild_dockerfinal() { + return 0 +} + +ffbuild_dockerlayer() { + return 0 +} + +ffbuild_dockerstage() { + return 0 +} + +ffbuild_dockerbuild() { + return 0 +} + +ffbuild_configure() { + if [[ $VARIANT == *shared* ]]; then + # Can't escape escape hell + echo --extra-ldexeflags=\'-Wl,-rpath='\\\\\\\$\\\$ORIGIN'\\ -Wl,-rpath='\\\\\\\$\\\$ORIGIN/../lib'\' + fi +}