summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2013-03-20 23:56:25 +0000
committerJulian Ospald <hasufell@gentoo.org>2013-03-20 23:56:25 +0000
commitdb3bcc70387059b267142212a07ab10cd3e3d415 (patch)
treed9cf623f0140f3913e8f0119970f65b9969fadf6 /media-gfx/nvidia-texture-tools
parentNew ebuild for simple-mtpfs, a FUSE MTP implementation written in C++ (diff)
downloadgentoo-2-db3bcc70387059b267142212a07ab10cd3e3d415.tar.gz
gentoo-2-db3bcc70387059b267142212a07ab10cd3e3d415.tar.bz2
gentoo-2-db3bcc70387059b267142212a07ab10cd3e3d415.zip
use pkg-config for openexr detection wrt #462494
(Portage version: 2.2.0_alpha168/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'media-gfx/nvidia-texture-tools')
-rw-r--r--media-gfx/nvidia-texture-tools/ChangeLog11
-rw-r--r--media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-openexr.patch93
-rw-r--r--media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild73
3 files changed, 175 insertions, 2 deletions
diff --git a/media-gfx/nvidia-texture-tools/ChangeLog b/media-gfx/nvidia-texture-tools/ChangeLog
index 5f06875130e5..85b4005da680 100644
--- a/media-gfx/nvidia-texture-tools/ChangeLog
+++ b/media-gfx/nvidia-texture-tools/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-gfx/nvidia-texture-tools
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/nvidia-texture-tools/ChangeLog,v 1.7 2012/06/29 08:26:26 hasufell Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/nvidia-texture-tools/ChangeLog,v 1.8 2013/03/20 23:56:25 hasufell Exp $
+
+*nvidia-texture-tools-2.0.8-r2 (20 Mar 2013)
+
+ 20 Mar 2013; Julian Ospald <hasufell@gentoo.org>
+ +nvidia-texture-tools-2.0.8-r2.ebuild,
+ +files/nvidia-texture-tools-2.0.8-openexr.patch:
+ use pkg-config for openexr detection wrt #462494
29 Jun 2012; Julian Ospald <hasufell@gentoo.org>
nvidia-texture-tools-2.0.8-r1.ebuild,
diff --git a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-openexr.patch b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-openexr.patch
new file mode 100644
index 000000000000..b49abf9e5c32
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-openexr.patch
@@ -0,0 +1,93 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Wed Mar 20 22:10:22 UTC 2013
+Subject: add pkgconfig checks
+
+https://bugs.gentoo.org/show_bug.cgi?id=462494
+
+--- nvidia-texture-tools/cmake/FindOpenEXR.cmake
++++ nvidia-texture-tools/cmake/FindOpenEXR.cmake
+@@ -7,11 +7,15 @@
+ # OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR.
+ #
+
+-INCLUDE(FindZLIB)
++IF(UNIX)
++ INCLUDE(FindPkgConfig)
++ pkg_check_modules(_PKG_OPENEXR OpenEXR)
++ENDIF(UNIX)
+
++find_package(ZLIB REQUIRED)
+
+-IF(ZLIB_FOUND)
+-
++IF(NOT _PKG_OPENEXR_FOUND)
++
+ SET(LIBRARY_PATHS
+ /usr/lib
+ /usr/local/lib
+@@ -46,10 +50,20 @@
+ NAMES IlmThread
+ PATHS ${LIBRARY_PATHS})
+
+-ENDIF(ZLIB_FOUND)
++ENDIF(NOT _PKG_OPENEXR_FOUND)
+
+ #MESSAGE(STATUS ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ZLIB_LIBRARY})
+
++IF(_PKG_OPENEXR_FOUND)
++ SET(OPENEXR_FOUND TRUE)
++ foreach(i ${_PKG_OPENEXR_CFLAGS})
++ SET(OPENEXR_CFLAGS "${OPENEXR_CFLAGS} ${i}")
++ endforeach(i)
++ foreach(p ${_PKG_OPENEXR_LDFLAGS})
++ SET(OPENEXR_LDFLAGS "${OPENEXR_LDFLAGS} ${p}")
++ endforeach(p)
++ SET(OPENEXR_LDFLAGS "${OPENEXR_LDFLAGS} ${ZLIB_LIBRARY}")
++ELSE(_PKG_OPENEXR_FOUND)
+ IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
+ SET(OPENEXR_FOUND TRUE)
+ SET(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
+@@ -65,6 +79,8 @@
+ MESSAGE(FATAL_ERROR "Could not find OpenEXR library")
+ ENDIF(OPENEXR_FIND_REQUIRED)
+ ENDIF(OPENEXR_FOUND)
++ENDIF(_PKG_OPENEXR_FOUND)
++
+
+ MARK_AS_ADVANCED(
+ OPENEXR_INCLUDE_PATHS
+@@ -73,3 +89,4 @@
+ OPENEXR_IMATH_LIBRARY
+ OPENEXR_IEX_LIBRARY
+ OPENEXR_HALF_LIBRARY)
++
+--- nvidia-texture-tools/src/nvimage/CMakeLists.txt
++++ nvidia-texture-tools/src/nvimage/CMakeLists.txt
+@@ -44,10 +44,10 @@
+ INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR})
+ ENDIF(TIFF_FOUND)
+
+-IF(OPENEXR_FOUND)
++IF(OPENEXR_FOUND AND NOT _PKG_OPENEXR_FOUND)
+ SET(LIBS ${LIBS} ${OPENEXR_LIBRARIES})
+ INCLUDE_DIRECTORIES(${OPENEXR_INCLUDE_PATHS})
+-ENDIF(OPENEXR_FOUND)
++ENDIF(OPENEXR_FOUND AND NOT _PKG_OPENEXR_FOUND)
+
+ # targets
+ ADD_DEFINITIONS(-DNVIMAGE_EXPORTS)
+@@ -61,6 +61,14 @@
+
+ TARGET_LINK_LIBRARIES(nvimage ${LIBS} nvcore nvmath posh)
+
++IF(_PKG_OPENEXR_FOUND)
++ SET_TARGET_PROPERTIES(nvimage
++ PROPERTIES
++ COMPILE_FLAGS "${OPENEXR_CFLAGS}"
++ LINK_FLAGS "${OPENEXR_LDFLAGS}"
++ )
++ENDIF(_PKG_OPENEXR_FOUND)
++
+ INSTALL(TARGETS nvimage
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
diff --git a/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild
new file mode 100644
index 000000000000..18bfe6827073
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild,v 1.1 2013/03/20 23:56:25 hasufell Exp $
+
+EAPI=4
+inherit cmake-utils eutils multilib toolchain-funcs
+
+DESCRIPTION="A set of cuda-enabled texture tools and compressors"
+HOMEPAGE="http://developer.nvidia.com/object/texture_tools.html"
+SRC_URI="http://${PN}.googlecode.com/files/${P}-1.tar.gz
+ http://dev.gentoo.org/~ssuominen/${P}-patchset-1.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cg cuda glew glut openexr"
+
+DEPEND="media-libs/libpng:0
+ media-libs/ilmbase
+ media-libs/tiff:0
+ sys-libs/zlib
+ virtual/jpeg
+ virtual/opengl
+ x11-libs/libX11
+ cg? ( media-gfx/nvidia-cg-toolkit )
+ cuda? ( dev-util/nvidia-cuda-toolkit )
+ glew? ( media-libs/glew )
+ glut? ( media-libs/freeglut )
+ openexr? ( media-libs/openexr )
+ "
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ if use cuda; then
+ if [[ $(( $(gcc-major-version) * 10 + $(gcc-minor-version) )) -gt 44 ]] ; then
+ eerror "gcc 4.5 and up are not supported for useflag cuda!"
+ die "gcc 4.5 and up are not supported for useflag cuda!"
+ fi
+ fi
+}
+
+src_prepare() {
+ edos2unix cmake/*
+ EPATCH_SUFFIX=patch epatch "${WORKDIR}"/patches
+ # fix bug #414509
+ epatch "${FILESDIR}"/${P}-cg.patch
+ # fix bug #423965
+ epatch "${FILESDIR}"/${P}-gcc-4.7.patch
+ # fix bug #462494
+ epatch "${FILESDIR}"/${P}-openexr.patch
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIBDIR=$(get_libdir)
+ -DNVTT_SHARED=TRUE
+ $(cmake-utils_use cg CG)
+ $(cmake-utils_use cuda CUDA)
+ $(cmake-utils_use glew GLEW)
+ $(cmake-utils_use glut GLUT)
+ $(cmake-utils_use openexr OPENEXR)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dodoc ChangeLog
+}