commit:     af968047e6411575e9b9e0c8d0c209f1b6ef977d
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Tue Jan  6 04:05:09 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 11 02:51:54 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af968047

app-editors/qhexedit2: add 0.9.0

Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45266
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-editors/qhexedit2/Manifest               |   1 +
 app-editors/qhexedit2/qhexedit2-0.9.0.ebuild | 109 +++++++++++++++++++++++++++
 2 files changed, 110 insertions(+)

diff --git a/app-editors/qhexedit2/Manifest b/app-editors/qhexedit2/Manifest
index 33d7b0e1c8c5..84e32da47ebe 100644
--- a/app-editors/qhexedit2/Manifest
+++ b/app-editors/qhexedit2/Manifest
@@ -1 +1,2 @@
 DIST qhexedit2-0.8.10.tar.gz 353275 BLAKE2B 
475d718f5ed05bbfded5b38f42672decff09310b27964d9c1680212302ef8cd1a9cedadf9860cc5200bae78e7ac66d5cbd14ac139d91ed025b8228bd7836947f
 SHA512 
e245bea0f2edca69b821f6fcb64114f7307b536e1eaf15b3a05e4f50b7ea2038b64b4d3a3a1f1f56b76b0b570aae21ee3cc1497e2d43d5fd145029fe565c1c58
+DIST qhexedit2-0.9.0.tar.gz 375234 BLAKE2B 
21f5f29071bbdfb39d452ea26a6d8428f1214e7878708555792ab173e330b4f10048a1eb51b6ffe538df68b6653d7d995828e4a50708e81b0bd9cf6ecd090c1c
 SHA512 
b7ea5b8823b2a5b826ebf16e8a627372edcf58eac1ee5e430035efad338ab7e9ff8fb5f42a74a009131274b8c96fe615422884b1dcaa5af5b30ed798a6ffeaf5

diff --git a/app-editors/qhexedit2/qhexedit2-0.9.0.ebuild 
b/app-editors/qhexedit2/qhexedit2-0.9.0.ebuild
new file mode 100644
index 000000000000..b952aa258be9
--- /dev/null
+++ b/app-editors/qhexedit2/qhexedit2-0.9.0.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+inherit python-r1 qmake-utils
+
+DESCRIPTION="Hex editor library, Qt application written in C++ with Python 
bindings"
+HOMEPAGE="https://github.com/Simsys/qhexedit2/";
+SRC_URI="https://github.com/Simsys/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="doc +gui python"
+REQUIRED_USE="
+       python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+       dev-qt/qtbase:6[gui,widgets]
+       media-libs/libglvnd
+       python? (
+               ${PYTHON_DEPS}
+               $(python_gen_cond_dep '
+                       >=dev-python/pyqt6-6.8.0[gui,widgets,${PYTHON_USEDEP}]
+                       >=dev-python/pyqt6-sip-13.5:=[${PYTHON_USEDEP}]
+               ')
+       )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       python? (
+               $(python_gen_cond_dep '
+                       >=dev-python/pyqt-builder-1.17[${PYTHON_USEDEP}]
+                       >=dev-python/sip-6.9:=[${PYTHON_USEDEP}]
+               ')
+       )
+"
+
+src_configure() {
+       QHEXEDIT_DESTDIR="${S}" eqmake6 src/qhexedit.pro
+
+       if use gui; then
+               pushd example || die "can't pushd example"
+               eqmake6 qhexedit.pro
+       fi
+}
+
+src_compile() {
+       emake
+       use gui && emake -C example
+       if use python; then
+               export PATH="$(qt6_get_bindir):${PATH}"
+               python_build() {
+                       local build_dir="${BUILD_DIR}/python-build"
+                       mkdir -p "${build_dir}" || die
+                       cp -r "${S}"/src "${build_dir}/" || die
+                       cp "${S}"/license.txt "${build_dir}/" || die
+                       cp "${S}"/readme.md "${build_dir}/" || die
+                       cp "${S}"/python/pyqt6-pyproject.toml 
"${build_dir}/pyproject.toml" || die
+                       cp "${S}"/python/QHexEdit.sip "${build_dir}/" || die
+                       pushd "${build_dir}" || die
+                       # sip-build is not able to handle CFLAGS, CXXFLAGS and 
LDFLAGS
+                       # so we need to pass them as QMAKE_CFLAGS, 
QMAKE_CXXFLAGS and QMAKE_LFLAGS
+                       # https://bugs.gentoo.org/952787
+                       # https://bugs.gentoo.org/955165
+                       sip-build \
+                               --qmake-setting "QMAKE_CFLAGS += ${CFLAGS}" \
+                               --qmake-setting "QMAKE_CXXFLAGS += ${CXXFLAGS}" 
\
+                               --qmake-setting "QMAKE_LFLAGS += ${LDFLAGS}" \
+                               || die
+                       popd || die
+               }
+               python_foreach_impl run_in_build_dir python_build
+       fi
+}
+
+src_test() {
+       pushd test || die "can't pushd test"
+       mkdir logs || die "can't create logs dir"
+       eqmake6 chunks.pro
+       emake
+       ./chunks || die "test run failed"
+       grep -q "^NOK" logs/Summary.log && die "test failed"
+}
+
+src_install() {
+       doheader src/*.h
+       dolib.so libqhexedit.so*
+       if use python; then
+               python_install() {
+                       pushd "${BUILD_DIR}"/python-build/build || die
+                       emake INSTALL_ROOT="${D}" install
+                       popd || die
+               }
+               python_foreach_impl run_in_build_dir python_install
+       fi
+       if use gui; then
+               dobin example/qhexedit
+               insinto /usr/share/${PN}/
+               doins example/translations/*.qm
+       fi
+       if use doc; then
+               dodoc -r doc/html
+               dodoc changelog.md
+       fi
+}

Reply via email to