[nvidia-texture-tools/f16] Initial import (#823096).

pcpa pcpa at fedoraproject.org
Thu Dec 20 22:07:03 UTC 2012


commit 2f0b868dbe5324ebf5fa44da46440b94d765e6e0
Author: pcpa <paulo.cesar.pereira.de.andrade at gmail.com>
Date:   Thu Dec 20 20:05:45 2012 -0200

    Initial import (#823096).

 .gitignore                                 |    1 +
 nvidia-texture-tools-2.0.8-gcc4.7.patch    |   14 ++++
 nvidia-texture-tools-2.0.8-libdir.patch    |   43 +++++++++++
 nvidia-texture-tools-2.0.8-png-api.patch   |   13 ++++
 nvidia-texture-tools-2.0.8-soversion.patch |   69 ++++++++++++++++++
 nvidia-texture-tools-2.0.8-wordsize.patch  |   26 +++++++
 nvidia-texture-tools.spec                  |  107 ++++++++++++++++++++++++++++
 sources                                    |    1 +
 8 files changed, 274 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..25998c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/nvidia-texture-tools-2.0.8-1.tar.gz
diff --git a/nvidia-texture-tools-2.0.8-gcc4.7.patch b/nvidia-texture-tools-2.0.8-gcc4.7.patch
new file mode 100644
index 0000000..773af16
--- /dev/null
+++ b/nvidia-texture-tools-2.0.8-gcc4.7.patch
@@ -0,0 +1,14 @@
+diff -up nvidia-texture-tools/src/nvcore/Debug.cpp.orig nvidia-texture-tools/src/nvcore/Debug.cpp
+--- nvidia-texture-tools/src/nvcore/Debug.cpp.orig	2012-05-18 22:10:11.359805471 -0300
++++ nvidia-texture-tools/src/nvcore/Debug.cpp	2012-05-18 22:11:15.588807912 -0300
+@@ -34,6 +34,10 @@
+ #	endif
+ #endif
+ 
++#if NV_OS_LINUX
++#	include <unistd.h>	// getpid
++#endif
++
+ #if NV_OS_DARWIN
+ #	include <unistd.h>	// getpid
+ #	include <sys/types.h>
diff --git a/nvidia-texture-tools-2.0.8-libdir.patch b/nvidia-texture-tools-2.0.8-libdir.patch
new file mode 100644
index 0000000..b0cbcaa
--- /dev/null
+++ b/nvidia-texture-tools-2.0.8-libdir.patch
@@ -0,0 +1,43 @@
+diff -up nvidia-texture-tools/src/nvcore/CMakeLists.txt.orig nvidia-texture-tools/src/nvcore/CMakeLists.txt
+--- nvidia-texture-tools/src/nvcore/CMakeLists.txt.orig	2012-05-18 23:32:42.120995054 -0300
++++ nvidia-texture-tools/src/nvcore/CMakeLists.txt	2012-05-18 23:33:18.078996428 -0300
+@@ -47,5 +47,5 @@ TARGET_LINK_LIBRARIES(nvcore ${LIBS})
+ 
+ INSTALL(TARGETS nvcore
+ 	RUNTIME DESTINATION bin
+-	LIBRARY DESTINATION lib
++	LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ 	ARCHIVE DESTINATION lib/static)
+diff -up nvidia-texture-tools/src/nvimage/CMakeLists.txt.orig nvidia-texture-tools/src/nvimage/CMakeLists.txt
+--- nvidia-texture-tools/src/nvimage/CMakeLists.txt.orig	2012-05-18 23:32:37.775994885 -0300
++++ nvidia-texture-tools/src/nvimage/CMakeLists.txt	2012-05-18 23:33:08.398996062 -0300
+@@ -67,6 +67,6 @@ TARGET_LINK_LIBRARIES(nvimage ${LIBS} nv
+ 
+ INSTALL(TARGETS nvimage
+ 	RUNTIME DESTINATION bin
+-	LIBRARY DESTINATION lib
++	LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ 	ARCHIVE DESTINATION lib/static)
+ 
+diff -up nvidia-texture-tools/src/nvmath/CMakeLists.txt.orig nvidia-texture-tools/src/nvmath/CMakeLists.txt
+--- nvidia-texture-tools/src/nvmath/CMakeLists.txt.orig	2012-05-18 23:32:31.192994634 -0300
++++ nvidia-texture-tools/src/nvmath/CMakeLists.txt	2012-05-18 23:33:12.854996216 -0300
+@@ -33,5 +33,5 @@ TARGET_LINK_LIBRARIES(nvmath ${LIBS} nvc
+ 
+ INSTALL(TARGETS nvmath
+ 	RUNTIME DESTINATION bin
+-	LIBRARY DESTINATION lib
++	LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ 	ARCHIVE DESTINATION lib/static)
+diff -up nvidia-texture-tools/src/nvtt/CMakeLists.txt.orig nvidia-texture-tools/src/nvtt/CMakeLists.txt
+--- nvidia-texture-tools/src/nvtt/CMakeLists.txt.orig	2012-05-18 23:32:18.184994143 -0300
++++ nvidia-texture-tools/src/nvtt/CMakeLists.txt	2012-05-18 23:32:57.542995724 -0300
+@@ -58,7 +58,7 @@ TARGET_LINK_LIBRARIES(nvtt ${LIBS} nvcor
+ 
+ INSTALL(TARGETS nvtt 
+ 	RUNTIME DESTINATION bin
+-	LIBRARY DESTINATION lib
++	LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ 	ARCHIVE DESTINATION lib/static)
+ 
+ INSTALL(FILES nvtt.h DESTINATION include/nvtt)
diff --git a/nvidia-texture-tools-2.0.8-png-api.patch b/nvidia-texture-tools-2.0.8-png-api.patch
new file mode 100644
index 0000000..0b22916
--- /dev/null
+++ b/nvidia-texture-tools-2.0.8-png-api.patch
@@ -0,0 +1,13 @@
+Index: src/src/nvimage/ImageIO.cpp
+===================================================================
+--- src/src/nvimage/ImageIO.cpp	(revision 9895)
++++ src/src/nvimage/ImageIO.cpp	(working copy)
+@@ -603,7 +603,7 @@
+ {
+ 	nvDebugCheck(png_ptr != NULL);
+ 	
+-	Stream * s = (Stream *)png_ptr->io_ptr;
++	Stream * s = (Stream *)png_get_io_ptr(png_ptr);
+ 	s->serialize(data, (int)length);
+ 	
+ 	if (s->isError()) {
diff --git a/nvidia-texture-tools-2.0.8-soversion.patch b/nvidia-texture-tools-2.0.8-soversion.patch
new file mode 100644
index 0000000..cb418f2
--- /dev/null
+++ b/nvidia-texture-tools-2.0.8-soversion.patch
@@ -0,0 +1,69 @@
+diff -up nvidia-texture-tools/CMakeLists.txt.orig nvidia-texture-tools/CMakeLists.txt
+--- nvidia-texture-tools/CMakeLists.txt.orig	2012-05-18 22:58:53.135917349 -0300
++++ nvidia-texture-tools/CMakeLists.txt	2012-05-18 22:59:45.293919346 -0300
+@@ -2,6 +2,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
+ PROJECT(NV)
+ ENABLE_TESTING()
+ 
++set(PACKAGE_VERSION 2.0.8)
++set(LIBRARY_SOVERSION 2.0)
++
+ SET(NV_CMAKE_DIR "${NV_SOURCE_DIR}/cmake")
+ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NV_CMAKE_DIR}")
+ 
+diff -up nvidia-texture-tools/src/nvcore/CMakeLists.txt.orig nvidia-texture-tools/src/nvcore/CMakeLists.txt
+--- nvidia-texture-tools/src/nvcore/CMakeLists.txt.orig	2012-05-18 22:58:59.455917596 -0300
++++ nvidia-texture-tools/src/nvcore/CMakeLists.txt	2012-05-18 23:00:45.677921655 -0300
+@@ -35,6 +35,10 @@ ENDIF(UNIX)
+ IF(NVCORE_SHARED)
+ 	ADD_DEFINITIONS(-DNVCORE_SHARED=1)
+ 	ADD_LIBRARY(nvcore SHARED ${CORE_SRCS})
++	SET_TARGET_PROPERTIES(nvcore
++		PROPERTIES
++		VERSION ${PACKAGE_VERSION}
++		SOVERSION ${LIBRARY_SOVERSION})
+ ELSE(NVCORE_SHARED)
+ 	ADD_LIBRARY(nvcore ${CORE_SRCS})
+ ENDIF(NVCORE_SHARED)
+diff -up nvidia-texture-tools/src/nvimage/CMakeLists.txt.orig nvidia-texture-tools/src/nvimage/CMakeLists.txt
+--- nvidia-texture-tools/src/nvimage/CMakeLists.txt.orig	2012-05-18 22:59:07.007917887 -0300
++++ nvidia-texture-tools/src/nvimage/CMakeLists.txt	2012-05-18 23:00:58.557922157 -0300
+@@ -55,6 +55,10 @@ ADD_DEFINITIONS(-DNVIMAGE_EXPORTS)
+ IF(NVIMAGE_SHARED)	
+ 	ADD_DEFINITIONS(-DNVIMAGE_SHARED=1)
+ 	ADD_LIBRARY(nvimage SHARED ${IMAGE_SRCS})
++	SET_TARGET_PROPERTIES(nvimage
++		PROPERTIES
++		VERSION ${PACKAGE_VERSION}
++		SOVERSION ${LIBRARY_SOVERSION})
+ ELSE(NVIMAGE_SHARED)
+ 	ADD_LIBRARY(nvimage ${IMAGE_SRCS})
+ ENDIF(NVIMAGE_SHARED)
+diff -up nvidia-texture-tools/src/nvmath/CMakeLists.txt.orig nvidia-texture-tools/src/nvmath/CMakeLists.txt
+--- nvidia-texture-tools/src/nvmath/CMakeLists.txt.orig	2012-05-18 22:59:13.119918119 -0300
++++ nvidia-texture-tools/src/nvmath/CMakeLists.txt	2012-05-18 23:01:05.373922375 -0300
+@@ -21,6 +21,10 @@ ADD_DEFINITIONS(-DNVMATH_EXPORTS)
+ IF(NVMATH_SHARED)
+ 	ADD_DEFINITIONS(-DNVMATH_SHARED=1)
+ 	ADD_LIBRARY(nvmath SHARED ${MATH_SRCS})
++	SET_TARGET_PROPERTIES(nvmath
++		PROPERTIES
++		VERSION ${PACKAGE_VERSION}
++		SOVERSION ${LIBRARY_SOVERSION})
+ ELSE(NVMATH_SHARED)
+ 	ADD_LIBRARY(nvmath ${MATH_SRCS})
+ ENDIF(NVMATH_SHARED)
+diff -up nvidia-texture-tools/src/nvtt/CMakeLists.txt.orig nvidia-texture-tools/src/nvtt/CMakeLists.txt
+--- nvidia-texture-tools/src/nvtt/CMakeLists.txt.orig	2012-05-18 22:59:21.607918449 -0300
++++ nvidia-texture-tools/src/nvtt/CMakeLists.txt	2012-05-18 23:01:12.133922682 -0300
+@@ -46,6 +46,10 @@ ADD_DEFINITIONS(-DNVTT_EXPORTS)
+ IF(NVTT_SHARED)
+ 	ADD_DEFINITIONS(-DNVTT_SHARED=1)
+ 	ADD_LIBRARY(nvtt SHARED ${NVTT_SRCS})
++	SET_TARGET_PROPERTIES(nvtt
++		PROPERTIES
++		VERSION  ${PACKAGE_VERSION}
++		SOVERSION ${LIBRARY_SOVERSION})
+ ELSE(NVTT_SHARED)
+ 	ADD_LIBRARY(nvtt ${NVTT_SRCS})
+ ENDIF(NVTT_SHARED)
diff --git a/nvidia-texture-tools-2.0.8-wordsize.patch b/nvidia-texture-tools-2.0.8-wordsize.patch
new file mode 100644
index 0000000..e93eaac
--- /dev/null
+++ b/nvidia-texture-tools-2.0.8-wordsize.patch
@@ -0,0 +1,26 @@
+diff -up nvidia-texture-tools/src/nvcore/DefsGnucLinux.h.orig nvidia-texture-tools/src/nvcore/DefsGnucLinux.h
+--- nvidia-texture-tools/src/nvcore/DefsGnucLinux.h.orig	2012-05-18 22:17:43.367822764 -0300
++++ nvidia-texture-tools/src/nvcore/DefsGnucLinux.h	2012-05-18 22:19:50.709827759 -0300
+@@ -2,6 +2,8 @@
+ #error "Do not include this file directly."
+ #endif
+ 
++#include <bits/wordsize.h>
++
+ // Function linkage
+ #define DLL_IMPORT
+ #if __GNUC__ >= 4
+@@ -58,8 +60,13 @@ typedef signed short        int16;
+ typedef unsigned int        uint32;
+ typedef signed int          int32;
+ 
++#if __WORDSIZE == 32
+ typedef unsigned long long  uint64;
+ typedef signed long long    int64;
++#else
++typedef unsigned long       uint64;
++typedef signed long         int64;
++#endif
+ 
+ // Aliases
+ typedef uint32              uint;
diff --git a/nvidia-texture-tools.spec b/nvidia-texture-tools.spec
new file mode 100644
index 0000000..8c6c71e
--- /dev/null
+++ b/nvidia-texture-tools.spec
@@ -0,0 +1,107 @@
+%global		soversion	2.0
+
+Name:		nvidia-texture-tools
+Version:	2.0.8
+Release:	3%{?dist}
+Summary:	Collection of image processing and texture manipulation tools
+Group:		System Environment/Libraries
+License:	MIT
+URL:		http://code.google.com/p/nvidia-texture-tools/
+Source0:	http://nvidia-texture-tools.googlecode.com/files/%{name}-%{version}-1.tar.gz
+BuildRequires:	cmake
+BuildRequires:	help2man
+BuildRequires:	libjpeg-turbo-devel
+BuildRequires:	libpng-devel
+BuildRequires:	libtiff-devel
+BuildRequires:	openjpeg-devel
+BuildRequires:	libGL-devel
+BuildRequires:	libGLU-devel
+# g++ 4.7 does not include unistd.h by default to avoid namespace polution
+Patch0:		%{name}-%{version}-gcc4.7.patch
+# use a saner type for int64 and uint64 generic typedefs that are unlikely
+# to conflict with other headers that do not use long long on 64 bit
+Patch1:		%{name}-%{version}-wordsize.patch
+# from 0ad sources
+Patch2:		%{name}-%{version}-png-api.patch
+# add soversion to libraries
+Patch3:		%{name}-%{version}-soversion.patch
+# install libraries in proper directory
+Patch4:		%{name}-%{version}-libdir.patch
+
+%description
+The NVIDIA Texture Tools is a collection of image processing and texture
+manipulation tools, designed to be integrated in game tools and asset
+conditioning pipelines.
+
+The primary features of the library are mipmap and normal map generation,
+format conversion and DXT compression.
+
+DXT compression is based on Simon Brown's squish library. The library also
+contains an alternative GPU-accelerated compressor that uses CUDA and is
+one order of magnitude faster.
+
+%package	devel
+Summary:	Development libraries/headers for %{name}
+Group:		Development/Libraries
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+
+%description	devel
+Headers and libraries for development with %{name}.
+
+%prep
+%setup -q -n %{name}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+
+%build
+mkdir -p build
+pushd build
+    %cmake -DNVTT_SHARED=1 -DCMAKE_SKIP_RPATH=1 ..
+    make %{?_smp_mflags}
+popd
+
+sed -e 's/\r//' -i NVIDIA_*.txt
+
+%install
+make -C build install DESTDIR=$RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
+pushd $RPM_BUILD_ROOT/%{_bindir}
+    export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir}:
+    for bin in *; do
+	help2man --no-info ./$bin > $RPM_BUILD_ROOT/%{_mandir}/man1/$bin.1
+    done
+popd
+
+%check
+make -C build filtertest
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%doc NVIDIA_Texture_Tools_LICENSE.txt
+%doc NVIDIA_Texture_Tools_README.txt
+%{_bindir}/*
+%{_libdir}/lib*.%{version}
+%{_libdir}/lib*.%{soversion}
+%{_mandir}/man1/*
+
+%files		devel
+%doc ChangeLog
+%{_includedir}/nvtt
+%{_libdir}/lib*.so
+
+%changelog
+* Wed Dec 19 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 2.0.8-3
+- Correct source url (#823096).
+- No need for a -progs subpackage (#823096).
+
+* Wed May 30 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 2.0.8-2
+- Rename tools subpackage to progs.
+
+* Fri May 18 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 2.0.8-1
+- Initial nvidia-texture-tools spec.
diff --git a/sources b/sources
index e69de29..9e78729 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7449c95ca1583b512561c83c5a5f401c  nvidia-texture-tools-2.0.8-1.tar.gz


More information about the scm-commits mailing list