Merge ~vpa1977/ubuntu/+source/aom:use-system-libwebm into ubuntu/+source/aom:ubuntu/devel

Proposed by Vladimir Petko
Status: Needs review
Proposed branch: ~vpa1977/ubuntu/+source/aom:use-system-libwebm
Merge into: ubuntu/+source/aom:ubuntu/devel
Diff against target: 134 lines (+91/-0)
5 files modified
debian/changelog (+7/-0)
debian/control (+1/-0)
debian/patches/0003-use-system-libwebm.patch (+81/-0)
debian/patches/series (+1/-0)
debian/rules (+1/-0)
Reviewer Review Type Date Requested Status
Canonical Server MOTU reviewers Pending
Canonical Server Pending
git-ubuntu import Pending
Review via email: mp+436987@code.launchpad.net

Description of the change

This merge proposal adds a patch to CMake to replace bundled libwebm with the system one. It depends on https://code.launchpad.net/~vpa1977/ubuntu/+source/libwebm/+git/libwebm/+merge/436986

There should be no functional changes in the package.

PPA: ppa:vpa1977/libheif

Testing:
 - autopackage tests should pass:
Download image:
$ autopkgtest-buildvm-ubuntu-cloud -v -r lunar --post-command "apt install bzip2 dpkg-dev libdpkg-perl lto-disabled-list make"
....
$ autopkgtest -U -s --setup-commands="sudo add-apt-repository -y -u -s ppa:vpa1977/libheif" -B aom -- qemu autopkgtest-lunar-amd64.img
....
autopkgtest [16:09:31]: @@@@@@@@@@@@@@@@@@@@ summary
encode-decode PASS
library-build PASS

To post a comment you must log in.

Unmerged commits

1a42648... by Vladimir Petko

changelog

96c87ce... by Vladimir Petko

add patch description

c556b45... by Vladimir Petko

add libwebm-dev dependency

51aeee9... by Vladimir Petko

use system libwebm

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 52e6af9..1226193 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1aom (3.5.0-1ubuntu1) lunar; urgency=medium
2
3 * debian/patches/0003-use-system-libwebm.patch, debian/rules: Use system
4 libwebm instead of the bundled one.
5
6 -- Vladimir Petko <vladimir.petko@canonical.com> Wed, 08 Feb 2023 14:30:01 +1300
7
1aom (3.5.0-1) unstable; urgency=medium8aom (3.5.0-1) unstable; urgency=medium
29
3 * Team upload.10 * Team upload.
diff --git a/debian/control b/debian/control
index 1f48b62..6bb2851 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Build-Depends:
7 cmake (>= 3.6),7 cmake (>= 3.6),
8 debhelper-compat (= 13),8 debhelper-compat (= 13),
9 libyuv-dev,9 libyuv-dev,
10 libwebm-dev,
10 yasm [any-amd64 any-i386],11 yasm [any-amd64 any-i386],
11Build-Depends-Indep:12Build-Depends-Indep:
12 doxygen,13 doxygen,
diff --git a/debian/patches/0003-use-system-libwebm.patch b/debian/patches/0003-use-system-libwebm.patch
13new file mode 10064414new file mode 100644
index 0000000..99dc8f6
--- /dev/null
+++ b/debian/patches/0003-use-system-libwebm.patch
@@ -0,0 +1,81 @@
1Description: Use system libwebm library instead of the bundled one
2--- a/CMakeLists.txt
3+++ b/CMakeLists.txt
4@@ -735,26 +735,29 @@
5 endif()
6
7 if(CONFIG_WEBM_IO)
8- add_library(webm OBJECT ${AOM_LIBWEBM_SOURCES})
9- include_directories("${AOM_ROOT}/third_party/libwebm")
10- target_compile_definitions(webm PRIVATE __STDC_CONSTANT_MACROS)
11- target_compile_definitions(webm PRIVATE __STDC_LIMIT_MACROS)
12-
13- if(NOT MSVC)
14- target_compile_options(webm PRIVATE -Wno-shadow)
15+ target_link_libraries(aom ${AOM_LIB_LINK_TYPE} webm)
16+ target_include_directories(aom PRIVATE /usr/include/webm)
17+ if(BUILD_SHARED_LIBS)
18+ target_link_libraries(aom_static ${AOM_LIB_LINK_TYPE} webm)
19+ target_include_directories(aom_static PRIVATE /usr/include/webm)
20 endif()
21
22 # Add to existing targets.
23 if(CONFIG_AV1_DECODER)
24+ target_link_libraries(aom_decoder_app_util ${AOM_LIB_LINK_TYPE} webm)
25+ target_include_directories(aom_decoder_app_util PRIVATE /usr/include/webm)
26 target_sources(aom_decoder_app_util PRIVATE ${AOM_WEBM_DECODER_SOURCES})
27 endif()
28
29 if(CONFIG_AV1_ENCODER)
30+ target_link_libraries(aom_encoder_app_util ${AOM_LIB_LINK_TYPE} webm)
31+ target_include_directories(aom_encoder_app_util PRIVATE /usr/include/webm)
32 target_sources(aom_encoder_app_util PRIVATE ${AOM_WEBM_ENCODER_SOURCES})
33 endif()
34
35 foreach(aom_app ${AOM_APP_TARGETS})
36- target_sources(${aom_app} PRIVATE $<TARGET_OBJECTS:webm>)
37+ target_include_directories(${aom_app} PRIVATE /usr/include/webm)
38+ target_link_libraries(${aom_app} PRIVATE webm)
39 set_property(TARGET ${aom_app} PROPERTY LINKER_LANGUAGE CXX)
40 endforeach()
41 endif()
42--- a/common/webmdec.cc
43+++ b/common/webmdec.cc
44@@ -15,8 +15,8 @@
45 #include <cstring>
46 #include <cstdio>
47
48-#include "third_party/libwebm/mkvparser/mkvparser.h"
49-#include "third_party/libwebm/mkvparser/mkvreader.h"
50+#include <mkvparser/mkvparser.h>
51+#include <mkvparser/mkvreader.h>
52
53 namespace {
54
55--- a/common/webmenc.cc
56+++ b/common/webmenc.cc
57@@ -19,9 +19,9 @@
58 #include <string>
59
60 #include "common/av1_config.h"
61-#include "third_party/libwebm/mkvmuxer/mkvmuxer.h"
62-#include "third_party/libwebm/mkvmuxer/mkvmuxerutil.h"
63-#include "third_party/libwebm/mkvmuxer/mkvwriter.h"
64+#include <mkvmuxer/mkvmuxer.h>
65+#include <mkvmuxer/mkvmuxerutil.h>
66+#include <mkvmuxer/mkvwriter.h>
67
68 namespace {
69 const uint64_t kDebugTrackUid = 0xDEADBEEF;
70--- a/test/test.cmake
71+++ b/test/test.cmake
72@@ -467,7 +467,8 @@
73 # target_sources(test_libaom PRIVATE $<TARGET_OBJECTS:yuv>)
74 # endif()
75 if(CONFIG_WEBM_IO)
76- target_sources(test_libaom PRIVATE $<TARGET_OBJECTS:webm>)
77+ target_link_libraries(test_libaom ${AOM_LIB_LINK_TYPE} webm)
78+ target_include_directories(test_libaom PRIVATE ${CMAKE_INCLUDE_PATH}/webm)
79 endif()
80 if(HAVE_SSE2)
81 add_intrinsics_source_to_target("-msse2" "test_libaom"
diff --git a/debian/patches/series b/debian/patches/series
index 464179c..f3424a9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
10001-doc-Use-libjs-mathjax-rather-than-cloudflare-copy.patch10001-doc-Use-libjs-mathjax-rather-than-cloudflare-copy.patch
20002-use-system-libyuv.patch20002-use-system-libyuv.patch
30003-use-system-libwebm.patch
diff --git a/debian/rules b/debian/rules
index 450c322..7d48528 100755
--- a/debian/rules
+++ b/debian/rules
@@ -41,6 +41,7 @@ endif
41# Force building with system libyuv41# Force building with system libyuv
42execute_before_dh_auto_configure:42execute_before_dh_auto_configure:
43 rm -rf $(CURDIR)/third_party/libyuv43 rm -rf $(CURDIR)/third_party/libyuv
44 rm -rf $(CURDIR)/third_party/libwebm
4445
45# Examples and tools not built because they require various private46# Examples and tools not built because they require various private
46# symbols from libaom.so which we filter out.47# symbols from libaom.so which we filter out.

Subscribers

People subscribed via source and target branches