Skip to content
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

Add libglvnd recipe #27107

Merged
merged 62 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5f6cae9
Add meta.yaml for libglvnd
traversaro Mar 30, 2024
13b321c
Create libglvnd_look_for_egl_icd_in_system_location.patch
traversaro Mar 30, 2024
74c4f7c
Add build.sh for libglvnd
traversaro Mar 30, 2024
c3c8ca1
Update meta.yaml
traversaro Mar 30, 2024
df1e9c9
Update meta.yaml
traversaro Mar 30, 2024
c4418b2
Update meta.yaml
traversaro Mar 30, 2024
e0d66b4
Add improvements
ehfd Jul 27, 2024
6aacdb1
Improve libglvnd
ehfd Jul 27, 2024
0d0e15a
Fix Meson options
ehfd Jul 27, 2024
c7a99da
Fix diff patch
ehfd Jul 27, 2024
05b2909
Restore previous patch
ehfd Jul 27, 2024
d22bf68
Fix paths for ICD
ehfd Jul 27, 2024
d5656f4
Change maintainer
ehfd Jul 27, 2024
82e5c39
Fix LicenseRef
ehfd Jul 27, 2024
4f51f7c
Change host dependency
ehfd Jul 27, 2024
c34cb84
Change dependencies
ehfd Jul 27, 2024
3e1586d
Clarify runtime dependency
ehfd Jul 27, 2024
c123024
Clarify dependencies
ehfd Jul 27, 2024
48a46af
Remove runtime dependencies
ehfd Jul 28, 2024
e19b5c7
Cosmetic edits
ehfd Jul 28, 2024
85633d6
Cosmetic edits
ehfd Jul 28, 2024
4c21ce7
Cosmetic edits
ehfd Jul 28, 2024
1168460
Cosmetic edits
ehfd Jul 28, 2024
c4b9eae
Change ICD priority
ehfd Jul 29, 2024
9cdeda9
Try multi-output recipe
ehfd Aug 3, 2024
738e1d1
Fix multi-output recipe
ehfd Aug 3, 2024
94e9ebb
Add run exports
ehfd Aug 3, 2024
50a0d0f
Try changing package name
ehfd Aug 3, 2024
82d7645
Changing topmost package does nothing
ehfd Aug 3, 2024
48a8757
Fix run exports
ehfd Aug 3, 2024
7685b39
Fix glob
ehfd Aug 3, 2024
7b61602
Specify feedstock name
hmaarrfk Aug 3, 2024
b442dd1
Add host dependencies
ehfd Aug 3, 2024
d4d4524
Try to add sysroot
ehfd Aug 3, 2024
82d8e42
Build recipe separately
ehfd Aug 3, 2024
8077cae
Revert back
ehfd Aug 3, 2024
362070d
Change the strategy
hmaarrfk Aug 3, 2024
7681ae1
Minor edits
ehfd Aug 4, 2024
6eaa4b3
cleanup a little more
hmaarrfk Aug 4, 2024
446c86a
Remove 1 line
hmaarrfk Aug 4, 2024
b3f8990
Apply suggestions to recipe organization for test sections
hmaarrfk Aug 5, 2024
5fda822
Add more jinja
hmaarrfk Aug 5, 2024
7c1d8ac
more jinja
h-vetinari Aug 5, 2024
6b621a7
do not require exact version match in pkg-config check (as versions d…
h-vetinari Aug 5, 2024
49cf06b
don't do flang
hmaarrfk Aug 5, 2024
44eb663
gldispatch doesn't have matching name for pkgconfig
h-vetinari Aug 5, 2024
d2bf7b7
Clarify dependencies
ehfd Aug 5, 2024
1f92ce4
Add comments
ehfd Aug 5, 2024
5bc3dbb
WIP split
isuruf Aug 5, 2024
6cd20fe
WIP 2
isuruf Aug 5, 2024
5d98859
Overhaul and split libraries
ehfd Aug 11, 2024
f9e72e9
Minor edit
ehfd Aug 11, 2024
3929544
Minor edit
ehfd Aug 11, 2024
358b035
Fix pkg-config
ehfd Aug 11, 2024
beff77e
Reduce build dependencies in install
ehfd Aug 11, 2024
5437847
Fix tests
ehfd Aug 11, 2024
f18a50e
Use Debian-like package structure
ehfd Aug 11, 2024
483b8c0
Fix clobbering files
ehfd Aug 11, 2024
35ad1fe
Prevent clobbering completely
ehfd Aug 11, 2024
746501d
Add comments
ehfd Aug 11, 2024
a209eb3
Make behavior even closer to Debian
ehfd Aug 11, 2024
ad04b5a
Remove libglvnd-core-devel
ehfd Aug 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions recipes/libglvnd/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
set -e -x

# Get meson to find pkg-config when cross compiling
export PKG_CONFIG="${BUILD_PREFIX}/bin/pkg-config"

meson setup builddir \
${MESON_ARGS} \
-Dasm=enabled \
-Dx11=enabled \
-Degl=true \
-Dglx=enabled \
-Dgles1=true \
-Dgles2=true \
-Dtls=true \
-Ddispatch-tls=true \
-Dheaders=true
meson configure builddir
ninja -v -C builddir
ninja -C builddir install
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')))
+ '/etc',
+ join_paths('/usr',get_option('datadir')))
endif

libEGL = shared_library(
320 changes: 320 additions & 0 deletions recipes/libglvnd/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,320 @@
{% set version = "1.7.0" %}

package:
name: libglvnd-split
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

requirements:
build:
- {{ compiler('c') }}
- {{ stdlib('c') }}
- meson
- pkg-config
- ninja
host:
- xorg-libx11
- xorg-libxext
- xorg-xextproto
- xorg-glproto

outputs:
- name: libglvnd
files:
- "lib/libGLdispatch.so.*"
requirements:
build:
- {{ stdlib('c') }}
test:
commands:
# Shared libraries (change in any SOVER means we need to react on run-export)
- test -f $PREFIX/lib/libGLdispatch.so.0

- name: libglvnd-devel
files:
- lib/libGLdispatch.so
- lib/pkgconfig/libglvnd.pc
- include/glvnd
build:
run_exports:
- {{ pin_subpackage('libglvnd', max_pin='x') }}
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libglvnd', exact=True) }}
run:
- {{ pin_subpackage('libglvnd', exact=True) }}
test:
requires:
- pkg-config
commands:
- pkg-config --print-errors libglvnd
- test -f $PREFIX/include/glvnd/GLdispatchABI.h
- test -f $PREFIX/include/glvnd/libeglabi.h
- test -f $PREFIX/include/glvnd/libglxabi.h

- name: libopengl
files:
- "lib/libOpenGL.so.*"
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libglvnd', exact=True) }}
run:
- {{ pin_subpackage('libglvnd', exact=True) }}
test:
commands:
# Shared libraries (change in any SOVER means we need to react on run-export)
- test -f $PREFIX/lib/libOpenGL.so.0

- name: libopengl-devel
files:
- lib/libOpenGL.so
- lib/pkgconfig/opengl.pc
build:
run_exports:
- {{ pin_subpackage('libopengl', max_pin='x') }}
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libopengl', exact=True) }}
run:
- {{ pin_subpackage('libopengl', exact=True) }}
test:
requires:
- pkg-config
commands:
- pkg-config --print-errors opengl

- name: libglx
files:
- "lib/libGLX.so.*"
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libglvnd', exact=True) }}
- xorg-libx11
run:
- {{ pin_subpackage('libglvnd', exact=True) }}
test:
commands:
# Shared libraries (change in any SOVER means we need to react on run-export)
- test -f $PREFIX/lib/libGLX.so.0

- name: libglx-devel
files:
- lib/libGLX.so
- lib/pkgconfig/glx.pc
- include/GL/glx.h
- include/GL/glxext.h
build:
run_exports:
- {{ pin_subpackage('libglx', max_pin='x') }}
ignore_run_exports_from:
# Only need the headers during development build
- xorg-libxext
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libglx', exact=True) }}
- xorg-libx11
- xorg-libxext
- xorg-xextproto
- xorg-glproto
run:
- {{ pin_subpackage('libglx', exact=True) }}
- xorg-xextproto
- xorg-glproto
hmaarrfk marked this conversation as resolved.
Show resolved Hide resolved
test:
requires:
- pkg-config
commands:
- pkg-config --print-errors glx
- test -f $PREFIX/include/GL/glx.h
- test -f $PREFIX/include/GL/glxext.h

- name: libgl
files:
- "lib/libGL.so.*"
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libglvnd', exact=True) }}
- {{ pin_subpackage('libglx', exact=True) }}
run:
- {{ pin_subpackage('libglvnd', exact=True) }}
- {{ pin_subpackage('libglx', exact=True) }}
test:
commands:
# Shared libraries (change in any SOVER means we need to react on run-export)
- test -f $PREFIX/lib/libGL.so.1

- name: libgl-devel
files:
- lib/libGL.so
- lib/pkgconfig/gl.pc
- include/GL/gl.h
- include/GL/glcorearb.h
- include/GL/glext.h
- include/KHR/khrplatform.h
build:
run_exports:
- {{ pin_subpackage('libgl', max_pin='x') }}
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libgl', exact=True) }}
- {{ pin_subpackage('libglx-devel', exact=True) }}
run:
- {{ pin_subpackage('libgl', exact=True) }}
- {{ pin_subpackage('libglx-devel', exact=True) }}
test:
requires:
- pkg-config
commands:
- pkg-config --print-errors gl
- test -f $PREFIX/include/GL/gl.h
- test -f $PREFIX/include/GL/glcorearb.h
- test -f $PREFIX/include/GL/glext.h
- test -f $PREFIX/include/KHR/khrplatform.h

- name: libegl
files:
- "lib/libEGL.so.*"
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libglvnd', exact=True) }}
run:
- {{ pin_subpackage('libglvnd', exact=True) }}
test:
commands:
# Shared libraries (change in any SOVER means we need to react on run-export)
- test -f $PREFIX/lib/libEGL.so.1

- name: libegl-devel
files:
- lib/libEGL.so
- lib/pkgconfig/egl.pc
- include/EGL
build:
run_exports:
- {{ pin_subpackage('libegl', max_pin='x') }}
ignore_run_exports_from:
# Only need the headers during development build
- libgl-devel
- xorg-libx11
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libegl', exact=True) }}
- {{ pin_subpackage('libgl-devel', exact=True) }}
- xorg-libx11
run:
- {{ pin_subpackage('libegl', exact=True) }}
- {{ pin_subpackage('libgl-devel', exact=True) }}
- xorg-libx11
test:
requires:
- pkg-config
commands:
- pkg-config --print-errors egl
- test -f $PREFIX/include/EGL/egl.h
- test -f $PREFIX/include/EGL/eglext.h
- test -f $PREFIX/include/EGL/eglplatform.h

- name: libgles
files:
- "lib/libGLESv1_CM.so.*"
- "lib/libGLESv2.so.*"
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libglvnd', exact=True) }}
run:
- {{ pin_subpackage('libglvnd', exact=True) }}
test:
commands:
# Shared libraries (change in any SOVER means we need to react on run-export)
- test -f $PREFIX/lib/libGLESv1_CM.so.1
- test -f $PREFIX/lib/libGLESv2.so.2

- name: libgles-devel
files:
- lib/libGLESv1_CM.so
- lib/libGLESv2.so
- lib/pkgconfig/glesv1_cm.pc
- lib/pkgconfig/glesv2.pc
- include/GLES
- include/GLES2
- include/GLES3
build:
run_exports:
- {{ pin_subpackage('libgles', max_pin='x') }}
ignore_run_exports_from:
# Only need the headers during development build
- libegl-devel
- libgl-devel
requirements:
build:
- {{ stdlib('c') }}
host:
- {{ pin_subpackage('libgles', exact=True) }}
- {{ pin_subpackage('libegl-devel', exact=True) }}
- {{ pin_subpackage('libgl-devel', exact=True) }}
run:
- {{ pin_subpackage('libgles', exact=True) }}
- {{ pin_subpackage('libegl-devel', exact=True) }}
- {{ pin_subpackage('libgl-devel', exact=True) }}
test:
requires:
- pkg-config
commands:
- pkg-config --print-errors glesv1_cm
- pkg-config --print-errors glesv2
- test -f $PREFIX/include/GLES/egl.h
- test -f $PREFIX/include/GLES/gl.h
- test -f $PREFIX/include/GLES/glext.h
- test -f $PREFIX/include/GLES/glplatform.h
- test -f $PREFIX/include/GLES2/gl2.h
- test -f $PREFIX/include/GLES2/gl2ext.h
- test -f $PREFIX/include/GLES2/gl2platform.h
- test -f $PREFIX/include/GLES3/gl3.h
- test -f $PREFIX/include/GLES3/gl31.h
- test -f $PREFIX/include/GLES3/gl32.h
- test -f $PREFIX/include/GLES3/gl3ext.h
- test -f $PREFIX/include/GLES3/gl3platform.h

about:
home: https://gitlab.freedesktop.org/glvnd/libglvnd
license: LicenseRef-libglvnd
license_file: README.md
summary: GL Vendor-Neutral Dispatch library

extra:
feedstock-name: libglvnd
recipe-maintainers:
- ehfd
- traversaro
- hmaarrfk
- h-vetinari
- isuruf