Skip to content

Commit

Permalink
Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
n0toose authored and linusg committed Apr 20, 2021
1 parent 3f5c934 commit e45e0ee
Show file tree
Hide file tree
Showing 33 changed files with 69 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
# Don't mix these up!
# runner.workspace = /home/runner/work/serenity
# github.workspace = /home/runner/work/serenity/serenity
SERENITY_ROOT: ${{ github.workspace }}
SERENITY_SOURCE_DIR: ${{ github.workspace }}

jobs:
build_and_test_serenity:
Expand Down
2 changes: 1 addition & 1 deletion Base/usr/share/man/man1/test-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

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.

You can disable output from `dbgln()` calls by setting the `DISABLE_DBG_OUTPUT` environment variable.
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ add_custom_target(image
DEPENDS 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
USES_TERMINAL
)
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
USES_TERMINAL
)
Expand All @@ -68,7 +68,7 @@ add_custom_target(check-style
)

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
)

Expand Down
4 changes: 2 additions & 2 deletions Meta/build-image-grub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ disk_usage() {
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..."
if [ "$1" = "ebr" ]; then
Expand Down Expand Up @@ -98,7 +98,7 @@ script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
"$script_path/build-root-filesystem.sh"

if [ -z "$2" ]; then
grub_cfg="$SERENITY_ROOT"/Meta/grub-"${partition_scheme}".cfg
grub_cfg="$SERENITY_SOURCE_DIR"/Meta/grub-"${partition_scheme}".cfg
else
grub_cfg=$2
fi
Expand Down
2 changes: 1 addition & 1 deletion Meta/build-image-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ disk_usage() {
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..."
qemu-img create _disk_image "${DISK_SIZE:-600}"m || die "could not create disk image"
Expand Down
24 changes: 12 additions & 12 deletions Meta/build-root-filesystem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ if [ "$(id -u)" != 0 ]; then
die "this script needs to run as root"
fi

[ -z "$SERENITY_ROOT" ] && die "SERENITY_ROOT is not set"
[ -d "$SERENITY_ROOT/Base" ] || die "$SERENITY_ROOT/Base doesn't exist"
[ -z "$SERENITY_SOURCE_DIR" ] && die "SERENITY_SOURCE_DIR is not set"
[ -d "$SERENITY_SOURCE_DIR/Base" ] || die "$SERENITY_SOURCE_DIR/Base doesn't exist"

umask 0022

printf "installing base system... "
$CP -PdR "$SERENITY_ROOT"/Base/* mnt/
$CP "$SERENITY_ROOT"/Toolchain/Local/i686/i686-pc-serenity/lib/libgcc_s.so mnt/usr/lib/
$CP -PdR "$SERENITY_SOURCE_DIR"/Base/* mnt/
$CP "$SERENITY_SOURCE_DIR"/Toolchain/Local/i686/i686-pc-serenity/lib/libgcc_s.so mnt/usr/lib/
$CP -PdR Root/* mnt/
# If umask was 027 or similar when the repo was cloned,
# file permissions in Base/ are too restrictive. Restore
# 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
chown $window_uid:$window_gid mnt/etc/WindowServer/WindowServer.ini
Expand Down Expand Up @@ -96,9 +96,9 @@ mkdir -p mnt/home/anon
mkdir -p mnt/home/anon/Desktop
mkdir -p mnt/home/anon/Downloads
mkdir -p mnt/home/nona
cp "$SERENITY_ROOT"/README.md mnt/home/anon/
cp -r "$SERENITY_ROOT"/Userland/Libraries/LibJS/Tests mnt/home/anon/js-tests
cp -r "$SERENITY_ROOT"/Userland/Libraries/LibWeb/Tests mnt/home/anon/web-tests
cp "$SERENITY_SOURCE_DIR"/README.md mnt/home/anon/
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibJS/Tests mnt/home/anon/js-tests
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibWeb/Tests mnt/home/anon/web-tests
chmod 700 mnt/root
chmod 700 mnt/home/anon
chmod 700 mnt/home/nona
Expand Down Expand Up @@ -126,14 +126,14 @@ ln -s checksum mnt/bin/sha256sum
ln -s checksum mnt/bin/sha512sum
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'.
tput setaf 1
echo
echo " +-----------------------------------------------------------------------------+"
echo " | |"
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 " | |"
echo " +-----------------------------------------------------------------------------+"
Expand All @@ -142,6 +142,6 @@ if [ -f "${SERENITY_ROOT}/Kernel/sync-local.sh" ] || [ -f "${SERENITY_ROOT}/Buil
fi

# Run local sync script, if it exists
if [ -f "${SERENITY_ROOT}/sync-local.sh" ]; then
sh "${SERENITY_ROOT}/sync-local.sh"
if [ -f "${SERENITY_SOURCE_DIR}/sync-local.sh" ]; then
sh "${SERENITY_SOURCE_DIR}/sync-local.sh"
fi
6 changes: 3 additions & 3 deletions Meta/install-ports-tree.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/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
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"
fi
done
8 changes: 4 additions & 4 deletions Meta/refresh-serenity-qtcreator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

set -e

if [ -z "$SERENITY_ROOT" ]
if [ -z "$SERENITY_SOURCE_DIR" ]
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 " export SERENITY_ROOT=${SERENITY_ROOT}"
echo " export SERENITY_SOURCE_DIR=${SERENITY_SOURCE_DIR}"
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
6 changes: 3 additions & 3 deletions Meta/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ cd -P -- "$SERENITY_BUILD" || die "Could not cd to \"$SERENITY_BUILD\""
if [ "$SERENITY_RUN" = "b" ]; then
# Meta/run.sh b: bochs
[ -z "$SERENITY_BOCHSRC" ] && {
# Make sure that SERENITY_ROOT is set and not empty
[ -z "$SERENITY_ROOT" ] && die 'SERENITY_ROOT not set or empty'
SERENITY_BOCHSRC="$SERENITY_ROOT/Meta/bochsrc"
# Make sure that SERENITY_SOURCE_DIR is set and not empty
[ -z "$SERENITY_SOURCE_DIR" ] && die 'SERENITY_SOURCE_DIR not set or empty'
SERENITY_BOCHSRC="$SERENITY_SOURCE_DIR/Meta/bochsrc"
}
"$SERENITY_BOCHS_BIN" -q -f "$SERENITY_BOCHSRC"
elif [ "$SERENITY_RUN" = "qn" ]; then
Expand Down
12 changes: 6 additions & 6 deletions Meta/serenity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ create_build_dir() {
cmd_with_target() {
is_valid_target || ( >&2 echo "Unknown target: $TARGET"; usage )

if [ ! -d "$SERENITY_ROOT" ]; then
SERENITY_ROOT="$(get_top_dir)"
export SERENITY_ROOT
if [ ! -d "$SERENITY_SOURCE_DIR" ]; then
SERENITY_SOURCE_DIR="$(get_top_dir)"
export SERENITY_SOURCE_DIR
fi
BUILD_DIR="$SERENITY_ROOT/Build/$TARGET"
BUILD_DIR="$SERENITY_SOURCE_DIR/Build/$TARGET"
if [ "$TARGET" != "lagom" ]; then
export SERENITY_ARCH="$TARGET"
TOOLCHAIN_DIR="$SERENITY_ROOT/Toolchain/Build/$TARGET"
TOOLCHAIN_DIR="$SERENITY_SOURCE_DIR/Toolchain/Build/$TARGET"
fi
}

Expand All @@ -140,7 +140,7 @@ delete_target() {
}

build_toolchain() {
( cd "$SERENITY_ROOT/Toolchain" && ARCH="$TARGET" ./BuildIt.sh )
( cd "$SERENITY_SOURCE_DIR/Toolchain" && ARCH="$TARGET" ./BuildIt.sh )
}

ensure_toolchain() {
Expand Down
2 changes: 1 addition & 1 deletion Ports/.hosted_defs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export PKG_CONFIG_DIR=""
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"

# To be removed.
# To be deprecated soon.
export SERENITY_ROOT="$(realpath "${SCRIPT}/../")"

enable_ccache
Expand Down
4 changes: 2 additions & 2 deletions Ports/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

`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.

#### `makeopts`
Expand All @@ -215,7 +215,7 @@ is placed in.
The location of the ports directory, only used for the `package.db` file for
now. Don't override this in ports contributed to Serenity.

Defaults to `$SERENITY_ROOT/Ports`.
Defaults to `$SERENITY_SOURCE_DIR/Ports`.

#### `useconfigure`

Expand Down
2 changes: 1 addition & 1 deletion Ports/SDL2/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ workdir=SDL-main-serenity
useconfigure=true
files="https://github.com/SerenityOS/SDL/archive/main-serenity.tar.gz SDL2-git.tar.gz 18ce496be8644b0eb7fc4cad0d8dd5ff"
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() {
run cmake $configopts
Expand Down
2 changes: 1 addition & 1 deletion Ports/SDLPoP/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ useconfigure=true
version=git
depends="SDL2 SDL2_image"
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"
auth_type=sha256
install_location="Root/opt/PrinceOfPersia"
Expand Down
2 changes: 1 addition & 1 deletion Ports/Super-Mario/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ useconfigure=true
version=git
depends="SDL2 SDL2_mixer SDL2_image"
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"
auth_type=md5
install_location="Root/opt/Super_Mario"
Expand Down
2 changes: 1 addition & 1 deletion Ports/c-ray/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version=c094d64570c30c70f4003e9428d31a2a0d9d3d41
useconfigure=true
files="https://github.com/vkoskiv/c-ray/archive/${version}.tar.gz ${version}.tar.gz b83e3c6a1462486257dfe38d309b47c2"
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"
workdir="${port}-${version}"

Expand Down
2 changes: 1 addition & 1 deletion Ports/chester/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ useconfigure=true
version=git
depends="SDL2"
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"
auth_type=md5

Expand Down
2 changes: 1 addition & 1 deletion Ports/cmake/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
auth_type=md5
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() {
run cmake $configopts .
Expand Down
2 changes: 1 addition & 1 deletion Ports/cmatrix/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ useconfigure=true
version=git
depends="ncurses"
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"
auth_type=md5

Expand Down
2 changes: 1 addition & 1 deletion Ports/dialog/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ auth_type="sig"
auth_import_key="C52048C0C0748FEE227D47A2702353E0F7E48EDB"
auth_opts="dialog-${version}.tgz.asc dialog-${version}.tgz"
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"
2 changes: 1 addition & 1 deletion Ports/emu2/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ files="https://github.com/dmsc/emu2/archive/${version}.zip emu2-${version}.zip 2
auth_type=md5

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
}
2 changes: 1 addition & 1 deletion Ports/flatbuffers/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ files="https://github.com/google/flatbuffers/archive/refs/tags/v${version}.tar.g
useconfigure=true
# Since we are cross-compiling, we cannot build the tests, because we need
# 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() {
run cmake $configopts
Expand Down
2 changes: 1 addition & 1 deletion Ports/frotz/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ depends="ncurses"
build() {
run make \
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=ncurses \
USE_UTF8=no \
Expand Down
2 changes: 1 addition & 1 deletion Ports/genemu/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version=3bf6f7cd893db3451019d6e18a2d9ad1de0e7c8c
useconfigure=true
files="https://github.com/rasky/genemu/archive/${version}.tar.gz genemu-${version}.tar.gz 5704a21341ea56d026601e48e08f4605"
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"

configure() {
Expand Down
2 changes: 1 addition & 1 deletion Ports/hatari/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version=2.4.0-devel
depends="SDL2 zlib"
commit=353379e1f8a847cc0e284541d2b40fd49d175d22
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"
auth_type=md5

Expand Down
2 changes: 1 addition & 1 deletion Ports/libzip/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ useconfigure=true
version=1.7.3
depends="zlib"
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"
auth_type=md5

Expand Down
2 changes: 1 addition & 1 deletion Ports/nesalizer/package.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=nesalizer
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"
auth_type=md5
depends=SDL2
2 changes: 1 addition & 1 deletion Ports/oksh/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ files="https://github.com/ibara/oksh/releases/download/oksh-${version}/oksh-${ve
auth_type=md5

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 LDFLAGS="-lncurses"
run ./configure --no-thanks
Expand Down
2 changes: 1 addition & 1 deletion Ports/pt2-clone/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version=1.28
useconfigure=true
files="https://github.com/8bitbubsy/pt2-clone/archive/v${version}.tar.gz v${version}.tar.gz 42df939c03b7e598ed8b17a764150860"
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"

configure() {
Expand Down
2 changes: 1 addition & 1 deletion Ports/python3/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pre_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
Expand Down
Loading

0 comments on commit e45e0ee

Please sign in to comment.