Initial import (#823096).
This commit is contained in:
parent
fa2b8aaa9b
commit
2f0b868dbe
|
@ -0,0 +1 @@
|
||||||
|
/nvidia-texture-tools-2.0.8-1.tar.gz
|
|
@ -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>
|
|
@ -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)
|
|
@ -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()) {
|
|
@ -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)
|
|
@ -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;
|
|
@ -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@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@gmail.com> - 2.0.8-2
|
||||||
|
- Rename tools subpackage to progs.
|
||||||
|
|
||||||
|
* Fri May 18 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.0.8-1
|
||||||
|
- Initial nvidia-texture-tools spec.
|
Loading…
Reference in New Issue