Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/apitrace/
Date: Sat, 18 Aug 2018 11:04:54
Message-Id: 1534590271.1a295b80fc9ad4e656be8df5b2cb7176949a7b5e.asturm@gentoo
1 commit: 1a295b80fc9ad4e656be8df5b2cb7176949a7b5e
2 Author: EoD <EoD <AT> xmw <DOT> de>
3 AuthorDate: Sat Aug 18 10:19:24 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 18 11:04:31 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a295b80
7
8 dev-util/apitrace: Enforce non-gles2 USE-dep on Qt
9
10 Closes: https://bugs.gentoo.org/594066
11 Package-Manager: Portage-2.3.47, Repoman-2.3.10
12
13 dev-util/apitrace/apitrace-7.1-r1.ebuild | 97 ++++++++++++++++++++++++++++++++
14 1 file changed, 97 insertions(+)
15
16 diff --git a/dev-util/apitrace/apitrace-7.1-r1.ebuild b/dev-util/apitrace/apitrace-7.1-r1.ebuild
17 new file mode 100644
18 index 00000000000..63879492cc7
19 --- /dev/null
20 +++ b/dev-util/apitrace/apitrace-7.1-r1.ebuild
21 @@ -0,0 +1,97 @@
22 +# Copyright 1999-2018 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI="5"
26 +
27 +PYTHON_COMPAT=( python2_7 )
28 +inherit cmake-multilib eutils python-single-r1
29 +
30 +DESCRIPTION="A tool for tracing, analyzing, and debugging graphics APIs"
31 +HOMEPAGE="https://github.com/apitrace/apitrace"
32 +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
33 +
34 +LICENSE="MIT"
35 +LICENSE+=" BSD CC-BY-3.0 CC-BY-4.0 public-domain" #bundled snappy
36 +SLOT="0"
37 +KEYWORDS="~amd64 ~arm ~x86"
38 +IUSE="+cli egl qt5 system-snappy"
39 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
40 +
41 +RDEPEND="${PYTHON_DEPS}
42 + >=sys-devel/gcc-4.7:*
43 + system-snappy? ( >=app-arch/snappy-1.1.1[${MULTILIB_USEDEP}] )
44 + >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
45 + >=media-libs/mesa-9.1.6[egl?,${MULTILIB_USEDEP}]
46 + media-libs/libpng:0=
47 + sys-process/procps
48 + x11-libs/libX11
49 + egl? (
50 + >=media-libs/mesa-8.0[gles1,gles2]
51 + media-libs/waffle[egl]
52 + )
53 + qt5? (
54 + dev-qt/qtcore:5
55 + dev-qt/qtgui:5[-gles2]
56 + dev-qt/qtnetwork:5
57 + dev-qt/qtwebkit:5
58 + dev-qt/qtwidgets:5[-gles2]
59 + )"
60 +DEPEND="${RDEPEND}"
61 +
62 +PATCHES=(
63 + "${FILESDIR}"/${PN}-7.1-glxtrace-only.patch
64 + "${FILESDIR}"/${PN}-7.1-disable-multiarch.patch
65 + "${FILESDIR}"/${PN}-7.1-docs-install.patch
66 + "${FILESDIR}"/${PN}-7.1-snappy-license.patch
67 +)
68 +
69 +src_prepare() {
70 + cmake-utils_src_prepare
71 +
72 + # The apitrace code grubs around in the internal zlib structures.
73 + # We have to extract this header and clean it up to keep that working.
74 + # Do not be surprised if a zlib upgrade breaks things ...
75 + rm -rf "${S}"/thirdparty/{getopt,less,libpng,zlib,dxerr,directxtex,devcon} || die
76 + if use system-snappy ; then
77 + rm -rf "${S}"/thirdparty/snappy || die
78 + fi
79 +}
80 +
81 +src_configure() {
82 + my_configure() {
83 + mycmakeargs=(
84 + -DARCH_SUBDIR=
85 + $(cmake-utils_use_enable egl EGL)
86 + $(cmake-utils_use_enable !system-snappy STATIC_SNAPPY)
87 + )
88 + if multilib_is_native_abi ; then
89 + mycmakeargs+=(
90 + $(cmake-utils_use_enable cli CLI)
91 + $(cmake-utils_use_enable qt5 GUI)
92 + )
93 + else
94 + mycmakeargs+=(
95 + -DBUILD_LIB_ONLY=ON
96 + -DENABLE_CLI=OFF
97 + -DENABLE_GUI=OFF
98 + )
99 + fi
100 + cmake-utils_src_configure
101 + }
102 +
103 + multilib_parallel_foreach_abi my_configure
104 +}
105 +
106 +src_install() {
107 + cmake-multilib_src_install
108 +
109 + dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so
110 + dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1
111 + dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1.2
112 +
113 + rm docs/INSTALL.markdown
114 + dodoc docs/* README.markdown
115 +
116 + exeinto /usr/$(get_libdir)/${PN}/scripts
117 + doexe $(find scripts -type f -executable)
118 +}