aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Gasc <gasc@eurecom.fr>2023-09-05 00:16:44 +0200
committerHenri Gasc <gasc@eurecom.fr>2023-09-05 08:56:13 +0200
commit9edd9e68ad840c30d246002beb19e97d89dd2b6b (patch)
tree8cb579ae0e0ca4da95c5a6deff958ae0897b85fa /dev-python
parentdev-python/pypandoc: add 1.4 (needed by dev-python/imgui) (diff)
downloadguru-9edd9e68ad840c30d246002beb19e97d89dd2b6b.tar.gz
guru-9edd9e68ad840c30d246002beb19e97d89dd2b6b.tar.bz2
guru-9edd9e68ad840c30d246002beb19e97d89dd2b6b.zip
dev-python/imgui: new package, add 2.0.0
Signed-off-by: Henri Gasc <gasc@eurecom.fr>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/imgui/Manifest2
-rw-r--r--dev-python/imgui/imgui-2.0.0.ebuild59
-rw-r--r--dev-python/imgui/metadata.xml21
3 files changed, 82 insertions, 0 deletions
diff --git a/dev-python/imgui/Manifest b/dev-python/imgui/Manifest
new file mode 100644
index 000000000..76592741d
--- /dev/null
+++ b/dev-python/imgui/Manifest
@@ -0,0 +1,2 @@
+DIST imgui-1.82.gh.tar.gz 1433525 BLAKE2B 2bdb34b020390ee36a23dc674dabbb946e048099f47492fe9ebc1f142e40ceb58a0b89e49b70d2db4e2929c50f127fd8a70519171cd9007f91db23ccdb24375d SHA512 210076c2b04c09e63a4924e1f874bfe240668f4d2656511c96dd5499efe04d795ad01d5af8e2aa2543849d3ca5ef1a6c6555a9232d4d92f95bf98c41e8505b58
+DIST imgui-2.0.0.gh.tar.gz 230722 BLAKE2B 298b169e0ee8cb3f4eadad151475f13226203c77eea2f517ca1209fd39cac6880c5ba247253b37fd676c14b6706151ee14b3e5d384dcac581a44c4ef537eda4f SHA512 30d81462829daab8d760bdae18e470a0bb781a05086c9e93d3c891e38df1a8451800d3118266f6938ee838c081b192697b8669eac8a404ed9497b923ac52fe34
diff --git a/dev-python/imgui/imgui-2.0.0.ebuild b/dev-python/imgui/imgui-2.0.0.ebuild
new file mode 100644
index 000000000..92b087ab5
--- /dev/null
+++ b/dev-python/imgui/imgui-2.0.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit distutils-r1
+
+IMGUI_VERSION="1.82" # The version of imgui that pyimgui is using
+
+DESCRIPTION="Cython-based Python bindings for dear imgui"
+HOMEPAGE="https://github.com/pyimgui/pyimgui https://pypi.org/project/imgui"
+SRC_URI="
+ https://github.com/pyimgui/pyimgui/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz
+ https://github.com/ocornut/imgui/archive/v${IMGUI_VERSION}.tar.gz -> imgui-${IMGUI_VERSION}.gh.tar.gz
+"
+S="${WORKDIR}/pyimgui-${PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="allegro glfw glut opengl sdl vulkan doc"
+
+RDEPEND="media-libs/imgui[bindings,allegro?,glfw?,glut?,opengl?,sdl?,vulkan?]"
+BDEPEND="
+ <dev-python/cython-3[${PYTHON_USEDEP}]
+ doc? (
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/pyopengl[${PYTHON_USEDEP}]
+ ~dev-python/pypandoc-1.4[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ )
+"
+
+src_unpack() {
+ default
+ rm -r "${S}/imgui-cpp"
+ mv "${WORKDIR}/imgui-${IMGUI_VERSION}" "${S}/imgui-cpp"
+}
+
+distutils_enable_tests pytest
+
+python_compile_all() {
+ use doc && emake man -C "${S}/doc"
+ use test && rm -rf "${S}/${PN}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ use doc && doman "${S}/doc/build/man/pyimgui.1"
+}
+
+python_test() {
+ epytest "${S}/tests" || die "Tests failed with ${EPYTHON}"
+}
diff --git a/dev-python/imgui/metadata.xml b/dev-python/imgui/metadata.xml
new file mode 100644
index 000000000..437a9ab21
--- /dev/null
+++ b/dev-python/imgui/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gasc@eurecom.fr</email>
+ <name>Gasc Henri</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">imgui</remote-id>
+ <remote-id type="github">pyimgui/pyimgui</remote-id>
+ <doc>https://pyimgui.readthedocs.io</doc>
+ </upstream>
+ <use>
+ <flag name="allegro">Enable allegro backend and renderer</flag>
+ <flag name="glfw">Enable glfw backend</flag>
+ <flag name="glut">Enable glut backen</flag>
+ <flag name="opengl">Enable opengl renderer</flag>
+ <flag name="sdl">Enable sdl backend</flag>
+ <flag name="vulkan">Enable vulkan renderer</flag>
+ </use>
+</pkgmetadata>