summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-multimedia/recipes-multimedia/openh264/openh264/0001-Makefile-Use-cp-options-to-preserve-file-mode.patch32
-rw-r--r--meta-multimedia/recipes-multimedia/openh264/openh264/0002-Makefile-add-possibility-to-disable-NEON-extension.patch103
-rw-r--r--meta-multimedia/recipes-multimedia/openh264/openh264_2.3.1.bb55
-rw-r--r--meta-multimedia/recipes-multimedia/openh264/openh264_2.5.0.bb20
4 files changed, 20 insertions, 190 deletions
diff --git a/meta-multimedia/recipes-multimedia/openh264/openh264/0001-Makefile-Use-cp-options-to-preserve-file-mode.patch b/meta-multimedia/recipes-multimedia/openh264/openh264/0001-Makefile-Use-cp-options-to-preserve-file-mode.patch
deleted file mode 100644
index 92f32948b2..0000000000
--- a/meta-multimedia/recipes-multimedia/openh264/openh264/0001-Makefile-Use-cp-options-to-preserve-file-mode.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 1c3bda45c55d2334af384caf9e7f240b7aaf2eb5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 3 Mar 2020 22:28:25 -0800
4Subject: [PATCH] Makefile: Use cp options to preserve file mode
5
6This fixes packaging issues e.g.
7openh264: /usr/lib/libopenh264.so is owned by uid 1000, which is the same as the user running bitbake
8
9Upstream-Status: Submitted [https://github.com/cisco/openh264/pull/3245]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 Makefile | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/Makefile b/Makefile
16index 74ff029d..ac643412 100644
17--- a/Makefile
18+++ b/Makefile
19@@ -306,8 +306,8 @@ install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) install-headers $
20 mkdir -p $(DESTDIR)$(SHAREDLIB_DIR)
21 install -m 755 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXFULLVER) $(DESTDIR)$(SHAREDLIB_DIR)
22 if [ "$(SHAREDLIBSUFFIXFULLVER)" != "$(SHAREDLIBSUFFIX)" ]; then \
23- cp -a $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) $(DESTDIR)$(SHAREDLIB_DIR) ; \
24- cp -a $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR) ; \
25+ cp -R --no-dereference --preserve=mode,links $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) $(DESTDIR)$(SHAREDLIB_DIR) ; \
26+ cp -R --no-dereference --preserve=mode,links $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR) ; \
27 fi
28 mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
29 install -m 644 $(PROJECT_NAME).pc $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
30--
312.25.1
32
diff --git a/meta-multimedia/recipes-multimedia/openh264/openh264/0002-Makefile-add-possibility-to-disable-NEON-extension.patch b/meta-multimedia/recipes-multimedia/openh264/openh264/0002-Makefile-add-possibility-to-disable-NEON-extension.patch
deleted file mode 100644
index 298ac1c013..0000000000
--- a/meta-multimedia/recipes-multimedia/openh264/openh264/0002-Makefile-add-possibility-to-disable-NEON-extension.patch
+++ /dev/null
@@ -1,103 +0,0 @@
1From bc3a3baeaccfe9c1286848b348baf92dfbd05346 Mon Sep 17 00:00:00 2001
2From: Benjamin Bara <benjamin.bara@skidata.com>
3Date: Thu, 31 Aug 2023 09:27:31 +0200
4Subject: [PATCH 2/2] Makefile: add possibility to disable NEON extension
5
6README states that the NEON extension is optional. However, currently it
7cannot be turned off, therefore add an option to disable it.
8
9Upstream-Status: Submitted [https://github.com/cisco/openh264/pull/3679]
10Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>
11---
12 Makefile | 1 +
13 build/arch.mk | 4 ++++
14 build/msvc-common.mk | 10 ++++++++--
15 build/platform-mingw_nt.mk | 5 ++++-
16 4 files changed, 17 insertions(+), 3 deletions(-)
17
18diff --git a/Makefile b/Makefile
19index baed53a7..cc22c4aa 100644
20--- a/Makefile
21+++ b/Makefile
22@@ -35,6 +35,7 @@ CCASFLAGS=$(CFLAGS)
23 STATIC_LDFLAGS=-lstdc++
24 STRIP ?= strip
25 USE_STACK_PROTECTOR = Yes
26+USE_NEON=Yes
27
28 SHAREDLIB_MAJORVERSION=7
29 FULL_VERSION := 2.3.1
30diff --git a/build/arch.mk b/build/arch.mk
31index 4e1538c4..fd6a81e4 100644
32--- a/build/arch.mk
33+++ b/build/arch.mk
34@@ -17,18 +17,22 @@ ifneq ($(filter-out arm64 arm64e, $(filter arm%, $(ARCH))),)
35 ifeq ($(USE_ASM), Yes)
36 ASM_ARCH = arm
37 ASMFLAGS += -I$(SRC_PATH)codec/common/arm/
38+ifeq ($(USE_NEON), Yes)
39 CFLAGS += -DHAVE_NEON
40 endif
41 endif
42+endif
43
44 #for arm64
45 ifneq ($(filter arm64 aarch64 arm64e, $(ARCH)),)
46 ifeq ($(USE_ASM), Yes)
47 ASM_ARCH = arm64
48 ASMFLAGS += -I$(SRC_PATH)codec/common/arm64/
49+ifeq ($(USE_NEON), Yes)
50 CFLAGS += -DHAVE_NEON_AARCH64
51 endif
52 endif
53+endif
54
55 #for mips
56 ifneq ($(filter mips mips64, $(ARCH)),)
57diff --git a/build/msvc-common.mk b/build/msvc-common.mk
58index 5891ea4e..5a1e2582 100644
59--- a/build/msvc-common.mk
60+++ b/build/msvc-common.mk
61@@ -10,7 +10,10 @@ else
62 endif
63 ifeq ($(ASM_ARCH), arm)
64 CCAS = gas-preprocessor.pl -as-type armasm -force-thumb -- armasm
65-CCASFLAGS = -nologo -DHAVE_NEON -ignore 4509
66+CCASFLAGS = -nologo -ignore 4509
67+ifeq ($(USE_NEON), Yes)
68+CCASFLAGS += -DHAVE_NEON
69+endif
70 endif
71
72 CC=cl
73@@ -20,7 +23,10 @@ CXX_O=-Fo$@
74
75 ifeq ($(ASM_ARCH), arm64)
76 CCAS = clang-cl
77-CCASFLAGS = -nologo -DHAVE_NEON_AARCH64 --target=arm64-windows
78+CCASFLAGS = -nologo --target=arm64-windows
79+ifeq ($(USE_NEON), Yes)
80+CCASFLAGS += -DHAVE_NEON_AARCH64
81+endif
82 endif
83
84
85diff --git a/build/platform-mingw_nt.mk b/build/platform-mingw_nt.mk
86index b7a5495d..d73e362a 100644
87--- a/build/platform-mingw_nt.mk
88+++ b/build/platform-mingw_nt.mk
89@@ -17,7 +17,10 @@ endif
90 endif
91 ifeq ($(ASM_ARCH), arm)
92 CCAS = gas-preprocessor.pl -as-type clang -force-thumb -- $(CC)
93-CCASFLAGS = -DHAVE_NEON -mimplicit-it=always
94+CCASFLAGS = -mimplicit-it=always
95+ifeq ($(USE_NEON), Yes)
96+CCASFLAGS += -DHAVE_NEON
97+endif
98 endif
99 EXEEXT = .exe
100
101--
1022.34.1
103
diff --git a/meta-multimedia/recipes-multimedia/openh264/openh264_2.3.1.bb b/meta-multimedia/recipes-multimedia/openh264/openh264_2.3.1.bb
deleted file mode 100644
index 6dfd759355..0000000000
--- a/meta-multimedia/recipes-multimedia/openh264/openh264_2.3.1.bb
+++ /dev/null
@@ -1,55 +0,0 @@
1SUMMARY = "Open Source H.264 Codec"
2DESCRIPTION = "OpenH264 is a codec library which supports H.264 encoding and \
3decoding. It is suitable for use in real time applications such as WebRTC."
4HOMEPAGE = "http://www.openh264.org/"
5SECTION = "libs/multimedia"
6
7DEPENDS:append:x86 = " nasm-native"
8DEPENDS:append:x86-64 = " nasm-native"
9
10LICENSE = "BSD-2-Clause"
11LICENSE_FLAGS = "commercial"
12LIC_FILES_CHKSUM = "file://LICENSE;md5=bb6d3771da6a07d33fd50d4d9aa73bcf"
13
14S = "${WORKDIR}/git"
15SRCREV = "0a48f4d2e9be2abb4fb01b4c3be83cf44ce91a6e"
16BRANCH = "openh264v${PV}"
17SRC_URI = "git://github.com/cisco/openh264.git;protocol=https;branch=${BRANCH} \
18 file://0001-Makefile-Use-cp-options-to-preserve-file-mode.patch \
19 file://0002-Makefile-add-possibility-to-disable-NEON-extension.patch \
20 "
21
22COMPATIBLE_MACHINE:armv7a = "(.*)"
23COMPATIBLE_MACHINE:aarch64 = "(.*)"
24COMPATIBLE_MACHINE:x86 = "(.*)"
25COMPATIBLE_MACHINE:x86-64 = "(.*)"
26COMPATIBLE_MACHINE:mips = "(.*)"
27COMPATIBLE_MACHINE:mips64 = "(.*)"
28COMPATIBLE_MACHINE:powerpc64le = "null"
29
30EXTRA_OEMAKE:armv7a = "ARCH=arm"
31EXTRA_OEMAKE:armv7ve = "ARCH=arm"
32EXTRA_OEMAKE:aarch64 = "ARCH=arm64"
33EXTRA_OEMAKE:x86 = "ARCH=i386"
34EXTRA_OEMAKE:x86-64 = "ARCH=x86_64"
35EXTRA_OEMAKE:mips = "ARCH=mips"
36EXTRA_OEMAKE:mips64 = "ARCH=mips64"
37EXTRA_OEMAKE:riscv64 = "ARCH=riscv64"
38
39EXTRA_OEMAKE:append:armv7a = "${@bb.utils.contains("TUNE_FEATURES","neon",""," USE_NEON=No",d)}"
40EXTRA_OEMAKE:append:armv7ve = "${@bb.utils.contains("TUNE_FEATURES","neon",""," USE_NEON=No",d)}"
41
42EXTRA_OEMAKE:append = " ENABLEPIC=Yes"
43do_configure() {
44 :
45}
46
47do_compile() {
48 oe_runmake
49}
50
51do_install() {
52 oe_runmake install DESTDIR=${D} PREFIX=${prefix} LIBDIR_NAME=${baselib} SHAREDLIB_DIR=${libdir}
53}
54
55CLEANBROKEN = "1"
diff --git a/meta-multimedia/recipes-multimedia/openh264/openh264_2.5.0.bb b/meta-multimedia/recipes-multimedia/openh264/openh264_2.5.0.bb
new file mode 100644
index 0000000000..04e93ce790
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/openh264/openh264_2.5.0.bb
@@ -0,0 +1,20 @@
1SUMMARY = "Open Source H.264 Codec"
2DESCRIPTION = "OpenH264 is a codec library which supports H.264 encoding and \
3decoding. It is suitable for use in real time applications such as WebRTC."
4HOMEPAGE = "http://www.openh264.org/"
5SECTION = "libs/multimedia"
6LICENSE = "BSD-2-Clause"
7LICENSE_FLAGS = "commercial"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=bb6d3771da6a07d33fd50d4d9aa73bcf"
9
10DEPENDS = " nasm-native"
11
12inherit meson pkgconfig
13
14S = "${WORKDIR}/git"
15SRCREV = "8c7008aeb6335e7d36ab0d9a023a63f82a8eaac0"
16BRANCH = "openh264v${PV}"
17SRC_URI = "git://github.com/cisco/openh264.git;protocol=https;branch=${BRANCH}"
18
19COMPATIBLE_MACHINE:powerpc64le = "null"
20