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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Mar 18 21:32:06 2012 UTC (2 years ago) by radhermit
Branch: MAIN
Changes since 1.1: +3 -2 lines
Fix build with zlib-1.2.6.

(Portage version: 2.2.0_alpha90/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-2.0-r1.ebuild,v 1.1 2011/12/15 07:28:36 radhermit Exp $
4
5 EAPI="4"
6 PYTHON_DEPEND="2:2.6"
7
8 inherit cmake-utils python multilib
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="multilib qt4"
18
19 RDEPEND="app-arch/snappy
20 media-libs/libpng
21 sys-libs/zlib
22 virtual/opengl
23 x11-libs/libX11
24 multilib? ( app-emulation/emul-linux-x86-baselibs )
25 qt4? (
26 >=x11-libs/qt-core-4.7:4
27 >=x11-libs/qt-gui-4.7:4
28 >=x11-libs/qt-webkit-4.7:4
29 >=dev-libs/qjson-0.5
30 )"
31 DEPEND="${RDEPEND}"
32
33 EMULTILIB_PKG="true"
34
35 PATCHES=(
36 "${FILESDIR}"/${P}-system-libs.patch
37 "${FILESDIR}"/${P}-glxtrace-only.patch
38 "${FILESDIR}"/${P}-zlib-1.2.6.patch
39 )
40
41 pkg_setup() {
42 python_set_active_version 2
43 }
44
45 src_unpack() {
46 unpack ${A}
47 mv *-${PN}-* "${S}"
48 }
49
50 src_prepare() {
51 base_src_prepare
52
53 # Workaround NULL DT_RPATH issues
54 sed -i -e "s/install (TARGETS/#\0/" gui/CMakeLists.txt || die
55 }
56
57 src_configure() {
58 for ABI in $(get_install_abis) ; do
59 mycmakeargs=( $(cmake-utils_use_enable qt4 GUI) )
60
61 if use multilib ; then
62 if [[ "${ABI}" != "${DEFAULT_ABI}" ]] ; then
63 mycmakeargs=( -DBUILD_LIB_ONLY=ON -DENABLE_GUI=OFF )
64 fi
65 multilib_toolchain_setup ${ABI}
66 fi
67
68 CMAKE_BUILD_DIR="${WORKDIR}/${P}_build-${ABI}"
69 cmake-utils_src_configure
70 done
71 }
72
73 src_compile() {
74 for ABI in $(get_install_abis) ; do
75 use multilib && multilib_toolchain_setup ${ABI}
76 CMAKE_BUILD_DIR="${WORKDIR}/${P}_build-${ABI}"
77 cmake-utils_src_compile
78 done
79 }
80
81 src_install() {
82 dobin "${CMAKE_BUILD_DIR}"/{glretrace,tracedump}
83 use qt4 && dobin "${CMAKE_BUILD_DIR}"/qapitrace
84
85 for ABI in $(get_install_abis) ; do
86 CMAKE_BUILD_DIR="${WORKDIR}/${P}_build-${ABI}"
87 dolib.so "${CMAKE_BUILD_DIR}"/glxtrace.so
88 done
89
90 dodoc {BUGS,NEWS,README,TODO}.markdown
91
92 exeinto /usr/share/${PN}/scripts
93 doexe scripts/*
94 }

  ViewVC Help
Powered by ViewVC 1.1.20