Skip to contentSkip to conversation

libopus: upgrade to version 1.1.2

PATCH Superseded Carlos Rafael Giani 1 participant 2 messages Feb 8, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libopus: upgrade to version 1.1.2

This release includes support for Ne10 to improve performance on ARM NEON capable CPUs. Also, packageconfigs are introduced for controlling whether Opus uses fixed or floating point processing and whether or not fast floating point approximations are enabled.

---
 .../libopus/{libopus_1.1.bb => libopus_1.1.2.bb}   | 24 ++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
 rename meta-oe/recipes-multimedia/libopus/{libopus_1.1.bb => libopus_1.1.2.bb} (65%)
meta-oe/recipes-multimedia/libopus/libopus_1.1.2.bb renamed from meta-oe/recipes-multimedia/libopus/libopus_1.1.bb +20 -4
similarity index 65%
rename from meta-oe/recipes-multimedia/libopus/libopus_1.1.bb
rename to meta-oe/recipes-multimedia/libopus/libopus_1.1.2.bb
index 948d4df..9d9a634 100644
@@ -9,15 +9,31 @@ LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=e304cdf74c2a1b0a33a5084c128a23a3"
 
 SRC_URI = "http://downloads.xiph.org/releases/opus/opus-${PV}.tar.gz"
-SRC_URI[md5sum] = "c5a8cf7c0b066759542bc4ca46817ac6"
-SRC_URI[sha256sum] = "b9727015a58affcf3db527322bf8c4d2fcf39f5f6b8f15dbceca20206cbe1d95"
+SRC_URI[md5sum] = "1f08a661bc72930187893a07f3741a91"
+SRC_URI[sha256sum] = "0e290078e31211baa7b5886bcc8ab6bc048b9fc83882532da4a1a45e58e907fd"
 
 S = "${WORKDIR}/opus-${PV}"
 
 inherit autotools pkgconfig
 
-require libopus-fpu.inc
-EXTRA_OECONF = "${@get_libopus_fpu_setting(bb, d)}"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[fixed-point] = "--enable-fixed-point,,"
+PACKAGECONFIG[float-approx] = "--enable-float-approx,,"
+
+EXTRA_OECONF = "--with-NE10-includes=${STAGING_DIR_TARGET}${includedir} \
+                --with-NE10-libraries=${STAGING_DIR_TARGET}${libdir} \
+                --enable-asm \
+                --enable-intrinsics \
+               "
+
+python () {
+    if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
+        d.appendVar('PACKAGECONFIG', ' fixed-point')
+
+    # Ne10 is only available for armv7 and aarch64
+    if any((t.startswith('armv7') or t.startswith('aarch64')) for t in d.getVar('TUNE_FEATURES', True).split()):
+        d.appendVar('DEPENDS', ' ne10')
+}
 
 # Fails to build with thumb-1 (qemuarm)
 #| {standard input}: Assembler messages:
Signature · 1 line
2.5.0
#1 lore raw

PATCH v2 1/1 libopus: upgrade to version 1.1.2

This release includes support for Ne10 to improve performance on ARM NEON capable CPUs. Also, packageconfigs are introduced for controlling whether Opus uses fixed or floating point processing and whether or not fast floating point approximations are enabled.

libopus-fpu.inc wasn't doing much, and was fully integrated into the main recipe.

---
 meta-oe/recipes-multimedia/libopus/libopus-fpu.inc |  6 ------
 .../libopus/{libopus_1.1.bb => libopus_1.1.2.bb}   | 24 ++++++++++++++++++----
 2 files changed, 20 insertions(+), 10 deletions(-)
 delete mode 100644 meta-oe/recipes-multimedia/libopus/libopus-fpu.inc
 rename meta-oe/recipes-multimedia/libopus/{libopus_1.1.bb => libopus_1.1.2.bb} (65%)
meta-oe/recipes-multimedia/libopus/libopus-fpu.inc deleted +0 -6
deleted file mode 100644
index 8464664..0000000
@@ -1,6 +0,0 @@
-
-def get_libopus_fpu_setting(bb, d):
-    if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
-        return "--enable-fixed-point"
-    return ""
-
meta-oe/recipes-multimedia/libopus/libopus_1.1.2.bb renamed from meta-oe/recipes-multimedia/libopus/libopus_1.1.bb +20 -4
similarity index 65%
rename from meta-oe/recipes-multimedia/libopus/libopus_1.1.bb
rename to meta-oe/recipes-multimedia/libopus/libopus_1.1.2.bb
index 948d4df..9d9a634 100644
@@ -9,15 +9,31 @@ LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=e304cdf74c2a1b0a33a5084c128a23a3"
 
 SRC_URI = "http://downloads.xiph.org/releases/opus/opus-${PV}.tar.gz"
-SRC_URI[md5sum] = "c5a8cf7c0b066759542bc4ca46817ac6"
-SRC_URI[sha256sum] = "b9727015a58affcf3db527322bf8c4d2fcf39f5f6b8f15dbceca20206cbe1d95"
+SRC_URI[md5sum] = "1f08a661bc72930187893a07f3741a91"
+SRC_URI[sha256sum] = "0e290078e31211baa7b5886bcc8ab6bc048b9fc83882532da4a1a45e58e907fd"
 
 S = "${WORKDIR}/opus-${PV}"
 
 inherit autotools pkgconfig
 
-require libopus-fpu.inc
-EXTRA_OECONF = "${@get_libopus_fpu_setting(bb, d)}"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[fixed-point] = "--enable-fixed-point,,"
+PACKAGECONFIG[float-approx] = "--enable-float-approx,,"
+
+EXTRA_OECONF = "--with-NE10-includes=${STAGING_DIR_TARGET}${includedir} \
+                --with-NE10-libraries=${STAGING_DIR_TARGET}${libdir} \
+                --enable-asm \
+                --enable-intrinsics \
+               "
+
+python () {
+    if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
+        d.appendVar('PACKAGECONFIG', ' fixed-point')
+
+    # Ne10 is only available for armv7 and aarch64
+    if any((t.startswith('armv7') or t.startswith('aarch64')) for t in d.getVar('TUNE_FEATURES', True).split()):
+        d.appendVar('DEPENDS', ' ne10')
+}
 
 # Fails to build with thumb-1 (qemuarm)
 #| {standard input}: Assembler messages:
Signature · 1 line
2.5.0