NetBSD Problem Report #49921

From iamleot@gmail.com  Fri May 22 12:03:21 2015
Return-Path: <iamleot@gmail.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C46CDA6552
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 22 May 2015 12:03:21 +0000 (UTC)
Message-Id: <555f1b05.6a6ab40a.3771.7024@mx.google.com>
Date: Fri, 22 May 2015 14:03:08 +0200
From: Leonardo Taccari <iamleot@gmail.com>
Reply-To: Leonardo Taccari <iamleot@gmail.com>
To: gnats-bugs@NetBSD.org
Subject: Update multimedia/mpv to 0.9.2
X-Send-Pr-Version: 3.95

>Number:         49921
>Category:       pkg
>Synopsis:       Update multimedia/mpv to 0.9.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bsiegert
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri May 22 12:05:00 +0000 2015
>Closed-Date:    Sun May 24 14:19:00 +0000 2015
>Last-Modified:  Sun May 24 14:19:00 +0000 2015
>Originator:     Leonardo Taccari
>Release:        NetBSD 7.99.15
>Organization:
Università Politecnica delle Marche
>Environment:


System: NetBSD boh 7.99.15 NetBSD 7.99.15 (GENERIC) #21: Mon May 4 05:10:05 CEST 2015 leot@boh:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	multimedia/mpv in pkgsrc (0.9.0) is not the latest stable release
	(0.9.2).
>How-To-Repeat:
	$ cd pkgsrc/multimedia/mpv
	$ make show-var VARNAME=PKGNAME_NOREV
>Fix:
	Please apply the attached patches. While here I will also attach a
	possible commit message. Regarding patches/patch-audio_chmap.c it will
	be needed just for this release version and the problem was fixed
	upstream.


--------------------8<-----------------8<-----------------8<--------------------
Update multimedia/mpv to mpv-0.9.2.

Changes:
Release 0.9.2
-------------
Changes
 * The Lua check now also checks for lua52.pc, as used by Arch Linux
   testing.
 * (X11) vo_opengl's icc-profile-auto now queries the current ICC
   profile relative to the center of the window.
 * ao_coreaudio, ao_alsa now support adding dummy padding channels for
   better compatibility with hardware decoders that only support
   specific channel counts (e.g. 5.1 now should work on a decoder that
   only accepts 7.1).
 * Channel fallback (in case the audio device doesn't natively support
   a given channel layout) has been improved.
 * vf_vapoursynth now rejects unaligned video instead of outputting
   corrupted video.
 * mpv now tries to autoload .sup subtitles as well.

Bug fixes
 * vo_opengl's default for fbo-format is now rgba16, to avoid rounding
   errors when using non-default cscale (issue #1918).
 * Improved framedrop behavior when playing video that has higher
   framerate than the display (issue #1897).
 * Trying to play a directory will no longer spam Connection lost! to
   the console log.
 * (Linux) Several vo_rpi bugfixes.
 * (Linux) Several vo_drm bugfixes. Pan&Scan is now supported.
 * (X11) Fix fullscreen behavior on certain window managers (issues
   #1937, #1920).
 * (OSX) The OSD no longer always shows up on startup.
 * (OSX) Several ao_coreaudio and ao_coreaudio_exclusive bugfixes.
 * (OSX) Fixed potential crash on exit when using Cocoa.
 * (ClientAPI) vo_opengl_cb now actually applies options changed at
   runtime.
 * (OSX, ClientAPI) Cocoa now works when both the cplayer (mpv) and
   libmpv are built at the same time; however, libmpv now always
   creates an application singleton. Cocoa has to be disabled
   completely to prevent libmpv from creating the singleton.

Release 0.9.1
-------------
Changes
 * mpv's IRC channel moved from #mpv-player to #mpv on
   chat.freenode.net.
 * Documentation updates.
 * The default value for the --ytdl-format option is now best, in
   order to work around youtube-dl's 2015.04.26 release enabling DASH
   by default, as FFmpeg / Libav do not yet properly support DASH.
 * When seeking, the current timestamp will show the predicted seek
   timestamp instead, until the final timestamp is resolved. Improves
   UI responsiveness on slow streams and/or large seeks.

Bug fixes
 * Corrected the release marker on DOCS/client-api-changes. The
   release manager forgot to fix it before release...
 * Fix vo_vdpau rendering garbage lines on H.264 video with non-mod16
   size (issue #1863).
 * Fix a crash on exit if the "sub_reload" command had run
   successfully.
 * Fixed seeking with the mouse when osc-seekbarstyle=bar is set
   (issue #1876).
 * (IPC) Fixed encoding of UTF-8 data in JSON (issue #1874).
--------------------8<-----------------8<-----------------8<--------------------


--------------------8<-----------------8<-----------------8<--------------------
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/mpv/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile	30 Apr 2015 15:10:17 -0000	1.19
+++ Makefile	22 May 2015 11:55:42 -0000
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.19 2015/04/30 15:10:17 wiz Exp $

-DISTNAME=	mpv-0.9.0
+DISTNAME=	mpv-0.9.2
 CATEGORIES=	multimedia
 MASTER_SITES=	${MASTER_SITE_GITHUB:=mpv-player/}
 GITHUB_TAG=	v${PKGVERSION_NOREV}
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/mpv/distinfo,v
retrieving revision 1.13
diff -u -r1.13 distinfo
--- distinfo	30 Apr 2015 15:10:17 -0000	1.13
+++ distinfo	22 May 2015 11:55:42 -0000
@@ -1,5 +1,6 @@
 $NetBSD: distinfo,v 1.13 2015/04/30 15:10:17 wiz Exp $

-SHA1 (mpv-0.9.0.tar.gz) = 8960058bfd61941967fdea168de412c15d57d257
-RMD160 (mpv-0.9.0.tar.gz) = 40f0e10412c30250eab76f60e85eb19cd5404903
-Size (mpv-0.9.0.tar.gz) = 2697623 bytes
+SHA1 (mpv-0.9.2.tar.gz) = e5b59d62dee13f8f5cf3974f9c46b7afeb02b740
+RMD160 (mpv-0.9.2.tar.gz) = bcb626d91875a240a9cfa440c917fc96bed25b7d
+Size (mpv-0.9.2.tar.gz) = 2701306 bytes
+SHA1 (patch-audio_chmap.c) = a6990486f4d274cceced3c3786a233b22983667e
Index: patches/patch-audio_chmap.c
===================================================================
RCS file: patches/patch-audio_chmap.c
diff -N patches/patch-audio_chmap.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-audio_chmap.c	22 May 2015 11:55:42 -0000
@@ -0,0 +1,37 @@
+$NetBSD$
+
+Avoid conflicts with NetBSD popcount(3) (issue #1968).
+
+--- audio/chmap.c.orig	2015-05-19 02:19:25.000000000 +0000
++++ audio/chmap.c
+@@ -18,6 +18,8 @@
+ #include <stdlib.h>
+ #include <assert.h>
+ 
++#include <libavutil/common.h>
++
+ #include "common/common.h"
+ #include "common/msg.h"
+ #include "chmap.h"
+@@ -395,20 +397,12 @@ void mp_chmap_get_reorder(int src[MP_NUM
+         assert(src[n] < 0 || (to->speaker[n] == from->speaker[src[n]]));
+ }
+ 
+-static int popcount64(uint64_t bits)
+-{
+-    int r = 0;
+-    for (int n = 0; n < 64; n++)
+-        r += !!(bits & (1ULL << n));
+-    return r;
+-}
+-
+ // Return the number of channels only in a.
+ int mp_chmap_diffn(const struct mp_chmap *a, const struct mp_chmap *b)
+ {
+     uint64_t a_mask = mp_chmap_to_lavc_unchecked(a);
+     uint64_t b_mask = mp_chmap_to_lavc_unchecked(b);
+-    return popcount64((a_mask ^ b_mask) & a_mask);
++    return av_popcount64((a_mask ^ b_mask) & a_mask);
+ }
+ 
+ // Returns something like "fl-fr-fc". If there's a standard layout in lavc

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->bsiegert
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sat, 23 May 2015 13:57:08 +0000
Responsible-Changed-Why:


State-Changed-From-To: open->feedback
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sat, 23 May 2015 13:57:08 +0000
State-Changed-Why:
When trying to build this on Mac OS 10.10, I get the following error:
[ 12/232] Compiling DOCS/man/mpv.rst
Traceback (most recent call last):
  File "/usr/pkg/bin/rst2man-2.7.py", line 21, in <module>
    from docutils.core import publish_cmdline, default_description
  File "/usr/pkg/lib/python2.7/site-packages/docutils/core.py", line 20, in <module>
    from docutils import frontend, io, utils, readers, writers
  File "/usr/pkg/lib/python2.7/site-packages/docutils/frontend.py", line 41, in <module>
    import docutils.utils
  File "/usr/pkg/lib/python2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>
    import docutils.io
  File "/usr/pkg/lib/python2.7/site-packages/docutils/io.py", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "/usr/pkg/lib/python2.7/site-packages/docutils/utils/error_reporting.py", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/usr/pkg/lib/python2.7/locale.py", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/pkg/lib/python2.7/locale.py", line 475, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

Waf: Leaving directory `/usr/pkgsrc/multimedia/mpv/work/mpv-0.9.2/build'
Build failed
 -> task in 'rst2man' failed (exit status 1): 
	{task 4504363088: rst2man mpv.rst -> mpv.1}
' /usr/pkg/bin/rst2man-2.7.py ../DOCS/man/mpv.rst DOCS/man/mpv.1 '

Any ideas? (full log: http://pastebin.com/UjxVDkLZ)


From: Leonardo Taccari <iamleot@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: bsiegert@NetBSD.org, adam@NetBSD.org
Subject: Re: pkg/49921 (Update multimedia/mpv to 0.9.2)
Date: Sat, 23 May 2015 18:37:00 +0200

 Hello Benny and Adam,
 Adam I have added you in cc: because it seems that you worked on this
 package in order to improve Darwin support and probably you have a
 better solution than me.

 bsiegert@NetBSD.org writes:
 > [...]
 > When trying to build this on Mac OS 10.10, I get the following error:
 > [ 12/232] Compiling DOCS/man/mpv.rst
 > Traceback (most recent call last):
 >   File "/usr/pkg/bin/rst2man-2.7.py", line 21, in <module>
 >     from docutils.core import publish_cmdline, default_description
 >   File "/usr/pkg/lib/python2.7/site-packages/docutils/core.py", line 20,=
  in <module>
 >     from docutils import frontend, io, utils, readers, writers
 >   File "/usr/pkg/lib/python2.7/site-packages/docutils/frontend.py", line=
  41, in <module>
 >     import docutils.utils
 >   File "/usr/pkg/lib/python2.7/site-packages/docutils/utils/__init__.py"=
 , line 20, in <module>
 >     import docutils.io
 >   File "/usr/pkg/lib/python2.7/site-packages/docutils/io.py", line 18, i=
 n <module>
 >     from docutils.utils.error_reporting import locale_encoding, ErrorStr=
 ing, ErrorOutput
 >   File "/usr/pkg/lib/python2.7/site-packages/docutils/utils/error_report=
 ing.py", line 47, in <module>
 >     locale_encoding =3D locale.getlocale()[1] or locale.getdefaultlocale=
 ()[1]
 >   File "/usr/pkg/lib/python2.7/locale.py", line 543, in getdefaultlocale
 >     return _parse_localename(localename)
 >   File "/usr/pkg/lib/python2.7/locale.py", line 475, in _parse_localenam=
 e
 >     raise ValueError, 'unknown locale: %s' % localename
 > ValueError: unknown locale: UTF-8
 > =

 > Waf: Leaving directory `/usr/pkgsrc/multimedia/mpv/work/mpv-0.9.2/build'
 > Build failed
 >  -> task in 'rst2man' failed (exit status 1): =

 > 	{task 4504363088: rst2man mpv.rst -> mpv.1}
 > ' /usr/pkg/bin/rst2man-2.7.py ../DOCS/man/mpv.rst DOCS/man/mpv.1 '
 > =

 > Any ideas? (full log: http://pastebin.com/UjxVDkLZ)
 I can reproduce that in this way (in order to isolate the problem...
 it seems rst2man specific) on NetBSD-current and pkgsrc-current:

  $ env LC_ALL=3D'UTF-8' rst2man-2.7.py

 After asking on #mpv on Freenode regarding that it seems a known issue
 and they pointed me to a kludge present in the homebrew formula in order
 to fix this issue (mpv-player/homebrew-mpv issue #30[0])... Maybe we can
 do something similar in pkgsrc:

  .if ${OPSYS} =3D=3D "Darwin"
  WAF_ENV+=3D	LC_ALL=3D"en_US.UTF-8"
  .endif

 ...but yes: this is a dirty hack and I would prefer to avoid it. Does
 anyone know a better solution or get similar errors with other packages
 that needs rst2man?


 Thank you for your attention!
 Ciao,
 L.


 [0]: https://github.com/mpv-player/homebrew-mpv/pull/30

From: "Benny Siegert" <bsiegert@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49921 CVS commit: pkgsrc/devel/waf
Date: Sun, 24 May 2015 14:06:42 +0000

 Module Name:	pkgsrc
 Committed By:	bsiegert
 Date:		Sun May 24 14:06:42 UTC 2015

 Modified Files:
 	pkgsrc/devel/waf: waf.mk

 Log Message:
 Manually set locale to en_us.UTF-8 on Mac OS to fix rst2man invocations
 in the build of multimedia/mpv. Patch originally from Homebrew, via
 Leonardo Taccari in PR pkg/49921.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/waf/waf.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sun, 24 May 2015 14:19:00 +0000
State-Changed-Why:
adam@ committed the update without referencing this bug.
I added the gross hack.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.