pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/nvidia-texture-tools Import nvidia-texture-to...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f6e9f21509c8
branches: trunk
changeset: 352724:f6e9f21509c8
user: kamil <kamil%pkgsrc.org@localhost>
date: Sun Sep 18 17:08:20 2016 +0000
description:
Import nvidia-texture-tools-2.0.8 as graphics/nvidia-texture-tools
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.
diffstat:
graphics/nvidia-texture-tools/DESCR | 4 +
graphics/nvidia-texture-tools/Makefile | 22 ++
graphics/nvidia-texture-tools/PLIST | 12 +
graphics/nvidia-texture-tools/buildlink3.mk | 16 ++
graphics/nvidia-texture-tools/distinfo | 12 +
graphics/nvidia-texture-tools/patches/patch-src_nvcore_Debug.cpp | 56 +++++++
graphics/nvidia-texture-tools/patches/patch-src_nvcore_DefsGnucNetBSD.h | 72 +++++++++
graphics/nvidia-texture-tools/patches/patch-src_nvcore_nvcore.h | 25 +++
graphics/nvidia-texture-tools/patches/patch-src_nvcore_poshlib_posh.h | 24 +++
graphics/nvidia-texture-tools/patches/patch-src_nvimage_ImageIO.cpp | 75 ++++++++++
graphics/nvidia-texture-tools/patches/patch-src_nvmath_nvmath.h | 24 +++
11 files changed, 342 insertions(+), 0 deletions(-)
diffs (truncated from 386 to 300 lines):
diff -r e6566a48b113 -r f6e9f21509c8 graphics/nvidia-texture-tools/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/nvidia-texture-tools/DESCR Sun Sep 18 17:08:20 2016 +0000
@@ -0,0 +1,4 @@
+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.
diff -r e6566a48b113 -r f6e9f21509c8 graphics/nvidia-texture-tools/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/nvidia-texture-tools/Makefile Sun Sep 18 17:08:20 2016 +0000
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1 2016/09/18 17:08:20 kamil Exp $
+
+DISTNAME= nvidia-texture-tools-2.0.8
+CATEGORIES= graphics
+MASTER_SITES= ${MASTER_SITE_GITHUB:=castano/}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/castano/nvidia-texture-tools/wiki
+COMMENT= Texture processing tools with support for Direct3D 10 and 11 formats
+LICENSE= mit
+
+HAS_CONFIGURE= yes
+USE_CMAKE= yes
+USE_LANGUAGES= c c++
+
+CMAKE_ARGS+= -DNVTT_SHARED=ON
+
+.include "../../graphics/openexr/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../graphics/tiff/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r e6566a48b113 -r f6e9f21509c8 graphics/nvidia-texture-tools/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/nvidia-texture-tools/PLIST Sun Sep 18 17:08:20 2016 +0000
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1 2016/09/18 17:08:20 kamil Exp $
+bin/nvassemble
+bin/nvcompress
+bin/nvddsinfo
+bin/nvdecompress
+bin/nvimgdiff
+bin/nvzoom
+include/nvtt/nvtt.h
+lib/libnvcore.so
+lib/libnvimage.so
+lib/libnvmath.so
+lib/libnvtt.so
diff -r e6566a48b113 -r f6e9f21509c8 graphics/nvidia-texture-tools/buildlink3.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/nvidia-texture-tools/buildlink3.mk Sun Sep 18 17:08:20 2016 +0000
@@ -0,0 +1,16 @@
+# $NetBSD: buildlink3.mk,v 1.1 2016/09/18 17:08:20 kamil Exp $
+
+BUILDLINK_TREE+= nvidia-texture-tools
+
+.if !defined(NVIDIA_TEXTURE_TOOLS_BUILDLINK3_MK)
+NVIDIA_TEXTURE_TOOLS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.nvidia-texture-tools+= nvidia-texture-tools>=2.0.8
+BUILDLINK_PKGSRCDIR.nvidia-texture-tools?= ../../wip/nvidia-texture-tools
+
+.include "../../graphics/openexr/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../graphics/tiff/buildlink3.mk"
+.endif # NVIDIA_TEXTURE_TOOLS_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -nvidia-texture-tools
diff -r e6566a48b113 -r f6e9f21509c8 graphics/nvidia-texture-tools/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/nvidia-texture-tools/distinfo Sun Sep 18 17:08:20 2016 +0000
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.1 2016/09/18 17:08:20 kamil Exp $
+
+SHA1 (nvidia-texture-tools-2.0.8.tar.gz) = 5e032be01a17feef3f78fd0aa35aaf1eec81b620
+RMD160 (nvidia-texture-tools-2.0.8.tar.gz) = 86fc38c77cf0529bd0b1746322a7923cc3deecaf
+SHA512 (nvidia-texture-tools-2.0.8.tar.gz) = 342b9e14a1bdeeee8fae4a3b0446b25b01e13915cc5bd29396e6ca01bb1262c64e759008a7d7debf8a811c7cf16c54d44c22f31557e626cd0bafea07724bab01
+Size (nvidia-texture-tools-2.0.8.tar.gz) = 939218 bytes
+SHA1 (patch-src_nvcore_Debug.cpp) = 17499d48fca6d19a0adc4118e4e64a22913ca64f
+SHA1 (patch-src_nvcore_DefsGnucNetBSD.h) = b5497bad0aac0cfbc8c10da70b0918621935a919
+SHA1 (patch-src_nvcore_nvcore.h) = c769e4d3a4bfe02054df7c7529554e21c3108e3c
+SHA1 (patch-src_nvcore_poshlib_posh.h) = 0641af0a61d0f5cc158623b204136c0e383586a3
+SHA1 (patch-src_nvimage_ImageIO.cpp) = 0863e3d4f6dfcd2d1b94c0e9e7592a17c85caafd
+SHA1 (patch-src_nvmath_nvmath.h) = c6a06d8043f5f80dc936b26f1cae41e7b2f4d804
diff -r e6566a48b113 -r f6e9f21509c8 graphics/nvidia-texture-tools/patches/patch-src_nvcore_Debug.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/nvidia-texture-tools/patches/patch-src_nvcore_Debug.cpp Sun Sep 18 17:08:20 2016 +0000
@@ -0,0 +1,56 @@
+$NetBSD: patch-src_nvcore_Debug.cpp,v 1.1 2016/09/18 17:08:20 kamil Exp $
+
+Add NetBSD support.
+
+--- src/nvcore/Debug.cpp.orig 2010-05-15 09:12:05.000000000 +0000
++++ src/nvcore/Debug.cpp
+@@ -34,7 +34,7 @@
+ # endif
+ #endif
+
+-#if NV_OS_DARWIN
++#if NV_OS_DARWIN || NV_OS_NETBSD
+ # include <unistd.h> // getpid
+ # include <sys/types.h>
+ # include <sys/sysctl.h> // sysctl
+@@ -133,7 +133,7 @@ namespace
+
+ #elif !NV_OS_WIN32 && defined(HAVE_SIGNAL_H) // NV_OS_LINUX || NV_OS_DARWIN
+
+-#if defined(HAVE_EXECINFO_H) // NV_OS_LINUX
++#if defined(HAVE_EXECINFO_H) // NV_OS_LINUX || NV_OS_NETBSD
+
+ static bool nvHasStackTrace() {
+ #if NV_OS_DARWIN
+@@ -199,6 +199,17 @@ namespace
+ return (void *) ucp->uc_mcontext->ss.eip;
+ # endif
+ # endif
++# elif NV_OS_NETBSD
++# if NV_CPU_X86_64
++ ucontext_t * ucp = (ucontext_t *)secret;
++ return (void *)ucp->uc_mcontext.__gregs[_REG_RIP];
++# elif NV_CPU_X86
++ ucontext_t * ucp = (ucontext_t *)secret;
++ return (void *)ucp->uc_mcontext.__gregs[_REG_EIP];
++# elif NV_CPU_PPC
++ ucontext_t * ucp = (ucontext_t *)secret;
++ return (void *)ucp->uc_mcontext.__gregs[_REG_PC];
++# endif
+ # else
+ # if NV_CPU_X86_64
+ // #define REG_RIP REG_INDEX(rip) // seems to be 16
+@@ -215,7 +226,7 @@ namespace
+
+ // How to obtain the instruction pointers in different platforms, from mlton's source code.
+ // http://mlton.org/
+- // OpenBSD && NetBSD
++ // OpenBSD
+ // ucp->sc_eip
+ // FreeBSD:
+ // ucp->uc_mcontext.mc_eip
+@@ -534,4 +545,3 @@ void debug::disableSigHandler()
+
+ #endif
+ }
+-
diff -r e6566a48b113 -r f6e9f21509c8 graphics/nvidia-texture-tools/patches/patch-src_nvcore_DefsGnucNetBSD.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/nvidia-texture-tools/patches/patch-src_nvcore_DefsGnucNetBSD.h Sun Sep 18 17:08:20 2016 +0000
@@ -0,0 +1,72 @@
+$NetBSD: patch-src_nvcore_DefsGnucNetBSD.h,v 1.1 2016/09/18 17:08:20 kamil Exp $
+
+Add NetBSD support.
+
+--- src/nvcore/DefsGnucNetBSD.h.orig 2016-07-29 23:19:05.554359582 +0000
++++ src/nvcore/DefsGnucNetBSD.h
+@@ -0,0 +1,65 @@
++#ifndef NV_CORE_H
++#error "Do not include this file directly."
++#endif
++
++#include <stdint.h> // uint8_t, int8_t, ...
++
++// Function linkage
++#define DLL_IMPORT
++#if __GNUC__ >= 4
++# define DLL_EXPORT __attribute__((visibility("default")))
++# define DLL_EXPORT_CLASS DLL_EXPORT
++#else
++# define DLL_EXPORT
++# define DLL_EXPORT_CLASS
++#endif
++
++// Function calling modes
++#if NV_CPU_X86
++# define NV_CDECL __attribute__((cdecl))
++# define NV_STDCALL __attribute__((stdcall))
++#else
++# define NV_CDECL
++# define NV_STDCALL
++#endif
++
++#define NV_FASTCALL __attribute__((fastcall))
++#define NV_FORCEINLINE __attribute__((always_inline))
++#define NV_DEPRECATED __attribute__((deprecated))
++
++#if __GNUC__ > 2
++#define NV_PURE __attribute__((pure))
++#define NV_CONST __attribute__((const))
++#else
++#define NV_PURE
++#define NV_CONST
++#endif
++
++// Define __FUNC__ properly.
++#if __STDC_VERSION__ < 199901L
++# if __GNUC__ >= 2
++# define __FUNC__ __PRETTY_FUNCTION__ // __FUNCTION__
++# else
++# define __FUNC__ "<unknown>"
++# endif
++#else
++# define __FUNC__ __PRETTY_FUNCTION__
++#endif
++
++#define restrict __restrict__
++
++// Type definitions
++typedef uint8_t uint8;
++typedef int8_t int8;
++
++typedef uint16_t uint16;
++typedef int16_t int16;
++
++typedef uint32_t uint32;
++typedef int32_t int32;
++
++typedef unsigned long long uint64;
++typedef int64_t int64;
++
++// Aliases
++typedef uint32 uint;
diff -r e6566a48b113 -r f6e9f21509c8 graphics/nvidia-texture-tools/patches/patch-src_nvcore_nvcore.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/nvidia-texture-tools/patches/patch-src_nvcore_nvcore.h Sun Sep 18 17:08:20 2016 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_nvcore_nvcore.h,v 1.1 2016/09/18 17:08:20 kamil Exp $
+
+Add NetBSD support.
+
+--- src/nvcore/nvcore.h.orig 2010-05-15 09:12:05.000000000 +0000
++++ src/nvcore/nvcore.h
+@@ -43,6 +43,9 @@
+ #elif defined POSH_OS_MINGW
+ # define NV_OS_MINGW 1
+ # define NV_OS_WIN32 1
++#elif defined POSH_OS_NETBSD
++# define NV_OS_NETBSD 1
++# define NV_OS_UNIX 1
+ #elif defined POSH_OS_OSX
+ # define NV_OS_DARWIN 1
+ # define NV_OS_UNIX 1
+@@ -160,6 +163,8 @@
+ # include "DefsGnucLinux.h"
+ # elif NV_OS_DARWIN
+ # include "DefsGnucDarwin.h"
++# elif NV_OS_NETBSD
++# include "DefsGnucNetBSD.h"
+ # elif NV_OS_MINGW
+ # include "DefsGnucWin32.h"
+ # elif NV_OS_CYGWIN
diff -r e6566a48b113 -r f6e9f21509c8 graphics/nvidia-texture-tools/patches/patch-src_nvcore_poshlib_posh.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/nvidia-texture-tools/patches/patch-src_nvcore_poshlib_posh.h Sun Sep 18 17:08:20 2016 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_nvcore_poshlib_posh.h,v 1.1 2016/09/18 17:08:20 kamil Exp $
+
+Add NetBSD support.
+
+--- src/nvcore/poshlib/posh.h.orig 2010-05-15 09:12:05.000000000 +0000
++++ src/nvcore/poshlib/posh.h
+@@ -372,6 +372,11 @@ Metrowerks:
+ # define POSH_OS_STRING "Amiga"
+ #endif
+
++#if defined __NetBSD__
++# define POSH_OS_NETBSD 1
++# define POSH_OS_STRING "NetBSD"
++#endif
++
+ #if defined __unix__
+ # define POSH_OS_UNIX 1
+ # if !defined POSH_OS_STRING
+@@ -1003,5 +1008,3 @@ extern posh_i64_t POSH_ReadI64FromBig(
+ #ifdef __cplusplus
+ }
+ #endif
+-
+-
diff -r e6566a48b113 -r f6e9f21509c8 graphics/nvidia-texture-tools/patches/patch-src_nvimage_ImageIO.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/nvidia-texture-tools/patches/patch-src_nvimage_ImageIO.cpp Sun Sep 18 17:08:20 2016 +0000
@@ -0,0 +1,75 @@
+$NetBSD: patch-src_nvimage_ImageIO.cpp,v 1.1 2016/09/18 17:08:20 kamil Exp $
+
+Add NetBSD support.
+Adapt for new libpng API.
+Fix false->NULL conversion warnings.
+
+--- src/nvimage/ImageIO.cpp.orig 2010-05-15 09:12:05.000000000 +0000
++++ src/nvimage/ImageIO.cpp
+@@ -135,7 +135,7 @@ FloatImage * nv::ImageIO::loadFloat(cons
+ StdInputStream stream(fileName);
+
+ if (stream.isError()) {
+- return false;
++ return NULL;
+ }
+
+ return loadFloat(fileName, stream);
Home |
Main Index |
Thread Index |
Old Index