Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR

This commit is contained in:
Panagiotis Vasilopoulos 2021-04-20 03:51:04 +03:00 committed by Linus Groh
parent 3f5c934ea6
commit e45e0eeb47
Notes: sideshowbarker 2024-07-18 19:21:02 +09:00
33 changed files with 69 additions and 69 deletions

View file

@ -6,7 +6,7 @@ env:
# Don't mix these up! # Don't mix these up!
# runner.workspace = /home/runner/work/serenity # runner.workspace = /home/runner/work/serenity
# github.workspace = /home/runner/work/serenity/serenity # github.workspace = /home/runner/work/serenity/serenity
SERENITY_ROOT: ${{ github.workspace }} SERENITY_SOURCE_DIR: ${{ github.workspace }}
jobs: jobs:
build_and_test_serenity: build_and_test_serenity:

View file

@ -16,7 +16,7 @@ tests are using a custom JavaScript testing framework inspired by
It also supports the [test262 parser tests](https://github.com/tc39/test262-parser-tests). It also supports the [test262 parser tests](https://github.com/tc39/test262-parser-tests).
The test root directory is assumed to be `/home/anon/js-tests`, or `$SERENITY_ROOT/Libraries/LibJS/Tests` The test root directory is assumed to be `/home/anon/js-tests`, or `$SERENITY_SOURCE_DIR/Libraries/LibJS/Tests`
when using the Lagom build. Optionally you can pass a custom path to `test-js` to override these defaults. when using the Lagom build. Optionally you can pass a custom path to `test-js` to override these defaults.
You can disable output from `dbgln()` calls by setting the `DISABLE_DBG_OUTPUT` environment variable. You can disable output from `dbgln()` calls by setting the `DISABLE_DBG_OUTPUT` environment variable.

View file

@ -48,12 +48,12 @@ add_custom_target(image
DEPENDS qemu-image DEPENDS qemu-image
) )
add_custom_target(qemu-image add_custom_target(qemu-image
COMMAND ${CMAKE_COMMAND} -E env "SERENITY_ROOT=${CMAKE_SOURCE_DIR}" "SERENITY_ARCH=${SERENITY_ARCH}" ${CMAKE_SOURCE_DIR}/Meta/build-image-qemu.sh COMMAND ${CMAKE_COMMAND} -E env "SERENITY_SOURCE_DIR=${CMAKE_SOURCE_DIR}" "SERENITY_ARCH=${SERENITY_ARCH}" ${CMAKE_SOURCE_DIR}/Meta/build-image-qemu.sh
BYPRODUCTS ${CMAKE_BINARY_DIR}/_disk_image BYPRODUCTS ${CMAKE_BINARY_DIR}/_disk_image
USES_TERMINAL USES_TERMINAL
) )
add_custom_target(grub-image add_custom_target(grub-image
COMMAND ${CMAKE_COMMAND} -E env "SERENITY_ROOT=${CMAKE_SOURCE_DIR}" "SERENITY_ARCH=${SERENITY_ARCH}" ${CMAKE_SOURCE_DIR}/Meta/build-image-grub.sh COMMAND ${CMAKE_COMMAND} -E env "SERENITY_SOURCE_DIR=${CMAKE_SOURCE_DIR}" "SERENITY_ARCH=${SERENITY_ARCH}" ${CMAKE_SOURCE_DIR}/Meta/build-image-grub.sh
BYPRODUCTS ${CMAKE_BINARY_DIR}/grub_disk_image BYPRODUCTS ${CMAKE_BINARY_DIR}/grub_disk_image
USES_TERMINAL USES_TERMINAL
) )
@ -68,7 +68,7 @@ add_custom_target(check-style
) )
add_custom_target(install-ports add_custom_target(install-ports
COMMAND ${CMAKE_COMMAND} -E env "SERENITY_ROOT=${CMAKE_SOURCE_DIR}" "SERENITY_ARCH=${SERENITY_ARCH}" ${CMAKE_SOURCE_DIR}/Meta/install-ports-tree.sh COMMAND ${CMAKE_COMMAND} -E env "SERENITY_SOURCE_DIR=${CMAKE_SOURCE_DIR}" "SERENITY_ARCH=${SERENITY_ARCH}" ${CMAKE_SOURCE_DIR}/Meta/install-ports-tree.sh
USES_TERMINAL USES_TERMINAL
) )

View file

@ -27,7 +27,7 @@ disk_usage() {
du -sm "$1" | cut -f1 du -sm "$1" | cut -f1
} }
DISK_SIZE=$(($(disk_usage "$SERENITY_ROOT/Base") + $(disk_usage Root) + 300)) DISK_SIZE=$(($(disk_usage "$SERENITY_SOURCE_DIR/Base") + $(disk_usage Root) + 300))
echo "setting up disk image..." echo "setting up disk image..."
if [ "$1" = "ebr" ]; then if [ "$1" = "ebr" ]; then
@ -98,7 +98,7 @@ script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
"$script_path/build-root-filesystem.sh" "$script_path/build-root-filesystem.sh"
if [ -z "$2" ]; then if [ -z "$2" ]; then
grub_cfg="$SERENITY_ROOT"/Meta/grub-"${partition_scheme}".cfg grub_cfg="$SERENITY_SOURCE_DIR"/Meta/grub-"${partition_scheme}".cfg
else else
grub_cfg=$2 grub_cfg=$2
fi fi

View file

@ -23,7 +23,7 @@ disk_usage() {
expr "$(du -sk "$1" | cut -f1)" / 1024 expr "$(du -sk "$1" | cut -f1)" / 1024
} }
DISK_SIZE=$(($(disk_usage "$SERENITY_ROOT/Base") + $(disk_usage Root) + 100)) DISK_SIZE=$(($(disk_usage "$SERENITY_SOURCE_DIR/Base") + $(disk_usage Root) + 100))
echo "setting up disk image..." echo "setting up disk image..."
qemu-img create _disk_image "${DISK_SIZE:-600}"m || die "could not create disk image" qemu-img create _disk_image "${DISK_SIZE:-600}"m || die "could not create disk image"

View file

@ -26,19 +26,19 @@ if [ "$(id -u)" != 0 ]; then
die "this script needs to run as root" die "this script needs to run as root"
fi fi
[ -z "$SERENITY_ROOT" ] && die "SERENITY_ROOT is not set" [ -z "$SERENITY_SOURCE_DIR" ] && die "SERENITY_SOURCE_DIR is not set"
[ -d "$SERENITY_ROOT/Base" ] || die "$SERENITY_ROOT/Base doesn't exist" [ -d "$SERENITY_SOURCE_DIR/Base" ] || die "$SERENITY_SOURCE_DIR/Base doesn't exist"
umask 0022 umask 0022
printf "installing base system... " printf "installing base system... "
$CP -PdR "$SERENITY_ROOT"/Base/* mnt/ $CP -PdR "$SERENITY_SOURCE_DIR"/Base/* mnt/
$CP "$SERENITY_ROOT"/Toolchain/Local/i686/i686-pc-serenity/lib/libgcc_s.so mnt/usr/lib/ $CP "$SERENITY_SOURCE_DIR"/Toolchain/Local/i686/i686-pc-serenity/lib/libgcc_s.so mnt/usr/lib/
$CP -PdR Root/* mnt/ $CP -PdR Root/* mnt/
# If umask was 027 or similar when the repo was cloned, # If umask was 027 or similar when the repo was cloned,
# file permissions in Base/ are too restrictive. Restore # file permissions in Base/ are too restrictive. Restore
# the permissions needed in the image. # the permissions needed in the image.
chmod -R g+rX,o+rX "$SERENITY_ROOT"/Base/* mnt/ chmod -R g+rX,o+rX "$SERENITY_SOURCE_DIR"/Base/* mnt/
chmod 660 mnt/etc/WindowServer/WindowServer.ini chmod 660 mnt/etc/WindowServer/WindowServer.ini
chown $window_uid:$window_gid mnt/etc/WindowServer/WindowServer.ini chown $window_uid:$window_gid mnt/etc/WindowServer/WindowServer.ini
@ -96,9 +96,9 @@ mkdir -p mnt/home/anon
mkdir -p mnt/home/anon/Desktop mkdir -p mnt/home/anon/Desktop
mkdir -p mnt/home/anon/Downloads mkdir -p mnt/home/anon/Downloads
mkdir -p mnt/home/nona mkdir -p mnt/home/nona
cp "$SERENITY_ROOT"/README.md mnt/home/anon/ cp "$SERENITY_SOURCE_DIR"/README.md mnt/home/anon/
cp -r "$SERENITY_ROOT"/Userland/Libraries/LibJS/Tests mnt/home/anon/js-tests cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibJS/Tests mnt/home/anon/js-tests
cp -r "$SERENITY_ROOT"/Userland/Libraries/LibWeb/Tests mnt/home/anon/web-tests cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibWeb/Tests mnt/home/anon/web-tests
chmod 700 mnt/root chmod 700 mnt/root
chmod 700 mnt/home/anon chmod 700 mnt/home/anon
chmod 700 mnt/home/nona chmod 700 mnt/home/nona
@ -126,14 +126,14 @@ ln -s checksum mnt/bin/sha256sum
ln -s checksum mnt/bin/sha512sum ln -s checksum mnt/bin/sha512sum
echo "done" echo "done"
if [ -f "${SERENITY_ROOT}/Kernel/sync-local.sh" ] || [ -f "${SERENITY_ROOT}/Build/sync-local.sh" ]; then if [ -f "${SERENITY_SOURCE_DIR}/Kernel/sync-local.sh" ] || [ -f "${SERENITY_SOURCE_DIR}/Build/sync-local.sh" ]; then
# TODO: Deprecated on 2021-01-30. In a few months, remove this 'if'. # TODO: Deprecated on 2021-01-30. In a few months, remove this 'if'.
tput setaf 1 tput setaf 1
echo echo
echo " +-----------------------------------------------------------------------------+" echo " +-----------------------------------------------------------------------------+"
echo " | |" echo " | |"
echo " | WARNING: sync-local.sh, previously located in Kernel/ and later Build/ |" echo " | WARNING: sync-local.sh, previously located in Kernel/ and later Build/ |"
echo " | must be moved to \$SERENITY_ROOT! |" echo " | must be moved to \$SERENITY_SOURCE_DIR! |"
echo " | See https://github.com/SerenityOS/serenity/pull/5172 for details. |" echo " | See https://github.com/SerenityOS/serenity/pull/5172 for details. |"
echo " | |" echo " | |"
echo " +-----------------------------------------------------------------------------+" echo " +-----------------------------------------------------------------------------+"
@ -142,6 +142,6 @@ if [ -f "${SERENITY_ROOT}/Kernel/sync-local.sh" ] || [ -f "${SERENITY_ROOT}/Buil
fi fi
# Run local sync script, if it exists # Run local sync script, if it exists
if [ -f "${SERENITY_ROOT}/sync-local.sh" ]; then if [ -f "${SERENITY_SOURCE_DIR}/sync-local.sh" ]; then
sh "${SERENITY_ROOT}/sync-local.sh" sh "${SERENITY_SOURCE_DIR}/sync-local.sh"
fi fi

View file

@ -1,10 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
SERENITY_PORTS_DIR="${SERENITY_ROOT}/Build/${SERENITY_ARCH}/Root/usr/Ports" SERENITY_PORTS_DIR="${SERENITY_SOURCE_DIR}/Build/${SERENITY_ARCH}/Root/usr/Ports"
for file in $(git ls-files "${SERENITY_ROOT}/Ports"); do for file in $(git ls-files "${SERENITY_SOURCE_DIR}/Ports"); do
if [ "$(basename "$file")" != ".hosted_defs.sh" ]; then if [ "$(basename "$file")" != ".hosted_defs.sh" ]; then
target=${SERENITY_PORTS_DIR}/$(realpath --relative-to="${SERENITY_ROOT}/Ports" "$file") target=${SERENITY_PORTS_DIR}/$(realpath --relative-to="${SERENITY_SOURCE_DIR}/Ports" "$file")
mkdir -p "$(dirname "$target")" && cp "$file" "$target" mkdir -p "$(dirname "$target")" && cp "$file" "$target"
fi fi
done done

View file

@ -2,13 +2,13 @@
set -e set -e
if [ -z "$SERENITY_ROOT" ] if [ -z "$SERENITY_SOURCE_DIR" ]
then then
SERENITY_ROOT="$(git rev-parse --show-toplevel)" SERENITY_SOURCE_DIR="$(git rev-parse --show-toplevel)"
echo "Serenity root not set. This is fine! Other scripts may require you to set the environment variable first, e.g.:" echo "Serenity root not set. This is fine! Other scripts may require you to set the environment variable first, e.g.:"
echo " export SERENITY_ROOT=${SERENITY_ROOT}" echo " export SERENITY_SOURCE_DIR=${SERENITY_SOURCE_DIR}"
fi fi
cd "$SERENITY_ROOT" cd "$SERENITY_SOURCE_DIR"
find . \( -name Base -o -name Patches -o -name Ports -o -name Root -o -name Toolchain -o -name Build \) -prune -o \( -name '*.ipc' -or -name '*.cpp' -or -name '*.idl' -or -name '*.c' -or -name '*.h' -or -name '*.S' -or -name '*.css' -or -name '*.json' -or -name '*.gml' -or -name 'CMakeLists.txt' \) -print > serenity.files find . \( -name Base -o -name Patches -o -name Ports -o -name Root -o -name Toolchain -o -name Build \) -prune -o \( -name '*.ipc' -or -name '*.cpp' -or -name '*.idl' -or -name '*.c' -or -name '*.h' -or -name '*.S' -or -name '*.css' -or -name '*.json' -or -name '*.gml' -or -name 'CMakeLists.txt' \) -print > serenity.files

View file

@ -91,9 +91,9 @@ cd -P -- "$SERENITY_BUILD" || die "Could not cd to \"$SERENITY_BUILD\""
if [ "$SERENITY_RUN" = "b" ]; then if [ "$SERENITY_RUN" = "b" ]; then
# Meta/run.sh b: bochs # Meta/run.sh b: bochs
[ -z "$SERENITY_BOCHSRC" ] && { [ -z "$SERENITY_BOCHSRC" ] && {
# Make sure that SERENITY_ROOT is set and not empty # Make sure that SERENITY_SOURCE_DIR is set and not empty
[ -z "$SERENITY_ROOT" ] && die 'SERENITY_ROOT not set or empty' [ -z "$SERENITY_SOURCE_DIR" ] && die 'SERENITY_SOURCE_DIR not set or empty'
SERENITY_BOCHSRC="$SERENITY_ROOT/Meta/bochsrc" SERENITY_BOCHSRC="$SERENITY_SOURCE_DIR/Meta/bochsrc"
} }
"$SERENITY_BOCHS_BIN" -q -f "$SERENITY_BOCHSRC" "$SERENITY_BOCHS_BIN" -q -f "$SERENITY_BOCHSRC"
elif [ "$SERENITY_RUN" = "qn" ]; then elif [ "$SERENITY_RUN" = "qn" ]; then

View file

@ -106,14 +106,14 @@ create_build_dir() {
cmd_with_target() { cmd_with_target() {
is_valid_target || ( >&2 echo "Unknown target: $TARGET"; usage ) is_valid_target || ( >&2 echo "Unknown target: $TARGET"; usage )
if [ ! -d "$SERENITY_ROOT" ]; then if [ ! -d "$SERENITY_SOURCE_DIR" ]; then
SERENITY_ROOT="$(get_top_dir)" SERENITY_SOURCE_DIR="$(get_top_dir)"
export SERENITY_ROOT export SERENITY_SOURCE_DIR
fi fi
BUILD_DIR="$SERENITY_ROOT/Build/$TARGET" BUILD_DIR="$SERENITY_SOURCE_DIR/Build/$TARGET"
if [ "$TARGET" != "lagom" ]; then if [ "$TARGET" != "lagom" ]; then
export SERENITY_ARCH="$TARGET" export SERENITY_ARCH="$TARGET"
TOOLCHAIN_DIR="$SERENITY_ROOT/Toolchain/Build/$TARGET" TOOLCHAIN_DIR="$SERENITY_SOURCE_DIR/Toolchain/Build/$TARGET"
fi fi
} }
@ -140,7 +140,7 @@ delete_target() {
} }
build_toolchain() { build_toolchain() {
( cd "$SERENITY_ROOT/Toolchain" && ARCH="$TARGET" ./BuildIt.sh ) ( cd "$SERENITY_SOURCE_DIR/Toolchain" && ARCH="$TARGET" ./BuildIt.sh )
} }
ensure_toolchain() { ensure_toolchain() {

View file

@ -10,7 +10,7 @@ export PKG_CONFIG_DIR=""
export PKG_CONFIG_SYSROOT_DIR="${SERENITY_BUILD_DIR}/Root" export PKG_CONFIG_SYSROOT_DIR="${SERENITY_BUILD_DIR}/Root"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/usr/lib/pkgconfig/:${PKG_CONFIG_SYSROOT_DIR}/usr/local/lib/pkgconfig" export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/usr/lib/pkgconfig/:${PKG_CONFIG_SYSROOT_DIR}/usr/local/lib/pkgconfig"
# To be removed. # To be deprecated soon.
export SERENITY_ROOT="$(realpath "${SCRIPT}/../")" export SERENITY_ROOT="$(realpath "${SCRIPT}/../")"
enable_ccache enable_ccache

View file

@ -190,7 +190,7 @@ keyring and can later be used for verification using [`auth_opts`](#auth_opts).
Options passed to `make install` in the default `install` function. Options passed to `make install` in the default `install` function.
`DESTDIR="${SERENITY_BUILD_DIR}/Root"` (`"${SERENITY_ROOT}/Build/${SERENITY_ARCH}/Root"`) `DESTDIR="${SERENITY_BUILD_DIR}/Root"` (`"${SERENITY_SOURCE_DIR}/Build/${SERENITY_ARCH}/Root"`)
is always passed, override the `install` function if that's undesirable. is always passed, override the `install` function if that's undesirable.
#### `makeopts` #### `makeopts`
@ -215,7 +215,7 @@ is placed in.
The location of the ports directory, only used for the `package.db` file for The location of the ports directory, only used for the `package.db` file for
now. Don't override this in ports contributed to Serenity. now. Don't override this in ports contributed to Serenity.
Defaults to `$SERENITY_ROOT/Ports`. Defaults to `$SERENITY_SOURCE_DIR/Ports`.
#### `useconfigure` #### `useconfigure`

View file

@ -5,7 +5,7 @@ workdir=SDL-main-serenity
useconfigure=true useconfigure=true
files="https://github.com/SerenityOS/SDL/archive/main-serenity.tar.gz SDL2-git.tar.gz 18ce496be8644b0eb7fc4cad0d8dd5ff" files="https://github.com/SerenityOS/SDL/archive/main-serenity.tar.gz SDL2-git.tar.gz 18ce496be8644b0eb7fc4cad0d8dd5ff"
auth_type=md5 auth_type=md5
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt -DPULSEAUDIO=OFF -DJACK=OFF" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt -DPULSEAUDIO=OFF -DJACK=OFF"
configure() { configure() {
run cmake $configopts run cmake $configopts

View file

@ -4,7 +4,7 @@ useconfigure=true
version=git version=git
depends="SDL2 SDL2_image" depends="SDL2 SDL2_image"
workdir=SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68 workdir=SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt"
files="https://github.com/NagyD/SDLPoP/archive/86988c668eeaa10f218e1d4938fc5b4e42314d68.zip PoP.zip d18cae8541fb8cbcc374fd998316993d561429a83f92061bc0754337ada774c5" files="https://github.com/NagyD/SDLPoP/archive/86988c668eeaa10f218e1d4938fc5b4e42314d68.zip PoP.zip d18cae8541fb8cbcc374fd998316993d561429a83f92061bc0754337ada774c5"
auth_type=sha256 auth_type=sha256
install_location="Root/opt/PrinceOfPersia" install_location="Root/opt/PrinceOfPersia"

View file

@ -4,7 +4,7 @@ useconfigure=true
version=git version=git
depends="SDL2 SDL2_mixer SDL2_image" depends="SDL2 SDL2_mixer SDL2_image"
workdir=Super-Mario-Clone-Cpp-master workdir=Super-Mario-Clone-Cpp-master
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt"
files="https://github.com/Bennyhwanggggg/Super-Mario-Clone-Cpp/archive/refs/heads/master.zip master.zip 11f622721d1ba504acf75c024aa0dbe3" files="https://github.com/Bennyhwanggggg/Super-Mario-Clone-Cpp/archive/refs/heads/master.zip master.zip 11f622721d1ba504acf75c024aa0dbe3"
auth_type=md5 auth_type=md5
install_location="Root/opt/Super_Mario" install_location="Root/opt/Super_Mario"

View file

@ -4,7 +4,7 @@ version=c094d64570c30c70f4003e9428d31a2a0d9d3d41
useconfigure=true useconfigure=true
files="https://github.com/vkoskiv/c-ray/archive/${version}.tar.gz ${version}.tar.gz b83e3c6a1462486257dfe38d309b47c2" files="https://github.com/vkoskiv/c-ray/archive/${version}.tar.gz ${version}.tar.gz b83e3c6a1462486257dfe38d309b47c2"
auth_type=md5 auth_type=md5
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt"
depends="SDL2" depends="SDL2"
workdir="${port}-${version}" workdir="${port}-${version}"

View file

@ -4,7 +4,7 @@ useconfigure=true
version=git version=git
depends="SDL2" depends="SDL2"
workdir=chester-public workdir=chester-public
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt"
files="https://github.com/veikkos/chester/archive/public.tar.gz chester.tar.gz f09d797209e7bfd9b1460d2540525186" files="https://github.com/veikkos/chester/archive/public.tar.gz chester.tar.gz f09d797209e7bfd9b1460d2540525186"
auth_type=md5 auth_type=md5

View file

@ -5,7 +5,7 @@ useconfigure=true
files="https://github.com/Kitware/CMake/releases/download/v$version/cmake-$version.tar.gz cmake-$version.tar.gz 2a71f16c61bac5402004066d193fc14e" files="https://github.com/Kitware/CMake/releases/download/v$version/cmake-$version.tar.gz cmake-$version.tar.gz 2a71f16c61bac5402004066d193fc14e"
auth_type=md5 auth_type=md5
depends="bash gcc make sed ncurses" depends="bash gcc make sed ncurses"
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt"
configure() { configure() {
run cmake $configopts . run cmake $configopts .

View file

@ -4,7 +4,7 @@ useconfigure=true
version=git version=git
depends="ncurses" depends="ncurses"
workdir=cmatrix-master workdir=cmatrix-master
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt"
files="https://github.com/abishekvashok/cmatrix/archive/refs/heads/master.zip cmatrix.zip 2541321b89149b375d5732402e52d654" files="https://github.com/abishekvashok/cmatrix/archive/refs/heads/master.zip cmatrix.zip 2541321b89149b375d5732402e52d654"
auth_type=md5 auth_type=md5

View file

@ -8,4 +8,4 @@ auth_type="sig"
auth_import_key="C52048C0C0748FEE227D47A2702353E0F7E48EDB" auth_import_key="C52048C0C0748FEE227D47A2702353E0F7E48EDB"
auth_opts="dialog-${version}.tgz.asc dialog-${version}.tgz" auth_opts="dialog-${version}.tgz.asc dialog-${version}.tgz"
useconfigure=true useconfigure=true
configopts="--prefix=/usr/local --with-ncurses --with-curses-dir=${SERENITY_ROOT}/Build/i686/Root/usr/local/include/ncurses" configopts="--prefix=/usr/local --with-ncurses --with-curses-dir=${SERENITY_SOURCE_DIR}/Build/i686/Root/usr/local/include/ncurses"

View file

@ -5,6 +5,6 @@ files="https://github.com/dmsc/emu2/archive/${version}.zip emu2-${version}.zip 2
auth_type=md5 auth_type=md5
build() { build() {
export CC="${SERENITY_ROOT}/Toolchain/Local/${SERENITY_ARCH}/bin/${SERENITY_ARCH}-pc-serenity-gcc" export CC="${SERENITY_SOURCE_DIR}/Toolchain/Local/${SERENITY_ARCH}/bin/${SERENITY_ARCH}-pc-serenity-gcc"
run make DESTDIR="${SERENITY_BUILD_DIR}/Root" CC="${CC}" $installopts run make DESTDIR="${SERENITY_BUILD_DIR}/Root" CC="${CC}" $installopts
} }

View file

@ -7,7 +7,7 @@ files="https://github.com/google/flatbuffers/archive/refs/tags/v${version}.tar.g
useconfigure=true useconfigure=true
# Since we are cross-compiling, we cannot build the tests, because we need # Since we are cross-compiling, we cannot build the tests, because we need
# the flatbuffers compiler to build them # the flatbuffers compiler to build them
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt -DFLATBUFFERS_BUILD_TESTS=off" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt -DFLATBUFFERS_BUILD_TESTS=off"
configure() { configure() {
run cmake $configopts run cmake $configopts

View file

@ -9,7 +9,7 @@ depends="ncurses"
build() { build() {
run make \ run make \
PKG_CONFIG_CURSES=no \ PKG_CONFIG_CURSES=no \
CURSES_CFLAGS="-I${SERENITY_ROOT}/Build/i686/Root/usr/local/include/ncurses" \ CURSES_CFLAGS="-I${SERENITY_SOURCE_DIR}/Build/i686/Root/usr/local/include/ncurses" \
CURSES_LDFLAGS="-lncurses -ltinfo" \ CURSES_LDFLAGS="-lncurses -ltinfo" \
CURSES=ncurses \ CURSES=ncurses \
USE_UTF8=no \ USE_UTF8=no \

View file

@ -4,7 +4,7 @@ version=3bf6f7cd893db3451019d6e18a2d9ad1de0e7c8c
useconfigure=true useconfigure=true
files="https://github.com/rasky/genemu/archive/${version}.tar.gz genemu-${version}.tar.gz 5704a21341ea56d026601e48e08f4605" files="https://github.com/rasky/genemu/archive/${version}.tar.gz genemu-${version}.tar.gz 5704a21341ea56d026601e48e08f4605"
auth_type=md5 auth_type=md5
configopts="-DCMAKE_TOOLCHAIN_FILE=${SERENITY_ROOT}/Toolchain/CMake/CMakeToolchain.txt" configopts="-DCMAKE_TOOLCHAIN_FILE=${SERENITY_SOURCE_DIR}/Toolchain/CMake/CMakeToolchain.txt"
depends="SDL2" depends="SDL2"
configure() { configure() {

View file

@ -5,7 +5,7 @@ version=2.4.0-devel
depends="SDL2 zlib" depends="SDL2 zlib"
commit=353379e1f8a847cc0e284541d2b40fd49d175d22 commit=353379e1f8a847cc0e284541d2b40fd49d175d22
workdir="${port}-${commit}" workdir="${port}-${commit}"
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt"
files="https://github.com/hatari/hatari/archive/${commit}.tar.gz ${commit}.tar.gz 614d8c20a06deea6df464a5de32cc795" files="https://github.com/hatari/hatari/archive/${commit}.tar.gz ${commit}.tar.gz 614d8c20a06deea6df464a5de32cc795"
auth_type=md5 auth_type=md5

View file

@ -4,7 +4,7 @@ useconfigure=true
version=1.7.3 version=1.7.3
depends="zlib" depends="zlib"
workdir=libzip-${version} workdir=libzip-${version}
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt"
files="https://libzip.org/download/libzip-${version}.tar.gz libzip-${version}.tar.gz 76f8fea9b88f6ead7f15ed7712eb5aef" files="https://libzip.org/download/libzip-${version}.tar.gz libzip-${version}.tar.gz 76f8fea9b88f6ead7f15ed7712eb5aef"
auth_type=md5 auth_type=md5

View file

@ -1,7 +1,7 @@
#!/usr/bin/env -S bash ../.port_include.sh #!/usr/bin/env -S bash ../.port_include.sh
port=nesalizer port=nesalizer
version=master version=master
makeopts="CONF=release EXTRA=-I${SERENITY_ROOT}/Build/i686/Root/usr/local/include/SDL2" makeopts="CONF=release EXTRA=-I${SERENITY_SOURCE_DIR}/Build/i686/Root/usr/local/include/SDL2"
files="https://github.com/SerenityOS/nesalizer/archive/master.zip nesalizer-master.zip 0bbcde24c2366ced827ad63935f557cf" files="https://github.com/SerenityOS/nesalizer/archive/master.zip nesalizer-master.zip 0bbcde24c2366ced827ad63935f557cf"
auth_type=md5 auth_type=md5
depends=SDL2 depends=SDL2

View file

@ -8,7 +8,7 @@ files="https://github.com/ibara/oksh/releases/download/oksh-${version}/oksh-${ve
auth_type=md5 auth_type=md5
configure() { configure() {
export CC=${SERENITY_ROOT}/Toolchain/Local/${SERENITY_ARCH}/bin/${SERENITY_ARCH}-pc-serenity-gcc export CC=${SERENITY_SOURCE_DIR}/Toolchain/Local/${SERENITY_ARCH}/bin/${SERENITY_ARCH}-pc-serenity-gcc
export CFLAGS="" export CFLAGS=""
export LDFLAGS="-lncurses" export LDFLAGS="-lncurses"
run ./configure --no-thanks run ./configure --no-thanks

View file

@ -4,7 +4,7 @@ version=1.28
useconfigure=true useconfigure=true
files="https://github.com/8bitbubsy/pt2-clone/archive/v${version}.tar.gz v${version}.tar.gz 42df939c03b7e598ed8b17a764150860" files="https://github.com/8bitbubsy/pt2-clone/archive/v${version}.tar.gz v${version}.tar.gz 42df939c03b7e598ed8b17a764150860"
auth_type=md5 auth_type=md5
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt" configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt"
depends="SDL2" depends="SDL2"
configure() { configure() {

View file

@ -27,7 +27,7 @@ pre_configure() {
} }
post_configure() { post_configure() {
run cp "${SERENITY_ROOT}/Ports/${port}/Setup.local" "Modules/Setup.local" run cp "${SERENITY_SOURCE_DIR}/Ports/${port}/Setup.local" "Modules/Setup.local"
} }
if [ -x "$(command -v python3)" ]; then if [ -x "$(command -v python3)" ]; then

View file

@ -4,15 +4,15 @@ if (NOT DEFINED ENV{SERENITY_ARCH})
message(FATAL_ERROR "SERENITY_ARCH not set.") message(FATAL_ERROR "SERENITY_ARCH not set.")
endif() endif()
if (NOT DEFINED ENV{SERENITY_ROOT}) if (NOT DEFINED ENV{SERENITY_SOURCE_DIR})
message(FATAL_ERROR "SERENITY_ROOT not set.") message(FATAL_ERROR "SERENITY_SOURCE_DIR not set.")
endif() endif()
set(SERENITYOS 1) set(SERENITYOS 1)
set(CMAKE_SYSTEM_PROCESSOR "$ENV{SERENITY_ARCH}") set(CMAKE_SYSTEM_PROCESSOR "$ENV{SERENITY_ARCH}")
set(SERENITY_BUILD_DIR $ENV{SERENITY_ROOT}/Build/$ENV{SERENITY_ARCH}) set(SERENITY_BUILD_DIR $ENV{SERENITY_SOURCE_DIR}/Build/$ENV{SERENITY_ARCH})
# where to read from/write to # where to read from/write to
set(CMAKE_SYSROOT ${SERENITY_BUILD_DIR}/Root) set(CMAKE_SYSROOT ${SERENITY_BUILD_DIR}/Root)
@ -28,4 +28,4 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
list(APPEND CMAKE_MODULE_PATH "$ENV{SERENITY_ROOT}/Toolchain/CMake") list(APPEND CMAKE_MODULE_PATH "$ENV{SERENITY_SOURCE_DIR}/Toolchain/CMake")

View file

@ -744,12 +744,12 @@ int main(int argc, char** argv)
#ifdef __serenity__ #ifdef __serenity__
test_root = "/home/anon/js-tests"; test_root = "/home/anon/js-tests";
#else #else
char* serenity_root = getenv("SERENITY_ROOT"); char* serenity_source_dir = getenv("SERENITY_SOURCE_DIR");
if (!serenity_root) { if (!serenity_source_dir) {
warnln("No test root given, test-js requires the SERENITY_ROOT environment variable to be set"); warnln("No test root given, test-js requires the SERENITY_SOURCE_DIR environment variable to be set");
return 1; return 1;
} }
test_root = String::formatted("{}/Userland/Libraries/LibJS/Tests", serenity_root); test_root = String::formatted("{}/Userland/Libraries/LibJS/Tests", serenity_source_dir);
#endif #endif
} }
if (!Core::File::is_directory(test_root)) { if (!Core::File::is_directory(test_root)) {

View file

@ -676,12 +676,12 @@ int main(int argc, char** argv)
#ifdef __serenity__ #ifdef __serenity__
TestRunner("/home/anon/web-tests", "/home/anon/js-tests", view, print_times).run(); TestRunner("/home/anon/web-tests", "/home/anon/js-tests", view, print_times).run();
#else #else
char* serenity_root = getenv("SERENITY_ROOT"); char* serenity_source_dir = getenv("SERENITY_SOURCE_DIR");
if (!serenity_root) { if (!serenity_source_dir) {
printf("test-web requires the SERENITY_ROOT environment variable to be set"); printf("test-web requires the SERENITY_SOURCE_DIR environment variable to be set");
return 1; return 1;
} }
TestRunner(String::format("%s/Userland/Libraries/LibWeb/Tests", serenity_root), String::format("%s/Userland/Libraries/LibJS/Tests", serenity_root), view, print_times).run(); TestRunner(String::format("%s/Userland/Libraries/LibWeb/Tests", serenity_source_dir), String::format("%s/Userland/Libraries/LibJS/Tests", serenity_source_dir), view, print_times).run();
#endif #endif
return 0; return 0;
} }