graphics/py-glcontext: New port: Portable OpenGL context for Python
This commit is contained in:
parent
e905d57f39
commit
de388e5769
|
@ -865,6 +865,7 @@
|
|||
SUBDIR += py-geopandas
|
||||
SUBDIR += py-giddy
|
||||
SUBDIR += py-gizeh
|
||||
SUBDIR += py-glcontext
|
||||
SUBDIR += py-glfw
|
||||
SUBDIR += py-glooey
|
||||
SUBDIR += py-gphoto2
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
PORTNAME= glcontext
|
||||
DISTVERSION= 2.3.7
|
||||
CATEGORIES= graphics
|
||||
#MASTER_SITES= PYPI # no tests
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= yuri@FreeBSD.org
|
||||
COMMENT= Portable OpenGL context for Python
|
||||
WWW= https://github.com/moderngl/glcontext
|
||||
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
|
||||
|
||||
USES= localbase python xorg
|
||||
USE_PYTHON= pep517 autoplist pytest
|
||||
USE_XORG= x11
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= moderngl
|
||||
|
||||
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
|
||||
TEST_WRKSRC= ${WRKSRC}/tests
|
||||
|
||||
post-install:
|
||||
@${STRIP_CMD} \
|
||||
${STAGEDIR}${PYTHON_SITELIBDIR}/glcontext/x11${PYTHON_EXT_SUFFIX}.so \
|
||||
${STAGEDIR}${PYTHON_SITELIBDIR}/glcontext/egl${PYTHON_EXT_SUFFIX}.so
|
||||
|
||||
.include <bsd.port.mk>
|
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1674242863
|
||||
SHA256 (moderngl-glcontext-2.3.7_GH0.tar.gz) = 91f649b1b7db6ebb66ca7c0ec5e032c9abd19975caeefb77c8fe063a401e7fe3
|
||||
SIZE (moderngl-glcontext-2.3.7_GH0.tar.gz) = 22254
|
|
@ -0,0 +1,11 @@
|
|||
--- glcontext/egl.cpp.orig 2023-01-20 19:29:43 UTC
|
||||
+++ glcontext/egl.cpp
|
||||
@@ -216,7 +216,7 @@ GLContext * meth_create_context(PyObject * self, PyObj
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- EGLDeviceEXT* devices = malloc(sizeof(EGLDeviceEXT) * num_devices);
|
||||
+ EGLDeviceEXT* devices = (EGLDeviceEXT*)malloc(sizeof(EGLDeviceEXT) * num_devices);
|
||||
if (!res->m_eglQueryDevicesEXT(num_devices, devices, &num_devices)) {
|
||||
PyErr_Format(PyExc_Exception, "eglQueryDevicesEXT failed (0x%x)", res->m_eglGetError());
|
||||
free(devices);
|
|
@ -0,0 +1,5 @@
|
|||
glcontext is a library providing OpenGL implementation for ModernGL on multiple
|
||||
platforms:
|
||||
* glcontext on github
|
||||
* glcontext on pypi
|
||||
* ModernGL
|
Loading…
Reference in New Issue