Files
chromebrew/packages/mesa.rb
2021-03-20 13:15:24 -04:00

68 lines
2.3 KiB
Ruby

require 'package'
class Mesa < Package
description 'Open-source implementation of the OpenGL specification'
homepage 'https://www.mesa3d.org'
@_ver = '21.0.0'
version @_ver
license 'MIT'
compatibility 'all'
source_url "https://mesa.freedesktop.org/archive/mesa-#{@_ver}.tar.xz"
source_sha256 'e6204e98e6a8d77cf9dc5d34f99dd8e3ef7144f3601c808ca0dd26ba522e0d84'
binary_url({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/mesa-21.0.0-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/mesa-21.0.0-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/mesa-21.0.0-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/mesa-21.0.0-chromeos-x86_64.tar.xz'
})
binary_sha256({
aarch64: '98e8f7551123894e27cba186b902e907d4d4676628f0c6c293c66339512b79da',
armv7l: '98e8f7551123894e27cba186b902e907d4d4676628f0c6c293c66339512b79da',
i686: 'e9d7a58868a977a3eba49aea0012b80fa01bcf2185b79e809b612d1c3d0e4e01',
x86_64: '65464f8aa7a9d88ef46326463654c86fcd882446d686585e92e5d546932acf8e'
})
depends_on 'elfutils'
depends_on 'glslang'
depends_on 'libdrm'
depends_on 'libomxil_bellagio'
depends_on 'libunwind'
depends_on 'libvdpau'
depends_on 'libxdamage'
depends_on 'libxshmfence'
depends_on 'libxv'
depends_on 'libxvmc'
depends_on 'libxxf86vm'
depends_on 'valgrind'
depends_on 'vulkan_headers' => :build
depends_on 'vulkan_icd_loader'
depends_on 'wayland_protocols'
depends_on 'lm_sensors'
def self.build
case ARCH
when 'i686'
@vk = 'intel,swrast'
@galliumdrivers = 'swrast,svga,virgl,swr,lima,zink,d3d12'
when 'x86_64', 'aarch64', 'armv7l'
@vk = 'auto'
@galliumdrivers = 'auto'
end
system 'pip3 uninstall -y Mako MarkupSafe || :'
system "pip3 install --no-warn-script-location --prefix \"#{CREW_PREFIX}\" --root \"#{CREW_DEST_DIR}\" Mako"
system "pip3 install --prefix \"#{CREW_PREFIX}\" Mako"
system "meson #{CREW_MESON_LTO_OPTIONS} \
-Db_asneeded=false \
-Dvulkan-drivers=#{@vk} \
-Dgallium-drivers=#{@galliumdrivers} \
builddir"
system 'meson configure builddir'
system 'ninja -C builddir'
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
end
end