gnu: libopenshot-audio: Update to 0.1.8.
[jackhill/guix/guix.git] / gnu / packages / patches / libopenshot-tests-with-system-libs.patch
1 Combination of two patches that fix libopenshot tests when built with
2 system-provided ffmpeg and jsoncpp. See
3
4 https://github.com/OpenShot/libopenshot/pull/163
5
6 From 0d7691ab53433e1583f6a66ea96683b0f7af8a57 Mon Sep 17 00:00:00 2001
7 From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
8 Date: Mon, 17 Sep 2018 14:04:40 -0400
9 Subject: [PATCH] tests/CMakeFiles: Use FFMpeg like src/
10
11 ---
12 tests/CMakeLists.txt | 32 +++++++++++++++++++++++++++++++-
13 1 file changed, 31 insertions(+), 1 deletion(-)
14
15 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
16 index 2c45550..4df8464 100644
17 --- a/tests/CMakeLists.txt
18 +++ b/tests/CMakeLists.txt
19 @@ -79,7 +79,37 @@ ENDIF (ImageMagick_FOUND)
20 FIND_PACKAGE(FFmpeg REQUIRED)
21
22 # Include FFmpeg headers (needed for compile)
23 -include_directories(${FFMPEG_INCLUDE_DIR})
24 +message('AVCODEC_FOUND: ${AVCODEC_FOUND}')
25 +message('AVCODEC_INCLUDE_DIRS: ${AVCODEC_INCLUDE_DIRS}')
26 +message('AVCODEC_LIBRARIES: ${AVCODEC_LIBRARIES}')
27 +
28 +IF (AVCODEC_FOUND)
29 + include_directories(${AVCODEC_INCLUDE_DIRS})
30 +ENDIF (AVCODEC_FOUND)
31 +IF (AVDEVICE_FOUND)
32 + include_directories(${AVDEVICE_INCLUDE_DIRS})
33 +ENDIF (AVDEVICE_FOUND)
34 +IF (AVFORMAT_FOUND)
35 + include_directories(${AVFORMAT_INCLUDE_DIRS})
36 +ENDIF (AVFORMAT_FOUND)
37 +IF (AVFILTER_FOUND)
38 + include_directories(${AVFILTER_INCLUDE_DIRS})
39 +ENDIF (AVFILTER_FOUND)
40 +IF (AVUTIL_FOUND)
41 + include_directories(${AVUTIL_INCLUDE_DIRS})
42 +ENDIF (AVUTIL_FOUND)
43 +IF (POSTPROC_FOUND)
44 + include_directories(${POSTPROC_INCLUDE_DIRS})
45 +ENDIF (POSTPROC_FOUND)
46 +IF (SWSCALE_FOUND)
47 + include_directories(${SWSCALE_INCLUDE_DIRS})
48 +ENDIF (SWSCALE_FOUND)
49 +IF (SWRESAMPLE_FOUND)
50 + include_directories(${SWRESAMPLE_INCLUDE_DIRS})
51 +ENDIF (SWRESAMPLE_FOUND)
52 +IF (AVRESAMPLE_FOUND)
53 + include_directories(${AVRESAMPLE_INCLUDE_DIRS})
54 +ENDIF (AVRESAMPLE_FOUND)
55
56 ################# LIBOPENSHOT-AUDIO ###################
57 # Find JUCE-based openshot Audio libraries
58
59
60 From e9e85cdfd036587adb86341f7f81619dc69f102c Mon Sep 17 00:00:00 2001
61 From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
62 Date: Mon, 17 Sep 2018 19:23:25 -0400
63 Subject: [PATCH] Use system jsoncpp in tests, too
64
65 The tests/ build needs to use the same jsoncpp as the src/ build,
66 or tests in Clip_Tests.cpp can fail.
67 ---
68 tests/CMakeLists.txt | 10 ++++++++--
69 1 file changed, 8 insertions(+), 2 deletions(-)
70
71 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
72 index 4df8464..a1a0356 100644
73 --- a/tests/CMakeLists.txt
74 +++ b/tests/CMakeLists.txt
75 @@ -180,12 +180,18 @@ endif(OPENMP_FOUND)
76 # Find ZeroMQ library (used for socket communication & logging)
77 FIND_PACKAGE(ZMQ REQUIRED)
78
79 -# Include FFmpeg headers (needed for compile)
80 +# Include ZeroMQ headers (needed for compile)
81 include_directories(${ZMQ_INCLUDE_DIRS})
82
83 ################### JSONCPP #####################
84 # Include jsoncpp headers (needed for JSON parsing)
85 -include_directories("../thirdparty/jsoncpp/include")
86 +if (USE_SYSTEM_JSONCPP)
87 + find_package(JsonCpp REQUIRED)
88 + include_directories(${JSONCPP_INCLUDE_DIRS})
89 +else()
90 + message("Using embedded JsonCpp")
91 + include_directories("../thirdparty/jsoncpp/include")
92 +endif(USE_SYSTEM_JSONCPP)
93
94 IF (NOT DISABLE_TESTS)
95 ############### SET TEST SOURCE FILES #################