summaryrefslogtreecommitdiff
path: root/graphics/openimageio
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2012-12-03 12:54:14 +0000
committerryoon <ryoon@pkgsrc.org>2012-12-03 12:54:14 +0000
commit36ea90bad3f0d7bda6f7d6e118995e4f9c00a445 (patch)
tree09a466abe4868f042ccac45c5e3aa43c071ac64e /graphics/openimageio
parent7152d80ee084def5731e2ee57435e5c1eaedaa34 (diff)
downloadpkgsrc-36ea90bad3f0d7bda6f7d6e118995e4f9c00a445.tar.gz
Import openimageio-1.1.1 as graphics/openimageio.
OpenImageIO is a library for reading and writing images, and a bunch of related classes, utilities, and applications. There is a particular emphasis on formats and functionality used in professional, large-scale animation and visual effects work for film. OpenImageIO is used extensively in animation and VFX studios all over the world, and is also incorporated into several commercial products.
Diffstat (limited to 'graphics/openimageio')
-rw-r--r--graphics/openimageio/DESCR7
-rw-r--r--graphics/openimageio/Makefile47
-rw-r--r--graphics/openimageio/PLIST66
-rw-r--r--graphics/openimageio/buildlink3.mk13
-rw-r--r--graphics/openimageio/distinfo13
-rw-r--r--graphics/openimageio/patches/patch-CMakeLists.txt44
-rw-r--r--graphics/openimageio/patches/patch-cmake_oiio__macros.cmake24
-rw-r--r--graphics/openimageio/patches/patch-cmake_platform.cmake16
-rw-r--r--graphics/openimageio/patches/patch-include_tbb_tbb__machine.h13
-rw-r--r--graphics/openimageio/patches/patch-include_tbb_tbb__misc.h27
-rw-r--r--graphics/openimageio/patches/patch-libutil_sysutil.cpp24
-rw-r--r--graphics/openimageio/patches/patch-make_detectplatform.mk33
-rw-r--r--graphics/openimageio/patches/patch-ptex.imageio_ptex_PtexPlatform.h15
13 files changed, 342 insertions, 0 deletions
diff --git a/graphics/openimageio/DESCR b/graphics/openimageio/DESCR
new file mode 100644
index 00000000000..01bc8ae6edd
--- /dev/null
+++ b/graphics/openimageio/DESCR
@@ -0,0 +1,7 @@
+OpenImageIO is a library for reading and writing images, and a
+bunch of related classes, utilities, and applications. There is
+a particular emphasis on formats and functionality used in
+professional, large-scale animation and visual effects work for
+film. OpenImageIO is used extensively in animation and VFX studios
+all over the world, and is also incorporated into several commercial
+products.
diff --git a/graphics/openimageio/Makefile b/graphics/openimageio/Makefile
new file mode 100644
index 00000000000..136ab3189fd
--- /dev/null
+++ b/graphics/openimageio/Makefile
@@ -0,0 +1,47 @@
+# $NetBSD: Makefile,v 1.1 2012/12/03 12:54:14 ryoon Exp $
+#
+
+DISTNAME= oiio-Release-1.1.1
+PKGNAME= ${DISTNAME:S/oiio-Release/openimageio/}
+CATEGORIES= graphics
+MASTER_SITES= -https://github.com/OpenImageIO/oiio/archive/Release-1.1.1.tar.gz
+
+MAINTAINER= ryoon@NetBSD.org
+HOMEPAGE= https://sites.google.com/site/openimageio/
+COMMENT= OpenImageIO is a library for reading and writing images
+LICENSE= modified-bsd
+
+# Force using "curl" for fetching the distribution file. It is only available
+# over HTTPS and "curl" is the only fetch program which always supports HTTPS.
+FETCH_USING= curl
+
+WRKSRC= ${WRKDIR}/${DISTNAME}/src
+
+USE_TOOLS+= gmake
+USE_CMAKE= yes
+USE_LANGUAGES= c c++
+
+CXXFLAGS+= -std=c++0x
+
+CMAKE_ARGS+= -DILMBASE_HOME:STRING=${BUILDLINK_PREFIX.ilmbase}
+CMAKE_ARGS+= -DOPENJPEG_HOME:STRING=${BUILDLINK_PREFIX.openjpeg}
+CMAKE_ARGS+= -DOPENEXR_HOME:STRING=${BUILDLINK_PREFIX.openexr}
+
+post-patch:
+ ${RM} -f ${WRKSRC}/include/tbb/tbb_machine.h.orig
+ ${RM} -f ${WRKSRC}/include/tbb/tbb_misc.h.orig
+
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/hdf5/buildlink3.mk"
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../graphics/glew/buildlink3.mk"
+.include "../../graphics/ilmbase/buildlink3.mk"
+.include "../../graphics/libwebp/buildlink3.mk"
+.include "../../graphics/opencv/buildlink3.mk"
+.include "../../graphics/openjpeg/buildlink3.mk"
+.include "../../graphics/openexr/buildlink3.mk"
+.include "../../graphics/tiff/buildlink3.mk"
+.include "../../x11/qt4-libs/buildlink3.mk"
+BUILDLINK_DEPMETHOD.qt4-tools= build
+.include "../../x11/qt4-tools/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/openimageio/PLIST b/graphics/openimageio/PLIST
new file mode 100644
index 00000000000..378ae7fb81a
--- /dev/null
+++ b/graphics/openimageio/PLIST
@@ -0,0 +1,66 @@
+@comment $NetBSD: PLIST,v 1.1 2012/12/03 12:54:14 ryoon Exp $
+bin/iconvert
+bin/idiff
+bin/igrep
+bin/iinfo
+bin/iv
+bin/maketx
+bin/oiiotool
+include/OpenImageIO/argparse.h
+include/OpenImageIO/color.h
+include/OpenImageIO/dassert.h
+include/OpenImageIO/errorhandler.h
+include/OpenImageIO/export.h
+include/OpenImageIO/filesystem.h
+include/OpenImageIO/filter.h
+include/OpenImageIO/fmath.h
+include/OpenImageIO/hash.h
+include/OpenImageIO/imagebuf.h
+include/OpenImageIO/imagebufalgo.h
+include/OpenImageIO/imagecache.h
+include/OpenImageIO/imageio.h
+include/OpenImageIO/optparser.h
+include/OpenImageIO/osdep.h
+include/OpenImageIO/paramlist.h
+include/OpenImageIO/plugin.h
+include/OpenImageIO/pugiconfig.hpp
+include/OpenImageIO/pugixml.hpp
+include/OpenImageIO/refcnt.h
+include/OpenImageIO/strutil.h
+include/OpenImageIO/sysutil.h
+include/OpenImageIO/tbb/_tbb_windef.h
+include/OpenImageIO/tbb/aligned_space.h
+include/OpenImageIO/tbb/atomic.h
+include/OpenImageIO/tbb/machine/ibm_aix51.h
+include/OpenImageIO/tbb/machine/linux_common.h
+include/OpenImageIO/tbb/machine/linux_ia32.h
+include/OpenImageIO/tbb/machine/linux_ia64.h
+include/OpenImageIO/tbb/machine/linux_intel64.h
+include/OpenImageIO/tbb/machine/mac_ppc.h
+include/OpenImageIO/tbb/machine/windows_ia32.h
+include/OpenImageIO/tbb/machine/windows_intel64.h
+include/OpenImageIO/tbb/spin_mutex.h
+include/OpenImageIO/tbb/spin_rw_mutex.h
+include/OpenImageIO/tbb/tbb_allocator.h
+include/OpenImageIO/tbb/tbb_assert_impl.h
+include/OpenImageIO/tbb/tbb_config.h
+include/OpenImageIO/tbb/tbb_exception.h
+include/OpenImageIO/tbb/tbb_machine.h
+include/OpenImageIO/tbb/tbb_misc.h
+include/OpenImageIO/tbb/tbb_profiling.h
+include/OpenImageIO/tbb/tbb_stddef.h
+include/OpenImageIO/tbb/tbb_version.h
+include/OpenImageIO/texture.h
+include/OpenImageIO/thread.h
+include/OpenImageIO/timer.h
+include/OpenImageIO/tinyformat.h
+include/OpenImageIO/typedesc.h
+include/OpenImageIO/ustring.h
+include/OpenImageIO/varyingref.h
+include/OpenImageIO/version.h
+lib/libOpenImageIO.so
+lib/libOpenImageIO.so.1.1
+lib/libOpenImageIO.so.${PKGVERSION}
+share/doc/openimageio/CHANGES
+share/doc/openimageio/LICENSE
+share/doc/openimageio/openimageio.pdf
diff --git a/graphics/openimageio/buildlink3.mk b/graphics/openimageio/buildlink3.mk
new file mode 100644
index 00000000000..7b0d4b42965
--- /dev/null
+++ b/graphics/openimageio/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2012/12/03 12:54:14 ryoon Exp $
+
+BUILDLINK_TREE+= openimageio
+
+.if !defined(OPENIMAGEIO_BUILDLINK3_MK)
+OPENIMAGEIO_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.openimageio+= openimageio>=1.1.1
+BUILDLINK_PKGSRCDIR.openimageio?= ../../graphics/openimageio
+
+.endif # OPENIMAGEIO_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -openimageio
diff --git a/graphics/openimageio/distinfo b/graphics/openimageio/distinfo
new file mode 100644
index 00000000000..7d00d5032c0
--- /dev/null
+++ b/graphics/openimageio/distinfo
@@ -0,0 +1,13 @@
+$NetBSD: distinfo,v 1.1 2012/12/03 12:54:14 ryoon Exp $
+
+SHA1 (oiio-Release-1.1.1.tar.gz) = f46e0a6f42c9fb875702ee526e9bf073110791ea
+RMD160 (oiio-Release-1.1.1.tar.gz) = 3ff3119fcb61ffaa2ec4828a3ce356ac8702ec88
+Size (oiio-Release-1.1.1.tar.gz) = 8217036 bytes
+SHA1 (patch-CMakeLists.txt) = 2923ca84d7981aaaf6494588392444e5ee07f74a
+SHA1 (patch-cmake_oiio__macros.cmake) = 016c4792c1dc85a903477f4c72af26577e1b2bb9
+SHA1 (patch-cmake_platform.cmake) = 841295fbd0ba47dda7224e6536b0a7e6f6ea9558
+SHA1 (patch-include_tbb_tbb__machine.h) = 7d9a196397315e0d39dd2f16139e011ab84c5630
+SHA1 (patch-include_tbb_tbb__misc.h) = 27995a9cdb72b182e352b2a649756af2d60fec86
+SHA1 (patch-libutil_sysutil.cpp) = b7484aef56ea239bae20faba1f04c14907557485
+SHA1 (patch-make_detectplatform.mk) = a399f09b9280109519a829dbacc1b924a074f4cc
+SHA1 (patch-ptex.imageio_ptex_PtexPlatform.h) = 3c32f95181cfcf8c0e67249a4d04f7ea14a5e122
diff --git a/graphics/openimageio/patches/patch-CMakeLists.txt b/graphics/openimageio/patches/patch-CMakeLists.txt
new file mode 100644
index 00000000000..1816e63e6ec
--- /dev/null
+++ b/graphics/openimageio/patches/patch-CMakeLists.txt
@@ -0,0 +1,44 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2012/12/03 12:54:14 ryoon Exp $
+
+* Enable in-tree build
+* Remove rpath handling
+
+--- CMakeLists.txt.orig 2012-11-16 23:02:42.000000000 +0000
++++ CMakeLists.txt
+@@ -13,10 +13,6 @@ set (CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS T
+ message (STATUS "Project source dir = ${PROJECT_SOURCE_DIR}")
+ message (STATUS "Project build dir = ${CMAKE_BINARY_DIR}")
+
+-if (${PROJECT_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
+- message (FATAL_ERROR "Not allowed to run in-source build!")
+-endif ()
+-
+ if (NOT CMAKE_BUILD_TYPE)
+ set (CMAKE_BUILD_TYPE "Release")
+ endif ()
+@@ -197,25 +193,6 @@ endif()
+ set (INSTALL_DOCS ON CACHE BOOL "Install documentation")
+
+
+-###########################################################################
+-# Rpath handling.
+-if (CMAKE_SKIP_RPATH)
+- # We need to disallow the user from truly setting CMAKE_SKIP_RPATH, since
+- # we want to run the generated executables from the build tree in order to
+- # generate the manual page documentation. However, we make sure the
+- # install rpath is unset so that the install tree is still free of rpaths
+- # for linux packaging purposes.
+- set (CMAKE_SKIP_RPATH FALSE)
+- unset (CMAKE_INSTALL_RPATH)
+-else ()
+- set (CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
+- if (NOT IS_ABSOLUTE ${CMAKE_INSTALL_RPATH})
+- set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
+- endif ()
+- set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+-endif ()
+-
+-
+ if (MSVC)
+ add_definitions (-D_CRT_SECURE_NO_DEPRECATE)
+ add_definitions (-D_CRT_SECURE_NO_WARNINGS)
diff --git a/graphics/openimageio/patches/patch-cmake_oiio__macros.cmake b/graphics/openimageio/patches/patch-cmake_oiio__macros.cmake
new file mode 100644
index 00000000000..266e3463177
--- /dev/null
+++ b/graphics/openimageio/patches/patch-cmake_oiio__macros.cmake
@@ -0,0 +1,24 @@
+$NetBSD: patch-cmake_oiio__macros.cmake,v 1.1 2012/12/03 12:54:14 ryoon Exp $
+
+* Set python interpreter as pkgsrc-provided one
+
+--- cmake/oiio_macros.cmake.orig 2012-11-16 23:02:42.000000000 +0000
++++ cmake/oiio_macros.cmake
+@@ -103,7 +103,7 @@ macro (oiio_add_tests)
+ if (_has_generator_expr)
+ set (_add_test_args NAME ${_testname}
+ # WORKING_DIRECTORY ${_testdir}
+- COMMAND python)
++ COMMAND ${PYTHONBIN})
+ if (MSVC_IDE)
+ set (_extra_test_args
+ --devenv-config $<CONFIGURATION>
+@@ -112,7 +112,7 @@ macro (oiio_add_tests)
+ set (_extra_test_args "")
+ endif ()
+ else ()
+- set (_add_test_args ${_testname} python)
++ set (_add_test_args ${_testname} ${PYTHONBIN})
+ set (_extra_test_args "")
+ endif ()
+ if (VERBOSE)
diff --git a/graphics/openimageio/patches/patch-cmake_platform.cmake b/graphics/openimageio/patches/patch-cmake_platform.cmake
new file mode 100644
index 00000000000..9db3a846965
--- /dev/null
+++ b/graphics/openimageio/patches/patch-cmake_platform.cmake
@@ -0,0 +1,16 @@
+$NetBSD: patch-cmake_platform.cmake,v 1.1 2012/12/03 12:54:14 ryoon Exp $
+
+* Add NetBSD support
+
+--- cmake/platform.cmake.orig 2012-11-16 23:02:42.000000000 +0000
++++ cmake/platform.cmake
+@@ -23,6 +23,9 @@ if (UNIX)
+ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+ set (platform "FreeBSD")
+ set (CXXFLAGS "${CXXFLAGS} -DFREEBSD")
++ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD")
++ set (platform "NetBSD")
++ set (CXXFLAGS "${CXXFLAGS} -DNETBSD")
+ else ()
+ string (TOLOWER ${CMAKE_SYSTEM_NAME} platform)
+ endif ()
diff --git a/graphics/openimageio/patches/patch-include_tbb_tbb__machine.h b/graphics/openimageio/patches/patch-include_tbb_tbb__machine.h
new file mode 100644
index 00000000000..fbde1f5c109
--- /dev/null
+++ b/graphics/openimageio/patches/patch-include_tbb_tbb__machine.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-include_tbb_tbb__machine.h,v 1.1 2012/12/03 12:54:14 ryoon Exp $
+
+--- include/tbb/tbb_machine.h.orig 2012-11-16 23:02:42.000000000 +0000
++++ include/tbb/tbb_machine.h
+@@ -53,7 +53,7 @@ extern "C" __declspec(dllimport) int __s
+ #pragma managed(pop)
+ #endif
+
+-#elif __linux__ || __FreeBSD__
++#elif __linux__ || __FreeBSD__ || __NetBSD__
+
+ #if __i386__
+ #include "machine/linux_ia32.h"
diff --git a/graphics/openimageio/patches/patch-include_tbb_tbb__misc.h b/graphics/openimageio/patches/patch-include_tbb_tbb__misc.h
new file mode 100644
index 00000000000..03e8a5c9c04
--- /dev/null
+++ b/graphics/openimageio/patches/patch-include_tbb_tbb__misc.h
@@ -0,0 +1,27 @@
+$NetBSD: patch-include_tbb_tbb__misc.h,v 1.1 2012/12/03 12:54:14 ryoon Exp $
+
+--- include/tbb/tbb_misc.h.orig 2012-11-16 23:02:42.000000000 +0000
++++ include/tbb/tbb_misc.h
+@@ -42,7 +42,7 @@
+ #elif defined(__APPLE__)
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <unistd.h>
+ #endif
+
+@@ -64,11 +64,11 @@ static inline int DetectNumberOfWorkers(
+ return static_cast<int>(si.dwNumberOfProcessors);
+ }
+
+-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun)
++#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) || defined(__NetBSD__)
+ static inline int DetectNumberOfWorkers() {
+ long number_of_workers;
+
+-#if (defined(__FreeBSD__) || defined(__sun)) && defined(_SC_NPROCESSORS_ONLN)
++#if (defined(__FreeBSD__) || defined(__sun) || defined(__NetBSD__)) && defined(_SC_NPROCESSORS_ONLN)
+ number_of_workers = sysconf(_SC_NPROCESSORS_ONLN);
+
+ // In theory, sysconf should work everywhere.
diff --git a/graphics/openimageio/patches/patch-libutil_sysutil.cpp b/graphics/openimageio/patches/patch-libutil_sysutil.cpp
new file mode 100644
index 00000000000..938e429aff4
--- /dev/null
+++ b/graphics/openimageio/patches/patch-libutil_sysutil.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-libutil_sysutil.cpp,v 1.1 2012/12/03 12:54:15 ryoon Exp $
+
+* Treat NetBSD like Linux (I am not sure)
+
+--- libutil/sysutil.cpp.orig 2012-11-16 23:02:42.000000000 +0000
++++ libutil/sysutil.cpp
+@@ -39,7 +39,7 @@
+ # include <sys/ioctl.h>
+ #endif
+
+-#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
++#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__NetBSD__)
+ # include <sys/types.h>
+ # include <sys/resource.h>
+ # include <sys/sysctl.h>
+@@ -150,7 +150,7 @@ Sysutil::this_program_path ()
+ filename[0] = 0;
+ unsigned int size = sizeof(filename);
+
+-#if defined(__linux__)
++#if defined(__linux__) || defined(__NetBSD__)
+ int r = readlink ("/proc/self/exe", filename, size);
+ ASSERT(r < int(size)); // user won't get the right answer if the filename is too long to store
+ if (r > 0) filename[r] = 0; // readlink does not fill in the 0 byte
diff --git a/graphics/openimageio/patches/patch-make_detectplatform.mk b/graphics/openimageio/patches/patch-make_detectplatform.mk
new file mode 100644
index 00000000000..6c6167d37dd
--- /dev/null
+++ b/graphics/openimageio/patches/patch-make_detectplatform.mk
@@ -0,0 +1,33 @@
+$NetBSD: patch-make_detectplatform.mk,v 1.1 2012/12/03 12:54:15 ryoon Exp $
+
+* Add amd64 support for NetBSD
+* Add NetBSD support
+
+--- make/detectplatform.mk.orig 2012-11-16 23:02:42.000000000 +0000
++++ make/detectplatform.mk
+@@ -25,7 +25,9 @@ ifneq (${hw},x86)
+ ifneq (${hw},x86_64)
+ ifneq (${hw},i386)
+ ifneq (${hw},i686)
+- $(error "ERROR: Unknown hardware architecture")
++ ifneq (${hw},amd64)
++ $(error "ERROR: Unknown hardware architecture")
++ endif
+ endif
+ endif
+ endif
+@@ -46,6 +48,14 @@ ifeq (${platform},unknown)
+ endif
+ endif
+
++ # NetBSD
++ ifeq (${uname},netbsd)
++ platform := netbsd
++ ifeq (${hw},amd64)
++ platform := netbsd64
++ endif
++ endif
++
+ # Windows
+ ifeq (${uname},cygwin)
+ platform := windows
diff --git a/graphics/openimageio/patches/patch-ptex.imageio_ptex_PtexPlatform.h b/graphics/openimageio/patches/patch-ptex.imageio_ptex_PtexPlatform.h
new file mode 100644
index 00000000000..991d6203df1
--- /dev/null
+++ b/graphics/openimageio/patches/patch-ptex.imageio_ptex_PtexPlatform.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-ptex.imageio_ptex_PtexPlatform.h,v 1.1 2012/12/03 12:54:15 ryoon Exp $
+
+* Treat NetBSD like FreeBSD
+
+--- ptex.imageio/ptex/PtexPlatform.h.orig 2012-11-16 23:02:42.000000000 +0000
++++ ptex.imageio/ptex/PtexPlatform.h
+@@ -60,7 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+
+ // linux/unix/posix
+ #include <stdlib.h>
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <alloca.h>
+ #endif
+ #include <string.h>