re-update to opencolorio-2.1.1, now with -DOCIO_BUILD_GPU_TESTS=OFF which

caused configure failure if freeglut/glew were installed;  Dimitri Karamazov
This commit is contained in:
sthen 2022-03-05 11:30:09 +00:00
parent 4bb2a35b9b
commit ebc90594bd
10 changed files with 34 additions and 168 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.18 2022/03/04 22:33:35 sthen Exp $
# $OpenBSD: Makefile,v 1.19 2022/03/05 11:30:09 sthen Exp $
COMMENT = color management library
EPOCH = 1
GH_ACCOUNT = AcademySoftwareFoundation
GH_PROJECT = OpenColorIO
GH_TAGNAME = v1.1.1
GH_TAGNAME = v2.1.1
PKGNAME = ${DISTNAME:L}
SHARED_LIBS += OpenColorIO 1.1 # 1.1.1
@ -20,7 +20,7 @@ MAINTAINER = Pascal Stumpf <pascal@stumpf.co> \
# several BSD-like
PERMIT_PACKAGE = Yes
WANTLIB += m pthread ${COMPILER_LIBCXX} tinyxml yaml-cpp
WANTLIB += ${COMPILER_LIBCXX} Imath-3_1 expat m pystring yaml-cpp
COMPILER = base-clang ports-gcc
@ -28,25 +28,22 @@ MODULES = devel/cmake \
lang/python
BUILD_DEPENDS = devel/boost
LIB_DEPENDS = textproc/tinyxml \
devel/yaml-cpp
LIB_DEPENDS = devel/pystring \
devel/yaml-cpp \
math/imath
CONFIGURE_ARGS += -DPYTHON="${MODPY_BIN}" \
-DUSE_EXTERNAL_TINYXML=ON \
-DUSE_EXTERNAL_YAML=ON \
-DOCIO_USE_SSE=OFF \
-DOCIO_BUILD_STATIC=OFF \
-DOCIO_BUILD_APPS=OFF \
-DOCIO_BUILD_GPU_TESTS=OFF \
-DCMAKE_SHARED_LINKER_FLAGS="-L${LOCALBASE}/lib" \
-DCMAKE_EXE_LINKER_FLAGS="-L${LOCALBASE}/lib" \
-DCMAKE_MODULE_LINKER_FLAGS="-L${LOCALBASE}/lib"
NO_TEST = Yes
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/lib/cmake/OpenColorIO
mv ${PREFIX}/cmake/*.cmake ${PREFIX}/OpenColorIO*.cmake \
${PREFIX}/lib/cmake/OpenColorIO
rm -rf ${PREFIX}/cmake
.if ${MACHINE_ARCH} == "amd64"
CONFIGURE_ARGS += -DOCIO_USE_SSE=ON
.else
CONFIGURE_ARGS += -DOCIO_USE_SSE=OFF
.endif
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (OpenColorIO-1.1.1.tar.gz) = ybW53vkH4dr7KeNzNrcC//IsxjBtRFoTsWIbinVMFMg=
SIZE (OpenColorIO-1.1.1.tar.gz) = 13828483
SHA256 (OpenColorIO-2.1.1.tar.gz) = FuvD4PIfctvpD+YEN+uGT01N6cJV744hL4N4JPybjZw=
SIZE (OpenColorIO-2.1.1.tar.gz) = 11013141

View File

@ -1,26 +0,0 @@
$OpenBSD: patch-CMakeLists_txt,v 1.6 2022/03/04 22:33:35 sthen Exp $
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)

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_core_CMakeLists_txt,v 1.3 2022/03/04 22:33:35 sthen Exp $
Strip -Werror to fix sparc64 build
Index: src/core/CMakeLists.txt
--- src/core/CMakeLists.txt.orig
+++ src/core/CMakeLists.txt
@@ -24,7 +24,7 @@ if(WIN32)
set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /WX")
endif()
else()
- set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} -Werror")
+ set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}")
endif()
# SHARED

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-src_core_Config_cpp,v 1.6 2022/03/04 22:33:35 sthen Exp $
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;
}

View File

@ -1,61 +0,0 @@
$OpenBSD: patch-src_core_OCIOYaml_cpp,v 1.6 2022/03/04 22:33:35 sthen Exp $
Fix the build with newer yaml-cpp.
Index: src/core/OCIOYaml.cpp
--- 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 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
-
-#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"

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_core_Platform_h,v 1.4 2022/03/04 22:33:35 sthen Exp $
--- 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
#include <stdlib.h>
-#if !defined(__FreeBSD__)
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
#include <alloca.h>
#endif
#include <string.h>

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_pyglue_CMakeLists_txt,v 1.3 2022/03/04 22:33:35 sthen Exp $
Strip -Werror to fix sparc64 build
Index: src/pyglue/CMakeLists.txt
--- src/pyglue/CMakeLists.txt.orig
+++ src/pyglue/CMakeLists.txt
@@ -23,7 +23,7 @@ endif()
# Process all warnings as errors
# Unfortunately Windows still has a warning
if(UNIX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
find_package(PythonLibs)

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_utils_NumberUtils_h,v 1.3 2022/03/05 11:30:10 sthen Exp $
Fix build failure
Index: src/utils/NumberUtils.h
--- src/utils/NumberUtils.h.orig
+++ src/utils/NumberUtils.h
@@ -140,7 +140,7 @@ really_inline from_chars_result from_chars(const char
#ifdef _WIN32
tempval = _strtol_l(first, &endptr, 0, loc.local);
#else
- tempval = ::strtol_l(first, &endptr, 0, loc.local);
+ tempval = ::strtoll_l(first, &endptr, 0, loc.local);
#endif
if (errno != 0)

View File

@ -1,15 +1,14 @@
@comment $OpenBSD: PLIST,v 1.4 2022/03/04 22:33:35 sthen Exp $
include/OpenColorIO/
include/OpenColorIO/OpenColorABI.h
include/OpenColorIO/OpenColorAppHelpers.h
include/OpenColorIO/OpenColorIO.h
include/OpenColorIO/OpenColorTransforms.h
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/cmake/OpenColorIO/OpenColorIOConfigVersion.cmake
lib/cmake/OpenColorIO/OpenColorIOTargets${MODCMAKE_BUILD_SUFFIX}
lib/cmake/OpenColorIO/OpenColorIOTargets.cmake
@lib lib/libOpenColorIO.so.${LIBOpenColorIO_VERSION}
lib/pkgconfig/OpenColorIO.pc
@so lib/python${MODPY_VERSION}/site-packages/PyOpenColorIO.so