From nobody Fri Jan 20 19:49:20 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nz9753D1Yz2v758; Fri, 20 Jan 2023 19:49:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nz9750wBPz3Hrx; Fri, 20 Jan 2023 19:49:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674244161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6dQ6y7iWnocYzPh6A70kNYxj5qALmAN7NfhUXfiXBGM=; b=UxT63U5u8pqrEONcvoURzIe0OqoG987w2hgoOPHQwFUiyd9+W2BXPAHrmU+QpduQ+8oFyd DPlXLlcXYApEw/AP6x6hYTMAOaZtTHvc5qwe4Tx1q+jFkInXBSOuyQz9ITl0VKlu/VhBY+ o4Um928LrQZOvEPZwFtcrJo/nPsK7AYnwes3PepaDZ4o9tFyv3/JXzIIAw4jEcKJbTOhP3 +qWkA6IQfgcLpKt6FtQJT49O1GlUyccAWeGNIxaSxKC/5Wgr4BywS0nlmx7S4E+KWYaz35 kHUum5aNXS1cY5I6WF8H5ID/NQ9hyxa75QZGcqXJjOYWh/DSqVkBlfaK+k4AVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674244161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6dQ6y7iWnocYzPh6A70kNYxj5qALmAN7NfhUXfiXBGM=; b=GHuoMozDNRV+CuPcD+F1s17ipiaB3XTIm7LJ5GKSS6FNjHLY6SRK0NmxrfoobU6gUZJvnj Qq7828MeGfnFipXf3r4K+1vZ/aN1BAOJjy7TUmdW/4XVPXfoTGzktnmqXbbc7rw2m7O5kx x19E6pg9fCc+/NtbkowD9PXNw7PBKlv8B8CGDhkirhmIxpv4fvpVhkzsxy2MzzwhYFMTYD NiU8Zy7IZGQu5byGnGaL7CG8d8koXEZ3QdxEfTvZmkwia/JVunrUVgrWjRqfS3jHwawBCE ksRlKctE2ZozG05PsUAcGE3v+lhPPM9hkXFZ5a2DoHCfLnxL0VSIafUyK1Y3Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674244161; a=rsa-sha256; cv=none; b=Hm+LHikKXiEhh6GTmJXWBZz+cUBLCjalEkBKMegV5XI+6As0/cexfW5fcRE2SOjgI4BZ2B ogJghwuYDoRgIDgY5080fCSpI5o2Jg1d8BbHaJBE1zzZtPwGcRizmiRK871EDSkDoOBFU8 RCIFFZ37WoWN+OXaLPbRamJMAKPNHOpLrmfOJSeBeCCZE1+MVPRtb8diJgD4glT0IeiXaB kWuBBw/LYaNMFcjEA5b+qPKWYfg+WgrhhlkPG019jbrL5VaX7SkNbTrLlDqMoDdLdoIYVl RYrCDn+Mn2vdijrXKt7m89UyRJIcNjvWXHmI4LPtN952/THeEiGZEaE/Gpk39g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nz9746zWFzj1n; Fri, 20 Jan 2023 19:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KJnKd5043779; Fri, 20 Jan 2023 19:49:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KJnKD1043778; Fri, 20 Jan 2023 19:49:20 GMT (envelope-from git) Date: Fri, 20 Jan 2023 19:49:20 GMT Message-Id: <202301201949.30KJnKD1043778@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: de388e576961 - main - graphics/py-glcontext: New port: Portable OpenGL context for Python List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de388e576961501429ee507ea3f5e8d4bd27e363 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=de388e576961501429ee507ea3f5e8d4bd27e363 commit de388e576961501429ee507ea3f5e8d4bd27e363 Author: Yuri Victorovich AuthorDate: 2023-01-20 16:09:03 +0000 Commit: Yuri Victorovich CommitDate: 2023-01-20 19:49:17 +0000 graphics/py-glcontext: New port: Portable OpenGL context for Python --- graphics/Makefile | 1 + graphics/py-glcontext/Makefile | 31 ++++++++++++++++++++++ graphics/py-glcontext/distinfo | 3 +++ .../py-glcontext/files/patch-glcontext_egl.cpp | 11 ++++++++ graphics/py-glcontext/pkg-descr | 5 ++++ 5 files changed, 51 insertions(+) diff --git a/graphics/Makefile b/graphics/Makefile index bb42c7d2230f..d01e41b1d6c0 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -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 diff --git a/graphics/py-glcontext/Makefile b/graphics/py-glcontext/Makefile new file mode 100644 index 000000000000..a208bdab9399 --- /dev/null +++ b/graphics/py-glcontext/Makefile @@ -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 diff --git a/graphics/py-glcontext/distinfo b/graphics/py-glcontext/distinfo new file mode 100644 index 000000000000..0f875aea5609 --- /dev/null +++ b/graphics/py-glcontext/distinfo @@ -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 diff --git a/graphics/py-glcontext/files/patch-glcontext_egl.cpp b/graphics/py-glcontext/files/patch-glcontext_egl.cpp new file mode 100644 index 000000000000..634ebae65fa7 --- /dev/null +++ b/graphics/py-glcontext/files/patch-glcontext_egl.cpp @@ -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); diff --git a/graphics/py-glcontext/pkg-descr b/graphics/py-glcontext/pkg-descr new file mode 100644 index 000000000000..814adbaff441 --- /dev/null +++ b/graphics/py-glcontext/pkg-descr @@ -0,0 +1,5 @@ +glcontext is a library providing OpenGL implementation for ModernGL on multiple +platforms: +* glcontext on github +* glcontext on pypi +* ModernGL