diff options
Diffstat (limited to 'media-video/captury/captury-0.2.0_pre200702251.ebuild')
-rw-r--r-- | media-video/captury/captury-0.2.0_pre200702251.ebuild | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/media-video/captury/captury-0.2.0_pre200702251.ebuild b/media-video/captury/captury-0.2.0_pre200702251.ebuild new file mode 100644 index 0000000..bc735c5 --- /dev/null +++ b/media-video/captury/captury-0.2.0_pre200702251.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit multilib flag-o-matic eutils + +DESCRIPTION="Captury Tool - captures the screen from your OpenGL games." +HOMEPAGE="http://battousai.mylair.de/projects/captury/" +SRC_URI="http://battousai.mylair.de/dist/${PN}/${P}.tar.bz2" +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug" + +RDEPEND=">=media-libs/libcaptury-0.2.0_pre200702241 + x11-libs/libX11 + >=media-libs/libpng-1.2.14 + virtual/opengl" + +DEPEND="${RDEPEND} + || ( dev-libs/elfutils + dev-libs/libelf ) + dev-util/pkgconfig" + +RESTRICT="multilib-pkg-force" + +pkg_setup() { + built_with_use --missing die app-emulation/emul-linux-x86-xlibs opengl +} + +setup_env() { + myconf="" + makeopts="" + + if [[ ${ABI} != ${DEFAULT_ABI} ]]; then + # this is a workaround as Gentoo doesn't ship a 32bit version of libelf.so + myconf="${myconf} --disable-builtin-strip-soname" + makeopts="${makeopts} STRIP_SONAME=$(pwd)/../abi-${DEFAULT_ABI}/src/libGLcaptury/strip-soname" + + # unfortunately, different versions of emul-linux-x86-xlibs do install + # their files into different locations, depending on what version you + # installed. + if [[ -x /emul/linux/x86/usr/lib/libGL.so ]]; then + makeopts="${makeopts} NATIVE_LIBGL=/emul/linux/x86/usr/lib/libGL.so" + else + makeopts="${makeopts} NATIVE_LIBGL=/usr/$(get_libdir)/libGL.so" + fi + if [[ -x /emul/linux/x86/usr/lib/libX11.so ]]; then + makeopts="${makeopts} NATIVE_LIBX11=/emul/linux/x86/usr/lib/libX11.so" + else + makeopts="${makeopts} NATIVE_LIBX11=/usr/$(get_libdir)/libX11.so" + fi + else + makeopts="${makeopts} NATIVE_LIBGL=/usr/$(get_libdir)/libGL.so" + makeopts="${makeopts} NATIVE_LIBX11=/usr/$(get_libdir)/libX11.so" + fi + + export makeopts + export myconf +} + +src_compile() { + if [[ -z ${OABI} ]] && has_multilib_profile; then + use debug && append-flags -O0 -g3 + use debug || append-flags -DNDEBUG=1 + + # fixes missing #define in libGLcaptury.cpp + append-flags -DGLX_GLXEXT_PROTOTYPES + + einfo "Building multilib ${PN} for ABIs: $(get_install_abis)" + OABI=${ABI} + for ABI in $DEFAULT_ABI $(get_install_abis); do + export ABI=${ABI} + src_compile + done + ABI=${OABI} + return + fi + + cd ${S} + + test -d abi-${ABI} && return + + if [[ ! -f configure ]]; then + ./autogen.sh || die "autogen.sh failed" + fi + + mkdir abi-${ABI} + cd abi-${ABI} + + einfo "Compiling for ABI ${ABI} ..." + einfo + + setup_env + + ../configure ${myconf} \ + --prefix="/usr" \ + --host="${CHOST}" \ + --sysconfdir="/etc" \ + --libdir="/usr/$(get_libdir)" \ + || die "./configure for ABI ${ABI} failed" + + einfo "MAKE LINE: emake ${makeopts}" + einfo + emake ${makeopts} || die "make for ABI ${ABI} failed" +} + +src_install() { + for ABI in $(get_install_abis); do + cd "${S}/abi-${ABI}" + setup_env + einfo "make ${makeopts} install DESTDIR=\"${D}\"" + make ${makeopts} install DESTDIR="${D}" || die "make install for ABI ${ABI} failed." + done + + dodoc AUTHORS ChangeLog* NEWS README* TODO +} + +# vim:ai:noet:ts=4:nowrap |