diff options
author | Marcus von Appen <mva@FreeBSD.org> | 2012-12-20 10:48:05 +0000 |
---|---|---|
committer | Marcus von Appen <mva@FreeBSD.org> | 2012-12-20 10:48:05 +0000 |
commit | d2611de5ec0ee28926ef31b5b0ae55b727527f41 (patch) | |
tree | c7632b49365d48f377321af88814dd6191fe649a | |
parent | 746b3c2792f31f2cbe2f8c091396a2412d4d4baf (diff) | |
download | ports-d2611de5ec0ee28926ef31b5b0ae55b727527f41.tar.gz ports-d2611de5ec0ee28926ef31b5b0ae55b727527f41.zip |
Notes
-rw-r--r-- | graphics/openimageio/Makefile | 71 | ||||
-rw-r--r-- | graphics/openimageio/distinfo | 4 | ||||
-rw-r--r-- | graphics/openimageio/files/extra-patch-CMakeLists.txt | 49 | ||||
-rw-r--r-- | graphics/openimageio/files/patch-include__thread.h | 30 | ||||
-rw-r--r-- | graphics/openimageio/pkg-plist | 30 | ||||
-rw-r--r-- | graphics/openimageio/pkg-plist-pybind | 1 | ||||
-rw-r--r-- | graphics/py-openimageio/Makefile | 45 |
7 files changed, 133 insertions, 97 deletions
diff --git a/graphics/openimageio/Makefile b/graphics/openimageio/Makefile index 0323330e1a1e..c999b3c7dd58 100644 --- a/graphics/openimageio/Makefile +++ b/graphics/openimageio/Makefile @@ -1,52 +1,61 @@ -# New ports collection makefile for: OpenImageIO -# Date created: 21 March 2012 -# Whom: Shane Ambler -# +# Created by: Shane Ambler <FreeBSD@Shaneware.biz> # $FreeBSD$ -# -PORTNAME= openimageio -PORTVERSION= 1.0.9 -PORTREVISION= 1 -CATEGORIES= graphics multimedia +PORTNAME?= openimageio +PORTVERSION= 1.1.2 +PORTREVISION?= 0 +CATEGORIES?= graphics multimedia MASTER_SITES= https://github.com/OpenImageIO/oiio/tarball/ -DISTNAME= Release-${PORTVERSION} -EXTRACT_SUFX= # empty -DIST_SUBDIR= ${PORTNAME} MAINTAINER= FreeBSD@Shaneware.biz COMMENT= OpenImageIO graphics library -LICENSE= BSD +LICENSE?= BSD -LIB_DEPENDS= IlmImf:${PORTSDIR}/graphics/OpenEXR \ +LIB_DEPENDS?= IlmImf:${PORTSDIR}/graphics/OpenEXR \ boost_thread:${PORTSDIR}/devel/boost-libs \ hdf5:${PORTSDIR}/science/hdf5 \ opencv_legacy:${PORTSDIR}/graphics/opencv \ openjpeg:${PORTSDIR}/graphics/openjpeg \ - tbb:${PORTSDIR}/devel/tbb \ webp:${PORTSDIR}/graphics/webp +USE_GITHUB= yes +GH_ACCOUNT= OpenImageIO +GH_PROJECT= oiio +GH_TAGNAME= Release-${PORTVERSION} +GH_COMMIT= db9df57 + # fbm also installs bin/idiff CONFLICTS= fbm-[0-9]* -FETCH_ARGS= -pRr USE_CMAKE= yes CMAKE_VERBOSE= yes CMAKE_OUTSOURCE= yes -CMAKE_ARGS= -DBUILDSTATIC:BOOL=OFF \ +CMAKE_ARGS?= -DBUILDSTATIC:BOOL=OFF \ -DLINKSTATIC:BOOL=OFF \ - -DUSE_PYTHON:BOOL=OFF \ - -DUSE_TBB:BOOL=ON -LDFLAGS+= -ltbb + -DNOTHREADS:BOOL=OFF \ + -DUSE_TBB:BOOL=OFF + USE_LDCONFIG= yes -WRKSRC= ${WRKDIR}/OpenImageIO-oiio-0d48631/src +WRKSRC= ${WRKDIR}/OpenImageIO-oiio-${GH_COMMIT}/src MAKE_JOBS_SAFE= yes -OPTIONS_DEFINE= DOCS IMAGEVIEWER THREADS -OPTIONS_DEFAULT= DOCS IMAGEVIEWER THREADS +.if defined(OIIO_PYBIND) +EXTRA_PATCHES= ${FILESDIR}/extra-patch-CMakeLists.txt +PLIST= ${PKGDIR}/pkg-plist-pybind +CMAKE_ARGS+= -DUSE_PYTHON:BOOL=ON +.else +PLIST= ${PKGDIR}/pkg-plist +CMAKE_ARGS+= -DUSE_PYTHON:BOOL=OFF +.endif + +.if !defined(OIIO_PYBIND) +OPTIONS_DEFINE= DOCS IMAGEVIEWER OCIO +OPTIONS_DEFAULT= DOCS IMAGEVIEWER OCIO IMAGEVIEWER_DESC= Build image viewer +OCIO_DESC= Colour management support +.endif .include <bsd.port.options.mk> @@ -67,16 +76,18 @@ CMAKE_ARGS+= -DUSE_OPENGL:BOOL=OFF -DUSE_QT:BOOL=OFF PLIST_SUB+= IMAGEVIEWER="@comment " .endif -.if ${PORT_OPTIONS:MTHREADS} -CMAKE_ARGS+= -DNOTHREADS:BOOL=ON +.if ${PORT_OPTIONS:MOCIO} +CMAKE_ARGS+= -DUSE_OCIO:BOOL=ON +LIB_DEPENDS+= OpenColorIO:${PORTSDIR}/graphics/opencolorio .else -CMAKE_ARGS+= -DNOTHREADS:BOOL=OFF +CMAKE_ARGS+= -DUSE_OCIO:BOOL=OFF .endif .include <bsd.port.pre.mk> -.if ${ARCH} == "i386" || ${OSVERSION} < 803000 -USE_GCC= 4.6+ +.if ${ARCH} == "i386" +# for gcc atomics we need to have an arch > i486 +CFLAGS+= -march=i586 .endif .if ${OSVERSION} < 800000 @@ -84,6 +95,8 @@ IGNORE= requires FreeBSD 8.0 or higher .endif post-install: - cd ${PREFIX}/lib && ${LN} -sf libOpenImageIO.so.1.0 libOpenImageIO.so.1 +.if !defined(OIIO_PYBIND) + cd ${PREFIX}/lib && ${LN} -sf libOpenImageIO.so.1.1 libOpenImageIO.so.1 +.endif .include <bsd.port.post.mk> diff --git a/graphics/openimageio/distinfo b/graphics/openimageio/distinfo index 9f1d550a4c8a..f9c2c32690aa 100644 --- a/graphics/openimageio/distinfo +++ b/graphics/openimageio/distinfo @@ -1,2 +1,2 @@ -SHA256 (openimageio/Release-1.0.9) = 59ebc09f3d3e5ac780adc4a3e0020d6986721f6be1c84dd01da7899a565b5204 -SIZE (openimageio/Release-1.0.9) = 4208590 +SHA256 (openimageio-1.1.2.tar.gz) = 8c41094ce6a842bb85ba1523f3dd368afe742b1207a012f3459b7ee6c2bc4d46 +SIZE (openimageio-1.1.2.tar.gz) = 8217176 diff --git a/graphics/openimageio/files/extra-patch-CMakeLists.txt b/graphics/openimageio/files/extra-patch-CMakeLists.txt new file mode 100644 index 000000000000..e7750e90478c --- /dev/null +++ b/graphics/openimageio/files/extra-patch-CMakeLists.txt @@ -0,0 +1,49 @@ +--- ./CMakeLists.txt.orig 2012-11-11 18:38:49.980294043 +1030 ++++ ./CMakeLists.txt 2012-11-11 18:39:47.515297055 +1030 +@@ -234,46 +234,6 @@ + # their add_test commands will not register. + include (CTest) + +- +-# Tell CMake to process the sub-directories +-add_subdirectory (libOpenImageIO) +- +-add_subdirectory (iconvert) +-add_subdirectory (idiff) +-add_subdirectory (igrep) +-add_subdirectory (iinfo) +-add_subdirectory (maketx) +-add_subdirectory (oiiotool) +-add_subdirectory (testtex) +-add_subdirectory (iv) +-# Add IO plugin directories +-if (NOT EMBEDPLUGINS) +- add_subdirectory (bmp.imageio) +- add_subdirectory (cineon.imageio) +- add_subdirectory (dds.imageio) +- add_subdirectory (dpx.imageio) +- add_subdirectory (field3d.imageio) +- add_subdirectory (fits.imageio) +- add_subdirectory (hdr.imageio) +- add_subdirectory (ico.imageio) +- add_subdirectory (iff.imageio) +- add_subdirectory (jpeg.imageio) +- add_subdirectory (jpeg2000.imageio) +- add_subdirectory (openexr.imageio) +- add_subdirectory (png.imageio) +- add_subdirectory (pnm.imageio) +- add_subdirectory (psd.imageio) +- add_subdirectory (ptex.imageio) +- add_subdirectory (rla.imageio) +- add_subdirectory (sgi.imageio) +- add_subdirectory (socket.imageio) +- add_subdirectory (softimage.imageio) +- add_subdirectory (targa.imageio) +- add_subdirectory (tiff.imageio) +- add_subdirectory (webp.imageio) +- add_subdirectory (zfile.imageio) +-endif () +- + if (USE_PYTHON AND oiio_boost_PYTHON_FOUND) + add_subdirectory (python) + endif () diff --git a/graphics/openimageio/files/patch-include__thread.h b/graphics/openimageio/files/patch-include__thread.h new file mode 100644 index 000000000000..4c0bdb22a5e9 --- /dev/null +++ b/graphics/openimageio/files/patch-include__thread.h @@ -0,0 +1,30 @@ +--- ./include/thread.h.orig 2012-11-10 05:51:18.000000000 +1030 ++++ ./include/thread.h 2012-11-11 17:25:34.547296939 +1030 +@@ -70,9 +70,14 @@ + #pragma GCC diagnostic error "-Wunused-variable" + #endif + ++#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401)) ++#define USE_GCC_ATOMICS 1 ++#undef USE_TBB ++#else + #ifndef USE_TBB + # define USE_TBB 0 + #endif ++#endif + + // Include files we need for atomic counters. + // Some day, we hope this is all replaced by use of std::atomic<>. +@@ -97,12 +102,6 @@ + # include <libkern/OSAtomic.h> + #endif + +-#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401)) +-#if !defined(__FreeBSD__) || defined(__x86_64__) +-#define USE_GCC_ATOMICS +-#endif +-#endif +- + OIIO_NAMESPACE_ENTER + { + diff --git a/graphics/openimageio/pkg-plist b/graphics/openimageio/pkg-plist index 6986445cd4b3..c61454a496fa 100644 --- a/graphics/openimageio/pkg-plist +++ b/graphics/openimageio/pkg-plist @@ -2,32 +2,9 @@ bin/iconvert bin/idiff bin/igrep bin/iinfo -bin/iprocess %%IMAGEVIEWER%%bin/iv bin/maketx bin/oiiotool -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/_tbb_windef.h -include/OpenImageIO/tbb/aligned_space.h -include/OpenImageIO/tbb/atomic.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/argparse.h include/OpenImageIO/color.h include/OpenImageIO/dassert.h @@ -51,6 +28,7 @@ include/OpenImageIO/sysutil.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 @@ -59,12 +37,10 @@ include/OpenImageIO/pugiconfig.hpp include/OpenImageIO/version.h lib/libOpenImageIO.so lib/libOpenImageIO.so.1 -lib/libOpenImageIO.so.1.0 -lib/libOpenImageIO.so.1.0.9 +lib/libOpenImageIO.so.1.1 +lib/libOpenImageIO.so.1.1.2 %%PORTDOCS%%%%DOCSDIR%%/CHANGES %%PORTDOCS%%%%DOCSDIR%%/LICENSE %%PORTDOCS%%%%DOCSDIR%%/openimageio.pdf %%PORTDOCS%%@dirrm %%DOCSDIR%% -@dirrm include/OpenImageIO/tbb/machine -@dirrm include/OpenImageIO/tbb @dirrm include/OpenImageIO diff --git a/graphics/openimageio/pkg-plist-pybind b/graphics/openimageio/pkg-plist-pybind new file mode 100644 index 000000000000..b649adc8a98e --- /dev/null +++ b/graphics/openimageio/pkg-plist-pybind @@ -0,0 +1 @@ +%%PYTHON_SITELIBDIR%%/OpenImageIO.so diff --git a/graphics/py-openimageio/Makefile b/graphics/py-openimageio/Makefile index 0a49af577147..54a255daf6d4 100644 --- a/graphics/py-openimageio/Makefile +++ b/graphics/py-openimageio/Makefile @@ -1,20 +1,10 @@ -# New ports collection makefile for: py-openimageio -# Date created: 28 April 2012 -# Whom: Shane Ambler -# +# Created by: Shane Ambler # $FreeBSD$ -# PORTNAME= openimageio -PORTVERSION= 1.0.9 CATEGORIES= graphics multimedia python -MASTER_SITES= https://github.com/OpenImageIO/oiio/tarball/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -DISTNAME= Release-${PORTVERSION} -EXTRACT_SUFX= # empty -DIST_SUBDIR= ${PORTNAME} -MAINTAINER= FreeBSD@Shaneware.biz COMMENT= OpenImageIO python bindings LICENSE= BSD @@ -22,38 +12,15 @@ LICENSE= BSD LIB_DEPENDS= OpenImageIO:${PORTSDIR}/graphics/openimageio \ boost_python:${PORTSDIR}/devel/boost-python-libs -FETCH_ARGS= -pRr -USE_CMAKE= yes -CMAKE_VERBOSE= yes -CMAKE_OUTSOURCE= yes -CMAKE_ARGS= -DBUILDSTATIC:BOOL=OFF \ - -DLINKSTATIC:BOOL=OFF \ - -DUSE_OPENGL:BOOL=OFF \ - -DUSE_PYTHON:BOOL=ON \ - -DUSE_QT:BOOL=OFF \ - -DUSE_TBB:BOOL=ON -LDFLAGS+= -ltbb -MAKE_JOBS_SAFE= yes -USE_LDCONFIG= yes -USE_PYTHON= 2.6+ -WRKSRC= ${WRKDIR}/OpenImageIO-oiio-0d48631/src - -PLIST_FILES= %%PYTHON_SITELIBDIR%%/OpenImageIO.so +MASTERDIR= ${.CURDIR}/../openimageio -.include <bsd.port.pre.mk> - -.if ${ARCH} == "i386" || ${OSVERSION} < 803000 -USE_GCC= 4.6+ -.endif +USE_PYTHON= 2.6+ -.if ${OSVERSION} < 800000 -IGNORE= requires FreeBSD 8.0 or higher -.endif +OIIO_PYBIND= yes -post-patch: - @${REINPLACE_CMD} 's|lib/python|lib/${PYTHON_VERSION}|' ${WRKSRC}/CMakeLists.txt +EXTRA_PATCHES= ${FILESDIR}/extra-patch-CMakeLists.txt do-install: ${INSTALL_LIB} ${BUILD_WRKSRC}/python/OpenImageIO.so ${PYTHON_SITELIBDIR}/ -.include <bsd.port.post.mk> +.include "${MASTERDIR}/Makefile" |