summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/opencollada')
-rw-r--r--media-libs/opencollada/Manifest1
-rw-r--r--media-libs/opencollada/files/opencollada-1.6.62-cmake-fixes.patch122
-rw-r--r--media-libs/opencollada/opencollada-1.6.62.ebuild65
3 files changed, 188 insertions, 0 deletions
diff --git a/media-libs/opencollada/Manifest b/media-libs/opencollada/Manifest
index d1542aa0bf5c..536be7f94ebe 100644
--- a/media-libs/opencollada/Manifest
+++ b/media-libs/opencollada/Manifest
@@ -2,3 +2,4 @@ DIST opencollada-1.6.25.tar.gz 11817949 BLAKE2B 84278ae25d64ab827806c6ec588a333a
DIST opencollada-1.6.31.tar.gz 11832790 BLAKE2B 297130a8f844f4f80f4394db85098eaeaf42da125f34f20b4b6285c2bd0afc20c7066e3c54f73012c188b5b3c79f43be351fdc3b612b1e5c67ecc0ae19acb0f3 SHA512 6290600bed59fef72c4986a9d00683ae1bfedf6811a44fb9e05e1a46e4ceaee7585c2281918f0a491369e49b01d3dfab0eb38b3e0728f96fe8264a80ca28d8c9
DIST opencollada-1.6.36.tar.gz 12275972 BLAKE2B 3f7afb81767e92d1f6efeaf114caf0fa426d075ccd0fcd9f5c8e3951d7706329c545643cab8d18c05542d26933f3e016f96ca9931554b2929d8f815661917529 SHA512 bcee958d229a6d28043afd6dbe2e8536668ce57b510d2759ef68420aa9ac5b8f82ab5956fbcef7ecc6177ad5f0f20c9a7364a886236e583c85215de86f7066f8
DIST opencollada-1.6.58.tar.gz 12088428 BLAKE2B ef5da3eae1c7f4ffd5abf4f93fd9ae1399d7eb3d470ebf4d3c042562d654b6dbcab3010d64250ff9701bd2b1e310178ab2430ed59b3f774a610619e723786961 SHA512 122b841de28f82408bc6fe9d363894ab8f9033cfed949f8028b7a35445e3361f0df583d8b18f7198eaa9dbf3ad33b52dbe5fe6a7e652494789850effcbbf22c9
+DIST opencollada-1.6.62.tar.gz 12094443 BLAKE2B 6cd0ec893fc212bf3e8f166ad9c51c894dc298a3627e65dd41ece850a5638d91b8839830d5456bf3ba072a0b23f8c01247d8c676cc79d98464cdf0c1b55fd3c5 SHA512 bd39406b9a833409303ef7cd4e93beee0675fa57c267af95a34699348a81650d50ae042dbb1837cd41c72433533a3a9b827a44e9775a5b06c7c4f1a351146574
diff --git a/media-libs/opencollada/files/opencollada-1.6.62-cmake-fixes.patch b/media-libs/opencollada/files/opencollada-1.6.62-cmake-fixes.patch
new file mode 100644
index 000000000000..8fc32784daa7
--- /dev/null
+++ b/media-libs/opencollada/files/opencollada-1.6.62-cmake-fixes.patch
@@ -0,0 +1,122 @@
+From c3ed65c2c60b8744163b3a57cf24469e688536dd Mon Sep 17 00:00:00 2001
+From: Jonathan Scruggs <j.scruggs@gmail.com>
+Date: Sat, 13 Jan 2018 11:54:44 +0000
+Subject: [PATCH] OpenCOLLADA/CMakeLists.txt
+
+Use CMAKE_BUILD_TYPE which can be overrided with custom distro types
+
+Adhere to GNU filesystem layout conventions. Not all distros and OSes
+have directories in the same locations and they define the
+GNUInstallDirs variables, so use those variables. Also, this enables
+multi lib installations.
+
+Define the version variables to enable SONAME versioning on the
+library files in case there is ABI changes in the future.
+---
+ CMakeLists.txt | 58 ++++++++++++++++++++++++++++++++++++----------------------
+ 1 file changed, 36 insertions(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 95abbe21..00ad8d6a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -37,14 +37,41 @@ cmake_policy(SET CMP0010 NEW)
+ # Input directories must have CMakeLists.txt
+ cmake_policy(SET CMP0014 NEW)
+
+-# avoid having empty buildtype
+-set(CMAKE_BUILD_TYPE_INIT "Release")
+
+-set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Only do Release and Debug" FORCE )
+-mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
++# Set Release type for builds where CMAKE_BUILD_TYPE is unset
++# This is usually a good default as this implictly enables
++#
++# CXXFLAGS = -O3 -DNDEBUG
++#
++if( NOT CMAKE_BUILD_TYPE )
++ set( CMAKE_BUILD_TYPE "Release" )
++endif()
+
+ SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Add this string to as suffix to Debug libraries, e.g.: xml2_d.lib " )
+
++# Adhere to GNU filesystem layout conventions
++include( GNUInstallDirs )
++
++
++# #-----------------------------------------------------------------------------
++# Initialize project.
++
++project(OPENCOLLADA) # must be after setting cmake_configuration_types
++
++set(EXTERNAL_LIBRARIES ${OPENCOLLADA_SOURCE_DIR}/Externals) # external libraries
++set(CMAKE_MODULE_PATH "${EXTERNAL_LIBRARIES}/cmake-modules")
++
++set(OPENCOLLADA_VERSION_MAJOR 1)
++set(OPENCOLLADA_VERSION_MINOR 6)
++set(OPENCOLLADA_VERSION_PATCH 62)
++set(OPENCOLLADA_VERSION ${OPENCOLLADA_VERSION_MAJOR}.${OPENCOLLADA_VERSION_MINOR}.${OPENCOLLADA_VERSION_PATCH})
++
++if(NOT SOVERSION)
++ set(SOVERSION ${OPENCOLLADA_VERSION_MAJOR}.${OPENCOLLADA_VERSION_MINOR}
++ CACHE STRING "Set the SO version in the SO name of the output library")
++endif()
++
++
+ #-----------------------------------------------------------------------------
+ # Macro's
+
+@@ -58,7 +85,7 @@ macro(opencollada_add_lib
+
+ if (USE_STATIC)
+ add_library(${name}_static STATIC ${sources})
+- set_target_properties(${name}_static PROPERTIES OUTPUT_NAME ${name})
++ set_target_properties(${name}_static PROPERTIES OUTPUT_NAME ${name} SOVERSION ${SOVERSION})
+ foreach(target_lib ${target_libs})
+ if(TARGET ${target_lib}_static)
+ target_link_libraries(${name}_static ${target_lib}_static)
+@@ -84,7 +111,7 @@ macro(opencollada_add_lib
+ message(${name} " WARNING: Shared library support implemented for UNIX-like OS only")
+ endif ()
+ add_library(${name}_shared SHARED ${sources})
+- set_target_properties(${name}_shared PROPERTIES OUTPUT_NAME ${name})
++ set_target_properties(${name}_shared PROPERTIES OUTPUT_NAME ${name} SOVERSION ${SOVERSION})
+ foreach(target_lib ${target_libs})
+ if(TARGET ${target_lib}_shared)
+ target_link_libraries(${name}_shared ${target_lib}_shared)
+@@ -145,19 +172,6 @@ endmacro()
+ # end copy
+ # --------
+
+-#-----------------------------------------------------------------------------
+-# Initialize project.
+-
+-project(OPENCOLLADA) # must be after setting cmake_configuration_types
+-
+-set(EXTERNAL_LIBRARIES ${OPENCOLLADA_SOURCE_DIR}/Externals) # external libraries
+-set(CMAKE_MODULE_PATH "${EXTERNAL_LIBRARIES}/cmake-modules")
+-
+-set(OPENCOLLADA_VERSION_MAJOR 0)
+-set(OPENCOLLADA_VERSION_MINOR 1)
+-set(OPENCOLLADA_VERSION_PATCH 0)
+-set(OPENCOLLADA_VERSION ${OPENCOLLADA_VERSION_MAJOR}.${OPENCOLLADA_VERSION_MINOR}.${OPENCOLLADA_VERSION_PATCH})
+-
+
+ #-----------------------------------------------------------------------------
+ # Compiler warnings.
+@@ -190,9 +204,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNINGS}")
+ #-----------------------------------------------------------------------------
+ # Install vars
+
+-set(OPENCOLLADA_INST_INCLUDE ${CMAKE_INSTALL_PREFIX}/include/opencollada)
+-set(OPENCOLLADA_INST_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/opencollada)
+-set(OPENCOLLADA_INST_CMAKECONFIG ${OPENCOLLADA_INST_LIBRARY}/cmake)
++set(OPENCOLLADA_INST_INCLUDE ${CMAKE_INSTALL_FULL_INCLUDEDIR}/opencollada)
++set(OPENCOLLADA_INST_LIBRARY ${CMAKE_INSTALL_FULL_LIBDIR}/opencollada)
++set(OPENCOLLADA_INST_CMAKECONFIG ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/OpenCOLLADA)
+
+
+ #-----------------------------------------------------------------------------
+--
+2.15.1
+
diff --git a/media-libs/opencollada/opencollada-1.6.62.ebuild b/media-libs/opencollada/opencollada-1.6.62.ebuild
new file mode 100644
index 000000000000..4a0d0c352bd3
--- /dev/null
+++ b/media-libs/opencollada/opencollada-1.6.62.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils versionator
+
+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="static-libs"
+
+RDEPEND="dev-libs/libpcre
+ dev-libs/zziplib
+ media-libs/lib3ds
+ sys-libs/zlib
+ dev-libs/libxml2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/OpenCOLLADA-${PV}"
+
+PATCHES=( "${FILESDIR}/${P}-cmake-fixes.patch" )
+
+src_prepare() {
+ edos2unix CMakeLists.txt
+
+ cmake-utils_src_prepare
+
+ # Remove bundled depends that have portage equivalents
+ rm -rv Externals/{expat,lib3ds,LibXML,pcre,zziplib} || die
+
+ # Remove unused build systems
+ rm -v Makefile scripts/{unixbuild.sh,vcproj2cmake.rb} || die
+ find "${S}" -name SConscript -delete || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_SHARED=ON
+ -DUSE_STATIC=$(usex static-libs)
+ -DUSE_LIBXML=ON
+ )
+
+ 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_DIR}/bin/DAEValidator"
+ dobin "${BUILD_DIR}/bin/OpenCOLLADAValidator"
+ # Need to be in same directory as above binaries
+ docinto "/usr/bin"
+ dodoc "${BUILD_DIR}/bin/COLLADAPhysX3Schema.xsd"
+ dodoc "${BUILD_DIR}/bin/collada_schema_1_4_1.xsd"
+ dodoc "${BUILD_DIR}/bin/collada_schema_1_5.xsd"
+}