You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
2.5 KiB
109 lines
2.5 KiB
12 years ago
|
# Copyright 1999-2012 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
12 years ago
|
# $Header: /var/cvsroot/gentoo-x86/dev-util/apitrace/apitrace-3.0-r1.ebuild,v 1.1 2012/03/18 21:35:32 radhermit Exp $
|
||
13 years ago
|
|
||
12 years ago
|
EAPI="4"
|
||
|
PYTHON_DEPEND="2:2.6"
|
||
13 years ago
|
|
||
|
inherit cmake-utils eutils python multilib
|
||
|
|
||
|
DESCRIPTION="A tool for tracing, analyzing, and debugging graphics APIs"
|
||
|
HOMEPAGE="https://github.com/apitrace/apitrace"
|
||
|
SRC_URI="https://github.com/${PN}/${PN}/tarball/${PV} -> ${P}.tar.gz"
|
||
|
|
||
|
LICENSE="MIT"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
12 years ago
|
IUSE="egl multilib qt4"
|
||
13 years ago
|
|
||
12 years ago
|
RDEPEND="app-arch/snappy
|
||
|
media-libs/libpng
|
||
13 years ago
|
sys-libs/zlib
|
||
12 years ago
|
media-libs/mesa[egl?]
|
||
|
egl? ( || (
|
||
|
>=media-libs/mesa-8.0[gles1,gles2]
|
||
|
<media-libs/mesa-8.0[gles]
|
||
|
) )
|
||
13 years ago
|
x11-libs/libX11
|
||
|
multilib? ( app-emulation/emul-linux-x86-baselibs )
|
||
|
qt4? (
|
||
|
>=x11-libs/qt-core-4.7:4
|
||
|
>=x11-libs/qt-gui-4.7:4
|
||
|
>=x11-libs/qt-webkit-4.7:4
|
||
|
>=dev-libs/qjson-0.5
|
||
|
)"
|
||
12 years ago
|
DEPEND="${RDEPEND}"
|
||
13 years ago
|
|
||
|
EMULTILIB_PKG="true"
|
||
|
|
||
12 years ago
|
PATCHES=(
|
||
|
"${FILESDIR}"/${P}-system-libs.patch
|
||
|
"${FILESDIR}"/${P}-glxtrace-only.patch
|
||
|
)
|
||
|
|
||
13 years ago
|
pkg_setup() {
|
||
|
python_set_active_version 2
|
||
|
}
|
||
|
|
||
|
src_unpack() {
|
||
|
unpack ${A}
|
||
|
mv *-${PN}-* "${S}"
|
||
|
}
|
||
|
|
||
|
src_prepare() {
|
||
12 years ago
|
base_src_prepare
|
||
|
|
||
|
# Workaround NULL DT_RPATH issues
|
||
|
sed -i -e "s/install (TARGETS/#\0/" gui/CMakeLists.txt || die
|
||
13 years ago
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
for ABI in $(get_install_abis) ; do
|
||
12 years ago
|
mycmakeargs=(
|
||
|
$(cmake-utils_use_enable qt4 GUI)
|
||
|
$(cmake-utils_use_enable egl EGL)
|
||
|
)
|
||
13 years ago
|
|
||
|
if use multilib ; then
|
||
|
if [[ "${ABI}" != "${DEFAULT_ABI}" ]] ; then
|
||
12 years ago
|
mycmakeargs=(
|
||
|
-DBUILD_LIB_ONLY=ON
|
||
|
-DENABLE_GUI=OFF
|
||
|
$(cmake-utils_use_enable egl EGL)
|
||
|
)
|
||
13 years ago
|
fi
|
||
|
multilib_toolchain_setup ${ABI}
|
||
|
fi
|
||
|
|
||
|
CMAKE_BUILD_DIR="${WORKDIR}/${P}_build-${ABI}"
|
||
|
cmake-utils_src_configure
|
||
|
done
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
for ABI in $(get_install_abis) ; do
|
||
|
use multilib && multilib_toolchain_setup ${ABI}
|
||
|
CMAKE_BUILD_DIR="${WORKDIR}/${P}_build-${ABI}"
|
||
|
cmake-utils_src_compile
|
||
|
done
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
12 years ago
|
dobin "${CMAKE_BUILD_DIR}"/{glretrace,apitrace}
|
||
|
use qt4 && dobin "${CMAKE_BUILD_DIR}"/qapitrace
|
||
13 years ago
|
|
||
|
for ABI in $(get_install_abis) ; do
|
||
|
CMAKE_BUILD_DIR="${WORKDIR}/${P}_build-${ABI}"
|
||
12 years ago
|
exeinto /usr/$(get_libdir)/${PN}/wrappers
|
||
|
doexe "${CMAKE_BUILD_DIR}"/wrappers/*.so
|
||
|
dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so
|
||
|
dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1
|
||
|
dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1.2
|
||
13 years ago
|
done
|
||
|
|
||
12 years ago
|
dodoc {BUGS,DEVELOPMENT,NEWS,README,TODO}.markdown
|
||
13 years ago
|
|
||
12 years ago
|
exeinto /usr/$(get_libdir)/${PN}/scripts
|
||
|
doexe $(find scripts -type f -executable)
|
||
13 years ago
|
}
|