ports: Cleanup projects using cmake

There is no need to use $BANAN_CMAKE because our own toolchain directory
is added to path.
This commit is contained in:
Bananymous 2026-01-10 19:31:24 +02:00
parent 7a49a0d986
commit 83e5cb81e8
13 changed files with 38 additions and 47 deletions

View File

@ -6,7 +6,7 @@ DOWNLOAD_URL="https://github.com/libsdl-org/SDL/releases/download/release-$VERSI
DEPENDENCIES=('mesa' 'libiconv') DEPENDENCIES=('mesa' 'libiconv')
configure() { configure() {
$BANAN_CMAKE --fresh -S . -B build -G Ninja \ cmake --fresh -S . -B build -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-DCMAKE_INSTALL_PREFIX='/usr' \ -DCMAKE_INSTALL_PREFIX='/usr' \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
@ -16,9 +16,9 @@ configure() {
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
} }

View File

@ -6,7 +6,7 @@ DOWNLOAD_URL="https://github.com/libsdl-org/SDL_image/releases/download/release-
DEPENDENCIES=('SDL2' 'libpng' 'libjpeg' 'libtiff' 'libwebp') DEPENDENCIES=('SDL2' 'libpng' 'libjpeg' 'libtiff' 'libwebp')
configure() { configure() {
$BANAN_CMAKE --fresh -S . -B build -G Ninja \ cmake --fresh -S . -B build -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-DCMAKE_INSTALL_PREFIX='/usr' \ -DCMAKE_INSTALL_PREFIX='/usr' \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
@ -15,9 +15,9 @@ configure() {
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
} }

View File

@ -6,7 +6,7 @@ DOWNLOAD_URL="https://github.com/libsdl-org/SDL_mixer/releases/download/release-
DEPENDENCIES=('SDL2' 'timidity') DEPENDENCIES=('SDL2' 'timidity')
configure() { configure() {
$BANAN_CMAKE --fresh -S . -B build -G Ninja \ cmake --fresh -S . -B build -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-DCMAKE_INSTALL_PREFIX='/usr' \ -DCMAKE_INSTALL_PREFIX='/usr' \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
@ -19,9 +19,9 @@ configure() {
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
} }

View File

@ -7,11 +7,8 @@ TAR_CONTENT="SuperTux-v$VERSION-Source"
DEPENDENCIES=('boost' 'SDL2' 'SDL2_image' 'curl' 'openal-soft' 'libvorbis' 'freetype' 'physfs' 'glm') DEPENDENCIES=('boost' 'SDL2' 'SDL2_image' 'curl' 'openal-soft' 'libvorbis' 'freetype' 'physfs' 'glm')
configure() { configure() {
mkdir -p build cmake --fresh -B build -S . -G Ninja \
pushd build
$BANAN_CMAKE \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-G Ninja --fresh .. \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DINSTALL_SUBDIR_BIN=bin \ -DINSTALL_SUBDIR_BIN=bin \
@ -19,14 +16,13 @@ configure() {
-DENABLE_OPENGL=OFF \ -DENABLE_OPENGL=OFF \
-DENABLE_BOOST_STATIC_LIBS=ON \ -DENABLE_BOOST_STATIC_LIBS=ON \
|| exit 1 || exit 1
popd
# crashes in `std::ostream::sentry::sentry(std::ostream&)` with shared boost # crashes in `std::ostream::sentry::sentry(std::ostream&)` with shared boost
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
} }

View File

@ -7,7 +7,7 @@ TAR_CONTENT="SuperTuxKart-$VERSION-src"
DEPENDENCIES=('SDL2' 'curl' 'openal-soft' 'freetype' 'harfbuzz' 'libvorbis' 'libjpeg' 'libpng' 'zlib') DEPENDENCIES=('SDL2' 'curl' 'openal-soft' 'freetype' 'harfbuzz' 'libvorbis' 'libjpeg' 'libpng' 'zlib')
configure() { configure() {
$BANAN_CMAKE -B build -S . -G Ninja --fresh \ cmake --fresh -B build -S . -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
@ -20,9 +20,9 @@ configure() {
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
} }

View File

@ -6,9 +6,8 @@ DOWNLOAD_URL="https://github.com/Kitware/CMake/releases/download/v$VERSION/cmake
DEPENDENCIES=('openssl' 'libuv' 'make' 'bash') DEPENDENCIES=('openssl' 'libuv' 'make' 'bash')
configure() { configure() {
$BANAN_CMAKE \ cmake --fresh -B build -S . -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-B build -GNinja --fresh \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_USE_OPENSSL=ON \ -DCMAKE_USE_OPENSSL=ON \
-DCMAKE_USE_SYSTEM_LIBUV=ON \ -DCMAKE_USE_SYSTEM_LIBUV=ON \
@ -18,10 +17,10 @@ configure() {
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
cp $BANAN_TOOLCHAIN_DIR/cmake-platform/* $BANAN_SYSROOT/usr/share/cmake-3.26/Modules/Platform/ cp $BANAN_TOOLCHAIN_DIR/cmake-platform/* $BANAN_SYSROOT/usr/share/cmake-3.26/Modules/Platform/
} }

View File

@ -5,9 +5,8 @@ VERSION='1.0.2'
DOWNLOAD_URL="https://github.com/g-truc/glm/archive/refs/tags/$VERSION.tar.gz#19edf2e860297efab1c74950e6076bf4dad9de483826bc95e2e0f2c758a43f65" DOWNLOAD_URL="https://github.com/g-truc/glm/archive/refs/tags/$VERSION.tar.gz#19edf2e860297efab1c74950e6076bf4dad9de483826bc95e2e0f2c758a43f65"
configure() { configure() {
$BANAN_CMAKE \ cmake --fresh -B build -S . -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-B build -G Ninja --fresh . \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DGLM_BUILD_TESTS=OFF \ -DGLM_BUILD_TESTS=OFF \
@ -15,9 +14,9 @@ configure() {
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
} }

View File

@ -6,18 +6,17 @@ DOWNLOAD_URL="https://dist.libuv.org/dist/v$VERSION/libuv-v$VERSION.tar.gz#5f055
TAR_CONTENT="libuv-v$VERSION" TAR_CONTENT="libuv-v$VERSION"
configure() { configure() {
$BANAN_CMAKE \ cmake --fresh -B build -S . -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-B build -GNinja --fresh \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_TESTING=OFF \ -DBUILD_TESTING=OFF \
. || exit 1 . || exit 1
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
} }

View File

@ -9,7 +9,7 @@ DEPENDENCIES=('zlib' 'zstd')
configure() { configure() {
unset CC CXX LD unset CC CXX LD
$BANAN_CMAKE -B build -S llvm -G Ninja \ cmake --fresh -B build -S llvm -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
@ -24,7 +24,7 @@ configure() {
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {

View File

@ -6,7 +6,7 @@ DOWNLOAD_URL="https://github.com/kcat/openal-soft/archive/refs/tags/$VERSION.tar
DEPENDENCIES=('SDL2' 'zlib' 'libsndfile') DEPENDENCIES=('SDL2' 'zlib' 'libsndfile')
configure() { configure() {
$BANAN_CMAKE -B build -S . -G Ninja --fresh \ cmake --fresh -B build -S . -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
@ -17,9 +17,9 @@ configure() {
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
} }

View File

@ -6,9 +6,8 @@ DOWNLOAD_URL="https://github.com/icculus/physfs/archive/refs/tags/release-$VERSI
TAR_CONTENT="physfs-release-$VERSION" TAR_CONTENT="physfs-release-$VERSION"
configure() { configure() {
$BANAN_CMAKE \ cmake --fresh -B build -S . -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-B build -G Ninja --fresh . \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DPHYSFS_BUILD_TEST=ON \ -DPHYSFS_BUILD_TEST=ON \
@ -17,9 +16,9 @@ configure() {
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
} }

View File

@ -9,17 +9,16 @@ DEPENDENCIES=('SDL2' 'glu')
configure() { configure() {
sed -i 's/CMAKE_INSTALL_FULL_DATAROOTDIR/CMAKE_INSTALL_FULL_DATADIR/' CMakeLists.txt sed -i 's/CMAKE_INSTALL_FULL_DATAROOTDIR/CMAKE_INSTALL_FULL_DATADIR/' CMakeLists.txt
$BANAN_CMAKE \ cmake --fresh -B build -S . -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
--fresh -GNinja -S . -B build \
-DCMAKE_INSTALL_PREFIX="$BANAN_SYSROOT/usr" \ -DCMAKE_INSTALL_PREFIX="$BANAN_SYSROOT/usr" \
-DSDL2_INCLUDE_DIR="$BANAN_SYSROOT/usr/include/SDL2" -DSDL2_INCLUDE_DIR="$BANAN_SYSROOT/usr/include/SDL2"
} }
build() { build() {
$BANAN_CMAKE --build build || exit 1 cmake --build build || exit 1
} }
install() { install() {
$BANAN_CMAKE --install build || exit 1 cmake --install build || exit 1
} }

View File

@ -5,16 +5,16 @@ VERSION='1.5.7'
DOWNLOAD_URL="https://github.com/facebook/zstd/releases/download/v$VERSION/zstd-$VERSION.tar.gz#eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3" DOWNLOAD_URL="https://github.com/facebook/zstd/releases/download/v$VERSION/zstd-$VERSION.tar.gz#eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3"
configure() { configure() {
$BANAN_CMAKE -B _build -S build/cmake -G Ninja \ cmake --fresh -B _build -S build/cmake -G Ninja \
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \ --toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
|| exit 1 || exit 1
} }
build() { build() {
$BANAN_CMAKE --build _build ||exit 1 cmake --build _build ||exit 1
} }
install() { install() {
$BANAN_CMAKE --install _build ||exit 1 cmake --install _build ||exit 1
} }