summaryrefslogtreecommitdiff
path: root/app-editors/qhexedit2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /app-editors/qhexedit2
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'app-editors/qhexedit2')
-rw-r--r--app-editors/qhexedit2/Manifest7
-rw-r--r--app-editors/qhexedit2/files/qhexedit2-0.8.6-sip.patch35
-rw-r--r--app-editors/qhexedit2/files/qhexedit2-0.8.6-sip5.patch82
-rw-r--r--app-editors/qhexedit2/files/qhexedit2-0.8.9-fix-crash.patch37
-rw-r--r--app-editors/qhexedit2/metadata.xml9
-rw-r--r--app-editors/qhexedit2/qhexedit2-0.8.6_p20190316-r2.ebuild106
-rw-r--r--app-editors/qhexedit2/qhexedit2-0.8.9_p20210525-r2.ebuild108
7 files changed, 382 insertions, 2 deletions
diff --git a/app-editors/qhexedit2/Manifest b/app-editors/qhexedit2/Manifest
index 305f2ad253f5..b3f676a72b4e 100644
--- a/app-editors/qhexedit2/Manifest
+++ b/app-editors/qhexedit2/Manifest
@@ -1,7 +1,12 @@
AUX qhexedit2-0.8.4-setup.py.patch 596 BLAKE2B 15a801d87d9f690aa354162cb4966b1b691da95f7d64926f1b2ab66bd7d1db29b208cfab0f0bbe0f8fb272d67328f1a5ffd84ceb9d7af3d457ed6cd2a7d27ec0 SHA512 2cabb09c9c6e819a43d434a813ce9eb9614c72a3687758a35f338067d9e02add657ed1feee614486c9dbcbca823a848aedc69f9ab42aabd9ebe414b645b0d67e
+AUX qhexedit2-0.8.6-sip.patch 1134 BLAKE2B a64403e077b388f7c95ec5feada3d07e7e027732cd03ae9703fba43bcbc96bb434ea6bf2b8050620404fc7129850fe6affa5bed44a8b22000f7adee782f5683f SHA512 23143fbc94ec2eab8c89b41ff1e1a7e432828881c337e3cd56c3f84ed9639f1c2aea76c4826ac318956cc672d4b770d22613f45c6f4473bf25ad2469b680a71b
+AUX qhexedit2-0.8.6-sip5.patch 2295 BLAKE2B 8a689da202adf6169ed34eb7c7fc0c824451f05f5030fa457a7bdef4ec079c8df7b688a91855d7fc98b96f9e112c98e1805233af19b42fbd570eab6ed3fafa33 SHA512 0bc8a18085e9f928026ae852820b5a2cd6f8bea56f6193359d05c439fea3eb71a6baf3cf529d5f8ea95b6d0a1c28a460dedf1430e06f56486be108402c213daf
+AUX qhexedit2-0.8.9-fix-crash.patch 1437 BLAKE2B 8a58e4dc74de1fb5120ea7fc53df92f07d38023dede7bd4e778c7ad1de22ac981269d28fc80c1c61b7a1e448a812b4452b5a9494d486b71ff07e2e1cd07ffa24 SHA512 e8abff741616cbaf842942ff426b7ce6e43e88cd42f5c3ad282b7654ba727cacb2d3eb197656769ff1b9ff9a819a7ef61df594a686b2b339f0b67c8cfc8b55df
AUX qhexedit2-0.8.9.patch 1135 BLAKE2B fb9c3c9a4fa01b6cba9b3ca12a1a1e82f1503663bb186835b56d2610145bf3c1e211ab31c705d55cc9f3e22312c566058b816c20a4a65c7d7a501bd05db3fb8f SHA512 934bd0422b539459b446fc6ea18806f9fe6f6e107822dc4a94150632fdef35b091ca309cb0a5b7eb96c325c4d71091314c89907ce6c6404e0a6d8ebd126c58c3
DIST qhexedit2-0.8.6_p20190316.tar.gz 355512 BLAKE2B a7edc8d05a7788f3a3f2202762ca3dc436cafbde1b1216ff1bb342055600a2e9d53c27fe324380331b8182904545c698106129238065cd2416d244fdfa176446 SHA512 4ef288c8a220c308d38c41fee83fe962e213cdfa448445ef73c3d2fe1952b68f2096732e78d2aa0a87eddd3cf2f47bed3e77807e12d2b7616c1447b3bf1b0e7d
DIST qhexedit2-0.8.9_p20210525.tar.gz 342178 BLAKE2B baffe5b5e1130476162f23a91420cc86675a162c39539c9f07685cecc82571817625202814006221f96b56e94c0325fd7a6d8f2294041b426054f809c9967bad SHA512 d8a5159433a1212085371473cc7a89c4888c6af6b1416a34e3ea9d1ef9ae19411af32bea2e2fb256a024d6f2d05c733d285314cfc17f37dae065d7407a9c0d2c
+EBUILD qhexedit2-0.8.6_p20190316-r2.ebuild 2284 BLAKE2B 0a3e943b1b04852de5e72c1ae34f4767ab04ac29c4e18e54148ea39201e367116fb99987b3d12228518b4f2013a37c29121a671c6decd32c24b0bd96cd1a9dc8 SHA512 4aca967f831c7774618f8e596e7b13b160e975b66ef23d4a1a9733a8fd6db0860ede6a1fb0b89d06270dcdcfda7bd7cd378fe9845a0632da5d7814eb3f2d3d3f
EBUILD qhexedit2-0.8.6_p20190316.ebuild 1878 BLAKE2B deb3b0b20fd1681443e3e05fec6d35006966f94613e6397940f08220db939b5240924929aaa6095670c590f9bebdd6857a517b45855fb1f7081202248e3abe63 SHA512 1722f81744db0e01ed78ca3f2ae664510fd11a5fc42db897a8bf2defd8f432a0c06470e19a70b365b6c31f625f7b793d45d131c089b3368a13ef6b549694930a
+EBUILD qhexedit2-0.8.9_p20210525-r2.ebuild 2370 BLAKE2B fdf16a540f1585f8ed620a5f209e6594a0f6ff2993a2c9503e4959a798cb4f3c8952345c14957e7551b4e6d1109b76910240f13c1faa3f07cf78dac1d1e9db18 SHA512 783dd4e2ee8e6b9e2f1ec47e22e64a80003bfa73e0c024e6f1e1ff8c7c0b443b3016372cf37dd5d6f56ec18d3f5dce4381f280d84769f74030c19eb80532bb47
EBUILD qhexedit2-0.8.9_p20210525.ebuild 1671 BLAKE2B e36e973b9137abda5736e5e9eba1c5f0a2396651315e86c4b6f91f499d5ccbcb2b64e9c552fc88503d62f8d28cdbbd80056680da8876b6e0a3cecfa17da68848 SHA512 d941ac5d83ccb9e1bee51a64397bb749416df4d7a363f88bf36c8108f565eee6d9399f3dc58266aeea0921137b8f8d4445041ce233ae154dba342b6c26dd0d26
-MISC metadata.xml 636 BLAKE2B a6f5b56c36f34d3906a135d7b2516bcbbfb47c13b01a98284b8a9d9e1de2cc2d46918459901c4c2b7984d7844c3d7b4fcc6631f0398b25a89e61be0edab80335 SHA512 2cce503a57e04e07b2160c1d3ae4118a7b73b059eab3defb2102b7da46cc39dae277ad01915240ca16349b8a094b1d4494f2267df2b8fb4bdd7d9a305ebadb8b
+MISC metadata.xml 877 BLAKE2B f7343c25b4643b468d75938b4af93a8e52e10ebb1bc774c3caada33d202d0ea938789bc9400584fc78098b05c7a029c9be781f37302ac8edf7cae40659f6d9a9 SHA512 897f7435ec755c6689192e762172fc02a10ea043d7ba2662eb88dd7db4856dbe82e95c3b7fed890ee6dd2f8b11a3dd77e25af4ec56b69cb7191c5805b31371b3
diff --git a/app-editors/qhexedit2/files/qhexedit2-0.8.6-sip.patch b/app-editors/qhexedit2/files/qhexedit2-0.8.6-sip.patch
new file mode 100644
index 000000000000..56ae97159030
--- /dev/null
+++ b/app-editors/qhexedit2/files/qhexedit2-0.8.6-sip.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/820473
+From bdb22d3542099d7e1933aaffa80e044375466914 Mon Sep 17 00:00:00 2001
+From: Huang Rui <vowstar@gmail.com>
+Date: Sat, 7 May 2022 14:49:35 +0800
+Subject: [PATCH] setup.py: fix pyqt_sip_dir on modern Linux distributions
+
+QtCore/QtCoremod.sip may be installed to:
+/usr/lib/python3.9/site-packages/PyQt5/bindings/QtCore/QtCoremod.sip
+See also: https://github.com/qgis/QGIS/blob/master/cmake/FindPyQt5.py
+
+Closes: https://bugs.gentoo.org/820473
+Signed-off-by: Huang Rui <vowstar@gmail.com>
+---
+ setup.py | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/setup.py b/setup.py
+index 1a0d912..1906a07 100644
+--- a/setup.py
++++ b/setup.py
+@@ -10,6 +10,14 @@
+
+ cfg = sipconfig.Configuration()
+ pyqt_sip_dir = cfg.default_sip_dir
++for p in (os.path.join(pyqt_sip_dir, "PyQt5"),
++ os.path.join(pyqt_sip_dir, "PyQt5-3"),
++ os.path.join(pyqt_sip_dir, "PyQt4"),
++ pyqt_sip_dir,
++ os.path.join(cfg.default_mod_dir, "PyQt5", "bindings")):
++ if os.path.exists(os.path.join(p, "QtCore", "QtCoremod.sip")):
++ pyqt_sip_dir = p
++ break
+
+ try:
+ import PyQt5
diff --git a/app-editors/qhexedit2/files/qhexedit2-0.8.6-sip5.patch b/app-editors/qhexedit2/files/qhexedit2-0.8.6-sip5.patch
new file mode 100644
index 000000000000..0cc134e32358
--- /dev/null
+++ b/app-editors/qhexedit2/files/qhexedit2-0.8.6-sip5.patch
@@ -0,0 +1,82 @@
+https://bugs.gentoo.org/820473
+https://bugs.gentoo.org/815133
+https://github.com/Simsys/qhexedit2/pull/137
+https://src.fedoraproject.org/rpms/qhexedit2/blob/rawhide/f/sip5.patch
+From ce17d35586de1b9fdc21e3f8450dd1d2b76d5bcc Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Mon, 18 Jan 2021 21:06:46 -0500
+Subject: [PATCH] Add support for building with sip 5
+
+---
+ project.py | 29 +++++++++++++++++++++++++++++
+ pyproject.toml | 14 ++++++++++++++
+ src/qhexedit.sip | 2 +-
+ 3 files changed, 44 insertions(+), 1 deletion(-)
+ create mode 100644 project.py
+ create mode 100644 pyproject.toml
+
+diff --git a/project.py b/project.py
+new file mode 100644
+index 0000000..c9ee67f
+--- /dev/null
++++ b/project.py
+@@ -0,0 +1,29 @@
++"""The build configuration file for QHexEdit, used by sip."""
++
++import os
++from os.path import abspath, join
++from sipbuild import Option
++from pyqtbuild import PyQtBindings, PyQtProject
++import PyQt5
++
++
++class QHexEditProject(PyQtProject):
++ """The QHexEdit Project class."""
++
++ def __init__(self):
++ super().__init__()
++ self.bindings_factories = [QHexEditBindings]
++
++ def update(self, tool):
++ """Allows SIP to find PyQt5 .sip files."""
++ super().update(tool)
++ self.sip_include_dirs.append(join(PyQt5.__path__[0], 'bindings'))
++
++
++class QHexEditBindings(PyQtBindings):
++ """The QHexEdit Bindings class."""
++
++ def __init__(self, project):
++ super().__init__(project, name='QHexEdit',
++ sip_file='qhexedit.sip',
++ qmake_QT=['widgets'])
+diff --git a/pyproject.toml b/pyproject.toml
+new file mode 100644
+index 0000000..b5edaa4
+--- /dev/null
++++ b/pyproject.toml
+@@ -0,0 +1,14 @@
++[build-system]
++requires = ["sip >=5, <7", "PyQt-builder >=1.1.0, <2", "PyQt5"]
++build-backend = "sipbuild.api"
++
++[tool.sip.metadata]
++name = "QHexEdit"
++version = "0.8.9"
++
++[tools.sip]
++abi-version = "12.8"
++project-factory = "pyqtbuild:PyQtProject"
++
++[tool.sip.project]
++sip-files-dir = "src"
+diff --git a/src/qhexedit.sip b/src/qhexedit.sip
+index f7db293..6d4ebae 100644
+--- a/src/qhexedit.sip
++++ b/src/qhexedit.sip
+@@ -1,4 +1,4 @@
+-%Module(name=qhexedit, version=1)
++%Module(name=qhexedit)
+
+ %Import QtCore/QtCoremod.sip
+ %Import QtGui/QtGuimod.sip
diff --git a/app-editors/qhexedit2/files/qhexedit2-0.8.9-fix-crash.patch b/app-editors/qhexedit2/files/qhexedit2-0.8.9-fix-crash.patch
new file mode 100644
index 000000000000..9c3099b06d28
--- /dev/null
+++ b/app-editors/qhexedit2/files/qhexedit2-0.8.9-fix-crash.patch
@@ -0,0 +1,37 @@
+https://github.com/Simsys/qhexedit2/pull/139
+From d314aab25eeab0db131fc87f20daf7c4ad587ee2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=E8=AF=B7=E5=8F=AB=E6=88=91=E8=88=B9=E9=95=BF?=
+ <38233142+thinkSJ@users.noreply.github.com>
+Date: Sat, 13 Nov 2021 18:35:25 +0800
+Subject: [PATCH] Update qhexedit.cpp
+
+crashed when press ctrl alt keys....
+---
+ src/qhexedit.cpp | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/src/qhexedit.cpp b/src/qhexedit.cpp
+index d7e532c..4137192 100644
+--- a/src/qhexedit.cpp
++++ b/src/qhexedit.cpp
+@@ -766,11 +766,15 @@ void QHexEdit::keyPressEvent(QKeyEvent *event)
+ (QApplication::keyboardModifiers() == Qt::GroupSwitchModifier))
+ {
+ /* Hex and ascii input */
+- int key;
+- if (_editAreaIsAscii)
+- key = (uchar)event->text().at(0).toLatin1();
+- else
+- key = int(event->text().at(0).toLower().toLatin1());
++ int key = 0;
++ QString text = event->text();
++ if (!text.isEmpty())
++ {
++ if (_editAreaIsAscii)
++ key = (uchar)text.at(0).toLatin1();
++ else
++ key = int(text.at(0).toLower().toLatin1());
++ }
+
+ if ((((key >= '0' && key <= '9') || (key >= 'a' && key <= 'f')) && _editAreaIsAscii == false)
+ || (key >= ' ' && _editAreaIsAscii))
diff --git a/app-editors/qhexedit2/metadata.xml b/app-editors/qhexedit2/metadata.xml
index 7db8b420f3d9..f7e7eb3ae5ad 100644
--- a/app-editors/qhexedit2/metadata.xml
+++ b/app-editors/qhexedit2/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person">
+ <email>vowstar@gmail.com</email>
+ <name>Huang Rui</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<use>
<flag name="gui">Install Qt5 hex editor</flag>
</use>
diff --git a/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316-r2.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316-r2.ebuild
new file mode 100644
index 000000000000..094aed04481c
--- /dev/null
+++ b/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316-r2.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit python-r1 qmake-utils
+
+EGIT_COMMIT="ba5af8616b3a6c916e718914225a483267c01356"
+DESCRIPTION="Hex editor library, Qt application written in C++ with Python bindings"
+HOMEPAGE="https://github.com/lancos/qhexedit2/"
+SRC_URI="https://github.com/lancos/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~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-sip5.patch" #820473
+)
+
+RDEPEND="
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ >=dev-python/PyQt5-5.15.6[gui,widgets,${PYTHON_USEDEP}]
+ ')
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ python? (
+ $(python_gen_cond_dep '
+ >=dev-python/PyQt-builder-1.10[${PYTHON_USEDEP}]
+ >=dev-python/sip-5:=[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
+
+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"
+}
+
+src_configure() {
+ eqmake5 src/qhexedit.pro
+ if use gui; then
+ cd example || die "can't cd example"
+ eqmake5 qhexedit.pro
+ fi
+}
+
+src_compile() {
+ emake
+ use gui && emake -C example
+ if use python; then
+ export PATH="$(qt5_get_bindir):${PATH}"
+ python_build() {
+ pushd "${S}" || die
+ sip-build || die
+ popd || die
+ }
+ python_foreach_impl run_in_build_dir python_build
+ fi
+}
+
+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() {
+ doheader src/*.h
+ dolib.so libqhexedit.so*
+ if use python; then
+ python_install() {
+ pushd "${S}"/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 doc/release.txt
+ fi
+}
diff --git a/app-editors/qhexedit2/qhexedit2-0.8.9_p20210525-r2.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.9_p20210525-r2.ebuild
new file mode 100644
index 000000000000..731f3fb8d1af
--- /dev/null
+++ b/app-editors/qhexedit2/qhexedit2-0.8.9_p20210525-r2.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit python-r1 qmake-utils
+
+EGIT_COMMIT="541139125be034b90b6811a84faa1413e357fd94"
+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/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~riscv 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-sip.patch" #820473
+ "${FILESDIR}/${PN}-0.8.6-sip5.patch" #820473
+ "${FILESDIR}/${PN}-0.8.9-fix-crash.patch"
+)
+
+RDEPEND="
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ >=dev-python/PyQt5-5.15.6[gui,widgets,${PYTHON_USEDEP}]
+ ')
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ python? (
+ $(python_gen_cond_dep '
+ >=dev-python/PyQt-builder-1.10[${PYTHON_USEDEP}]
+ >=dev-python/sip-5:=[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
+
+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"
+}
+
+src_configure() {
+ eqmake5 src/qhexedit.pro
+ if use gui; then
+ cd example || die "can't cd example"
+ eqmake5 qhexedit.pro
+ fi
+}
+
+src_compile() {
+ emake
+ use gui && emake -C example
+ if use python; then
+ export PATH="$(qt5_get_bindir):${PATH}"
+ python_build() {
+ pushd "${S}" || die
+ sip-build || die
+ popd || die
+ }
+ python_foreach_impl run_in_build_dir python_build
+ fi
+}
+
+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() {
+ doheader src/*.h
+ dolib.so libqhexedit.so*
+ if use python; then
+ python_install() {
+ pushd "${S}"/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 doc/release.txt
+ fi
+}