* [gentoo-commits] repo/gentoo:master commit in: app-editors/qhexedit2/files/, app-editors/qhexedit2/
@ 2018-01-04 19:07 Mikle Kolyada
0 siblings, 0 replies; 5+ messages in thread
From: Mikle Kolyada @ 2018-01-04 19:07 UTC (permalink / raw
To: gentoo-commits
commit: af2ab4a3e7880cb7a5605080e5c17a136d889765
Author: Victor <coyote <AT> bks <DOT> tv>
AuthorDate: Mon Jan 1 19:19:10 2018 +0000
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Thu Jan 4 19:06:54 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af2ab4a3
app-editors/qhexedit2: new package
QHexEdit is a hex editor widget written in C++ for the Qt5 framework.
Used by ponyprog2000.
Package-Manager: Portage-2.3.13, Repoman-2.3.3
Closes: https://github.com/gentoo/gentoo/pull/6728
app-editors/qhexedit2/Manifest | 1 +
.../qhexedit2/files/qhexedit2-0.8.4-fixtest.patch | 12 ++++
.../qhexedit2/files/qhexedit2-0.8.4-setup.py.patch | 11 +++
app-editors/qhexedit2/metadata.xml | 33 +++++++++
app-editors/qhexedit2/qhexedit2-0.8.4.ebuild | 83 ++++++++++++++++++++++
5 files changed, 140 insertions(+)
diff --git a/app-editors/qhexedit2/Manifest b/app-editors/qhexedit2/Manifest
new file mode 100644
index 00000000000..961c901f02e
--- /dev/null
+++ b/app-editors/qhexedit2/Manifest
@@ -0,0 +1 @@
+DIST qhexedit2-0.8.4.tar.gz 340766 BLAKE2B af24031fdd9f8d677f7e8ab8fd69667852dd971db30f5406b9aaaa08bf7f2dc692c87e99c141f355adc82c8226b5b29f53ce07ba63656d866f8688cb2cbc67f2 SHA512 8ed831d75c8ec1897dfd7ef497423908b26b0f56e6577928ed035654e52b437f64edd61cfcc1de6eaf5d1f29f9dc97da84d2edd7f427e3c09c9d75d7bc6504ff
diff --git a/app-editors/qhexedit2/files/qhexedit2-0.8.4-fixtest.patch b/app-editors/qhexedit2/files/qhexedit2-0.8.4-fixtest.patch
new file mode 100644
index 00000000000..339ef99477e
--- /dev/null
+++ b/app-editors/qhexedit2/files/qhexedit2-0.8.4-fixtest.patch
@@ -0,0 +1,12 @@
+--- qhexedit2-0.8.4/test/testchunks.cpp- 2017-01-17 02:32:54.000000000 +0300
++++ qhexedit2-0.8.4/test/testchunks.cpp 2018-01-03 21:34:24.988555308 +0300
+@@ -1,8 +1,7 @@
+ #include "testchunks.h"
+ #include <cstdlib>
+
+-
+-TestChunks::TestChunks(QTextStream &log, QString tName, int size, bool random, int saveFile)
++TestChunks::TestChunks(QTextStream &log, QString tName, int size, bool random, int saveFile): _chunks(nullptr)
+ {
+ char hex[] = "0123456789abcdef";
+ srand(0);
diff --git a/app-editors/qhexedit2/files/qhexedit2-0.8.4-setup.py.patch b/app-editors/qhexedit2/files/qhexedit2-0.8.4-setup.py.patch
new file mode 100644
index 00000000000..83d9183fcdb
--- /dev/null
+++ b/app-editors/qhexedit2/files/qhexedit2-0.8.4-setup.py.patch
@@ -0,0 +1,11 @@
+--- qhexedit2-0.8.4/setup.py- 2018-01-02 19:40:57.542961661 +0300
++++ qhexedit2-0.8.4/setup.py 2017-01-17 02:32:54.000000000 +0300
+@@ -98,7 +98,7 @@
+ lib + ".framework", "Headers")]
+ else:
+ if PyQt_Version == 'PyQt5':
+- for qt_inc_dir in ('/usr/include/qt', '/usr/include/x86_64-linux-gnu/qt5'):
++ for qt_inc_dir in ('/usr/include/qt', '/usr/include/qt5'):
+ include_dirs.append(qt_inc_dir)
+ include_dirs += [os.path.join(qt_inc_dir, lib) for lib in qt_libs]
+ libraries = ["Qt5" + lib[2:] for lib in qt_libs]
diff --git a/app-editors/qhexedit2/metadata.xml b/app-editors/qhexedit2/metadata.xml
new file mode 100644
index 00000000000..3f610e098d9
--- /dev/null
+++ b/app-editors/qhexedit2/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>coyote@bks.tv</email>
+ <name>Victor Kustov</name>
+ <description>Proxied-maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>zlogene@gentoo.org</email>
+ <name>Mikle Kolyada</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</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>
+ <longdescription lang="en">
+ QHexEdit is a hex editor widget written in C++ for the Qt5 framework.
+ It is a simple editor for binary data, and has bindings to PyQt
+ with python 2 and 3.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">lancos/qhexedit2</remote-id>
+ <remote-id type="github">Simsys/qhexedit2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-editors/qhexedit2/qhexedit2-0.8.4.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.4.ebuild
new file mode 100644
index 00000000000..07dccd9847e
--- /dev/null
+++ b/app-editors/qhexedit2/qhexedit2-0.8.4.ebuild
@@ -0,0 +1,83 @@
+# Copyright 2017-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_5,3_6} )
+
+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/lancos/${PN}/archive/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}/${P}-fixtest.patch"
+ "${FILESDIR}/${P}-setup.py.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[${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
+ if use gui; then
+ cd example || die "can't cd example"
+ emake
+ fi
+}
+
+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
+ use python && distutils-r1_src_install
+ use gui && dobin example/qhexedit
+ if use doc; then
+ dodoc -r doc/html
+ dodoc doc/release.txt
+ fi
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-editors/qhexedit2/files/, app-editors/qhexedit2/
@ 2021-10-27 6:50 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2021-10-27 6:50 UTC (permalink / raw
To: gentoo-commits
commit: ee9e38d91f1b2b4a225df9e4e8bc1d83391d4ba7
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 27 06:48:06 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 27 06:50:41 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee9e38d9
app-editors/qhexedit2: add SIP 5 patch
Good enough for Fedora.
Closes: https://bugs.gentoo.org/815133
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/qhexedit2-0.8.6_p20190316-sip5.patch | 82 +++++++++++++++++++++
.../qhexedit2/qhexedit2-0.8.6_p20190316-r1.ebuild | 86 ++++++++++++++++++++++
2 files changed, 168 insertions(+)
diff --git a/app-editors/qhexedit2/files/qhexedit2-0.8.6_p20190316-sip5.patch b/app-editors/qhexedit2/files/qhexedit2-0.8.6_p20190316-sip5.patch
new file mode 100644
index 00000000000..837c2af211f
--- /dev/null
+++ b/app-editors/qhexedit2/files/qhexedit2-0.8.6_p20190316-sip5.patch
@@ -0,0 +1,82 @@
+https://github.com/Simsys/qhexedit2/pull/137
+https://src.fedoraproject.org/rpms/qhexedit2/blob/rawhide/f/sip5.patch
+https://bugs.gentoo.org/815133
+
+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", "PyQt-builder", "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/qhexedit2-0.8.6_p20190316-r1.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316-r1.ebuild
new file mode 100644
index 00000000000..5fcee894a76
--- /dev/null
+++ b/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316-r1.ebuild
@@ -0,0 +1,86 @@
+# 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
+
+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 ~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}"
+
+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"
+ 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
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-editors/qhexedit2/files/, app-editors/qhexedit2/
@ 2022-05-13 20:04 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-05-13 20:04 UTC (permalink / raw
To: gentoo-commits
commit: 8759771fffe11541f3259bab8b305a0afd142f32
Author: Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Mon May 9 03:04:44 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 13 20:03:48 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8759771f
app-editors/qhexedit2: fix compile problem and add BDEPEND
sip-4 no longer supports the latest PyQt5 syntax,
so it needs to be changed to sip-5
Fix unable to find file "QtCore/QtCoremod.sip"
Switched the build system to use sip-build + PyQt-builder
Add dev-python/sip-5 as RDEPEND
New maintainer by Proxy Maint
Closes: https://bugs.gentoo.org/820473
Closes: https://bugs.gentoo.org/758260
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/25395
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../qhexedit2/files/qhexedit2-0.8.6-sip.patch | 35 +++++++
.../qhexedit2/files/qhexedit2-0.8.6-sip5.patch | 82 +++++++++++++++
.../files/qhexedit2-0.8.9-fix-crash.patch | 37 +++++++
app-editors/qhexedit2/metadata.xml | 9 +-
.../qhexedit2/qhexedit2-0.8.6_p20190316-r1.ebuild | 108 ++++++++++++++++++++
.../qhexedit2/qhexedit2-0.8.9_p20210525-r1.ebuild | 110 +++++++++++++++++++++
6 files changed, 380 insertions(+), 1 deletion(-)
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-r1.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316-r1.ebuild
new file mode 100644
index 000000000000..5a67a0db9e25
--- /dev/null
+++ b/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=standalone
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-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[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-r1.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.9_p20210525-r1.ebuild
new file mode 100644
index 000000000000..eb3f2601963f
--- /dev/null
+++ b/app-editors/qhexedit2/qhexedit2-0.8.9_p20210525-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=standalone
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-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[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
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-editors/qhexedit2/files/, app-editors/qhexedit2/
@ 2022-10-25 16:01 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2022-10-25 16:01 UTC (permalink / raw
To: gentoo-commits
commit: 63597fca97038e30c7e910c5debb8135b1feed15
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 25 15:31:24 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Oct 25 16:00:41 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63597fca
app-editors/qhexedit2: drop versions
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
app-editors/qhexedit2/Manifest | 1 -
app-editors/qhexedit2/files/qhexedit2-0.8.9.patch | 36 -------
.../qhexedit2/qhexedit2-0.8.6_p20190316-r2.ebuild | 106 ---------------------
.../qhexedit2/qhexedit2-0.8.6_p20190316.ebuild | 85 -----------------
.../qhexedit2/qhexedit2-0.8.9_p20210525.ebuild | 79 ---------------
5 files changed, 307 deletions(-)
diff --git a/app-editors/qhexedit2/Manifest b/app-editors/qhexedit2/Manifest
index cd73ea49b28c..98fe22b61571 100644
--- a/app-editors/qhexedit2/Manifest
+++ b/app-editors/qhexedit2/Manifest
@@ -1,2 +1 @@
-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
diff --git a/app-editors/qhexedit2/files/qhexedit2-0.8.9.patch b/app-editors/qhexedit2/files/qhexedit2-0.8.9.patch
deleted file mode 100644
index cabbd77ac843..000000000000
--- a/app-editors/qhexedit2/files/qhexedit2-0.8.9.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 1a0d912..646c359 100644
---- a/setup.py
-+++ b/setup.py
-@@ -98,7 +98,7 @@ if cfg.qt_framework:
- lib + ".framework", "Headers")]
- else:
- if PyQt_Version == 'PyQt5':
-- for qt_inc_dir in ('/usr/include/qt', '/usr/include/x86_64-linux-gnu/qt5'):
-+ for qt_inc_dir in ('/usr/include/qt', '/usr/include/qt5'):
- include_dirs.append(qt_inc_dir)
- include_dirs += [os.path.join(qt_inc_dir, lib) for lib in qt_libs]
- libraries = ["Qt5" + lib[2:] for lib in qt_libs]
-diff --git a/src/qhexedit.pro b/src/qhexedit.pro
-index 2a94016..55d7bc2 100644
---- a/src/qhexedit.pro
-+++ b/src/qhexedit.pro
-@@ -23,5 +23,7 @@ Release:TARGET = qhexedit
- Debug:TARGET = qhexeditd
-
-
--unix:DESTDIR = /usr/lib
- win32:DESTDIR = ../lib
-+
-+target.path = /usr/lib64
-+INSTALLS += target
-diff --git a/src/qhexedit.sip b/src/qhexedit.sip
-index 082621e..a7ef4e7 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/qhexedit2-0.8.6_p20190316-r2.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316-r2.ebuild
deleted file mode 100644
index 094aed04481c..000000000000
--- a/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316-r2.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# 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.6_p20190316.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316.ebuild
deleted file mode 100644
index c5e05a60e67c..000000000000
--- a/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-
-DISTUTILS_OPTIONAL=1
-
-inherit distutils-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"
-)
-
-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}"
-
-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"
- 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
-}
diff --git a/app-editors/qhexedit2/qhexedit2-0.8.9_p20210525.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.9_p20210525.ebuild
deleted file mode 100644
index 0818ddefb0cb..000000000000
--- a/app-editors/qhexedit2/qhexedit2-0.8.9_p20210525.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8,9,10} )
-
-#DISTUTILS_OPTIONAL=1
-#DISTUTILS_USE_PEP517=p
-
-inherit distutils-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.9.patch" )
-
-RDEPEND="
- dev-qt/qtcore:5
- dev-qt/qtgui:5
- dev-qt/qtwidgets:5
- python? (
- dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}]
- ${PYTHON_DEPS}
- )
-"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
-
-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
-}
-
-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*
- use python && distutils-r1_src_install
- 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
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-editors/qhexedit2/files/, app-editors/qhexedit2/
@ 2025-01-27 23:22 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2025-01-27 23:22 UTC (permalink / raw
To: gentoo-commits
commit: 2e8404ccfd0dc18a369484c95f2f0ee6108296e1
Author: Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Thu Jan 23 17:31:51 2025 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jan 27 22:47:05 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e8404cc
app-editors/qhexedit2: add 0.8.10
- remove QT5 support and fully update to QT6
- simplified the ebuild script, corrected the installation method,
and the related optimizations will be merged into the upstream
in the next version
https://github.com/Simsys/qhexedit2/pull/156
Closes: https://bugs.gentoo.org/948586
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40276
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
app-editors/qhexedit2/Manifest | 1 +
.../qhexedit2/files/qhexedit2-0.8.10-pyqt6.patch | 344 +++++++++++++++++++++
app-editors/qhexedit2/qhexedit2-0.8.10.ebuild | 98 ++++++
3 files changed, 443 insertions(+)
diff --git a/app-editors/qhexedit2/Manifest b/app-editors/qhexedit2/Manifest
index 98fe22b61571..e7d9991838fb 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.8.9_p20210525.tar.gz 342178 BLAKE2B baffe5b5e1130476162f23a91420cc86675a162c39539c9f07685cecc82571817625202814006221f96b56e94c0325fd7a6d8f2294041b426054f809c9967bad SHA512 d8a5159433a1212085371473cc7a89c4888c6af6b1416a34e3ea9d1ef9ae19411af32bea2e2fb256a024d6f2d05c733d285314cfc17f37dae065d7407a9c0d2c
diff --git a/app-editors/qhexedit2/files/qhexedit2-0.8.10-pyqt6.patch b/app-editors/qhexedit2/files/qhexedit2-0.8.10-pyqt6.patch
new file mode 100644
index 000000000000..295e4bf59a90
--- /dev/null
+++ b/app-editors/qhexedit2/files/qhexedit2-0.8.10-pyqt6.patch
@@ -0,0 +1,344 @@
+From 628d28efb12eb68747b9ee5a15cb14301dbf1c75 Mon Sep 17 00:00:00 2001
+From: Huang Rui <vowstar@gmail.com>
+Date: Thu, 23 Jan 2025 23:06:14 +0800
+Subject: [PATCH] Add PyQt6 support with backward compatibility
+
+- Implement Qt version checks in C++ for Q_UNREACHABLE compatibility
+- Add dynamic PyQt version detection (4/5/6) in build system
+- Bump pyproject.toml version to 0.8.10 and update documentation examples
+- Fix missing include `<optional>` in `example/main.cpp
+- Fix unix install path allows users to specify environment var in qmake
+
+Closes: https://github.com/Simsys/qhexedit2/issues/154
+Closes: https://github.com/Simsys/qhexedit2/issues/155
+Signed-off-by: Huang Rui <vowstar@gmail.com>
+---
+ example/main.cpp | 18 ++++++--
+ project.py | 27 +++++++++--
+ pyproject.toml | 4 +-
+ python/python3_pyqt6/mainwindow.py | 23 ++++++++++
+ readme.md | 8 ++--
+ setup.py | 72 ++++++++++++++++++++++--------
+ src/qhexedit.pro | 8 +++-
+ src/qhexedit.sip | 2 +
+ 8 files changed, 129 insertions(+), 33 deletions(-)
+ create mode 100644 python/python3_pyqt6/mainwindow.py
+
+diff --git a/example/main.cpp b/example/main.cpp
+index e09f89192707..76a5ecf74ca8 100644
+--- a/example/main.cpp
++++ b/example/main.cpp
+@@ -1,9 +1,10 @@
++#include <optional>
+ #include <QApplication>
+-#include <QIcon>
+ #include <QCommandLineParser>
+-#include <QTranslator>
+-#include <QLocale>
+ #include <QFile>
++#include <QIcon>
++#include <QLocale>
++#include <QTranslator>
+
+ #include "mainwindow.h"
+
+@@ -87,11 +88,20 @@ int main(int argc, char *argv[])
+
+ case Status::VersionRequested:
+ parser.showVersion();
++#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ Q_UNREACHABLE_RETURN(0);
+-
++#else
++ Q_UNREACHABLE();
++ return 0;
++#endif
+ case Status::HelpRequested:
+ parser.showHelp();
++#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ Q_UNREACHABLE_RETURN(0);
++#else
++ Q_UNREACHABLE();
++ return 0;
++#endif
+ }
+
+ if (query.hasFile)
+diff --git a/project.py b/project.py
+index c9ee67f7788b..807e92ac7a9e 100644
+--- a/project.py
++++ b/project.py
+@@ -4,8 +4,23 @@ import os
+ from os.path import abspath, join
+ from sipbuild import Option
+ from pyqtbuild import PyQtBindings, PyQtProject
+-import PyQt5
+
++try:
++ import PyQt6
++ PyQt_Version = 'PyQt6'
++except ImportError:
++ try:
++ import PyQt5
++ PyQt_Version = 'PyQt5'
++ except ImportError:
++ try:
++ import PyQt4
++ PyQt_Version = 'PyQt4'
++ except ImportError:
++ PyQt_Version = None
++
++if PyQt_Version is None:
++ raise ImportError("No compatible PyQt version (PyQt4, PyQt5, or PyQt6) found.")
+
+ class QHexEditProject(PyQtProject):
+ """The QHexEdit Project class."""
+@@ -15,9 +30,15 @@ class QHexEditProject(PyQtProject):
+ self.bindings_factories = [QHexEditBindings]
+
+ def update(self, tool):
+- """Allows SIP to find PyQt5 .sip files."""
++ """Allows SIP to find PyQt .sip files."""
+ super().update(tool)
+- self.sip_include_dirs.append(join(PyQt5.__path__[0], 'bindings'))
++ if PyQt_Version == 'PyQt6':
++ self.sip_include_dirs.append(join(PyQt6.__path__[0], 'bindings'))
++ elif PyQt_Version == 'PyQt5':
++ self.sip_include_dirs.append(join(PyQt5.__path__[0], 'bindings'))
++ else:
++ # unexpected and not supported here
++ raise ValueError(f"Unsupported PyQt version: {PyQt_Version}.")
+
+
+ class QHexEditBindings(PyQtBindings):
+diff --git a/pyproject.toml b/pyproject.toml
+index b5edaa495c31..3724f89027e6 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,10 +1,10 @@
+ [build-system]
+-requires = ["sip >=5", "PyQt-builder", "PyQt5"]
++requires = ["sip >=5", "PyQt-builder", "PyQt6"]
+ build-backend = "sipbuild.api"
+
+ [tool.sip.metadata]
+ name = "QHexEdit"
+-version = "0.8.9"
++version = "0.8.10"
+
+ [tools.sip]
+ abi-version = "12.8"
+diff --git a/python/python3_pyqt6/mainwindow.py b/python/python3_pyqt6/mainwindow.py
+new file mode 100644
+index 000000000000..b816a3103f81
+--- /dev/null
++++ b/python/python3_pyqt6/mainwindow.py
+@@ -0,0 +1,23 @@
++import sys
++from PyQt6 import QtWidgets
++from qhexedit import QHexEdit
++
++
++class HexEdit(QHexEdit):
++
++ def __init__(self, fileName=None):
++ super(HexEdit, self).__init__()
++ file = open(fileName, 'rb')
++ data = file.read()
++ self.setData(data)
++ self.setReadOnly(False)
++
++
++if __name__ == '__main__':
++ app = QtWidgets.QApplication(sys.argv)
++ mainWin = HexEdit('mainwindow.py')
++ mainWin.resize(600, 400)
++ mainWin.move(300, 300)
++ mainWin.show()
++ sys.exit(app.exec_())
++
+diff --git a/readme.md b/readme.md
+index 0a75a9c8752b..ebd138a650b4 100644
+--- a/readme.md
++++ b/readme.md
+@@ -3,7 +3,7 @@ QHexEdit2
+ 
+
+
+-QHexEdit is a hex editor widget written in C++ for the Qt (Qt4, Qt5) framework. It is a simple editor for binary data, just like QPlainTextEdit is for text data. There are sip configuration files included, so it is easy to create bindings for PyQt and you can use this widget also in python 2 and 3.
++QHexEdit is a hex editor widget written in C++ for the Qt (Qt4, Qt5, Qt6) framework. It is a simple editor for binary data, just like QPlainTextEdit is for text data. There are sip configuration files included, so it is easy to create bindings for PyQt and you can use this widget also in python 2 and 3.
+
+ QHexEdit takes the data of a QByteArray (setData()) and shows it. You can use the mouse or the keyboard to navigate inside the widget. If you hit the keys (0..9, a..f) you will change the data. Changed data is highlighted and can be accessed via data().
+
+@@ -16,7 +16,7 @@ QHexEdit comes with undo/redo functionality. All changes can be undone, by press
+ QHexEdit is based on QIODevice, that's why QHexEdit can handle big amounts of data. The size of edited data can be more then two gigabytes without any restrictions.
+
+ ## Using QHexEdit
+-You can read the documentation of the project [here](http://simsys.github.io/). You find in the sources a [C++ example](https://github.com/Simsys/qhexedit2/tree/master/example), that shows how tu use the QHexedit widget. There is also a [python example](https://github.com/Simsys/qhexedit2/tree/master/python/python3_pyqt5) available.
++You can read the documentation of the project [here](http://simsys.github.io/). You find in the sources a [C++ example](https://github.com/Simsys/qhexedit2/tree/master/example), that shows how tu use the QHexedit widget. There is also a [python example](https://github.com/Simsys/qhexedit2/tree/master/python/python3_pyqt6) available.
+
+ ## Contributing to QHexEdit
+ We love to receive contributions. You can submit bug reports [here](https://github.com/Simsys/qhexedit2/issues). If you are a developer, you can pick up a work item and start to realize super exciting features or fix bugs. We also like to receive enhancement proposals or translation support.
+@@ -25,8 +25,8 @@ We love to receive contributions. You can submit bug reports [here](https://gith
+ ```
+ Copyright (C) 2015-2016 Winfried Simon
+
+-This software may be used under the terms of the GNU Lesser General
+-Public License version 2.1 as published by the Free Software Foundation
++This software may be used under the terms of the GNU Lesser General
++Public License version 2.1 as published by the Free Software Foundation
+ and appearing in the file license.txt included in the packaging of this file.
+
+ This program is distributed in the hope that it will be useful,
+diff --git a/setup.py b/setup.py
+index 1906a07261f6..89622e8c3b8a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -8,23 +8,48 @@ import subprocess
+ import sipdistutils
+ import sipconfig
+
++try:
++ import PyQt6
++ PyQt_Version = 'PyQt6'
++except ImportError:
++ try:
++ import PyQt5
++ PyQt_Version = 'PyQt5'
++ except ImportError:
++ try:
++ import PyQt4
++ PyQt_Version = 'PyQt4'
++ except ImportError:
++ PyQt_Version = None
++
++if PyQt_Version is None:
++ raise ImportError("No compatible PyQt version (PyQt4, PyQt5, or PyQt6) found.")
++
+ 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
+- PyQt_Version = 'PyQt5'
+-except:
+- PyQt_Version = 'PyQt4'
++if PyQt_Version == 'PyQt6':
++ search_paths = [
++ os.path.join(pyqt_sip_dir, "PyQt6"),
++ os.path.join(cfg.default_mod_dir, "PyQt6", "bindings"),
++ pyqt_sip_dir,
++ ]
++elif PyQt_Version == 'PyQt5':
++ search_paths = [
++ os.path.join(pyqt_sip_dir, "PyQt5"),
++ os.path.join(pyqt_sip_dir, "PyQt5-3"),
++ os.path.join(cfg.default_mod_dir, "PyQt5", "bindings"),
++ pyqt_sip_dir,
++ ]
++else:
++ search_paths = [
++ os.path.join(pyqt_sip_dir, "PyQt4"),
++ pyqt_sip_dir,
++ ]
+
++for p in search_paths:
++ if os.path.exists(os.path.join(p, "QtCore", "QtCoremod.sip")):
++ pyqt_sip_dir = p
+
+ include_dirs = ['src']
+
+@@ -45,7 +70,9 @@ class build_pyqt_ext(sipdistutils.build_ext):
+ self.required = False
+
+ def finalize_options(self):
+- if PyQt_Version == 'PyQt5':
++ if PyQt_Version == 'PyQt6':
++ from PyQt6.QtCore import PYQT_CONFIGURATION
++ elif PyQt_Version == 'PyQt5':
+ from PyQt5.QtCore import PYQT_CONFIGURATION
+ else:
+ from PyQt4.QtCore import PYQT_CONFIGURATION
+@@ -94,7 +121,9 @@ class build_pyqt_ext(sipdistutils.build_ext):
+
+
+ # Used Qt libs
+-if PyQt_Version == 'PyQt5':
++if PyQt_Version == 'PyQt6':
++ qt_libs = ["QtCore", "QtGui", "QtWidgets"]
++elif PyQt_Version == 'PyQt5':
+ qt_libs = ["QtCore", "QtGui", "QtWidgets"]
+ else:
+ qt_libs = ["QtCore", "QtGui"]
+@@ -105,8 +134,13 @@ if cfg.qt_framework:
+ include_dirs += [os.path.join(cfg.qt_lib_dir,
+ lib + ".framework", "Headers")]
+ else:
+- if PyQt_Version == 'PyQt5':
+- for qt_inc_dir in ('/usr/include/qt', '/usr/include/x86_64-linux-gnu/qt5'):
++ if PyQt_Version == 'PyQt6':
++ for qt_inc_dir in ('/usr/include/qt', '/usr/include/qt6', '/usr/include/x86_64-linux-gnu/qt6'):
++ include_dirs.append(qt_inc_dir)
++ include_dirs += [os.path.join(qt_inc_dir, lib) for lib in qt_libs]
++ libraries = ["Qt6" + lib[2:] for lib in qt_libs]
++ elif PyQt_Version == 'PyQt5':
++ for qt_inc_dir in ('/usr/include/qt', '/usr/include/qt5', '/usr/include/x86_64-linux-gnu/qt5'):
+ include_dirs.append(qt_inc_dir)
+ include_dirs += [os.path.join(qt_inc_dir, lib) for lib in qt_libs]
+ libraries = ["Qt5" + lib[2:] for lib in qt_libs]
+@@ -122,7 +156,7 @@ dirname = os.path.dirname(__file__)
+
+ setup(
+ name='QHexEdit',
+- version='0.8.9',
++ version='0.8.10',
+ ext_modules=[
+ Extension(
+ "qhexedit",
+@@ -135,4 +169,4 @@ setup(
+ ],
+ cmdclass={"build_ext": build_pyqt_ext},
+ )
+-
++
+diff --git a/src/qhexedit.pro b/src/qhexedit.pro
+index 2a940163d0e6..39e400a17c19 100644
+--- a/src/qhexedit.pro
++++ b/src/qhexedit.pro
+@@ -23,5 +23,11 @@ Release:TARGET = qhexedit
+ Debug:TARGET = qhexeditd
+
+
+-unix:DESTDIR = /usr/lib
++unix {
++ # Allows users to specify parameters when running qmake
++ QHEXEDIT_DESTDIR = $$(QHEXEDIT_DESTDIR)
++ isEmpty(QHEXEDIT_DESTDIR): QHEXEDIT_DESTDIR = $$[QT_INSTALL_LIBS]
++ target.path = $$QHEXEDIT_DESTDIR
++ INSTALLS += target
++}
+ win32:DESTDIR = ../lib
+diff --git a/src/qhexedit.sip b/src/qhexedit.sip
+index a7ef4e75db5d..c76fa088867e 100644
+--- a/src/qhexedit.sip
++++ b/src/qhexedit.sip
+@@ -3,6 +3,8 @@
+ %Import QtCore/QtCoremod.sip
+ %Import QtGui/QtGuimod.sip
+
++%Timeline {Qt_4_0_0 Qt_5_0_0 Qt_6_0_0}
++
+ %If (Qt_5_0_0 -)
+ %Import QtWidgets/QtWidgetsmod.sip
+ %End
+--
+2.48.1
+
diff --git a/app-editors/qhexedit2/qhexedit2-0.8.10.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.10.ebuild
new file mode 100644
index 000000000000..8bccefc0be85
--- /dev/null
+++ b/app-editors/qhexedit2/qhexedit2-0.8.10.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+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} )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.8.10-pyqt6.patch"
+)
+
+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.10[${PYTHON_USEDEP}]
+ >=dev-python/sip-5:=[${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() {
+ pushd "${S}" || die
+ sip-build || 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 "${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
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-27 23:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04 19:07 [gentoo-commits] repo/gentoo:master commit in: app-editors/qhexedit2/files/, app-editors/qhexedit2/ Mikle Kolyada
-- strict thread matches above, loose matches on Subject: below --
2021-10-27 6:50 Sam James
2022-05-13 20:04 Sam James
2022-10-25 16:01 Andreas Sturmlechner
2025-01-27 23:22 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox