/[gentoo-x86]/media-libs/opencollada/opencollada-0_p864-r1.ebuild
Gentoo

Contents of /media-libs/opencollada/opencollada-0_p864-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Sep 29 14:11:09 2012 UTC (2 years ago) by blueness
Branch: MAIN
Changes since 1.2: +2 -2 lines
keyword ~ppc64, bug #436566

(Portage version: 2.1.11.9/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/media-libs/opencollada/opencollada-0_p864-r1.ebuild,v 1.2 2012/09/10 12:55:10 sping Exp $
4
5 EAPI="3"
6
7 inherit eutils multilib cmake-utils
8
9 DESCRIPTION="Stream based read/write library for COLLADA files"
10 HOMEPAGE="http://www.opencollada.org/"
11 SRC_URI="http://www.hartwork.org/public/${P}.tar.xz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="~amd64 ~ppc64 ~x86"
16 IUSE="expat"
17
18 RDEPEND="dev-libs/libpcre
19 expat? ( dev-libs/expat )
20 !expat? ( dev-libs/libxml2 )
21 media-libs/lib3ds
22 sys-libs/zlib
23 dev-libs/zziplib"
24 DEPEND="${RDEPEND}
25 sys-apps/findutils
26 sys-apps/sed"
27
28 CMAKE_BUILD_DIR="${S}"/build
29
30 src_prepare() {
31 # Remove some bundled dependencies
32 edos2unix CMakeLists.txt || die
33 epatch "${FILESDIR}"/${P}-expat.patch
34 rm -R Externals/{expat,lib3ds,LibXML,pcre,zlib,zziplib} || die
35 ewarn "$(echo "Remaining bundled dependencies:";
36 find Externals -mindepth 1 -maxdepth 1 -type d | sed 's|^|- |')"
37
38 # Remove unused build systems
39 rm Makefile scripts/{unixbuild.sh,vcproj2cmake.rb} || die
40 find "${S}" -name SConscript -delete || die
41
42 epatch "${FILESDIR}"/${P}-gcc-4.7.patch
43 epatch "${FILESDIR}"/${P}-parallel.patch # still not fully done
44 }
45
46 src_configure() {
47 local mycmakeargs=" -DUSE_SHARED=ON -DUSE_STATIC=OFF"
48
49 # Master CMakeLists.txt says "EXPAT support not implemented"
50 # Something like "set(LIBEXPAT_LIBRARIES expat)" is missing to make it build
51 use expat \
52 && mycmakeargs+=' -DUSE_EXPAT=ON -DUSE_LIBXML=OFF' \
53 || mycmakeargs+=' -DUSE_EXPAT=OFF -DUSE_LIBXML=ON'
54 cmake-utils_src_configure
55 }
56
57 src_compile() {
58 MAKEOPTS="${MAKEOPTS} -j1" cmake-utils_src_compile # TODO
59 }
60
61 src_install() {
62 cmake-utils_src_install
63 if [[ $(get_libdir) != 'lib' ]]; then
64 mv "${D}"/usr/{lib,$(get_libdir)} || die
65 fi
66
67 dodir /etc/env.d || die
68 echo "LDPATH=/usr/$(get_libdir)/opencollada" \
69 > "${D}"/etc/env.d/99opencollada || die
70
71 dobin build/bin/OpenCOLLADAValidator || die
72 }

  ViewVC Help
Powered by ViewVC 1.1.20