commit:     b1954f0b14ff0203658ca936938f967f37f68095
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 27 06:50:35 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 27 06:50:42 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1954f0b

app-editors/qhexedit2: add 0.8.9

Closes: https://bugs.gentoo.org/758260
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-editors/qhexedit2/Manifest               |  1 +
 app-editors/qhexedit2/qhexedit2-0.8.9.ebuild | 81 ++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+)

diff --git a/app-editors/qhexedit2/Manifest b/app-editors/qhexedit2/Manifest
index 31427cf34c3..ac77a6c9696 100644
--- a/app-editors/qhexedit2/Manifest
+++ b/app-editors/qhexedit2/Manifest
@@ -1 +1,2 @@
 DIST qhexedit2-0.8.6_p20190316.tar.gz 355512 BLAKE2B 
a7edc8d05a7788f3a3f2202762ca3dc436cafbde1b1216ff1bb342055600a2e9d53c27fe324380331b8182904545c698106129238065cd2416d244fdfa176446
 SHA512 
4ef288c8a220c308d38c41fee83fe962e213cdfa448445ef73c3d2fe1952b68f2096732e78d2aa0a87eddd3cf2f47bed3e77807e12d2b7616c1447b3bf1b0e7d
+DIST qhexedit2-0.8.9.tar.gz 341341 BLAKE2B 
901cda2d28074bb535426102e40e0d5b6e68d3659b16ab4755b124de1f8a0ca878494e537f2c44b19dfc7bd9b9db499e74f66bd42301a73d12830486b7883d02
 SHA512 
db914adf7ab1226c652101b48a66b463c768447b96fe0b70ece060820c94dff9fbd91c6c3dbb16bb1df330f480662c15cc703e799ead9ec1580b825d2209f880

diff --git a/app-editors/qhexedit2/qhexedit2-0.8.9.ebuild 
b/app-editors/qhexedit2/qhexedit2-0.8.9.ebuild
new file mode 100644
index 00000000000..371993ff1e3
--- /dev/null
+++ b/app-editors/qhexedit2/qhexedit2-0.8.9.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+DISTUTILS_OPTIONAL=1
+inherit distutils-r1 qmake-utils
+
+DESCRIPTION="Hex editor library, Qt application written in C++ with Python 
bindings"
+HOMEPAGE="https://github.com/lancos/qhexedit2/";
+SRC_URI="https://github.com/Simsys/qhexedit2/archive/refs/tags/v${PV}.tar.gz 
-> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc +gui python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.8.4-setup.py.patch"
+       "${FILESDIR}/${PN}-0.8.6_p20190316-sip5.patch"
+)
+
+RDEPEND="
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5
+       dev-qt/qtwidgets:5
+       python? (
+               dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}]
+               >=dev-python/sip-5[${PYTHON_USEDEP}]
+               ${PYTHON_DEPS}
+       )
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+       default
+       sed -i -e '/^unix:DESTDIR/ d' -e "\$atarget.path = /usr/$(get_libdir)" \
+               -e "\$aINSTALLS += target" src/qhexedit.pro \
+               || die "src/qhexedit.pro: sed failed"
+       use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+       eqmake5 src/qhexedit.pro
+       if use gui; then
+               cd example || die "can't cd example"
+               eqmake5 qhexedit.pro
+       fi
+}
+
+src_compile() {
+       default
+       use python && distutils-r1_src_compile
+       use gui && emake -C example
+}
+
+python_compile() {
+       use python && distutils-r1_python_compile build_ext 
--library-dirs="${S}"
+}
+
+src_test() {
+       cd test || die "can't cd test"
+       mkdir logs || die "can't create logs dir"
+       eqmake5 chunks.pro
+       emake
+       ./chunks || die "test run failed"
+       grep -q "^NOK" logs/Summary.log && die "test failed"
+}
+
+src_install() {
+       emake INSTALL_ROOT="${D}" install
+       doheader src/*.h
+       use python && distutils-r1_src_install
+       use gui && dobin example/qhexedit
+       if use doc; then
+               dodoc -r doc/html
+               dodoc doc/release.txt
+       fi
+}

Reply via email to