mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05: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
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…
Add table
Reference in a new issue