commit 7ed09315d9cb07898e41342399ccf8bf718ed62f
Author: FeRD (Frank Dana) <ferdnyc(a)gmail.com>
Date: Wed Sep 18 21:41:53 2019 -0400
Update to git HEAD for new OpenShot build
- Enable unit tests
- Remove CMAKE_SKIP_RPATH to make test binaries runnable from build dir
- Delete outdated copy of standard CMake module, causes python3.8 failures
.gitignore | 1 +
libopenshot-fix-tests.patch | 60 -------------------------------------
libopenshot-fix_swig_variable.patch | 22 --------------
libopenshot-py-install-path.patch | 60 +++++++++++++++++++++++++++++++++++++
libopenshot.spec | 28 +++++++++++++----
sources | 2 +-
6 files changed, 84 insertions(+), 89 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a2b4e8f..16305b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@ libopenshot-0.0.6.tar.gz
/libopenshot-0.2.2.tar.gz
/libopenshot-0.2.3.tar.gz
/libopenshot-101f25a.tar.gz
+/libopenshot-c685571.tar.gz
diff --git a/libopenshot-py-install-path.patch b/libopenshot-py-install-path.patch
new file mode 100644
index 0000000..f33ef0a
--- /dev/null
+++ b/libopenshot-py-install-path.patch
@@ -0,0 +1,60 @@
+From 160df3ac40e9098942e1d2b9c7b0bd6757f4be05 Mon Sep 17 00:00:00 2001
+From: "FeRD (Frank Dana)" <ferdnyc(a)gmail.com>
+Date: Fri, 2 Aug 2019 07:14:11 -0400
+Subject: [PATCH] Python install path: remove site-packages detection
+
+The path `${CMAKE_INSTALL_PREFIX}/lib/pythonM.N/site-packages` is
+not Debian-specific, and will exist on too many systems where it
+should _not_ be assumed to be the correct install path. (This is
+causing Fedora and other `lib64`-using distros to install the
+bindings into `/usr/lib/`, when they were previously being
+installed into the correct `/usr/lib64/` location.)
+---
+ src/bindings/python/CMakeLists.txt | 27 +++++++++++----------------
+ 1 file changed, 11 insertions(+), 16 deletions(-)
+
+diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt
+index 9afabd4..80281d7 100644
+--- a/src/bindings/python/CMakeLists.txt
++++ b/src/bindings/python/CMakeLists.txt
+@@ -72,26 +72,21 @@ if (PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
+ ${PYTHON_LIBRARIES} openshot)
+
+ ### Check if the following Debian-friendly python module path exists
+- SET(PYTHON_MODULE_PATH
"${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages")
++ SET(PYTHON_MODULE_PATH
"${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/dist-packages")
+ if (NOT EXISTS ${PYTHON_MODULE_PATH})
+
+- ### Check if another Debian-friendly python module path exists
+- SET(PYTHON_MODULE_PATH
"${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/dist-packages")
+- if (NOT EXISTS ${PYTHON_MODULE_PATH})
+-
+- ### Calculate the python module path (using distutils)
+- execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "\
++ ### Calculate the python module path (using distutils)
++ execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "\
+ from distutils.sysconfig import get_python_lib; \
+ print( get_python_lib( plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}' )
)"
+- OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH
+- OUTPUT_STRIP_TRAILING_WHITESPACE )
+-
+- GET_FILENAME_COMPONENT(_ABS_PYTHON_MODULE_PATH
+- "${_ABS_PYTHON_MODULE_PATH}" ABSOLUTE)
+- FILE(RELATIVE_PATH _REL_PYTHON_MODULE_PATH
+- ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH})
+- SET(PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH})
+- endif()
++ OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH
++ OUTPUT_STRIP_TRAILING_WHITESPACE )
++
++ GET_FILENAME_COMPONENT(_ABS_PYTHON_MODULE_PATH
++ "${_ABS_PYTHON_MODULE_PATH}" ABSOLUTE)
++ FILE(RELATIVE_PATH _REL_PYTHON_MODULE_PATH
++ ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH})
++ SET(PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH})
+ endif()
+ message("PYTHON_MODULE_PATH: ${PYTHON_MODULE_PATH}")
+
+--
+2.21.0
+
diff --git a/libopenshot.spec b/libopenshot.spec
index 2ed6f58..3a6a159 100644
--- a/libopenshot.spec
+++ b/libopenshot.spec
@@ -1,18 +1,19 @@
-%global gitrev 101f25a7f5a1623cca2b2514fa2f7aed93799324
+%global gitrev c685571e6388ad5cc6c40661fd51bd15b436ccac
%global shortrev %(c=%{gitrev}; echo ${c:0:7})
-%global gitdate 20190406
+%global gitdate 20190912
Name: libopenshot
Version: 0.2.3
-Release: 3.%{gitdate}git%{shortrev}%{?dist}
+Release: 4.%{gitdate}git%{shortrev}%{?dist}
Summary: Library for creating and editing videos
License: LGPLv3+
URL:
http://www.openshot.org/
Source0:
https://github.com/OpenShot/%{name}/archive/%{gitrev}.tar.gz#/%{name}-%{s...
-# Fixed upstream
-#Patch1: %{name}-fix_swig_variable.patch
+# A fix has already been proposed upstream, but not yet accepted
+#
https://github.com/OpenShot/libopenshot/pull/290
+Patch1: %{name}-py-install-path.patch
BuildRequires: gcc-c++
%{?el7:BuildRequires: epel-rpm-macros}
@@ -53,6 +54,7 @@ developing applications that use %{name}.
%package -n python%{python3_pkgversion}-%{name}
Summary: Python bindings for %{name}
BuildRequires: swig
+BuildRequires: python%{python3_pkgversion}-libs
BuildRequires: python%{python3_pkgversion}-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: python-%{name} < 0.1.1-2
@@ -79,12 +81,20 @@ applications that use %{name}.
sed -e 's|-g -ggdb|-g|g' -i src/CMakeLists.txt tests/CMakeLists.txt
%build
+
+# Package includes an outdated FindPythonLibs.cmake module
+# Reported upstream:
https://github.com/OpenShot/libopenshot/pull/331
+rm cmake/Modules/FindPythonLibs.cmake
+
export CXXFLAGS="%{optflags} -Wl,--as-needed %{__global_ldflags}"
%cmake3 -Wno-dev -DCMAKE_BUILD_TYPE:STRING=Release \
- -DCMAKE_SKIP_RPATH:BOOL=YES -DUSE_SYSTEM_JSONCPP:BOOL=ON .
+ -DUSE_SYSTEM_JSONCPP:BOOL=ON .
%make_build
+%check
+make os_test
+
%install
%make_install
@@ -109,6 +119,12 @@ export CXXFLAGS="%{optflags} -Wl,--as-needed
%{__global_ldflags}"
%changelog
+* Mon Sep 16 2019 FeRD (Frank Dana) <ferdnyc(a)gmail.com> - 0.2.3-4
+- Update to git HEAD for compatibility with OpenShot update
+- Enable unit tests
+- Remove CMAKE_SKIP_RPATH to make test binaries runnable from build dir
+- Delete outdated copy of standard CMake module, causes python3.8 failures
+
* Wed Aug 07 2019 Leigh Scott <leigh123linux(a)gmail.com> -
0.2.3-3.20190406git101f25a
- Rebuild for new ffmpeg version
diff --git a/sources b/sources
index f56116a..b91f788 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ccadd77620b6c53f19e916b1ec96556d libopenshot-101f25a.tar.gz
+21b97efdab0832c017bd924ce1461f46 libopenshot-c685571.tar.gz