Skip to content

Commit

Permalink
[Tools][GTK][WPE] Add missing 'mesa-common-dev' dependency
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=260496

Reviewed by Carlos Alberto Lopez Perez.

267186@main requires dri.pkg but this file is only available if
'mesa-common-dev' is installed.

Besides, Debian 12 reported a runtime error because the file
'dri.pkg' no longer defines the variable 'libdir'. In case 'libdir' doesn't
exist, set 'libdir' to the parent dir of 'dridriverdir' fixes the issue.

* Tools/Scripts/generate-bundle:
* Tools/glib/dependencies/apt:

Canonical link: https://commits.webkit.org/267404@main
  • Loading branch information
dpino committed Aug 29, 2023
1 parent 5f45207 commit 8124fd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Tools/Scripts/generate-bundle
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,11 @@ class BundleCreator(object):
def _get_mesa_libraries(self):
mesa_library_names = ['libglapi', 'libEGL', 'libGL', 'libGLESv2', 'libGLX', 'libdrm', 'libgbm', 'libMesaOpenCL']
mesa_libraries = []
lib_dir_dri = self._get_pkg_config_var('dri', 'libdir')
try:
lib_dir_dri = self._get_pkg_config_var('dri', 'libdir')
except RuntimeError:
lib_dir_dri = os.path.dirname(self._get_pkg_config_var('dri', 'dridriverdir'))

# Some versions of the flatpak SDK ship the Mesa libraries into a non-standard path.
candidate_lib_dirs = [ lib_dir_dri, os.path.join(lib_dir_dri, 'GL/default/lib') ]
for lib_dir in candidate_lib_dirs:
Expand Down
1 change: 1 addition & 0 deletions Tools/glib/dependencies/apt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ PACKAGES=(
$(aptIfExists libwpebackend-fdo-1.0-dev)
libxml2-utils
libxslt1-dev
mesa-common-dev
ninja-build
patch
ruby
Expand Down

0 comments on commit 8124fd9

Please sign in to comment.