Sunday, December 06, 2020

Re: [UPDATE] graphics/opencolorio

On Sat, Dec 05, 2020 at 05:04:59PM -0500, Brad Smith wrote:
> On Sat, Dec 05, 2020 at 08:45:45AM -0000, Dimitri Karamazov wrote:
> > Update opencolorio to 1.1.1
> >
> > Required by graphics/krita and graphics/blender
> > both Build,run tested on amd64.
> >
> > The python module is not used by any of the above
> > programs so I removed it. Or should I let it be as
> > is?
> >
> > I'll be keeping this updated for blender.
> >
> > Any comments/OK's?
>
> Here is a diff that applies cleanly and integrates my diff to build with newer
> yaml-cpp.
>
Works fine for me on amd64. I've changed my mail-client, hopefully there would
be no such inconveniences/errors in the future

regards,
Dimitri
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/graphics/opencolorio/Makefile,v
> retrieving revision 1.10
> diff -u -p -u -p -r1.10 Makefile
> --- Makefile 12 Jul 2019 20:47:04 -0000 1.10
> +++ Makefile 5 Dec 2020 21:21:05 -0000
> @@ -2,16 +2,17 @@
>
> COMMENT = color management library
>
> -V = 20140911
> -DISTNAME = OpenColorIO-$V
> -PKGNAME = opencolorio-$V
> -REVISION = 2
> +V = 1.1.1
> +GH_ACCOUNT = AcademySoftwareFoundation
> +GH_PROJECT = OpenColorIO
> +GH_TAGNAME = v${V}
> +DISTNAME = ${GH_PROJECT:L}-${V}
>
> -SHARED_LIBS += OpenColorIO 1.0 # 1.0
> +SHARED_LIBS += OpenColorIO 1.1 # 1.1.1
>
> CATEGORIES = graphics
>
> -HOMEPAGE = http://opencolorio.org/index.html
> +HOMEPAGE = https://opencolorio.org/
>
> MAINTAINER = Pascal Stumpf <pascal@stumpf.co>
>
> @@ -22,27 +23,33 @@ WANTLIB += m pthread ${COMPILER_LIBCXX}
>
> COMPILER = base-clang ports-gcc base-gcc
>
> -MASTER_SITES = http://deftly.net/
> -
> -MODULES = devel/cmake \
> - lang/python
> +MODULES = devel/cmake
> LIB_DEPENDS = textproc/tinyxml \
> devel/yaml-cpp
>
> -CONFIGURE_ARGS += -DPYTHON="${MODPY_BIN}" \
> - -DUSE_EXTERNAL_TINYXML=ON \
> +CONFIGURE_ARGS += -DUSE_EXTERNAL_TINYXML=ON \
> -DUSE_EXTERNAL_YAML=ON \
> -DOCIO_USE_SSE=OFF \
> -DOCIO_BUILD_STATIC=OFF \
> - -DOCIO_BUILD_APPS=OFF \
> - -DCMAKE_SHARED_LINKER_FLAGS="-L${LOCALBASE}/lib" \
> - -DCMAKE_EXE_LINKER_FLAGS="-L${LOCALBASE}/lib" \
> - -DCMAKE_MODULE_LINKER_FLAGS="-L${LOCALBASE}/lib"
> + -DOCIO_BUILD_APPS=OFF
>
> NO_TEST = Yes
>
> -WRKDIST = ${WRKDIR}/OpenColorIO-master
> -
> -CFLAGS = -pthread
> +do-install:
> + ${INSTALL_DATA_DIR} ${PREFIX}/include/OpenColorIO
> + ${INSTALL_DATA} ${WRKBUILD}/export/*.h \
> + ${WRKSRC}/export/OpenColorIO/*.h \
> + ${PREFIX}/include/OpenColorIO
> + ${INSTALL_DATA_DIR} ${PREFIX}/lib/cmake/OpenColorIO
> + ${INSTALL_DATA} ${WRKBUILD}/CMakeFiles/Export/cmake/*.cmake \
> + ${WRKBUILD}/OpenColorIOConfig.cmake \
> + ${PREFIX}/lib/cmake/OpenColorIO
> + ${INSTALL_DATA} ${WRKBUILD}/src/core/libOpenColorIO.so.* \
> + ${PREFIX}/lib
> + ${INSTALL_DATA} ${WRKBUILD}/src/core/*.pc \
> + ${PREFIX}/lib/pkgconfig
> + ${INSTALL_DATA_DIR} ${PREFIX}/share/ocio
> + ${INSTALL_SCRIPT} ${WRKBUILD}/share/ocio/*.sh \
> + ${PREFIX}/share/ocio
>
> .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /home/cvs/ports/graphics/opencolorio/distinfo,v
> retrieving revision 1.3
> diff -u -p -u -p -r1.3 distinfo
> --- distinfo 21 Nov 2014 17:25:49 -0000 1.3
> +++ distinfo 5 Dec 2020 21:12:43 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (OpenColorIO-20140911.tar.gz) = d1Y6L8peE+SuqhBv/lA5Km70hjRlyszFOuVFmNzlnpQ=
> -SIZE (OpenColorIO-20140911.tar.gz) = 13742525
> +SHA256 (opencolorio-1.1.1.tar.gz) = ybW53vkH4dr7KeNzNrcC//IsxjBtRFoTsWIbinVMFMg=
> +SIZE (opencolorio-1.1.1.tar.gz) = 13828483
> Index: patches/patch-CMakeLists_txt
> ===================================================================
> RCS file: patches/patch-CMakeLists_txt
> diff -N patches/patch-CMakeLists_txt
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-CMakeLists_txt 5 Dec 2020 21:24:01 -0000
> @@ -0,0 +1,26 @@
> +$OpenBSD$
> +
> +Fix macro redefined error
> +
> +Index: CMakeLists.txt
> +--- CMakeLists.txt.orig
> ++++ CMakeLists.txt
> +@@ -218,8 +218,7 @@ else(USE_EXTERNAL_TINYXML)
> + ## => great news when build staticaly since we do not want another client project have to link also with tinyxml when he want to use this project
> + ## => could be problematic if the client project use another version of tinyxml... In this case build tinyxml as shared lib with all projects could be a solution
> + ## => TODO: so maybe provide a simple cmake way to build 3rdParty as shared and auto install with this project ?
> +- set_target_properties(TINYXML_LIB PROPERTIES COMPILE_FLAGS "-DTIXML_USE_STL -fPIC -fvisibility-inlines-hidden -fvisibility=hidden")
> +- add_definitions(-DTIXML_USE_STL) ## needed to build correctly, and also need to be propagated in child projects (client projects)
> ++ set_target_properties(TINYXML_LIB PROPERTIES COMPILE_FLAGS "-fPIC -fvisibility-inlines-hidden -fvisibility=hidden")
> + list(APPEND EXTERNAL_OBJECTS $<TARGET_OBJECTS:TINYXML_LIB>)
> + else()
> + find_package(Git REQUIRED) ## in order to apply patch (for crossplateform compatibility)
> +@@ -384,7 +383,7 @@ else()
> + set(OCIO_INLINES_HIDDEN OFF)
> + endif()
> +
> +-set(EXTERNAL_COMPILE_FLAGS "-DTIXML_USE_STL ${YAML_CPP_COMPILE_FLAGS} ${GCC_COMPILE_FLAGS}")
> ++set(EXTERNAL_COMPILE_FLAGS "${YAML_CPP_COMPILE_FLAGS} ${GCC_COMPILE_FLAGS}")
> +
> + set(EXTERNAL_LINK_FLAGS "")
> + set(EXTERNAL_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib)
> Index: patches/patch-export_OpenColorIO_OpenColorABI_h_in
> ===================================================================
> RCS file: patches/patch-export_OpenColorIO_OpenColorABI_h_in
> diff -N patches/patch-export_OpenColorIO_OpenColorABI_h_in
> --- patches/patch-export_OpenColorIO_OpenColorABI_h_in 21 Nov 2014 17:25:49 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-export_OpenColorIO_OpenColorABI_h_in,v 1.2 2014/11/21 17:25:49 pascal Exp $
> ---- export/OpenColorIO/OpenColorABI.h.in.orig Thu Sep 11 21:08:18 2014
> -+++ export/OpenColorIO/OpenColorABI.h.in Fri Nov 21 13:29:20 2014
> -@@ -69,7 +69,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
> -
> - // If supported, define OCIOEXPORT, OCIOHIDDEN
> - // (used to choose which symbols to export from OpenColorIO)
> --#if defined __linux__ || __APPLE__ || __FreeBSD__
> -+#if defined __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__
> - #if __GNUC__ >= 4
> - #define OCIOEXPORT __attribute__ ((visibility("default")))
> - #define OCIOHIDDEN __attribute__ ((visibility("hidden")))
> Index: patches/patch-src_core_Config_cpp
> ===================================================================
> RCS file: patches/patch-src_core_Config_cpp
> diff -N patches/patch-src_core_Config_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_core_Config_cpp 5 Dec 2020 21:23:56 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +Avoid assigning field to itself
> +
> +Index: src/core/Config.cpp
> +--- src/core/Config.cpp.orig
> ++++ src/core/Config.cpp
> +@@ -330,7 +330,7 @@ OCIO_NAMESPACE_ENTER
> + sanitytext_ = rhs.sanitytext_;
> +
> + cacheids_ = rhs.cacheids_;
> +- cacheidnocontext_ = cacheidnocontext_;
> ++ cacheidnocontext_ = rhs.cacheidnocontext_;
> + }
> + return *this;
> + }
> Index: patches/patch-src_core_OCIOYaml_cpp
> ===================================================================
> RCS file: patches/patch-src_core_OCIOYaml_cpp
> diff -N patches/patch-src_core_OCIOYaml_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_core_OCIOYaml_cpp 5 Dec 2020 21:34:30 -0000
> @@ -0,0 +1,61 @@
> +$OpenBSD$
> +
> +Fix the build with newer yaml-cpp
> +
> +Index: src/core/OCIOYaml.cpp
> +--- src/core/OCIOYaml.cpp.orig
> ++++ src/core/OCIOYaml.cpp
> +@@ -30,53 +30,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
> +
> + #include <OpenColorIO/OpenColorIO.h>
> +
> +-#ifndef WIN32
> +-
> +-// fwd declare yaml-cpp visibility
> +-#pragma GCC visibility push(hidden)
> +-namespace YAML {
> +- class Exception;
> +- class BadDereference;
> +- class RepresentationException;
> +- class EmitterException;
> +- class ParserException;
> +- class InvalidScalar;
> +- class KeyNotFound;
> +- template <typename T> class TypedKeyNotFound;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::ColorSpace>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::Config>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::Exception>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::GpuShaderDesc>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::ImageDesc>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::Look>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::Processor>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::Transform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::AllocationTransform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::CDLTransform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::ColorSpaceTransform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::DisplayTransform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::ExponentTransform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::FileTransform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::GroupTransform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::LogTransform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::LookTransform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::MatrixTransform>;
> +- template <> class TypedKeyNotFound<OCIO_NAMESPACE::TruelightTransform>;
> +-}
> +-#pragma GCC visibility pop
> +-
> +-

No comments:

Post a Comment