summaryrefslogtreecommitdiff
path: root/app-editors/qhexedit2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-05 20:45:13 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-05 20:45:13 +0000
commit8fcdcec5fbdd0e3a77391e4f354218014f59f358 (patch)
treeb6aaf9c103052f2ab4a948377142f4a4233caa60 /app-editors/qhexedit2
parent423d21dcfee183cc4b04d29c1621615e8c30f834 (diff)
gentoo resync : 05.01.2018
Diffstat (limited to 'app-editors/qhexedit2')
-rw-r--r--app-editors/qhexedit2/Manifest5
-rw-r--r--app-editors/qhexedit2/files/qhexedit2-0.8.4-fixtest.patch12
-rw-r--r--app-editors/qhexedit2/files/qhexedit2-0.8.4-setup.py.patch11
-rw-r--r--app-editors/qhexedit2/metadata.xml33
-rw-r--r--app-editors/qhexedit2/qhexedit2-0.8.4.ebuild83
5 files changed, 144 insertions, 0 deletions
diff --git a/app-editors/qhexedit2/Manifest b/app-editors/qhexedit2/Manifest
new file mode 100644
index 000000000000..3fa413f482e6
--- /dev/null
+++ b/app-editors/qhexedit2/Manifest
@@ -0,0 +1,5 @@
+AUX qhexedit2-0.8.4-fixtest.patch 479 BLAKE2B 1359815f0c072a4f8a036b8168796e22f8522c5e311220d6dd76b12df5c138693582f26a9d09ab33ca5e10a1e9d8dd6bb7b668d6bee09785b163dee6048a39af SHA512 6f72dc45c91da43a27bb66f7a81f33f810eef45711e6d84675bf761dda3a296aca7931e955526504c53a173a6ef65ef4712f378f8d4a1fbdd2437829aa2f49e6
+AUX qhexedit2-0.8.4-setup.py.patch 596 BLAKE2B 15a801d87d9f690aa354162cb4966b1b691da95f7d64926f1b2ab66bd7d1db29b208cfab0f0bbe0f8fb272d67328f1a5ffd84ceb9d7af3d457ed6cd2a7d27ec0 SHA512 2cabb09c9c6e819a43d434a813ce9eb9614c72a3687758a35f338067d9e02add657ed1feee614486c9dbcbca823a848aedc69f9ab42aabd9ebe414b645b0d67e
+DIST qhexedit2-0.8.4.tar.gz 340766 BLAKE2B af24031fdd9f8d677f7e8ab8fd69667852dd971db30f5406b9aaaa08bf7f2dc692c87e99c141f355adc82c8226b5b29f53ce07ba63656d866f8688cb2cbc67f2 SHA512 8ed831d75c8ec1897dfd7ef497423908b26b0f56e6577928ed035654e52b437f64edd61cfcc1de6eaf5d1f29f9dc97da84d2edd7f427e3c09c9d75d7bc6504ff
+EBUILD qhexedit2-0.8.4.ebuild 1823 BLAKE2B 290507913c6189cba96885eb1105bdba20c629ea50a92df395607f29c81d9960bac52aa9e8b77cce7323dd359234de6dea901047671be4154202ffa21de81f62 SHA512 37b647971a9f64cb6878753716a3139abc4a59249192831dae5ef9b49d0d15eff01517cfaec7422b43e964ad965226162a8fbdfbe5200a47fc0aa499b9e9ba22
+MISC metadata.xml 1188 BLAKE2B c77c4946d1d0b30cb98d1aa5043ffdd97511687eac48a014d5393e4fb9728ec5e56a2e7e8616369ac2b13bb12439b66f963d48aa31a9d4d84120d98b2cd23250 SHA512 399c8e332a7eebad8a7eccaa555eadd29b2e8cf2a3fc5423eee9bcdda472581d341a683eef186519eb07c88305a6943687569e2ba2343d4b2bfeaaf3767064cd
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 000000000000..339ef99477ee
--- /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 000000000000..83d9183fcdbe
--- /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 000000000000..3f610e098d98
--- /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 000000000000..07dccd9847e6
--- /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
+}