Files
chromebrew/packages/mesa.rb
Cassandra Watergate 30d028499d libffi => 3.4.2 & python3 => 3.10.1, and all downstream packages requiring updates (#6295)
* python3.10ize mypaint

* python3.10ize oci_cli

* python3.10ize py3_agate

* python3.10ize py3_agate_dfb

* python3.10ize py3_agate_excel

* python3.10ize py3_agate_sql

* python3.10ize py3_alabaster

* python3.10ize py3_appdirs

* python3.10ize py3_argcomplete

* python3.10ize py3_arrow

* python3.10ize py3_attrs

* python3.10ize py3_babel

* python3.10ize py3_beautifulsoup4

* python3.10ize py3_certifi

* python3.10ize py3_cffi

* python3.10ize py3_chardet

* python3.10ize py3_click

* python3.10ize py3_colorama

* python3.10ize py3_configparser

* python3.10ize py3_cryptography

* python3.10ize py3_cssselect

* python3.10ize py3_cython

* python3.10ize py3_dateutil

* python3.10ize py3_dbfread

* python3.10ize py3_decorator

* python3.10ize py3_dicttoxml

* python3.10ize py3_distlib

* python3.10ize py3_dnspython

* python3.10ize py3_docutils

* python3.10ize py3_docx2txt

* python3.10ize py3_ebooklib

* python3.10ize py3_et_xmlfile

* python3.10ize py3_extract_msg

* python3.10ize py3_fasteners

* python3.10ize py3_filelock

* python3.10ize py3_flask

* python3.10ize py3_future

* python3.10ize py3_greenlet

* python3.10ize py3_idna

* python3.10ize py3_imagesize

* python3.10ize py3_imapclient

* python3.10ize py3_impacket

* python3.10ize py3_importlib_metadata

* python3.10ize py3_iniconfig

* python3.10ize py3_isodate

* python3.10ize py3_itsdangerous

* python3.10ize py3_jeepney

* python3.10ize py3_jinja2

* python3.10ize py3_jmespath

* python3.10ize py3_json2xml

* python3.10ize py3_keyring

* python3.10ize py3_ldap3

* python3.10ize py3_ldapdomaindump

* python3.10ize py3_leather

* python3.10ize py3_libevdev

* python3.10ize py3_libxml2

* python3.10ize py3_lxml

* python3.10ize py3_magic

* python3.10ize py3_mako

* python3.10ize py3_markdown

* python3.10ize py3_markupsafe

* python3.10ize py3_minidb

* python3.10ize py3_nuitka

* python3.10ize py3_numpy

* python3.10ize py3_oci

* python3.10ize py3_olefile

* python3.10ize py3_openpyxl

* python3.10ize py3_parsedatetime

* python3.10ize py3_pathspec

* python3.10ize py3_pdfminer_six

* python3.10ize py3_pillow

* python3.10ize py3_pipdeptree

* python3.10ize py3_pluggy

* python3.10ize py3_ply

* python3.10ize py3_pptx

* python3.10ize py3_psutil

* python3.10ize py3_py

* python3.10ize py3_pyasn1

* python3.10ize py3_pycairo

* python3.10ize py3_pycryptodome

* python3.10ize py3_pycryptodomex

* python3.10ize py3_pyelftools

* python3.10ize py3_pygments

* python3.10ize py3_pyicu

* python3.10ize py3_pyopenssl

* python3.10ize py3_pyparsing

* python3.10ize py3_pystemmer

* python3.10ize py3_pyte

* python3.10ize py3_pytest

* python3.10ize py3_pytimeparse

* python3.10ize py3_pytz

* python3.10ize py3_pyudev

* python3.10ize py3_pyyaml

* python3.10ize py3_requests

* python3.10ize py3_retrying

* python3.10ize py3_secretstorage

* python3.10ize py3_semantic_version

* python3.10ize py3_setuptools

* python3.10ize py3_setuptools_rust

* python3.10ize py3_six

* python3.10ize py3_slugify

* python3.10ize py3_smartypants

* python3.10ize py3_snowballstemmer

* python3.10ize py3_sortedcontainers

* python3.10ize py3_speechrecognition

* python3.10ize py3_sphinxcontrib_applehelp

* python3.10ize py3_sphinxcontrib_devhelp

* python3.10ize py3_sphinxcontrib_htmlhelp

* python3.10ize py3_sphinxcontrib_jsmath

* python3.10ize py3_sphinxcontrib_qthelp

* python3.10ize py3_sphinxcontrib_serializinghtml

* python3.10ize py3_sqlalchemy

* python3.10ize py3_terminaltables

* python3.10ize py3_text_unidecode

* python3.10ize py3_toml

* python3.10ize py3_tox

* python3.10ize py3_typogrify

* python3.10ize py3_tzlocal

* python3.10ize py3_urllib3

* python3.10ize py3_urwid

* python3.10ize py3_virtualenv

* python3.10ize py3_wcwidth

* python3.10ize py3_werkzeug

* python3.10ize py3_wheel

* python3.10ize py3_xlrd

* python3.10ize py3_xlsxwriter

* python3.10ize py3_xmltodict

* python3.10ize py3_yamllint

* python3.10ize py3_zipp

* python3.10ize pygobject

* python3.10ize s3cmd

* python3.10ize speedtest_cli

* python3.10ize sphinx

* python3.10ize sshuttle

* python3.10ize textract

* python3.10ize thefuck

* python3.10ize urlwatch

* python3.10ize xcb_proto

* python3.10ize youtube_dl

* python3.10ize youtubedl

* Add initial x86_64 packages

* Add armv7l binaries

* fix duplicity version

* add x86_64 and armv7l binaries

* Add x86_64 llvm builds (note stage1 is needed to build main package).

* cairo libffi rebuild

* Add pygobject and wayland binary with version bump

* Add py3_libxml2

* add cairo builds

* add more binaries

* Add armv7l llvm_stage1 binaries

* llvm binaries for armv7l

* add more binaries

* add more libffi-ed x86_64 binaries

* Add more binaries

* add gjs

* add more armv7l builds

* add gnome libffi deps

* Add armv7l binaries

* update binaries for libffi, itstool, py3_pygments

* i686 test

* add more i686 binaries

* add llvm i686 patch

* Add i686 llvm binaries

* more i686 builds

* add more i686 builds

* add more i686 builds

* more i686

* Add i686 tesseract

* fix llvm for i686

* Add i686 ffmpeg

* replace i686 binary for glib

* add more gnutls builds

* Add armv7l gnutls

* add binaries

* Add meson 0.60.0

* Add i686 binary for gsettings_desktop_schemas

* Fix youtube_dl version number

* initial add of openmp (removed from llvm)

* fix openmp package

* update llvm and openmp

* mpv -> 0.34.0

* glib -> 2.70.1

* meson -> 0.60.1

* Update llvm for x86, armv7l building...

* Add new armv7l llvm build

* Add new i686 llvm build

* i686 llvm_stage1 rebuild

* vulkan -> 1.2.200

* add vulkan binaries

* glib -> 2.70.2

* pre-rebuild of wireshark which depends upon libffi

* add mesa and vulkan updates

* libcurl -> 7.80.0

* update binaries for c_ares libmaxminddb

* update libdrm

* update llvm, add new binaries for wireshark, libdrm

* add more fixed i686 binaries

* add llvm x86_64 binary

* update gtk4, add llvm build for i686

* rebuilds and i686 additions

* more i686 builds

* update cairo and add i686 build

* update libx11

* add llvm armv7l binary

* update mesa i686 binaey

* more i686 rebuilds

* update xorg_server builds

* update glib

* add glib dep to wireshark

* add i686 binary for libxcvt

* updates to remove iconv dep

* update ffmpeg

* add x86_64 rebuilds

* working ffmpeg 4.4.1

* add armv7l builds

* Add python abimap (needed by libssh)

* add binaries for py3_abimap

* add libx11 binaries

* add new builds

* add builds

* add i686 binaries

* add numpy armv7l binaries

* Add mypaint binaries

* use cmake for c_ares

* update xorg_cf_files

* fix curl for i686

* add libxcb binaries

* add armv7l oci_cli binaries

* add asciinema binaries

* add mutter comment about compat

* add mpv binary

* add armv7l binary

* Add more binaries

* add binaries for youtube_dl

* add note about gsd compatibility

* update xcb packages with armv7l binaries

* update packages, python -> 3.10.1

* Add explanation to curl postinstall

Co-authored-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: Satadru Pramanik <satadru@umich.edu>
2021-12-09 08:32:59 -06:00

133 lines
5.1 KiB
Ruby

require 'package'
class Mesa < Package
description 'Open-source implementation of the OpenGL specification'
homepage 'https://www.mesa3d.org'
@_ver = '21.3.1'
version @_ver
license 'MIT'
compatibility 'all'
source_url 'https://gitlab.freedesktop.org/mesa/mesa.git'
git_hashtag "mesa-#{@_ver}"
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/mesa/21.3.1_armv7l/mesa-21.3.1-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/mesa/21.3.1_armv7l/mesa-21.3.1-chromeos-armv7l.tpxz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/mesa/21.3.1_i686/mesa-21.3.1-chromeos-i686.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/mesa/21.3.1_x86_64/mesa-21.3.1-chromeos-x86_64.tpxz'
})
binary_sha256({
aarch64: '89bee7e209c8c9c60fbe8f8882c8bd82c0eb09286bd040c35d041900a5d3a5df',
armv7l: '89bee7e209c8c9c60fbe8f8882c8bd82c0eb09286bd040c35d041900a5d3a5df',
i686: 'ca35e6d0965cc934efb6073d6d787d35d9bd5bfed5638ab40a8165280b0e049e',
x86_64: 'fa4a3885c77713ec70588f24b27db1936254dcb6471a26c8b3fc4589bb6e5f97'
})
depends_on 'glslang' => :build
depends_on 'libdrm' # R
depends_on 'libomxil_bellagio' => :build
depends_on 'libunwind'
depends_on 'libvdpau' => :build
depends_on 'libx11' # R
depends_on 'libxcb' # R
depends_on 'libxdamage' => :build
depends_on 'libxext' # R
depends_on 'libxfixes' # R
depends_on 'libxrandr' # R
depends_on 'libxshmfence' # R
depends_on 'libxv' => :build
depends_on 'libxvmc' # R
depends_on 'libxv' # R
depends_on 'libxxf86vm' # R
# depends_on 'libva' => :build # Enable only during build to avoid circular dep.
depends_on 'llvm' => :build
depends_on 'lm_sensors' # R
depends_on 'py3_mako'
depends_on 'valgrind' => :build
depends_on 'vulkan_headers' => :build
depends_on 'vulkan_icd_loader' => :build
depends_on 'wayland_protocols' => :build
depends_on 'wayland' # R
def self.patch
case ARCH
when 'aarch64', 'armv7l'
# See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5067
@freedrenopatch = <<~FREEDRENOPATCHEOF
--- a/src/gallium/drivers/freedreno/freedreno_util.h 2021-08-05 14:40:22.000000000 +0000
+++ b/src/gallium/drivers/freedreno/freedreno_util.h 2021-08-05 19:52:53.115410668 +0000
@@ -44,6 +44,15 @@
#include "adreno_pm4.xml.h"
#include "disasm.h"
#{' '}
+#include <unistd.h>
+#include <sys/syscall.h>
+
+#ifndef SYS_gettid
+#error "SYS_gettid unavailable on this system"
+#endif
+
+#define gettid() ((pid_t)syscall(SYS_gettid))
+
#ifdef __cplusplus
extern "C" {
#endif
FREEDRENOPATCHEOF
File.write('freedreno.patch', @freedrenopatch)
system 'patch -Np1 -i freedreno.patch'
# See https://gitlab.freedesktop.org/mesa/mesa/-/issues/3505
@tegrapatch = <<~TEGRAPATCHEOF
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
index 48d81f197db..f9b7bd57b27 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
@@ -255,6 +255,10 @@ nvc0_validate_fb(struct nvc0_context *nvc0)
#{' '}
nvc0_resource_fence(res, NOUVEAU_BO_WR);
#{' '}
+ // hack to make opengl at least halfway working on a tegra k1
+ // see: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3505#note_627006
+ fb->zsbuf=NULL;
+
assert(!fb->zsbuf);
}
TEGRAPATCHEOF
File.write('tegra.patch', @tegrapatch)
system 'patch -Np1 -i tegra.patch'
end
# llvm 13 patch See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5455
# & https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13273.patch
system 'curl -OLf https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13273.patch'
system 'patch -Np1 -i 13273.patch'
end
def self.build
case ARCH
when 'i686'
@vk = 'intel,swrast'
@galliumdrivers = 'swrast,svga,virgl,swr,lima,zink'
@lto = CREW_MESON_FNO_LTO_OPTIONS
when 'aarch64', 'armv7l'
@vk = 'auto'
@galliumdrivers = 'auto'
@lto = CREW_MESON_OPTIONS
when 'x86_64'
@vk = 'auto'
@galliumdrivers = 'r300,r600,radeonsi,nouveau,virgl,svga,swrast,iris,crocus'
@lto = CREW_MESON_OPTIONS
end
system "meson #{@lto} \
-Db_asneeded=false \
-Dvulkan-drivers=#{@vk} \
-Dgallium-drivers=#{@galliumdrivers} \
-Dprefer-crocus=true \
builddir"
system 'meson configure builddir'
system 'samu -C builddir'
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} samu -C builddir install"
end
end