/[gentoo-x86]/media-libs/opencollada/opencollada-1.2.2_p20150207.ebuild
Gentoo

Contents of /media-libs/opencollada/opencollada-1.2.2_p20150207.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu Apr 9 07:22:12 2015 UTC (3 years, 1 month ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -2 lines
Stable for x86, wrt bug #545770

(Portage version: 2.2.14/cvs/Linux x86_64, RepoMan options: --include-arches="x86", signed Manifest commit with key 7194459F)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/opencollada/opencollada-1.2.2_p20150207.ebuild,v 1.4 2015/04/09 07:15:18 ago Exp $
4
5 EAPI=5
6
7 if [[ ${PV} == *9999* ]] ; then
8 SCM_ECLASS="git-r3"
9 else
10 SCM_ECLASS="vcs-snapshot"
11 fi
12
13 inherit versionator eutils multilib cmake-utils ${SCM_ECLASS}
14
15 DESCRIPTION="Stream based read/write library for COLLADA files"
16 HOMEPAGE="http://www.opencollada.org/"
17 LICENSE="MIT"
18 IUSE="expat"
19
20 # seems like the Khronos Group hasnt invented the SOVERSION yet
21 MY_SOVERSION="1.2"
22
23 SLOT="0"
24
25 if [[ ${PV} != *9999* ]]; then
26 #
27 # UPDATE THE COMMIT WHEN BUMPING!
28 COMMIT="ceb409cabdccda3000aa2e5c065850b8fde60b0f"
29 #
30 SRC_URI="https://github.com/KhronosGroup/OpenCOLLADA/tarball/${COMMIT} -> ${P}.tar.gz"
31 KEYWORDS="amd64 ~ppc64 x86"
32 else
33 EGIT_REPO_URI="http://github.com/KhronosGroup/OpenCOLLADA.git"
34 fi
35
36 RDEPEND="dev-libs/libpcre
37 dev-libs/zziplib
38 media-libs/lib3ds
39 sys-libs/zlib
40 >=sys-devel/gcc-4.7
41 expat? ( dev-libs/expat )
42 !expat? ( dev-libs/libxml2 )"
43 DEPEND="${RDEPEND}
44 sys-apps/findutils
45 sys-apps/sed"
46
47 BUILD_DIR="${S}"/build
48
49 src_prepare() {
50
51 # Remove some bundled dependencies
52 edos2unix CMakeLists.txt || die
53
54 epatch "${FILESDIR}"/${PN}-0_p864-expat.patch
55
56 epatch "${FILESDIR}"/${PN}-1.2.2-soversion.patch
57 epatch "${FILESDIR}"/${PN}-1.2.2-no-undefined.patch
58 epatch "${FILESDIR}"/${PN}-1.2.2-libdir.patch
59
60 rm -R Externals/{expat,lib3ds,LibXML,pcre,zlib,zziplib} || die
61 ewarn "$(echo "Remaining bundled dependencies:";
62 find Externals -mindepth 1 -maxdepth 1 -type d | sed 's|^|- |')"
63
64 # Remove unused build systems
65 rm Makefile scripts/{unixbuild.sh,vcproj2cmake.rb} || die
66 find "${S}" -name SConscript -delete || die
67 }
68
69 src_configure() {
70 local mycmakeargs=" -DUSE_SHARED=ON -DUSE_STATIC=OFF"
71
72 # Master CMakeLists.txt says "EXPAT support not implemented"
73 # Something like "set(LIBEXPAT_LIBRARIES expat)" is missing to make it build
74 use expat \
75 && mycmakeargs+=' -DUSE_EXPAT=ON -DUSE_LIBXML=OFF' \
76 || mycmakeargs+=' -DUSE_EXPAT=OFF -DUSE_LIBXML=ON'
77
78 # Seems like the Khronos Group hasnt invented the SOVERSION yet.
79 mycmakeargs+=" -Dsoversion=${MY_SOVERSION}"
80
81 cmake-utils_src_configure
82 }
83
84 src_install() {
85 cmake-utils_src_install
86
87 dodir /etc/env.d || die
88 echo "LDPATH=/usr/$(get_libdir)/opencollada" \
89 > "${D}"/etc/env.d/99opencollada || die
90
91 dobin build/bin/OpenCOLLADAValidator || die
92 }

  ViewVC Help
Powered by ViewVC 1.1.20