diff options
author | Jonathan Scruggs <j.scruggs@gmail.com> | 2016-07-08 19:22:52 +0100 |
---|---|---|
committer | Göktürk Yüksek <gokturk@gentoo.org> | 2016-07-08 21:57:40 -0400 |
commit | 04d723efb22e209a20a44395ae688edbcdd442ee (patch) | |
tree | 8eda016f74283d0233d571d9b744c8198d3494e0 /media-libs/opencollada/opencollada-1.6.18-r1.ebuild | |
parent | media-libs/opencollada: Remove live ebuild as it's no longer needed (diff) | |
download | gentoo-04d723efb22e209a20a44395ae688edbcdd442ee.tar.gz gentoo-04d723efb22e209a20a44395ae688edbcdd442ee.tar.bz2 gentoo-04d723efb22e209a20a44395ae688edbcdd442ee.zip |
media-libs/opencollada: Rev bump to fix insecure runpath vulnerability
Closes Gentoo Bug 439530
Also, remove live ebuild logic
Diffstat (limited to 'media-libs/opencollada/opencollada-1.6.18-r1.ebuild')
-rw-r--r-- | media-libs/opencollada/opencollada-1.6.18-r1.ebuild | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/media-libs/opencollada/opencollada-1.6.18-r1.ebuild b/media-libs/opencollada/opencollada-1.6.18-r1.ebuild new file mode 100644 index 000000000000..028f63147757 --- /dev/null +++ b/media-libs/opencollada/opencollada-1.6.18-r1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit eutils cmake-utils + +DESCRIPTION="Stream based read/write library for COLLADA files" +HOMEPAGE="http://www.opencollada.org/" +SRC_URI="https://github.com/KhronosGroup/OpenCOLLADA/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" + +KEYWORDS="~amd64 ~ppc64 ~x86" + +IUSE="expat static-libs" + +# This is still needed to have so version numbers +MY_SOVERSION="1.6" + +RDEPEND="dev-libs/libpcre + dev-libs/zziplib + media-libs/lib3ds + sys-libs/zlib + expat? ( dev-libs/expat ) + !expat? ( dev-libs/libxml2 )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S="${WORKDIR}"/OpenCOLLADA-${PV} +# This is needed or you get an error on install +BUILD_DIR="${S}"/build + +PATCHES=( + "${FILESDIR}"/${PN}-0_p864-expat.patch + "${FILESDIR}"/${PN}-1.2.2-soversion.patch + "${FILESDIR}"/${PN}-1.2.2-no-undefined.patch + "${FILESDIR}"/${PN}-1.2.2-libdir.patch +) + +src_prepare() { + edos2unix CMakeLists.txt + + default + + # Remove bundled depends that have portage equivalents + rm -R Externals/{expat,lib3ds,LibXML,pcre,zlib,zziplib} || die + + # Remove unused build systems + rm Makefile scripts/{unixbuild.sh,vcproj2cmake.rb} || die + find "${S}" -name SConscript -delete || die + + # Fix insecure RUNPATHS vulnerability + sed '/link_directories/i SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)' \ + -i COLLADAValidator/CMakeLists.txt || die "sed failed" +} + +src_configure() { + local mycmakeargs=( + -DUSE_SHARED=ON + -DUSE_STATIC=$(usex static-libs ON OFF) + -DUSE_EXPAT=$(usex expat ON OFF) + -DUSE_LIBXML=$(usex !expat ON OFF) + -Dsoversion=${MY_SOVERSION} + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + echo "LDPATH=/usr/$(get_libdir)/opencollada" > "${T}"/99${PN} || die "echo failed" + doenvd "${T}"/99${PN} + + dobin build/bin/OpenCOLLADAValidator +} |