mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-13 01:40:36 +00:00
Ports: Support multiple port directories
This allows Ports unfit for the main repository to be put elsewhere.
This commit is contained in:
parent
722ae35329
commit
9b7e217dda
Notes:
sideshowbarker
2024-07-17 01:00:26 +09:00
Author: https://github.com/Jan200101 Commit: https://github.com/SerenityOS/serenity/commit/9b7e217dda Pull-request: https://github.com/SerenityOS/serenity/pull/16824 Reviewed-by: https://github.com/gmta
2 changed files with 12 additions and 1 deletions
|
@ -56,3 +56,4 @@ export PKG_CONFIG_SYSROOT_DIR="${SERENITY_BUILD_DIR}/Root"
|
|||
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/usr/local/lib/pkgconfig"
|
||||
|
||||
export SERENITY_INSTALL_ROOT="${SERENITY_BUILD_DIR}/Root"
|
||||
export SERENITY_PORT_DIRS="${SERENITY_PORT_DIRS:+${SERENITY_PORT_DIRS}:}${SERENITY_SOURCE_DIR}/Ports"
|
||||
|
|
|
@ -528,7 +528,17 @@ package_install_state() {
|
|||
installdepends() {
|
||||
for depend in "${depends[@]}"; do
|
||||
if [ -z "$(package_install_state $depend)" ]; then
|
||||
(cd "${PORT_META_DIR}/../$depend" && ./package.sh --auto)
|
||||
# Split colon seperated string into a list
|
||||
IFS=':' read -ra port_directories <<< "$SERENITY_PORT_DIRS"
|
||||
for port_dir in "${port_directories[@]}"; do
|
||||
if [ -d "${port_dir}/$depend" ]; then
|
||||
(cd "${port_dir}/$depend" && ./package.sh --auto)
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
>&2 echo "Error: Dependency $depend could not be found."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue