gnu: Add libopenshot.

* gnu/packages/video.scm (libopenshot): New variable.
* gnu/packages/patches/libopenshot-tests-with-system-libs.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
master
Eric Bavier 2017-06-28 22:05:24 -05:00
parent ef8517f29d
commit 579a9cdec7
No known key found for this signature in database
GPG Key ID: FD73CAC719D32566
3 changed files with 160 additions and 1 deletions

View File

@ -890,6 +890,7 @@ dist_patch_DATA = \
%D%/packages/patches/libffi-3.2.1-complex-alpha.patch \
%D%/packages/patches/libjxr-fix-function-signature.patch \
%D%/packages/patches/libjxr-fix-typos.patch \
%D%/packages/patches/libopenshot-tests-with-system-libs.patch \
%D%/packages/patches/libotr-test-auth-fix.patch \
%D%/packages/patches/libmad-armv7-thumb-pt1.patch \
%D%/packages/patches/libmad-armv7-thumb-pt2.patch \

View File

@ -0,0 +1,95 @@
Combination of two patches that fix libopenshot tests when built with
system-provided ffmpeg and jsoncpp. See
https://github.com/OpenShot/libopenshot/pull/163
From 0d7691ab53433e1583f6a66ea96683b0f7af8a57 Mon Sep 17 00:00:00 2001
From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
Date: Mon, 17 Sep 2018 14:04:40 -0400
Subject: [PATCH] tests/CMakeFiles: Use FFMpeg like src/
---
tests/CMakeLists.txt | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2c45550..4df8464 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -79,7 +79,37 @@ ENDIF (ImageMagick_FOUND)
FIND_PACKAGE(FFmpeg REQUIRED)
# Include FFmpeg headers (needed for compile)
-include_directories(${FFMPEG_INCLUDE_DIR})
+message('AVCODEC_FOUND: ${AVCODEC_FOUND}')
+message('AVCODEC_INCLUDE_DIRS: ${AVCODEC_INCLUDE_DIRS}')
+message('AVCODEC_LIBRARIES: ${AVCODEC_LIBRARIES}')
+
+IF (AVCODEC_FOUND)
+ include_directories(${AVCODEC_INCLUDE_DIRS})
+ENDIF (AVCODEC_FOUND)
+IF (AVDEVICE_FOUND)
+ include_directories(${AVDEVICE_INCLUDE_DIRS})
+ENDIF (AVDEVICE_FOUND)
+IF (AVFORMAT_FOUND)
+ include_directories(${AVFORMAT_INCLUDE_DIRS})
+ENDIF (AVFORMAT_FOUND)
+IF (AVFILTER_FOUND)
+ include_directories(${AVFILTER_INCLUDE_DIRS})
+ENDIF (AVFILTER_FOUND)
+IF (AVUTIL_FOUND)
+ include_directories(${AVUTIL_INCLUDE_DIRS})
+ENDIF (AVUTIL_FOUND)
+IF (POSTPROC_FOUND)
+ include_directories(${POSTPROC_INCLUDE_DIRS})
+ENDIF (POSTPROC_FOUND)
+IF (SWSCALE_FOUND)
+ include_directories(${SWSCALE_INCLUDE_DIRS})
+ENDIF (SWSCALE_FOUND)
+IF (SWRESAMPLE_FOUND)
+ include_directories(${SWRESAMPLE_INCLUDE_DIRS})
+ENDIF (SWRESAMPLE_FOUND)
+IF (AVRESAMPLE_FOUND)
+ include_directories(${AVRESAMPLE_INCLUDE_DIRS})
+ENDIF (AVRESAMPLE_FOUND)
################# LIBOPENSHOT-AUDIO ###################
# Find JUCE-based openshot Audio libraries
From e9e85cdfd036587adb86341f7f81619dc69f102c Mon Sep 17 00:00:00 2001
From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
Date: Mon, 17 Sep 2018 19:23:25 -0400
Subject: [PATCH] Use system jsoncpp in tests, too
The tests/ build needs to use the same jsoncpp as the src/ build,
or tests in Clip_Tests.cpp can fail.
---
tests/CMakeLists.txt | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 4df8464..a1a0356 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -180,12 +180,18 @@ endif(OPENMP_FOUND)
# Find ZeroMQ library (used for socket communication & logging)
FIND_PACKAGE(ZMQ REQUIRED)
-# Include FFmpeg headers (needed for compile)
+# Include ZeroMQ headers (needed for compile)
include_directories(${ZMQ_INCLUDE_DIRS})
################### JSONCPP #####################
# Include jsoncpp headers (needed for JSON parsing)
-include_directories("../thirdparty/jsoncpp/include")
+if (USE_SYSTEM_JSONCPP)
+ find_package(JsonCpp REQUIRED)
+ include_directories(${JSONCPP_INCLUDE_DIRS})
+else()
+ message("Using embedded JsonCpp")
+ include_directories("../thirdparty/jsoncpp/include")
+endif(USE_SYSTEM_JSONCPP)
IF (NOT DISABLE_TESTS)
############### SET TEST SOURCE FILES #################

View File

@ -12,7 +12,7 @@
;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016, 2018 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2017 Feng Shu <tumashu@163.com>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@ -112,6 +112,7 @@
#:use-module (gnu packages man)
#:use-module (gnu packages mp3)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages networking)
#:use-module (gnu packages ocr)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
@ -128,6 +129,7 @@
#:use-module (gnu packages serialization)
#:use-module (gnu packages shells)
#:use-module (gnu packages ssh)
#:use-module (gnu packages swig)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
@ -3077,3 +3079,64 @@ as surfing, skiing, riding and walking while shooting videos are especially
prone to erratic camera shakes. Vidstab targets these video contents to help
create smoother and stable videos.")
(license license:gpl2+)))
(define-public libopenshot
(package
(name "libopenshot")
(version "0.2.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/OpenShot/libopenshot")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1x4kv05pdq1pglb6y056aa7llc6iyibyhzg93k7zwj0q08cp5ixd"))
(modules '((guix build utils)))
(snippet '(begin
;; Allow overriding of the python installation dir
(substitute* "src/bindings/python/CMakeLists.txt"
(("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
(string-append set " CACHE PATH "
"\"Python bindings directory\")")))
#t))
(patches (search-patches "libopenshot-tests-with-system-libs.patch"))))
(build-system cmake-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("python" ,python)
("swig" ,swig)
("unittest++" ,unittest-cpp)))
(propagated-inputs ;all referenced in installed headers
`(("cppzmq" ,cppzmq)
("ffmpeg" ,ffmpeg)
("imagemagick" ,imagemagick)
("jsoncpp" ,jsoncpp)
("libopenshot-audio" ,libopenshot-audio)
("qt" ,qt) ;widgets, core, gui, multimedia, and multimediawidgets
("zeromq" ,zeromq)))
(arguments
`(#:configure-flags
(list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
,(version-major+minor (package-version python))
"/site-packages")
"-DUSE_SYSTEM_JSONCPP:BOOL=ON")
#:phases
(modify-phases %standard-phases
(add-before 'configure 'set-vars
(lambda* (#:key inputs #:allow-other-keys)
(setenv "LIBOPENSHOT_AUDIO_DIR"
(assoc-ref inputs "libopenshot-audio"))
(setenv "ZMQDIR"
(assoc-ref inputs "zeromq"))
(setenv "UNITTEST_DIR"
(string-append (assoc-ref inputs "unittest++")
"/include/UnitTest++"))
#t)))))
(home-page "https://openshot.org")
(synopsis "Video-editing, animation, and playback library")
(description "OpenShot Library (libopenshot) is a powerful C++ video
editing library with a multi-threaded and feature rich video editing
API. It includes bindings for Python, Ruby, and other languages.")
(license license:lgpl3+)))