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
1diff --git a/debian/changelog b/debian/changelog
2index 52e6af9..1226193 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+aom (3.5.0-1ubuntu1) lunar; urgency=medium
7+
8+ * debian/patches/0003-use-system-libwebm.patch, debian/rules: Use system
9+ libwebm instead of the bundled one.
10+
11+ -- Vladimir Petko <vladimir.petko@canonical.com> Wed, 08 Feb 2023 14:30:01 +1300
12+
13 aom (3.5.0-1) unstable; urgency=medium
14
15 * Team upload.
16diff --git a/debian/control b/debian/control
17index 1f48b62..6bb2851 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -7,6 +7,7 @@ Build-Depends:
21 cmake (>= 3.6),
22 debhelper-compat (= 13),
23 libyuv-dev,
24+ libwebm-dev,
25 yasm [any-amd64 any-i386],
26 Build-Depends-Indep:
27 doxygen,
28diff --git a/debian/patches/0003-use-system-libwebm.patch b/debian/patches/0003-use-system-libwebm.patch
29new file mode 100644
30index 0000000..99dc8f6
31--- /dev/null
32+++ b/debian/patches/0003-use-system-libwebm.patch
33@@ -0,0 +1,81 @@
34+Description: Use system libwebm library instead of the bundled one
35+--- a/CMakeLists.txt
36++++ b/CMakeLists.txt
37+@@ -735,26 +735,29 @@
38+ endif()
39+
40+ if(CONFIG_WEBM_IO)
41+- add_library(webm OBJECT ${AOM_LIBWEBM_SOURCES})
42+- include_directories("${AOM_ROOT}/third_party/libwebm")
43+- target_compile_definitions(webm PRIVATE __STDC_CONSTANT_MACROS)
44+- target_compile_definitions(webm PRIVATE __STDC_LIMIT_MACROS)
45+-
46+- if(NOT MSVC)
47+- target_compile_options(webm PRIVATE -Wno-shadow)
48++ target_link_libraries(aom ${AOM_LIB_LINK_TYPE} webm)
49++ target_include_directories(aom PRIVATE /usr/include/webm)
50++ if(BUILD_SHARED_LIBS)
51++ target_link_libraries(aom_static ${AOM_LIB_LINK_TYPE} webm)
52++ target_include_directories(aom_static PRIVATE /usr/include/webm)
53+ endif()
54+
55+ # Add to existing targets.
56+ if(CONFIG_AV1_DECODER)
57++ target_link_libraries(aom_decoder_app_util ${AOM_LIB_LINK_TYPE} webm)
58++ target_include_directories(aom_decoder_app_util PRIVATE /usr/include/webm)
59+ target_sources(aom_decoder_app_util PRIVATE ${AOM_WEBM_DECODER_SOURCES})
60+ endif()
61+
62+ if(CONFIG_AV1_ENCODER)
63++ target_link_libraries(aom_encoder_app_util ${AOM_LIB_LINK_TYPE} webm)
64++ target_include_directories(aom_encoder_app_util PRIVATE /usr/include/webm)
65+ target_sources(aom_encoder_app_util PRIVATE ${AOM_WEBM_ENCODER_SOURCES})
66+ endif()
67+
68+ foreach(aom_app ${AOM_APP_TARGETS})
69+- target_sources(${aom_app} PRIVATE $<TARGET_OBJECTS:webm>)
70++ target_include_directories(${aom_app} PRIVATE /usr/include/webm)
71++ target_link_libraries(${aom_app} PRIVATE webm)
72+ set_property(TARGET ${aom_app} PROPERTY LINKER_LANGUAGE CXX)
73+ endforeach()
74+ endif()
75+--- a/common/webmdec.cc
76++++ b/common/webmdec.cc
77+@@ -15,8 +15,8 @@
78+ #include <cstring>
79+ #include <cstdio>
80+
81+-#include "third_party/libwebm/mkvparser/mkvparser.h"
82+-#include "third_party/libwebm/mkvparser/mkvreader.h"
83++#include <mkvparser/mkvparser.h>
84++#include <mkvparser/mkvreader.h>
85+
86+ namespace {
87+
88+--- a/common/webmenc.cc
89++++ b/common/webmenc.cc
90+@@ -19,9 +19,9 @@
91+ #include <string>
92+
93+ #include "common/av1_config.h"
94+-#include "third_party/libwebm/mkvmuxer/mkvmuxer.h"
95+-#include "third_party/libwebm/mkvmuxer/mkvmuxerutil.h"
96+-#include "third_party/libwebm/mkvmuxer/mkvwriter.h"
97++#include <mkvmuxer/mkvmuxer.h>
98++#include <mkvmuxer/mkvmuxerutil.h>
99++#include <mkvmuxer/mkvwriter.h>
100+
101+ namespace {
102+ const uint64_t kDebugTrackUid = 0xDEADBEEF;
103+--- a/test/test.cmake
104++++ b/test/test.cmake
105+@@ -467,7 +467,8 @@
106+ # target_sources(test_libaom PRIVATE $<TARGET_OBJECTS:yuv>)
107+ # endif()
108+ if(CONFIG_WEBM_IO)
109+- target_sources(test_libaom PRIVATE $<TARGET_OBJECTS:webm>)
110++ target_link_libraries(test_libaom ${AOM_LIB_LINK_TYPE} webm)
111++ target_include_directories(test_libaom PRIVATE ${CMAKE_INCLUDE_PATH}/webm)
112+ endif()
113+ if(HAVE_SSE2)
114+ add_intrinsics_source_to_target("-msse2" "test_libaom"
115diff --git a/debian/patches/series b/debian/patches/series
116index 464179c..f3424a9 100644
117--- a/debian/patches/series
118+++ b/debian/patches/series
119@@ -1,2 +1,3 @@
120 0001-doc-Use-libjs-mathjax-rather-than-cloudflare-copy.patch
121 0002-use-system-libyuv.patch
122+0003-use-system-libwebm.patch
123diff --git a/debian/rules b/debian/rules
124index 450c322..7d48528 100755
125--- a/debian/rules
126+++ b/debian/rules
127@@ -41,6 +41,7 @@ endif
128 # Force building with system libyuv
129 execute_before_dh_auto_configure:
130 rm -rf $(CURDIR)/third_party/libyuv
131+ rm -rf $(CURDIR)/third_party/libwebm
132
133 # Examples and tools not built because they require various private
134 # symbols from libaom.so which we filter out.

Subscribers

People subscribed via source and target branches