mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
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:
parent
0b7ac384ca
commit
566def7f7a
2 changed files with 76 additions and 0 deletions
51
projects/github.com/anholt/libepoxy/package.yml
Normal file
51
projects/github.com/anholt/libepoxy/package.yml
Normal 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
|
25
projects/github.com/anholt/libepoxy/test.c
Normal file
25
projects/github.com/anholt/libepoxy/test.c
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue