diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
commit | 623ee73d661e5ed8475cb264511f683407d87365 (patch) | |
tree | 993eb27c93ec7a2d2d19550300d888fc1fed9e69 /app-editors/qhexedit2/qhexedit2-0.8.6_p20190316.ebuild | |
parent | ceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff) |
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'app-editors/qhexedit2/qhexedit2-0.8.6_p20190316.ebuild')
-rw-r--r-- | app-editors/qhexedit2/qhexedit2-0.8.6_p20190316.ebuild | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316.ebuild b/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316.ebuild new file mode 100644 index 000000000000..2378ef10d4d9 --- /dev/null +++ b/app-editors/qhexedit2/qhexedit2-0.8.6_p20190316.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) + +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" +) + +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}" + +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 +} |