diff options
author | tijl <tijl@FreeBSD.org> | 2013-10-24 02:50:17 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2013-10-24 02:50:17 +0800 |
commit | 77e7fc12464967c96d88a26ddd7ac6f9bceb81bc (patch) | |
tree | 4f492bc73cce0a5592287f2063e8d5b66f9b0a75 /graphics | |
parent | b63513746b9655b571aa013b5131d3a923b33896 (diff) | |
download | freebsd-ports-gnome-77e7fc12464967c96d88a26ddd7ac6f9bceb81bc.tar.gz freebsd-ports-gnome-77e7fc12464967c96d88a26ddd7ac6f9bceb81bc.tar.zst freebsd-ports-gnome-77e7fc12464967c96d88a26ddd7ac6f9bceb81bc.zip |
- Fix build with libc++.
- Support staging.
- Rearrange bits between opencolorio and opencolorio-tools.
PR: ports/182220
Approved by: Shane Ambler <FreeBSD@ShaneWare.Biz> (maintainer)
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/opencolorio-tools/Makefile | 13 | ||||
-rw-r--r-- | graphics/opencolorio/Makefile | 66 | ||||
-rw-r--r-- | graphics/opencolorio/files/patch-export__OpenColorIO__OpenColorABI.h.in | 11 | ||||
-rw-r--r-- | graphics/opencolorio/pkg-plist | 3 |
4 files changed, 43 insertions, 50 deletions
diff --git a/graphics/opencolorio-tools/Makefile b/graphics/opencolorio-tools/Makefile index 020696583621..37881763439a 100644 --- a/graphics/opencolorio-tools/Makefile +++ b/graphics/opencolorio-tools/Makefile @@ -1,33 +1,30 @@ # Created by: Shane Ambler <FreeBSD@Shaneware.biz> # $FreeBSD$ -PORTNAME= opencolorio PORTREVISION= 0 PKGNAMESUFFIX= -tools COMMENT= Tools to work with OpenColorIO profiles -LICENSE= BSD - LIB_DEPENDS= OpenImageIO:${PORTSDIR}/graphics/openimageio \ OpenColorIO:${PORTSDIR}/graphics/opencolorio MASTERDIR= ${.CURDIR}/../opencolorio +OPTIONS_EXCLUDE=DOCS CMAKE_ARGS= -DOCIO_BUILD_APPS:BOOL=ON \ -DOCIO_BUILD_JNIGLUE:BOOL=OFF \ -DOCIO_BUILD_NUKE:BOOL=OFF \ -DOCIO_BUILD_PYGLUE:BOOL=OFF \ -DOCIO_BUILD_SHARED:BOOL=OFF \ - -DOCIO_BUILD_STATIC:BOOL=OFF \ - -DOCIO_BUILD_DOCS:BOOL=OFF + -DOCIO_BUILD_STATIC:BOOL=OFF USE_GL= glew glut -CFLAGS+= -L${LOCALBASE}/lib EXTRA_PATCHES= ${FILESDIR}/extra-patch-CMakeLists.txt -OCIO_TOOLS= yes +post-patch: + @${FIND} ${WRKSRC}/src/apps -name main.cpp | ${XARGS} \ + ${REINPLACE_CMD} '/namespace OIIO/d' -NO_STAGE= yes .include "${MASTERDIR}/Makefile" diff --git a/graphics/opencolorio/Makefile b/graphics/opencolorio/Makefile index f3a8492a668e..2d7f6f83fd44 100644 --- a/graphics/opencolorio/Makefile +++ b/graphics/opencolorio/Makefile @@ -1,15 +1,15 @@ # Created by: Shane Ambler <FreeBSD@Shaneware.biz> # $FreeBSD$ -PORTNAME?= opencolorio +PORTNAME= opencolorio PORTVERSION= 1.0.8 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= graphics multimedia MAINTAINER?= FreeBSD@Shaneware.biz COMMENT?= Complete color management solution -LICENSE?= BSD +LICENSE= BSD USE_GITHUB= yes GH_ACCOUNT= imageworks @@ -17,54 +17,38 @@ GH_PROJECT= OpenColorIO GH_TAGNAME= v${PORTVERSION} GH_COMMIT= 8883824 -.if !defined(OCIO_TOOLS) -USE_PYTHON= 2.6+ -USE_LDCONFIG= yes -.endif - -USES= cmake:outsource -CMAKE_ARGS?= -DOCIO_BUILD_APPS:BOOL=OFF \ - -DOCIO_BUILD_JNIGLUE:BOOL=OFF \ - -DOCIO_BUILD_NUKE:BOOL=OFF \ - -DOCIO_BUILD_STATIC:BOOL=OFF \ - -DOCIO_BUILD_PYGLUE:BOOL=ON - -MAKE_JOBS_SAFE?= yes +OPTIONS_DEFINE= DOCS +LDFLAGS+= -L${LOCALBASE}/lib PLIST= ${PKGDIR}/pkg-plist${PKGNAMESUFFIX} +USES= cmake:outsource pkgconfig -.if !defined(OCIO_TOOLS) -OPTIONS_DEFINE= DOCS SSE -OPTIONS_DEFAULT= DOCS SSE -.endif - -NO_STAGE= yes -.include <bsd.port.options.mk> - -.if empty(PORT_OPTIONS:MDOCS) || defined(OCIO_TOOLS) -CMAKE_ARGS+= -DOCIO_BUILD_DOCS:BOOL=OFF -.else -CMAKE_ARGS+= -DOCIO_BUILD_DOCS:BOOL=ON -.endif - -.if ${PORT_OPTIONS:MSSE} +.if ${MACHINE_CPU:Msse2} CMAKE_ARGS+= -DOCIO_USE_SSE:BOOL=ON .else CMAKE_ARGS+= -DOCIO_USE_SSE:BOOL=OFF .endif -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> -.if ${CC:T} == "clang" && ${ARCH} == "i386" && ${OSVERSION} < 901000 -# workaround for pr/165968 -# was fixed in 9-STABLE before 9.1-RELEASE but not passed into 9-RELEASE -CFLAGS+= -march=pentium2 +.if ${SLAVE_PORT} == no +LIB_DEPENDS+= libtinyxml.so:${PORTSDIR}/textproc/tinyxml \ + libyaml-cpp.so:${PORTSDIR}/devel/yaml-cpp +USE_PYTHON= 2.6+ +USE_LDCONFIG= yes +CMAKE_ARGS+= -DOCIO_BUILD_APPS:BOOL=OFF \ + -DOCIO_BUILD_JNIGLUE:BOOL=OFF \ + -DOCIO_BUILD_NUKE:BOOL=OFF \ + -DOCIO_BUILD_STATIC:BOOL=OFF \ + -DOCIO_BUILD_PYGLUE:BOOL=ON \ + -DUSE_EXTERNAL_TINYXML:BOOL=ON \ + -DUSE_EXTERNAL_YAML:BOOL=ON .endif -post-patch: -.if defined(OCIO_TOOLS) - @${FIND} ${WRKSRC}/src/apps -name "main.cpp" -exec \ - ${REINPLACE_CMD} -e 's|namespace OIIO|//namespace OIIO|g' "{}" \; +.if ${PORT_OPTIONS:MDOCS} +CMAKE_ARGS+= -DOCIO_BUILD_DOCS:BOOL=ON +.else +CMAKE_ARGS+= -DOCIO_BUILD_DOCS:BOOL=OFF .endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/graphics/opencolorio/files/patch-export__OpenColorIO__OpenColorABI.h.in b/graphics/opencolorio/files/patch-export__OpenColorIO__OpenColorABI.h.in index 935c9e3b4109..498bc106ec36 100644 --- a/graphics/opencolorio/files/patch-export__OpenColorIO__OpenColorABI.h.in +++ b/graphics/opencolorio/files/patch-export__OpenColorIO__OpenColorABI.h.in @@ -1,5 +1,16 @@ --- export/OpenColorIO/OpenColorABI.h.in.orig 2012-12-12 09:51:23.000000000 +1030 +++ export/OpenColorIO/OpenColorABI.h.in 2013-01-29 21:13:34.104857600 +1030 +@@ -55,6 +55,10 @@ + #include <boost/shared_ptr.hpp> + #define OCIO_SHARED_PTR boost::shared_ptr + #define OCIO_DYNAMIC_POINTER_CAST boost::dynamic_pointer_cast ++#elif defined(_LIBCPP_VERSION) ++#include <memory> ++#define OCIO_SHARED_PTR std::shared_ptr ++#define OCIO_DYNAMIC_POINTER_CAST std::dynamic_pointer_cast + #elif __GNUC__ >= 4 + #include <tr1/memory> + #define OCIO_SHARED_PTR std::tr1::shared_ptr @@ -65,7 +65,7 @@ // If supported, define OCIOEXPORT, OCIOHIDDEN diff --git a/graphics/opencolorio/pkg-plist b/graphics/opencolorio/pkg-plist index 154fca7ebf7a..62bca161328c 100644 --- a/graphics/opencolorio/pkg-plist +++ b/graphics/opencolorio/pkg-plist @@ -116,7 +116,6 @@ share/ocio/setup_ocio.sh %%PORTDOCS%%%%DOCSDIR%%/userguide/tool_overview.html @dirrm include/OpenColorIO @dirrm include/PyOpenColorIO -@dirrmtry libdata/pkgconfig @dirrm share/ocio %%PORTDOCS%%@dirrm %%DOCSDIR%%/userguide %%PORTDOCS%%@dirrm %%DOCSDIR%%/developers/bindings @@ -132,3 +131,5 @@ share/ocio/setup_ocio.sh %%PORTDOCS%%@dirrm %%DOCSDIR%%/_sources %%PORTDOCS%%@dirrm %%DOCSDIR%%/_images %%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrmtry %%PYTHON_SITELIBDIR%% +@dirrmtry %%PYTHON_LIBDIR%% |