-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] Add recipe for libglvnd #25919
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ce3a152
Add meta.yaml for libglvnd
traversaro 5b393b6
Create libglvnd_look_for_egl_icd_in_system_location.patch
traversaro 31c3446
Add build.sh for libglvnd
traversaro 866b2a3
Update meta.yaml
traversaro f9bdff1
Update meta.yaml
traversaro 70ec408
Update meta.yaml
traversaro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#! /bin/bash | ||
|
||
set -ex | ||
|
||
# get meson to find pkg-config when cross compiling | ||
export PKG_CONFIG=$BUILD_PREFIX/bin/pkg-config | ||
|
||
meson ${MESON_ARGS} builddir --prefix=$PREFIX | ||
meson configure builddir | ||
ninja -v -C builddir | ||
ninja -C builddir install |
19 changes: 19 additions & 0 deletions
19
recipes/libglvnd/libglvnd_look_for_egl_icd_in_system_location.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/src/EGL/meson.build b/src/EGL/meson.build | ||
index c90f0ca..3cf618a 100644 | ||
--- a/src/EGL/meson.build | ||
+++ b/src/EGL/meson.build | ||
@@ -39,9 +39,12 @@ if host_machine.system() in ['haiku'] | ||
egl_vendor_config_dirs += ':/boot/system/non-packaged/add-ons/opengl/egl_vendor.d' | ||
egl_vendor_config_dirs += ':/boot/system/add-ons/opengl/egl_vendor.d' | ||
else | ||
+ # conda-forge specific patch: in conda-forge we do not ship any EGL implementation | ||
+ # as a conda-forge package, so we patch the DEFAULT_EGL_VENDOR_CONFIG_DIRS to point | ||
+ # to the system one, where we assume that glvnd is installed with /usr prefix | ||
egl_vendor_config_dirs = '@0@/glvnd/egl_vendor.d:@1@/glvnd/egl_vendor.d'.format( | ||
- join_paths(get_option('prefix'),get_option('sysconfdir')), | ||
- join_paths(get_option('prefix'),get_option('datadir'))) | ||
+ join_paths('/usr',get_option('sysconfdir')), | ||
+ join_paths('/usr',get_option('datadir'))) | ||
endif | ||
|
||
libEGL = shared_library( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{% set name = "libglvnd" %} | ||
{% set version = "1.7.0" %} | ||
|
||
package: | ||
name: {{ name }} | ||
version: {{ version }} | ||
|
||
source: | ||
- url: https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v{{ version }}/libglvnd-v{{ version }}.tar.bz2 | ||
sha256: d0e1925a3c9aee0143b8c181ac31d5637c8faa081759c277b8e16c7075612c11 | ||
patches: | ||
- libglvnd_look_for_egl_icd_in_system_location.patch | ||
|
||
build: | ||
skip: true # [not linux] | ||
number: 0 | ||
run_exports: | ||
- {{ pin_subpackage(name, max_pin='x') }} | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('c') }} | ||
- meson | ||
- pkg-config | ||
- ninja | ||
host: | ||
- xorg-libxext | ||
- xorg-libx11 | ||
- xorg-xorgproto | ||
- wayland-protocols | ||
|
||
test: | ||
commands: | ||
- test -f $PREFIX/lib/pkgconfig/gl.pc | ||
- test -f $PREFIX/include/GL/gl.h | ||
- test -f $PREFIX/lib/libGL.so.1 | ||
|
||
|
||
about: | ||
home: https://gitlab.freedesktop.org/glvnd/libglvnd | ||
license: LicenseRef-TODO-Sort-Out-Correct-License | ||
license_file: README.md | ||
summary: The GL Vendor-Neutral Dispatch library | ||
|
||
extra: | ||
recipe-maintainers: | ||
- traversaro |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gets resolved at build time to be either lib or lib64 correct? Wont this cause problems between Ubuntu and fedora
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fortunately not, this are not the directory that contains the libraries, but rather the directories that contains the
.json
configuration files containg ICD information, see https://github.com/NVIDIA/libglvnd/blob/master/src/EGL/icd_enumeration.md .So by default they should be
/usr/share/glvnd/egl_vendor.d
and/etc/glvnd/egl_vendor.d/
. To be honest, I need to actually check if/etc/glvnd/egl_vendor.d/
is working as intended, as it is not clear how/etc/glvnd/egl_vendor.d/
could emerge ifprefix
is/usr
, but/usr/share/glvnd/egl_vendor.d
is working fine and should be the same across Ubuntu and Fedora.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gitlab.freedesktop.org/glvnd/libglvnd/-/blob/v1.7.0/src/EGL/Makefile.am#L53
The autoconf makefile specifies this way.