summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-03-07 14:51:39 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-03-07 14:51:39 +0000
commit464602e87ad7c0635c21a48f7da9c55a49fc04d9 (patch)
treeb62ac21be6c588e3beb88380f133c071b2b89f37
parentUpdate to 1.290 (diff)
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. WWW: http://code.google.com/p/nvidia-texture-tools/
Notes
Notes: svn path=/head/; revision=229634
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/nvidia-texture-tools/Makefile62
-rw-r--r--graphics/nvidia-texture-tools/distinfo3
-rw-r--r--graphics/nvidia-texture-tools/files/patch-src-nvcore-Debug.cpp26
-rw-r--r--graphics/nvidia-texture-tools/files/patch-src-nvcore-nvcore.h21
-rw-r--r--graphics/nvidia-texture-tools/files/patch-src-nvcore-poshlib-posh.h14
-rw-r--r--graphics/nvidia-texture-tools/files/patch-src-nvmath-nvmath.h20
-rw-r--r--graphics/nvidia-texture-tools/files/patch-src-nvtt-CMakeLists.txt15
-rw-r--r--graphics/nvidia-texture-tools/pkg-descr12
-rw-r--r--graphics/nvidia-texture-tools/pkg-plist13
10 files changed, 187 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index e1d894d4702a..65e221fa016f 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -494,6 +494,7 @@
SUBDIR += nip2
SUBDIR += npretty
SUBDIR += nurbs++
+ SUBDIR += nvidia-texture-tools
SUBDIR += ocaml-images
SUBDIR += ocaml-lablgl
SUBDIR += ocrad
diff --git a/graphics/nvidia-texture-tools/Makefile b/graphics/nvidia-texture-tools/Makefile
new file mode 100644
index 000000000000..d92cddea87ef
--- /dev/null
+++ b/graphics/nvidia-texture-tools/Makefile
@@ -0,0 +1,62 @@
+# New ports collection makefile for: nvidia-texture-tools
+# Date created: 06 Mar 2009
+# Whom: Dmitry Marakasov <amdmi3@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= nvidia-texture-tools
+PORTVERSION= 2.0.5
+CATEGORIES= graphics
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
+
+MAINTAINER= amdmi3@FreeBSD.org
+COMMENT= Texture Tools with support for DirectX 10 texture formats
+
+LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \
+ jpeg.9:${PORTSDIR}/graphics/jpeg \
+ tiff.4:${PORTSDIR}/graphics/tiff \
+ IlmImf.6:${PORTSDIR}/graphics/OpenEXR
+
+USE_CMAKE= yes
+CMAKE_USE_PTHREAD=yes
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+PORTDOCS= NVIDIA_Texture_Tools_README.txt ChangeLog
+
+OPTIONS= COMPRESSUI "Build compressor UI (requires Qt4)" off
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_COMPRESSUI)
+USE_QT_VER= 4
+# *_build stuff is not really needed, but cmake's Qt finder won't work otherwise
+QT_COMPONENTS= qmake_build moc_build uic_build rcc_build corelib gui opengl
+PLIST_SUB+= COMPRESSUI=""
+.else
+PLIST_SUB+= COMPRESSUI="@comment "
+.endif
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+.if defined(WITH_COMPRESSUI)
+ @${REINPLACE_CMD} -e '/FIND_PACKAGE.*Qt4/ s|)$$| REQUIRED&|' \
+ ${WRKSRC}/src/CMakeLists.txt
+.else
+ @${REINPLACE_CMD} -e '/FIND_PACKAGE.*Qt4/ d' \
+ ${WRKSRC}/src/CMakeLists.txt
+.endif
+ @${FIND} ${WRKSRC} -name CMakeLists.txt -print0 | ${XARGS} -0 \
+ ${REINPLACE_CMD} -e '/ARCHIVE/ s|/static||'
+
+.if !defined(NOPORTDOCS)
+post-install:
+ ${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/graphics/nvidia-texture-tools/distinfo b/graphics/nvidia-texture-tools/distinfo
new file mode 100644
index 000000000000..e48b7364848b
--- /dev/null
+++ b/graphics/nvidia-texture-tools/distinfo
@@ -0,0 +1,3 @@
+MD5 (nvidia-texture-tools-2.0.5.tar.gz) = a113fcd32994316f67f07dea6400595f
+SHA256 (nvidia-texture-tools-2.0.5.tar.gz) = 58d538f645006440d6609f66a8f99cd74b6d86ba0b3cf4a7a907d43842075a70
+SIZE (nvidia-texture-tools-2.0.5.tar.gz) = 945181
diff --git a/graphics/nvidia-texture-tools/files/patch-src-nvcore-Debug.cpp b/graphics/nvidia-texture-tools/files/patch-src-nvcore-Debug.cpp
new file mode 100644
index 000000000000..ee6d6c863f7b
--- /dev/null
+++ b/graphics/nvidia-texture-tools/files/patch-src-nvcore-Debug.cpp
@@ -0,0 +1,26 @@
+--- src/nvcore/Debug.cpp.orig 2008-12-01 11:04:27.000000000 +0300
++++ src/nvcore/Debug.cpp 2009-03-06 22:45:48.000000000 +0300
+@@ -34,7 +34,7 @@
+ # endif
+ #endif
+
+-#if NV_OS_DARWIN
++#if NV_OS_DARWIN || NV_OS_FREEBSD
+ # include <unistd.h> // getpid
+ # include <sys/types.h>
+ # include <sys/sysctl.h> // sysctl
+@@ -195,6 +195,14 @@
+ return (void *) ucp->uc_mcontext->ss.eip;
+ # endif
+ # endif
++# elif NV_OS_FREEBSD
++# if NV_CPU_X86_64
++ ucontext_t * ucp = (ucontext_t *)secret;
++ return (void *)ucp->uc_mcontext.mc_rip;
++# elif NV_CPU_X86
++ ucontext_t * ucp = (ucontext_t *)secret;
++ return (void *)ucp->uc_mcontext.mc_eip;
++# endif
+ # else
+ # if NV_CPU_X86_64
+ // #define REG_RIP REG_INDEX(rip) // seems to be 16
diff --git a/graphics/nvidia-texture-tools/files/patch-src-nvcore-nvcore.h b/graphics/nvidia-texture-tools/files/patch-src-nvcore-nvcore.h
new file mode 100644
index 000000000000..b77ddcc0d055
--- /dev/null
+++ b/graphics/nvidia-texture-tools/files/patch-src-nvcore-nvcore.h
@@ -0,0 +1,21 @@
+--- src/nvcore/nvcore.h.orig 2008-12-01 11:04:27.000000000 +0300
++++ src/nvcore/nvcore.h 2009-03-06 22:45:11.000000000 +0300
+@@ -38,6 +38,9 @@
+ #if defined POSH_OS_LINUX
+ # define NV_OS_LINUX 1
+ # define NV_OS_UNIX 1
++#elif defined POSH_OS_FREEBSD
++# define NV_OS_FREEBSD 1
++# define NV_OS_UNIX 1
+ #elif defined POSH_OS_CYGWIN32
+ # define NV_OS_CYGWIN 1
+ #elif defined POSH_OS_MINGW
+@@ -158,7 +161,7 @@
+ #elif NV_CC_GNUC
+ # if NV_OS_LINUX
+ # include "DefsGnucLinux.h"
+-# elif NV_OS_DARWIN
++# elif NV_OS_DARWIN || NV_OS_FREEBSD
+ # include "DefsGnucDarwin.h"
+ # elif NV_OS_MINGW
+ # include "DefsGnucWin32.h"
diff --git a/graphics/nvidia-texture-tools/files/patch-src-nvcore-poshlib-posh.h b/graphics/nvidia-texture-tools/files/patch-src-nvcore-poshlib-posh.h
new file mode 100644
index 000000000000..640ebb7f8fdc
--- /dev/null
+++ b/graphics/nvidia-texture-tools/files/patch-src-nvcore-poshlib-posh.h
@@ -0,0 +1,14 @@
+--- src/nvcore/poshlib/posh.h.orig 2008-12-01 11:04:27.000000000 +0300
++++ src/nvcore/poshlib/posh.h 2009-03-06 22:36:38.000000000 +0300
+@@ -293,6 +293,11 @@
+ # define POSH_OS_STRING "Linux"
+ #endif
+
++#if defined __FreeBSD__
++# define POSH_OS_FREEBSD 1
++# define POSH_OS_STRING "FreeBSD"
++#endif
++
+ #if defined __CYGWIN32__
+ # define POSH_OS_CYGWIN32 1
+ # define POSH_OS_STRING "Cygwin"
diff --git a/graphics/nvidia-texture-tools/files/patch-src-nvmath-nvmath.h b/graphics/nvidia-texture-tools/files/patch-src-nvmath-nvmath.h
new file mode 100644
index 000000000000..6230ee1a5c8a
--- /dev/null
+++ b/graphics/nvidia-texture-tools/files/patch-src-nvmath-nvmath.h
@@ -0,0 +1,20 @@
+--- src/nvmath/nvmath.h.orig 2008-12-01 11:04:28.000000000 +0300
++++ src/nvmath/nvmath.h 2009-03-06 22:38:28.000000000 +0300
+@@ -97,7 +97,7 @@
+ {
+ #if NV_OS_WIN32
+ return _finite(f) != 0;
+-#elif NV_OS_DARWIN
++#elif NV_OS_DARWIN || NV_OS_FREEBSD
+ return isfinite(f);
+ #elif NV_OS_LINUX
+ return finitef(f);
+@@ -112,7 +112,7 @@
+ {
+ #if NV_OS_WIN32
+ return _isnan(f) != 0;
+-#elif NV_OS_DARWIN
++#elif NV_OS_DARWIN || NV_OS_FREEBSD
+ return isnan(f);
+ #elif NV_OS_LINUX
+ return isnanf(f);
diff --git a/graphics/nvidia-texture-tools/files/patch-src-nvtt-CMakeLists.txt b/graphics/nvidia-texture-tools/files/patch-src-nvtt-CMakeLists.txt
new file mode 100644
index 000000000000..4b78d2b32e0c
--- /dev/null
+++ b/graphics/nvidia-texture-tools/files/patch-src-nvtt-CMakeLists.txt
@@ -0,0 +1,15 @@
+--- src/nvtt/CMakeLists.txt.orig 2008-12-01 11:04:29.000000000 +0300
++++ src/nvtt/CMakeLists.txt 2009-03-06 22:58:45.000000000 +0300
+@@ -105,9 +105,11 @@
+ QT4_WRAP_CPP(MOCS tools/configdialog.h)
+ #QT4_ADD_RESOURCES(RCCS tools/configdialog.rc)
+
+- ADD_EXECUTABLE(nvcompressui MACOSX_BUNDLE ${SRCS} ${UICS} ${MOCS})
++ ADD_EXECUTABLE(nvcompressui ${SRCS} ${UICS} ${MOCS})
+ TARGET_LINK_LIBRARIES(nvcompressui ${LIBS})
+
++ INSTALL(TARGETS nvcompressui DESTINATION bin)
++
+ ENDIF(QT4_FOUND AND NOT MSVC)
+
+
diff --git a/graphics/nvidia-texture-tools/pkg-descr b/graphics/nvidia-texture-tools/pkg-descr
new file mode 100644
index 000000000000..8940d0cc5bc4
--- /dev/null
+++ b/graphics/nvidia-texture-tools/pkg-descr
@@ -0,0 +1,12 @@
+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.
+
+WWW: http://code.google.com/p/nvidia-texture-tools/
diff --git a/graphics/nvidia-texture-tools/pkg-plist b/graphics/nvidia-texture-tools/pkg-plist
new file mode 100644
index 000000000000..f6f903b2a091
--- /dev/null
+++ b/graphics/nvidia-texture-tools/pkg-plist
@@ -0,0 +1,13 @@
+bin/nvassemble
+bin/nvcompress
+%%COMPRESSUI%%bin/nvcompressui
+bin/nvddsinfo
+bin/nvdecompress
+bin/nvimgdiff
+bin/nvzoom
+include/nvtt/nvtt.h
+lib/libnvcore.a
+lib/libnvimage.a
+lib/libnvmath.a
+lib/libnvtt.a
+@dirrm include/nvtt