Skip to content

Commit aca6fba

Browse files
slipherillwieckz
authored andcommitted
external_deps: check for absolute paths in result
1 parent 157ac2f commit aca6fba

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

external_deps/build.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,21 @@ build_install() {
12371237

12381238
# Remove empty directories
12391239
find "${PKG_PREFIX}/" -mindepth 1 -type d -empty -delete
1240+
1241+
# Check for unwanted embedded paths with a couple of exemptions:
1242+
# - Opus's release mode assertions - https://github.com/xiph/opus/issues/399
1243+
# - SDL3 has a small number of renderer backend filenames embedded for some reason
1244+
local good=true
1245+
for f in $(find "${PKG_PREFIX}" -type f -not -name '*libopus*' -not -name 'libSDL3.a'); do
1246+
if grep --with-filename external_deps "${f}"
1247+
then
1248+
good=false
1249+
elif [[ $? != 1 ]]
1250+
then
1251+
exit $? # grep errored
1252+
fi
1253+
done
1254+
"${good}" || log ERROR 'Absolute paths found embedded in install. This may be due to builds with debug symbols or config files that need to be fixed.'
12401255
}
12411256

12421257
# Create a redistributable package for the dependencies

0 commit comments

Comments
 (0)