opencollada-1.6.36.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils versionator
  5. DESCRIPTION="Stream based read/write library for COLLADA files"
  6. HOMEPAGE="http://www.opencollada.org/"
  7. SRC_URI="https://github.com/KhronosGroup/OpenCOLLADA/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~ppc64 ~x86"
  11. IUSE="static-libs"
  12. # This is still needed to have so version numbers
  13. MY_SOVERSION="$(get_version_component_range 1-2)"
  14. RDEPEND="dev-libs/libpcre
  15. dev-libs/zziplib
  16. media-libs/lib3ds
  17. sys-libs/zlib
  18. dev-libs/libxml2"
  19. DEPEND="${RDEPEND}
  20. virtual/pkgconfig"
  21. S="${WORKDIR}"/OpenCOLLADA-${PV}
  22. PATCHES=( "${FILESDIR}"/${PN}-build-fixes-v1.patch )
  23. src_prepare() {
  24. edos2unix CMakeLists.txt
  25. cmake-utils_src_prepare
  26. # Remove bundled depends that have portage equivalents
  27. rm -rv Externals/{expat,lib3ds,LibXML,pcre,zlib,zziplib} || die
  28. # Remove unused build systems
  29. rm -v Makefile scripts/{unixbuild.sh,vcproj2cmake.rb} || die
  30. find "${S}" -name SConscript -delete || die
  31. }
  32. src_configure() {
  33. local mycmakeargs=(
  34. -DUSE_SHARED=ON
  35. -DUSE_STATIC=$(usex static-libs)
  36. -DUSE_LIBXML=ON
  37. -Dsoversion=${MY_SOVERSION}
  38. )
  39. cmake-utils_src_configure
  40. }
  41. src_install() {
  42. cmake-utils_src_install
  43. echo "LDPATH=/usr/$(get_libdir)/opencollada" > "${T}"/99${PN} || die "echo failed"
  44. doenvd "${T}"/99${PN}
  45. dobin ${BUILD_DIR}/bin/OpenCOLLADAValidator
  46. }