On Wed, Dec 30, 2020 at 04:59:56PM +0000, Stuart Henderson wrote: > On 2020/12/24 14:45, Dimitri Karamazov wrote: > > Update opencolorio to 1.1.1 > > > > Required by graphics/krita and graphics/blender > > both Build,run tested on amd64. > > > > I'm forcing python3 as required by both consumers since > > python2 doesn't compile with C++17. > > > > Any comments/OK's? > > > > +V = 1.1.1 > > +GH_ACCOUNT = AcademySoftwareFoundation > > +GH_PROJECT = OpenColorIO > > +GH_TAGNAME = v${V} > > +DISTNAME = ${GH_PROJECT:L}-${V} > > the version number goes 'backwards' so it needs EPOCH. I suggest this > as a bit neater (needs distinfo regenerating): > > EPOCH = 0 > GH_ACCOUNT = AcademySoftwareFoundation > GH_PROJECT = OpenColorIO > GH_TAGNAME = v1.1.1 > PKGNAME = ${DISTNAME:L} > > > COMPILER = base-clang ports-gcc base-gcc > > base-gcc can go, it will never be used (port uses cmake which is now > "base-clang ports-gcc", so nothing able to build opencolorio will > select base-gcc). > > > +FLAVORS = python3 > > +FLAVOR = python3 > > this isn't a py-* port so please use > > MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3} > > > CFLAGS = -pthread > > please drop, this is bogus in the first place, but not actually used > anyway (it's all C++ so would be CXXFLAGS) > > > @@ -0,0 +1,15 @@ > > +$OpenBSD$ > > + > > +Avoid assigning field to itself > > + > > Part of upstream commit: > > From 0be465feb9ac2d34bd8171f30909b276c1efa996 Mon Sep 17 00:00:00 2001 > From: Bernard Lefebvre <37628108+bernardlefeb...@users.noreply.github.com> > Date: Fri, 28 Sep 2018 19:11:05 -0400 > Subject: [PATCH] Squashing Adsk contrib/operator rhs (#44) (#580) > > rest looks good. > > > Index: Makefile > > the whole diff was duplicated for some reason? The text(diff) attachment was not taken kindly by neomutt.
See diff below with all expected changes from Stuart. Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/opencolorio/Makefile,v retrieving revision 1.12 diff -u -p -r1.12 Makefile --- Makefile 14 Dec 2020 15:28:14 -0000 1.12 +++ Makefile 30 Dec 2020 18:32:53 -0000 @@ -2,12 +2,13 @@ COMMENT = color management library -V = 20140911 -DISTNAME = OpenColorIO-$V -PKGNAME = opencolorio-$V -REVISION = 4 +EPOCH = 0 +GH_ACCOUNT = AcademySoftwareFoundation +GH_PROJECT = OpenColorIO +GH_TAGNAME = v1.1.1 +PKGNAME = ${DISTNAME:L} -SHARED_LIBS += OpenColorIO 1.0 # 1.0 +SHARED_LIBS += OpenColorIO 1.1 # 1.1.1 CATEGORIES = graphics @@ -20,13 +21,13 @@ PERMIT_PACKAGE = Yes WANTLIB += m pthread ${COMPILER_LIBCXX} tinyxml yaml-cpp -COMPILER = base-clang ports-gcc base-gcc - -MASTER_SITES = http://deftly.net/ +COMPILER = base-clang ports-gcc MODULES = devel/cmake \ lang/python +MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3} + BUILD_DEPENDS = devel/boost LIB_DEPENDS = textproc/tinyxml \ devel/yaml-cpp @@ -43,8 +44,10 @@ CONFIGURE_ARGS += -DPYTHON="${MODPY_BIN} NO_TEST = Yes -WRKDIST = ${WRKDIR}/OpenColorIO-master - -CFLAGS = -pthread +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/lib/cmake/OpenColorIO + mv ${PREFIX}/cmake/*.cmake ${PREFIX}/OpenColorIO*.cmake \ + ${PREFIX}/lib/cmake/OpenColorIO + rm -rf ${PREFIX}/cmake .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/graphics/opencolorio/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- distinfo 21 Nov 2014 17:25:49 -0000 1.3 +++ distinfo 30 Dec 2020 18:32:53 -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 30 Dec 2020 18:32:53 -0000 @@ -0,0 +1,25 @@ +$OpenBSD$ + +Fix macro redefined error + +--- CMakeLists.txt.orig 2018-01-05 12:08:27 UTC ++++ CMakeLists.txt +@@ -218,8 +222,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 +387,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 30 Dec 2020 18:32:53 -0000 @@ -0,0 +1,15 @@ +$OpenBSD$ + +Upstream fix - Squashing Adsk contrib/operator rhs + +--- src/core/Config.cpp.orig Thu Dec 3 22:17:51 2020 ++++ src/core/Config.cpp Thu Dec 3 22:18:10 2020 +@@ -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: /cvs/ports/graphics/opencolorio/patches/patch-src_core_OCIOYaml_cpp,v retrieving revision 1.3 diff -u -p -r1.3 patch-src_core_OCIOYaml_cpp --- patches/patch-src_core_OCIOYaml_cpp 14 Dec 2020 06:26:25 -0000 1.3 +++ patches/patch-src_core_OCIOYaml_cpp 30 Dec 2020 18:32:53 -0000 @@ -3,13 +3,13 @@ $OpenBSD: patch-src_core_OCIOYaml_cpp,v Fix the build with newer yaml-cpp. Index: src/core/OCIOYaml.cpp ---- src/core/OCIOYaml.cpp.orig -+++ src/core/OCIOYaml.cpp -@@ -30,43 +30,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O +--- src/core/OCIOYaml.cpp.orig Thu Dec 24 17:16:21 2020 ++++ src/core/OCIOYaml.cpp Thu Dec 24 17:16:43 2020 +@@ -30,53 +30,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O #include <OpenColorIO/OpenColorIO.h> --#ifndef WINDOWS +-#ifndef WIN32 - -// fwd declare yaml-cpp visibility -#pragma GCC visibility push(hidden) @@ -46,6 +46,16 @@ Index: src/core/OCIOYaml.cpp - -#endif - +-#ifdef WIN32 +-#pragma warning( push ) +-#pragma warning( disable: 4146 ) +-#endif +- #include <yaml-cpp/yaml.h> +- +-#ifdef WIN32 +-#pragma warning( pop ) +-#endif #include "Logging.h" + #include "MathUtils.h" Index: patches/patch-src_core_Platform_h =================================================================== RCS file: /cvs/ports/graphics/opencolorio/patches/patch-src_core_Platform_h,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-src_core_Platform_h --- patches/patch-src_core_Platform_h 25 Mar 2014 10:33:33 -0000 1.1.1.1 +++ patches/patch-src_core_Platform_h 30 Dec 2020 18:32:53 -0000 @@ -1,9 +1,9 @@ $OpenBSD: patch-src_core_Platform_h,v 1.1.1.1 2014/03/25 10:33:33 pascal Exp $ ---- src/core/Platform.h.orig Wed Oct 9 00:59:34 2013 -+++ src/core/Platform.h Mon Mar 24 22:58:05 2014 +--- src/core/Platform.h.orig Thu Mar 28 10:42:57 2019 ++++ src/core/Platform.h Thu Dec 3 20:01:17 2020 @@ -85,7 +85,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O + // assume linux/unix/posix - // linux/unix/posix #include <stdlib.h> -#if !defined(__FreeBSD__) +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/graphics/opencolorio/pkg/PLIST,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 PLIST --- pkg/PLIST 25 Mar 2014 10:33:33 -0000 1.1.1.1 +++ pkg/PLIST 30 Dec 2020 18:32:53 -0000 @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.1.1.1 2014/03/25 10:33:33 pascal Exp $ +@comment $OpenBSD: PLIST,v$ include/OpenColorIO/ include/OpenColorIO/OpenColorABI.h include/OpenColorIO/OpenColorIO.h @@ -6,8 +6,12 @@ include/OpenColorIO/OpenColorTransforms. include/OpenColorIO/OpenColorTypes.h include/PyOpenColorIO/ include/PyOpenColorIO/PyOpenColorIO.h +lib/cmake/OpenColorIO/ +lib/cmake/OpenColorIO/OpenColorIO${MODCMAKE_BUILD_SUFFIX} +lib/cmake/OpenColorIO/OpenColorIO.cmake +lib/cmake/OpenColorIO/OpenColorIOConfig.cmake @lib lib/libOpenColorIO.so.${LIBOpenColorIO_VERSION} lib/pkgconfig/OpenColorIO.pc -lib/python${MODPY_VERSION}/site-packages/PyOpenColorIO.so +@so lib/python${MODPY_VERSION}/site-packages/PyOpenColorIO.so share/ocio/ share/ocio/setup_ocio.sh