49bf7bbb5d
- Introduced `r.toml` for R package configuration, including build flags and dependencies. - Added `sdl2-compat.toml` for SDL2 compatibility layer with SDL3, specifying build and runtime dependencies. - Created a patch for SDL3 to handle cases when XInput2 is not available, ensuring compatibility. - Added `sdl3.toml` for SDL3 configuration, including build flags and dependencies. - Introduced `tk.toml` for Tk configuration, detailing build flags and runtime dependencies. - Added a patch for Vala to ensure POSIX compliance in the test runner script, improving portability.
165 lines
4.4 KiB
Bash
165 lines
4.4 KiB
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
makei() {
|
|
echo "==> Running: make DESTDIR=\"$pkgdir\" install $*"
|
|
make DESTDIR="$pkgdir" install "$@"
|
|
}
|
|
|
|
mesoni() {
|
|
echo "==> Running: meson install --destdir \"$pkgdir\" $*"
|
|
meson install --destdir "$pkgdir" "$@"
|
|
}
|
|
|
|
cmakei() {
|
|
echo "==> Running: cmake --install $*"
|
|
DESTDIR="$pkgdir" cmake --install "$@"
|
|
}
|
|
|
|
starmove() {
|
|
[ "$#" -ge 1 ] || {
|
|
echo "starmove: requires at least one path pattern" >&2
|
|
return 1
|
|
}
|
|
[ "${DEPOT_OUTPUT_NAME:-}" != "" ] || {
|
|
echo "starmove: DEPOT_OUTPUT_NAME is not set" >&2
|
|
return 1
|
|
}
|
|
haul "$DEPOT_OUTPUT_NAME" "$@"
|
|
}
|
|
|
|
depot_starbuild_sync_srcdir() {
|
|
workdir=${DEPOT_STARBUILD_WORKDIR:?}
|
|
compat_root="$workdir/.depot-starbuild"
|
|
mkdir -p "$compat_root/packages"
|
|
for entry in "$workdir"/* "$workdir"/.[!.]* "$workdir"/..?*; do
|
|
[ -e "$entry" ] || [ -L "$entry" ] || continue
|
|
base=$(basename "$entry")
|
|
[ "$base" = ".depot-starbuild" ] && continue
|
|
[ "$base" = "packages" ] && continue
|
|
ln -snf "$entry" "$compat_root/$base"
|
|
done
|
|
mkdir -p "$compat_root/packages/lapack/"
|
|
ln -snf "${DEPOT_PRIMARY_DESTDIR:-$DESTDIR}" "$compat_root/packages/lapack/files"
|
|
mkdir -p "$compat_root/packages/blas/"
|
|
ln -snf "$(subdestdir 'blas')" "$compat_root/packages/blas/files"
|
|
mkdir -p "$compat_root/packages/cblas/"
|
|
ln -snf "$(subdestdir 'cblas')" "$compat_root/packages/cblas/files"
|
|
mkdir -p "$compat_root/packages/lapacke/"
|
|
ln -snf "$(subdestdir 'lapacke')" "$compat_root/packages/lapacke/files"
|
|
mkdir -p "$compat_root/packages/blas64/"
|
|
ln -snf "$(subdestdir 'blas64')" "$compat_root/packages/blas64/files"
|
|
mkdir -p "$compat_root/packages/cblas64/"
|
|
ln -snf "$(subdestdir 'cblas64')" "$compat_root/packages/cblas64/files"
|
|
mkdir -p "$compat_root/packages/lapack64/"
|
|
ln -snf "$(subdestdir 'lapack64')" "$compat_root/packages/lapack64/files"
|
|
mkdir -p "$compat_root/packages/lapacke64/"
|
|
ln -snf "$(subdestdir 'lapacke64')" "$compat_root/packages/lapacke64/files"
|
|
srcdir="$compat_root"
|
|
export srcdir
|
|
}
|
|
|
|
depot_starbuild_setup_env() {
|
|
package_name=$1
|
|
package_version='3.12.1'
|
|
pkgdir=${DESTDIR:?}
|
|
export package_name package_version pkgdir
|
|
LANG=C
|
|
LC_ALL=C
|
|
export LANG LC_ALL
|
|
depot_starbuild_sync_srcdir
|
|
}
|
|
|
|
depot_build() {
|
|
depot_starbuild_setup_env 'lapack'
|
|
cmake -B build \
|
|
-DCMAKE_SKIP_RPATH=ON \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DBUILD_TESTING=OFF \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_Fortran_COMPILER=flang \
|
|
-DLAPACKE_WITH_TMG=ON \
|
|
-DCBLAS=ON \
|
|
-G Ninja
|
|
ninja -C build
|
|
cmake -B build64 \
|
|
-DCMAKE_SKIP_RPATH=ON \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DBUILD_TESTING=OFF \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_Fortran_COMPILER=flang \
|
|
-DLAPACKE_WITH_TMG=ON \
|
|
-DCBLAS=ON \
|
|
-DBUILD_INDEX64=ON \
|
|
-G Ninja
|
|
ninja -C build64
|
|
# Add your commands here
|
|
}
|
|
|
|
depot_install() {
|
|
depot_starbuild_setup_env 'lapack'
|
|
cmakei build
|
|
rm -r "$pkgdir"/usr/lib/libblas.* \
|
|
"$pkgdir"/usr/lib/libcblas.* \
|
|
"$pkgdir"/usr/lib/liblapacke.*
|
|
|
|
rm -r "$pkgdir"/usr/lib/pkgconfig/blas.* \
|
|
"$pkgdir"/usr/lib/pkgconfig/cblas.* \
|
|
"$pkgdir"/usr/lib/pkgconfig/lapacke.*
|
|
|
|
rm -r "$pkgdir"/usr/lib/cmake/cblas* \
|
|
"$pkgdir"/usr/lib/cmake/lapacke*
|
|
|
|
rm -r "$pkgdir"/usr/include
|
|
}
|
|
|
|
depot_install_blas() {
|
|
depot_starbuild_setup_env 'blas'
|
|
cmakei build/BLAS
|
|
}
|
|
|
|
depot_install_cblas() {
|
|
depot_starbuild_setup_env 'cblas'
|
|
cmakei build/CBLAS
|
|
}
|
|
|
|
depot_install_lapacke() {
|
|
depot_starbuild_setup_env 'lapacke'
|
|
cmakei build/LAPACKE
|
|
}
|
|
|
|
depot_install_blas64() {
|
|
depot_starbuild_setup_env 'blas64'
|
|
cmakei build64/BLAS
|
|
}
|
|
|
|
depot_install_cblas64() {
|
|
depot_starbuild_setup_env 'cblas64'
|
|
cmakei build64/CBLAS
|
|
rm -r "$pkgdir"/usr/include
|
|
}
|
|
|
|
depot_install_lapack64() {
|
|
depot_starbuild_setup_env 'lapack64'
|
|
cmakei build64
|
|
rm -r "$pkgdir"/usr/lib/libblas64.* \
|
|
"$pkgdir"/usr/lib/libcblas64.* \
|
|
"$pkgdir"/usr/lib/liblapacke64.*
|
|
|
|
rm -r "$pkgdir"/usr/lib/pkgconfig/blas64.* \
|
|
"$pkgdir"/usr/lib/pkgconfig/cblas64.* \
|
|
"$pkgdir"/usr/lib/pkgconfig/lapacke64.*
|
|
|
|
rm -r "$pkgdir"/usr/lib/cmake/cblas* \
|
|
"$pkgdir"/usr/lib/cmake/lapacke*
|
|
|
|
rm -r "$pkgdir"/usr/include
|
|
}
|
|
|
|
depot_install_lapacke64() {
|
|
depot_starbuild_setup_env 'lapacke64'
|
|
cmakei build64/LAPACKE
|
|
rm -r "$pkgdir"/usr/include
|
|
}
|
|
|