github.com/anholt/libepoxy (#2334)

* github.com/anholt/libepoxy

* +x.org/x11: '*'

* meson args

* args

* remove --enable_egl

* egl=false

* test.c

* modified:   projects/github.com/anholt/libepoxy/package.yml

* +dri.freedesktop.org

* modified:   projects/github.com/anholt/libepoxy/package.yml

* sed

* test

* i _assume_ we're finding libGL here.

* +mesa

---------

Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
Andrew 2023-09-11 00:49:38 +03:00 committed by GitHub
parent 0b7ac384ca
commit 566def7f7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,51 @@
distributable:
url: https://github.com/anholt/libepoxy/archive/{{version}}.tar.gz
strip-components: 1
versions:
github: anholt/libepoxy
dependencies:
linux:
x.org/x11: '*'
mesa3d.org: '*'
build:
dependencies:
tea.xyz/gx/cc: c99
mesonbuild.com: '*'
ninja-build.org: '*'
freedesktop.org/pkg-config: '*'
python.org: ^3.1
working-directory: build
script:
- run: "sed -i'' -e 's|auto|no|g' $HOME/../meson_options.txt"
if: linux
- meson setup $ARGS ..
- ninja
- ninja install
env:
ARGS:
- --prefix="{{prefix}}"
- --libdir="{{prefix}}/lib"
- --buildtype=release
- --wrap-mode=nofallback
test:
dependencies:
freedesktop.org/pkg-config: '*'
tea.xyz/gx/cc: c99
env:
ARGS:
- -lepoxy
- -o test
darwin:
ARGS:
- -framework OpenGL
- -DOS_MAC
script:
- pkg-config --modversion epoxy | grep {{version}}
- cc test.c $ARGS
- ls -lh test
- ./test

View file

@ -0,0 +1,25 @@
#include <epoxy/gl.h>
#ifdef OS_MAC
#include <OpenGL/CGLContext.h>
#include <OpenGL/CGLTypes.h>
#include <OpenGL/OpenGL.h>
#endif
int main()
{
#ifdef OS_MAC
CGLPixelFormatAttribute attribs[] = {0};
CGLPixelFormatObj pix;
int npix;
CGLContextObj ctx;
CGLChoosePixelFormat( attribs, &pix, &npix );
CGLCreateContext(pix, (void*)0, &ctx);
#endif
glClear(GL_COLOR_BUFFER_BIT);
#ifdef OS_MAC
CGLReleasePixelFormat(pix);
CGLReleaseContext(pix);
#endif
return 0;
}