diff options
author | Eric Bavier <bavier@member.fsf.org> | 2017-06-28 22:05:24 -0500 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2018-11-26 19:03:54 -0600 |
commit | 579a9cdec7673d9007ef924bb345f42527aa0a72 (patch) | |
tree | 1357166b3c8633000e648eae86a20f5706bf280b /gnu | |
parent | ef8517f29d7412f78e6481b3df56fd81041e3e3a (diff) | |
download | gnu-guix-579a9cdec7673d9007ef924bb345f42527aa0a72.tar gnu-guix-579a9cdec7673d9007ef924bb345f42527aa0a72.tar.gz |
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.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/patches/libopenshot-tests-with-system-libs.patch | 95 | ||||
-rw-r--r-- | gnu/packages/video.scm | 65 |
3 files changed, 160 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 3350e5abac..0cd9fad2e5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -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 \ diff --git a/gnu/packages/patches/libopenshot-tests-with-system-libs.patch b/gnu/packages/patches/libopenshot-tests-with-system-libs.patch new file mode 100644 index 0000000000..a18c4b8bba --- /dev/null +++ b/gnu/packages/patches/libopenshot-tests-with-system-libs.patch @@ -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 ################# diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index e9a49df787..bc8e625d72 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -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+))) |