From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/qhexedit2/files/, app-editors/qhexedit2/
Date: Wed, 27 Oct 2021 06:50:51 +0000 (UTC) [thread overview]
Message-ID: <1635317441.ee9e38d91f1b2b4a225df9e4e8bc1d83391d4ba7.sam@gentoo> (raw)
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
+}
next reply other threads:[~2021-10-27 6:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 6:50 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-27 23:22 [gentoo-commits] repo/gentoo:master commit in: app-editors/qhexedit2/files/, app-editors/qhexedit2/ Andreas Sturmlechner
2022-10-25 16:01 Andreas Sturmlechner
2022-05-13 20:04 Sam James
2018-01-04 19:07 Mikle Kolyada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1635317441.ee9e38d91f1b2b4a225df9e4e8bc1d83391d4ba7.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox