[arch-commits] Commit in mpv/trunk (2 files)

Christian Hesse eworm at archlinux.org
Wed Jul 17 14:51:41 UTC 2019


    Date: Wednesday, July 17, 2019 @ 14:51:41
  Author: eworm
Revision: 490222

upgpkg: mpv 1:0.29.1-7

fix libarchive

Added:
  mpv/trunk/0001-libarchive-add-fallback-for-systems-without-C-UTF-8.patch
Modified:
  mpv/trunk/PKGBUILD

----------------------------------------------------------------+
 0001-libarchive-add-fallback-for-systems-without-C-UTF-8.patch |   40 ++++++++++
 PKGBUILD                                                       |   10 +-
 2 files changed, 47 insertions(+), 3 deletions(-)

Added: 0001-libarchive-add-fallback-for-systems-without-C-UTF-8.patch
===================================================================
--- 0001-libarchive-add-fallback-for-systems-without-C-UTF-8.patch	                        (rev 0)
+++ 0001-libarchive-add-fallback-for-systems-without-C-UTF-8.patch	2019-07-17 14:51:41 UTC (rev 490222)
@@ -0,0 +1,40 @@
+From 037cbacb8c5081313ea65024d4305d29a47165e0 Mon Sep 17 00:00:00 2001
+From: dudemanguy <random342 at airmail.cc>
+Date: Fri, 3 May 2019 11:54:31 -0500
+Subject: [PATCH] libarchive: add fallback for systems without C.UTF-8
+
+---
+ osdep/io.h                 | 1 +
+ stream/stream_libarchive.c | 7 +++++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/osdep/io.h b/osdep/io.h
+index 7e8a267541..2f04337288 100644
+--- a/osdep/io.h
++++ b/osdep/io.h
+@@ -196,6 +196,7 @@ int msync(void *addr, size_t length, int flags);
+ // These are stubs since there is not anything that helps with this on Windows.
+ #define locale_t int
+ #define LC_ALL_MASK 0
++#define LC_CTYPE_MASK 0
+ locale_t newlocale(int, const char *, locale_t);
+ locale_t uselocale(locale_t);
+ void freelocale(locale_t);
+diff --git a/stream/stream_libarchive.c b/stream/stream_libarchive.c
+index e5acad016b..ae06efb890 100644
+--- a/stream/stream_libarchive.c
++++ b/stream/stream_libarchive.c
+@@ -244,8 +244,11 @@ struct mp_archive *mp_archive_new(struct mp_log *log, struct stream *src,
+     struct mp_archive *mpa = talloc_zero(NULL, struct mp_archive);
+     mpa->log = log;
+     mpa->locale = newlocale(LC_ALL_MASK, "C.UTF-8", (locale_t)0);
+-    if (!mpa->locale)
+-        goto err;
++    if (!mpa->locale) {
++        mpa->locale = newlocale(LC_CTYPE_MASK, "", (locale_t)0);
++        if (!mpa->locale)
++            goto err;
++    }
+     mpa->arch = archive_read_new();
+     mpa->primary_src = src;
+     if (!mpa->arch)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-07-17 14:30:31 UTC (rev 490221)
+++ PKGBUILD	2019-07-17 14:51:41 UTC (rev 490222)
@@ -5,7 +5,7 @@
 pkgname=mpv
 epoch=1
 pkgver=0.29.1
-pkgrel=6
+pkgrel=7
 _waf_version=2.0.9
 pkgdesc='a free, open source, and cross-platform media player'
 arch=('x86_64')
@@ -23,13 +23,17 @@
 optdepends=('youtube-dl: for video-sharing websites playback')
 options=('!emptydirs')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/$pkgname/archive/v$pkgver.tar.gz"
-        "https://waf.io/waf-${_waf_version}")
+        "https://waf.io/waf-${_waf_version}"
+        '0001-libarchive-add-fallback-for-systems-without-C-UTF-8.patch')
 sha256sums=('f9f9d461d1990f9728660b4ccb0e8cb5dce29ccaa6af567bec481b79291ca623'
-            '2a8e0816f023995e557f79ea8940d322bec18f286917c8f9a6fa2dc3875dfa48')
+            '2a8e0816f023995e557f79ea8940d322bec18f286917c8f9a6fa2dc3875dfa48'
+            '0f8a1ba2628a50a8637137dfff8f66fdf1e7beb6ff159309842dcb6f39363d5e')
 
 prepare() {
   cd ${pkgname}-${pkgver}
 
+  patch -Np1 < ../0001-libarchive-add-fallback-for-systems-without-C-UTF-8.patch
+
   install -m755 "${srcdir}"/waf-${_waf_version} waf
 }
 



More information about the arch-commits mailing list