diff options
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/apitrace/ChangeLog | 8 | ||||
-rw-r--r-- | dev-util/apitrace/apitrace-1.0-r1.ebuild | 85 | ||||
-rw-r--r-- | dev-util/apitrace/files/apitrace-1.0-glxtrace-only.patch | 26 |
3 files changed, 118 insertions, 1 deletions
diff --git a/dev-util/apitrace/ChangeLog b/dev-util/apitrace/ChangeLog index 58b973f02ca2..18dbfb2618f1 100644 --- a/dev-util/apitrace/ChangeLog +++ b/dev-util/apitrace/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-util/apitrace # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/apitrace/ChangeLog,v 1.1 2011/06/09 05:47:25 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/apitrace/ChangeLog,v 1.2 2011/06/10 10:34:47 radhermit Exp $ + +*apitrace-1.0-r1 (10 Jun 2011) + + 10 Jun 2011; Tim Harder <radhermit@gentoo.org> +apitrace-1.0-r1.ebuild, + +files/apitrace-1.0-glxtrace-only.patch: + Revision bump to add multilib support (bug #370795). *apitrace-1.0 (09 Jun 2011) diff --git a/dev-util/apitrace/apitrace-1.0-r1.ebuild b/dev-util/apitrace/apitrace-1.0-r1.ebuild new file mode 100644 index 000000000000..28567ee5fa9d --- /dev/null +++ b/dev-util/apitrace/apitrace-1.0-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/apitrace/apitrace-1.0-r1.ebuild,v 1.1 2011/06/10 10:34:46 radhermit Exp $ + +EAPI=3 + +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" +IUSE="multilib qt4" + +RDEPEND="media-libs/libpng + sys-libs/zlib + virtual/opengl + 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 + )" +DEPEND="${RDEPEND} + || ( dev-lang/python:2.7 dev-lang/python:2.6 )" + +EMULTILIB_PKG="true" + +pkg_setup() { + python_set_active_version 2 +} + +src_unpack() { + unpack ${A} + mv *-${PN}-* "${S}" +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-automagic-qt.patch \ + "${FILESDIR}"/${P}-glxtrace-only.patch +} + +src_configure() { + for ABI in $(get_install_abis) ; do + mycmakeargs=( $(cmake-utils_use_enable qt4 GUI) ) + + if use multilib ; then + if [[ "${ABI}" != "${DEFAULT_ABI}" ]] ; then + mycmakeargs=( -DBUILD_LIB_ONLY=ON -DENABLE_GUI=OFF ) + 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() { + dobin "${CMAKE_BUILD_DIR}"/{glretrace,tracedump} || die + use qt4 && { dobin "${CMAKE_BUILD_DIR}"/qapitrace || die ; } + + for ABI in $(get_install_abis) ; do + CMAKE_BUILD_DIR="${WORKDIR}/${P}_build-${ABI}" + dolib.so "${CMAKE_BUILD_DIR}"/glxtrace.so || die + done + + dodoc README TODO || die + + exeinto /usr/share/${PN}/scripts + doexe scripts/* || die +} diff --git a/dev-util/apitrace/files/apitrace-1.0-glxtrace-only.patch b/dev-util/apitrace/files/apitrace-1.0-glxtrace-only.patch new file mode 100644 index 000000000000..d94c3b6fe7f3 --- /dev/null +++ b/dev-util/apitrace/files/apitrace-1.0-glxtrace-only.patch @@ -0,0 +1,26 @@ +--- apitrace-apitrace-5f03103/CMakeLists.txt.orig ++++ apitrace-apitrace-5f03103/CMakeLists.txt +@@ -19,6 +19,8 @@ + find_package (PythonInterp REQUIRED) + find_package (OpenGL REQUIRED) + ++option (BUILD_LIB_ONLY "Build the glxtrace library only" OFF) ++ + option (ENABLE_GUI "Build the QT-based GUI." ON) + if (ENABLE_GUI) + find_package (Qt4 4.7 COMPONENTS QtCore QtGui QtWebKit) +@@ -232,6 +234,8 @@ + target_link_libraries (glxtrace dl) + endif () + ++if (NOT BUILD_LIB_ONLY) ++ + if (WIN32) + set (os os_win32.cpp) + set (glws glws_wgl.cpp) +@@ -290,3 +294,5 @@ + if (ENABLE_GUI) + add_subdirectory(gui) + endif (ENABLE_GUI) ++ ++endif (NOT BUILD_LIB_ONLY) |