/[gentoo-x86]/dev-util/apitrace/apitrace-3.0-r1.ebuild
Gentoo

Contents of /dev-util/apitrace/apitrace-3.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Sep 4 07:44:52 2012 UTC (2 years, 1 month ago) by radhermit
Branch: MAIN
Changes since 1.2: +2 -7 lines
Use vcs-snapshot eclass.

(Portage version: 2.2.0_alpha124/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/apitrace/apitrace-3.0-r1.ebuild,v 1.2 2012/08/07 09:02:33 radhermit Exp $
4
5 EAPI="4"
6 PYTHON_DEPEND="2:2.6"
7
8 inherit cmake-utils eutils python multilib vcs-snapshot
9
10 DESCRIPTION="A tool for tracing, analyzing, and debugging graphics APIs"
11 HOMEPAGE="https://github.com/apitrace/apitrace"
12 SRC_URI="https://github.com/${PN}/${PN}/tarball/${PV} -> ${P}.tar.gz"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="egl multilib qt4"
18
19 RDEPEND="app-arch/snappy
20 media-libs/libpng
21 sys-libs/zlib
22 media-libs/mesa[egl?]
23 egl? ( || (
24 >=media-libs/mesa-8.0[gles1,gles2]
25 <media-libs/mesa-8.0[gles]
26 ) )
27 x11-libs/libX11
28 multilib? ( app-emulation/emul-linux-x86-baselibs )
29 qt4? (
30 >=x11-libs/qt-core-4.7:4
31 >=x11-libs/qt-gui-4.7:4
32 >=x11-libs/qt-webkit-4.7:4
33 >=dev-libs/qjson-0.5
34 )"
35 DEPEND="${RDEPEND}"
36
37 EMULTILIB_PKG="true"
38
39 PATCHES=(
40 "${FILESDIR}"/${P}-system-libs.patch
41 "${FILESDIR}"/${P}-glxtrace-only.patch
42 "${FILESDIR}"/${PN}-3.0-gcc47.patch
43 )
44
45 pkg_setup() {
46 python_set_active_version 2
47 }
48
49 src_prepare() {
50 base_src_prepare
51
52 # Workaround NULL DT_RPATH issues
53 sed -i -e "s/install (TARGETS/#\0/" gui/CMakeLists.txt || die
54 }
55
56 src_configure() {
57 for ABI in $(get_install_abis) ; do
58 mycmakeargs=(
59 $(cmake-utils_use_enable qt4 GUI)
60 $(cmake-utils_use_enable egl EGL)
61 )
62
63 if use multilib ; then
64 if [[ "${ABI}" != "${DEFAULT_ABI}" ]] ; then
65 mycmakeargs=(
66 -DBUILD_LIB_ONLY=ON
67 -DENABLE_GUI=OFF
68 $(cmake-utils_use_enable egl EGL)
69 )
70 fi
71 multilib_toolchain_setup ${ABI}
72 fi
73
74 CMAKE_BUILD_DIR="${WORKDIR}/${P}_build-${ABI}"
75 cmake-utils_src_configure
76 done
77 }
78
79 src_compile() {
80 for ABI in $(get_install_abis) ; do
81 use multilib && multilib_toolchain_setup ${ABI}
82 CMAKE_BUILD_DIR="${WORKDIR}/${P}_build-${ABI}"
83 cmake-utils_src_compile
84 done
85 }
86
87 src_install() {
88 dobin "${CMAKE_BUILD_DIR}"/{glretrace,apitrace}
89 use qt4 && dobin "${CMAKE_BUILD_DIR}"/qapitrace
90
91 for ABI in $(get_install_abis) ; do
92 CMAKE_BUILD_DIR="${WORKDIR}/${P}_build-${ABI}"
93 exeinto /usr/$(get_libdir)/${PN}/wrappers
94 doexe "${CMAKE_BUILD_DIR}"/wrappers/*.so
95 dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so
96 dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1
97 dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1.2
98 done
99
100 dodoc {BUGS,DEVELOPMENT,NEWS,README,TODO}.markdown
101
102 exeinto /usr/$(get_libdir)/${PN}/scripts
103 doexe $(find scripts -type f -executable)
104 }

  ViewVC Help
Powered by ViewVC 1.1.20