Skip to content

Instantly share code, notes, and snippets.

@X547
Last active January 18, 2023 13:24
Show Gist options
  • Save X547/292d5893da00098a924a8a0aa02d6a28 to your computer and use it in GitHub Desktop.
Save X547/292d5893da00098a924a8a0aa02d6a28 to your computer and use it in GitHub Desktop.
Building RadeonGfx
#/bin/bash
set -e
rm -rf install
INSTALL="$PWD/install"
export PKG_CONFIG_PATH="$INSTALL/lib/pkgconfig:$PKG_CONFIG_PATH"
export PATH="$INSTALL/bin:$PATH"
build_package() {
NAME=$1; shift
BUILD_DIR="$NAME/build.$(getarch)"
rm -rf "$BUILD_DIR"
mkdir "$BUILD_DIR"
(cd "$BUILD_DIR" ; meson .. -Dprefix="$INSTALL" "$@" ; ninja install)
}
build_package_cmake() {
NAME=$1; shift
BUILD_DIR="$NAME/build.$(getarch)"
rm -rf "$BUILD_DIR"
mkdir "$BUILD_DIR"
(cd "$BUILD_DIR" ; cmake .. -DCMAKE_INSTALL_PREFIX="$INSTALL" -G Ninja "$@" ; ninja install)
}
git clone https://github.com/X547/Locks.git
git clone https://github.com/X547/SADomains.git
git clone https://github.com/X547/ThreadLink.git
git clone https://github.com/X547/VideoStreams.git
git clone https://github.com/X547/RadeonGfx.git
git clone --depth 1 https://github.com/X547/mesa-drm.git libdrm
git clone https://github.com/X547/libdrm2.git
git clone https://github.com/X547/libglvnd.git
git clone --depth 1 https://github.com/KhronosGroup/glslang.git
git clone --depth 1 -b main-rebased https://github.com/X547/mesa.git
git clone https://github.com/X547/VideoStreamsWsi.git
git clone https://github.com/X547/accelerant2.git
mkdir -p SADomains/subprojects
ln -sfT "../../Locks" SADomains/subprojects/Locks
mkdir -p RadeonGfx/subprojects
ln -sfT "../../Locks" RadeonGfx/subprojects/Locks
ln -sfT "../../SADomains" RadeonGfx/subprojects/SADomains
ln -sfT "../../ThreadLink" RadeonGfx/subprojects/ThreadLink
mkdir -p libdrm2/subprojects
ln -sfT "../../Locks" libdrm2/subprojects/Locks
ln -sfT "../../ThreadLink" libdrm2/subprojects/ThreadLink
build_package accelerant2
build_package libdrm -Dintel=false
build_package libdrm2
build_package VideoStreams
build_package RadeonGfx
(cd RadeonGfx/kernel/radeon_gfx ; make)
build_package libglvnd -Dx11=disabled -Dhgl=true
build_package_cmake glslang
build_package mesa -Degl=true -Dglvnd=true
build_package VideoStreamsWsi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment