[arch-commits] Commit in opentimelineio/trunk (PKGBUILD opentimelineio-c++17.patch)
Antonio Rojas
arojas at gemini.archlinux.org
Sun Oct 17 22:03:42 UTC 2021
Date: Sunday, October 17, 2021 @ 22:03:42
Author: arojas
Revision: 1030780
Use native C++17 types
Added:
opentimelineio/trunk/opentimelineio-c++17.patch
Modified:
opentimelineio/trunk/PKGBUILD
----------------------------+
PKGBUILD | 14 ++++---
opentimelineio-c++17.patch | 84 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 92 insertions(+), 6 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-10-17 19:50:18 UTC (rev 1030779)
+++ PKGBUILD 2021-10-17 22:03:42 UTC (rev 1030780)
@@ -2,25 +2,27 @@
pkgname=opentimelineio
pkgver=0.13
-pkgrel=3
+pkgrel=4
pkgdesc='Open Source API and interchange format for editorial timeline information'
url='http://opentimeline.io/'
license=(Apache)
arch=(x86_64)
depends=(python-aaf2)
-makedepends=(cmake optional-lite python-pip pybind11 git)
+makedepends=(cmake python-pip pybind11 git)
source=(https://github.com/PixarAnimationStudios/OpenTimelineIO/archive/v$pkgver/$pkgname-$pkgver.tar.gz
- git+https://github.com/thelink2012/any#commit=69753a5
- git+https://github.com/Tencent/rapidjson#commit=66eb606)
+ git+https://github.com/Tencent/rapidjson#commit=66eb606
+ opentimelineio-c++17.patch)
sha256sums=('33a63891b4656804242512e122b33ed12e35d4038fd78610ccb82b441b9506dd'
'SKIP'
- 'SKIP')
+ '927675021a15d0fde97697e1b7a7312e0ee64f628cb5a09716edf972870d0cbc')
prepare() {
- mv any rapidjson OpenTimelineIO-$pkgver/src/deps
+ mv rapidjson OpenTimelineIO-$pkgver/src/deps
sed -e '/deps/d' -i OpenTimelineIO-$pkgver/src/CMakeLists.txt # Unbundle pybind11
sed -e '1 i\find_package(pybind11)' -i OpenTimelineIO-$pkgver/src/py-opentimelineio/opentime-bindings/CMakeLists.txt \
-i OpenTimelineIO-$pkgver/src/py-opentimelineio/opentimelineio-bindings/CMakeLists.txt
+
+ patch -d OpenTimelineIO-$pkgver -p1 < opentimelineio-c++17.patch # Use native C++17 types
}
build() {
Added: opentimelineio-c++17.patch
===================================================================
--- opentimelineio-c++17.patch (rev 0)
+++ opentimelineio-c++17.patch 2021-10-17 22:03:42 UTC (rev 1030780)
@@ -0,0 +1,84 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3325465..5a7f495 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ cmake_minimum_required(VERSION 3.9.4)
+
+-set(CMAKE_CXX_STANDARD 11)
++set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ set(CMAKE_CXX_EXTENSIONS OFF)
+
+@@ -8,8 +8,8 @@ if(MSVC)
+ set(PYBIND11_CPP_STANDARD /std:c++14)
+ set(CMAKE_CXX_FLAGS "/W4 /EHsc")
+ else()
+- set(PYBIND11_CPP_STANDARD -std=c++11)
+- set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-deprecated-register")
++ set(PYBIND11_CPP_STANDARD -std=c++17)
++ set(CMAKE_CXX_FLAGS "-std=c++17 -Wall -Wno-deprecated-register")
+ endif()
+
+ # make sure that git submodules are up to date when building
+diff --git a/src/opentimelineio/any.h b/src/opentimelineio/any.h
+index 2250eb1..b8c2634 100644
+--- a/src/opentimelineio/any.h
++++ b/src/opentimelineio/any.h
+@@ -1,12 +1,12 @@
+ #pragma once
+
+-#include "any/any.hpp"
++#include <any>
+ #include "opentimelineio/version.h"
+
+ namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {
+
+-using linb::any;
+-using linb::any_cast;
++using std::any;
++using std::any_cast;
+
+ } }
+
+diff --git a/src/opentimelineio/optional.h b/src/opentimelineio/optional.h
+index 7b6f110..288aea0 100644
+--- a/src/opentimelineio/optional.h
++++ b/src/opentimelineio/optional.h
+@@ -1,13 +1,13 @@
+ #pragma once
+
+-#include "nonstd/optional.hpp"
++#include <optional>
+ #include "opentimelineio/version.h"
+
+ namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {
+
+-using nonstd::optional;
+-using nonstd::nullopt;
+-using nonstd::nullopt_t;
++using std::optional;
++using std::nullopt;
++using std::nullopt_t;
+
+ } }
+
+diff --git a/src/py-opentimelineio/opentimelineio-bindings/otio_utils.h b/src/py-opentimelineio/opentimelineio-bindings/otio_utils.h
+index d647160..12bf3bc 100644
+--- a/src/py-opentimelineio/opentimelineio-bindings/otio_utils.h
++++ b/src/py-opentimelineio/opentimelineio-bindings/otio_utils.h
+@@ -14,14 +14,6 @@ using namespace opentimelineio::OPENTIMELINEIO_VERSION;
+
+ void install_external_keepalive_monitor(SerializableObject* so, bool apply_now);
+
+-namespace pybind11 { namespace detail {
+- template<typename T> struct type_caster<optional<T>>
+- : public optional_caster<optional<T>> {};
+-
+- template<> struct type_caster<nullopt_t>
+- : public void_caster<nullopt_t> {};
+-}}
+-
+ template <typename T>
+ struct managing_ptr {
+ managing_ptr(T* ptr)
More information about the arch-commits
mailing list