blob: 6c44b02396a19682df0a236aba457037a7ac3dbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit qmake-utils toolchain-funcs virtualx
DESCRIPTION="A public API for QZip in an easy to use module"
HOMEPAGE="https://github.com/nezticle/qtcompress"
MY_COMMIT="23f8831826cd72aedf99fc3699148b6c994fd677"
SRC_URI="https://github.com/nezticle/qtcompress/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/qtcompress-${MY_COMMIT}"
LICENSE="|| ( LGPL-2.1 GPL-3 ) FDL-1.3"
SLOT="0/5.11.0"
KEYWORDS="amd64 ppc ppc64 ~riscv x86"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-qt/qtcore:5
sys-libs/zlib
"
DEPEND="
${RDEPEND}
test? ( dev-qt/qttest:5 )
"
BDEPEND="
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}/${P}-remove-zlib.patch"
"${FILESDIR}/${P}-test-include.patch"
"${FILESDIR}/${P}-nogui.patch"
)
src_prepare() {
default
# qtcompress is bundling its own zlib, remove it
rm -r src/3rdparty/ || die
}
src_configure() {
local pkg_config="$(tc-getPKG_CONFIG)"
eqmake5 \
"INCLUDEPATH+=$("${pkg_config}" --cflags zlib)" \
"LIBS+=$("${pkg_config}" --libs zlib)"
}
src_test() {
cd tests/auto/unit || die
eqmake5 \
"INCLUDEPATH+=${S}/src/compress"
emake
virtx qzip/target_wrapper.sh qzip/tst_qzip
}
src_install() {
emake INSTALL_ROOT="${D}" install
rm "${ED}/usr/$(get_libdir)/libQt5Compress.la" || die
insinto /usr/include/qt5/QtCompress
doins src/compress/{qzipreader.h,qzipwriter.h,qtcompressglobal.h}
}
|