aboutsummaryrefslogtreecommitdiffstats
path: root/main/libtheora
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-09-15 05:32:52 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-09-15 05:33:55 +0000
commitfafe26db0feaa540b3e13a1e45253e4b6e1a8c50 (patch)
tree88af4483cec8d648cc4e06a45ae18c156a91a9f7 /main/libtheora
parentebee8376cadf635d062db76c49455ffcbd025c3e (diff)
downloadaports-fafe26db0feaa540b3e13a1e45253e4b6e1a8c50.tar.bz2
aports-fafe26db0feaa540b3e13a1e45253e4b6e1a8c50.tar.xz
main/libtheora: fix mmx/fpu usage
fixes #6132
Diffstat (limited to 'main/libtheora')
-rw-r--r--main/libtheora/APKBUILD6
-rw-r--r--main/libtheora/fix-mmx.patch31
2 files changed, 36 insertions, 1 deletions
diff --git a/main/libtheora/APKBUILD b/main/libtheora/APKBUILD
index d9678bd9cf..712ff802f1 100644
--- a/main/libtheora/APKBUILD
+++ b/main/libtheora/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libtheora
pkgver=1.1.1
-pkgrel=10
+pkgrel=11
pkgdesc="An open video codec developed by the Xiph.org"
url="http://www.xiph.org"
arch="all"
@@ -14,6 +14,7 @@ source="http://downloads.xiph.org/releases/theora/$pkgname-$pkgver.tar.bz2
libtheora-flags.patch
enc.patch
fix-timeb.patch
+ fix-mmx.patch
automake.patch
"
@@ -67,14 +68,17 @@ md5sums="292ab65cedd5021d6b7ddd117e07cd8e libtheora-1.1.1.tar.bz2
7cbab1ce1f52adb98e1c241515a27aca libtheora-flags.patch
5024b6c41351433bf0e8a354969f8efd enc.patch
b82250b0a1120e73bf225a0d313b848a fix-timeb.patch
+128a42b7182c73cccea61b3d76327f93 fix-mmx.patch
0ed0917a6dac6a0e3242b1f7ce9785a5 automake.patch"
sha256sums="b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc libtheora-1.1.1.tar.bz2
7efb7aec3e472914ffc0facbdc9769e088e5d69e285254d19f353555ca90c7d6 libtheora-flags.patch
eb8452cc4022e8a591c5b1e679c8c1434d965d842411feeb7121255aae5e4cc5 enc.patch
38228518e7a4ef0efc29cef9f99e98cce1f9668eff6e43ac783478163c08e420 fix-timeb.patch
+287baa8021af52c62a8a2e998659043492f394327449a44541618ee586fd7783 fix-mmx.patch
9a58f7cb9069c5b1792af07ddd7e5dfcc5765fd047f3dbe8e6ab9e39235da37c automake.patch"
sha512sums="9ab9b3af1c35d16a7d6d84f61f59ef3180132e30c27bdd7c0fa2683e0d00e2c791accbc7fd2c90718cc947d8bd10ee4a5940fb55f90f1fd7b0ed30583a47dbbd libtheora-1.1.1.tar.bz2
72916c4ed0f9609b84af7c72b35b558ecfb2ed7533739e170ed088e06d0e82a585dcc1185f3c5a5d0644d30901459813b635df2ba951e2290bcd4303cfebc20b libtheora-flags.patch
569132fd0a576abb26b3c28fe84c4c2c66ff871129f00bfb23e593b8f985e47d61bc910d383aa3fc7477cc9de21e86f8df412901c609a62da972410733ec41f2 enc.patch
985dd5f5f3afcb36d71a636082c6e09ec18bb9e442b552babc4706299f502b90e79fb4aacb50a43c5e87a0b8429b311bcfeb21027f6cdca6fdb81e76b491dfff fix-timeb.patch
+f86b15fe5b1029c1e82b8f3785cbd6c81dd5e17dc6c8e4052de3c55482be3948d53828930df864a4668078c5cbab38b1d06b5807563f5fa342da1d084ce924b2 fix-mmx.patch
d72648de058d42ed85d9870596d8c42148f9bcf5b08e2a333c279e1516f4bfa6535566cda807abb06ae58bfb1e373909148cb5c10aad6f56879d9c8452f2cc4f automake.patch"
diff --git a/main/libtheora/fix-mmx.patch b/main/libtheora/fix-mmx.patch
new file mode 100644
index 0000000000..63fb9f76ec
--- /dev/null
+++ b/main/libtheora/fix-mmx.patch
@@ -0,0 +1,31 @@
+http://bugs.alpinelinux.org/issues/6132
+https://trac.xiph.org/ticket/2287
+
+patch rebased for libtheory 1.1.1 stable
+
+diff -ru libtheora-1.1.1.orig/lib/encode.c libtheora-1.1.1/lib/encode.c
+--- libtheora-1.1.1.orig/lib/encode.c 2009-08-22 18:14:04.000000000 +0000
++++ libtheora-1.1.1/lib/encode.c 2016-09-15 05:27:02.065785527 +0000
+@@ -864,6 +864,9 @@
+ }
+
+ static void oc_enc_frame_pack(oc_enc_ctx *_enc){
++ /*musl libc malloc()/realloc() calls might use floating point, so make sure
++ we've cleared the MMX state for them.*/
++ oc_restore_fpu(&_enc->state);
+ oggpackB_reset(&_enc->opb);
+ /*Only proceed if we have some coded blocks.
+ If there are no coded blocks, we can drop this frame simply by emitting a
+diff -ru libtheora-1.1.1.orig/lib/decode.c libtheora-1.1.1/lib/decode.c
+--- libtheora-1.1.1.orig/lib/decode.c 2009-09-26 20:55:21.000000000 +0000
++++ libtheora-1.1.1/lib/decode.c 2016-09-15 05:29:45.912196850 +0000
+@@ -1181,6 +1181,9 @@
+
+
+ static int oc_dec_postprocess_init(oc_dec_ctx *_dec){
++ /*musl libc malloc()/realloc() calls might use floating point, so make sure
++ we've cleared the MMX state for them.*/
++ oc_restore_fpu(&_dec->state);
+ /*pp_level 0: disabled; free any memory used and return*/
+ if(_dec->pp_level<=OC_PP_LEVEL_DISABLED){
+ if(_dec->dc_qis!=NULL){