mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:57:34 +00:00
Move everything to a subdirectory
Also don't run cd for the initial git clone (DERP!), and other bash port fixes.
This commit is contained in:
parent
b12a096437
commit
9a284ad3f7
6 changed files with 15 additions and 9 deletions
|
@ -25,12 +25,18 @@ function run_command() {
|
||||||
echo "+ FINISHED: $@"
|
echo "+ FINISHED: $@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function run_command_nocd() {
|
||||||
|
echo "+ $@ (nocd)"
|
||||||
|
("$@")
|
||||||
|
echo "+ FINISHED (nocd): $@"
|
||||||
|
}
|
||||||
|
|
||||||
function run_fetch_git() {
|
function run_fetch_git() {
|
||||||
if [ -d "$PORT_DIR/.git" ]; then
|
if [ -d "$PORT_DIR/.git" ]; then
|
||||||
run_command git fetch
|
run_command git fetch
|
||||||
run_command git reset --hard FETCH_HEAD
|
run_command git reset --hard FETCH_HEAD
|
||||||
else
|
else
|
||||||
run_command git clone "$1" "$PORT_DIR"
|
run_command_nocd git clone "$1" "$PORT_DIR"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,4 @@ function build() {
|
||||||
function install() {
|
function install() {
|
||||||
run_make_install
|
run_make_install
|
||||||
}
|
}
|
||||||
source ./.port_include.sh
|
source ../.port_include.sh
|
|
@ -6,25 +6,25 @@ function fetch() {
|
||||||
run_fetch_git "https://git.savannah.gnu.org/git/bash.git"
|
run_fetch_git "https://git.savannah.gnu.org/git/bash.git"
|
||||||
|
|
||||||
# Add serenity as a system for configure
|
# Add serenity as a system for configure
|
||||||
run_patch .bash-serenity-system.patch -p1
|
run_patch configure-system.patch -p1
|
||||||
|
|
||||||
# For some reason, the build fails due to FILE* being undefined without this.
|
# For some reason, the build fails due to FILE* being undefined without this.
|
||||||
# This is probably a LibC bug, but work around it for now.
|
# This is probably a LibC bug, but work around it for now.
|
||||||
run_patch .bash-serenity-include-stdio.patch -p1
|
run_patch include-stdio.patch -p1
|
||||||
|
|
||||||
# Locale calls crash right now. LibC bug, probably.
|
# Locale calls crash right now. LibC bug, probably.
|
||||||
run_patch .bash-serenity-disable-locale.patch -p1
|
run_patch disable-locale.patch -p1
|
||||||
}
|
}
|
||||||
function configure() {
|
function configure() {
|
||||||
run_configure_autotools --disable-nls --without-bash-malloc
|
run_configure_autotools --disable-nls --without-bash-malloc
|
||||||
}
|
}
|
||||||
function build() {
|
function build() {
|
||||||
# Avoid some broken cross compile tests...
|
# Avoid some broken cross compile tests...
|
||||||
run_command perl -p -i -e "s/GETCWD_BROKEN 1/GETCWD_BROKEN 0/" config.h
|
run_command perl -p -i -e "s/define GETCWD_BROKEN 1/undef GETCWD_BROKEN/" config.h
|
||||||
run_command perl -p -i -e "s/CAN_REDEFINE_GETENV 1/CAN_REDEFINE_GETENV 0/" config.h
|
run_command perl -p -i -e "s/define CAN_REDEFINE_GETENV 1/undef CAN_REDEFINE_GETENV/" config.h
|
||||||
run_make
|
run_make
|
||||||
}
|
}
|
||||||
function install() {
|
function install() {
|
||||||
run_make_install
|
run_make_install DESTDIR="$SERENITY_ROOT"/Root
|
||||||
}
|
}
|
||||||
source ./.port_include.sh
|
source ../.port_include.sh
|
Loading…
Add table
Add a link
Reference in a new issue