Bug 217051

Summary: [PATCH] multimedia/vlc: Build in C++11 mode by default
Product: Ports & Packages Reporter: Raphael Kubo da Costa <rakuco>
Component: Individual Port(s)Assignee: Thomas Zander <riggs>
Status: Closed FIXED    
Severity: Affects Only Me CC: multimedia, riggs
Priority: --- Keywords: patch
Version: LatestFlags: riggs: maintainer-feedback+
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 216797    
Attachments:
Description Flags
Proposed patch rakuco: maintainer-approval? (multimedia)

Description Raphael Kubo da Costa freebsd_committer freebsd_triage 2017-02-12 21:47:57 UTC
Created attachment 179920 [details]
Proposed patch

This is in preparation for the Qt 5.6.2 -> 5.7.1 update (bug 216797): Qt 5.7 requires C++11 support.

VLC 2.2.4 has issues building in C++11 mode, so incorporate a few upstream commits to make things work, and adjust the atomics-related patches landed in ports r416225, as including <atomic> only with libc++ >= 3.8.0 leaves out FreeBSD 10.3. include/vlc_atomic.h is now closer to its git (post-2.2.4) version, in that we now have 3 possible conditions:
1. The header is included in C11 mode, in which case <stdatomic.h> is included.
2. The header is included by C code but we're not building in C11 mode, in which case some shims are defined.
3. The header is included by C++ code, so we can assume C++11 and just include <atomic>.

It will likely be possible to drop the changes once a new VLC version is released, as upstream has since started requiring C+11 and passes the appropriate flags to the compiler.
Comment 1 Raphael Kubo da Costa freebsd_committer freebsd_triage 2017-02-16 15:10:22 UTC
Ping.
Comment 2 Thomas Zander freebsd_committer freebsd_triage 2017-02-17 06:19:32 UTC
Will take a look asap.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-02-18 08:21:01 UTC
A commit references this bug:

Author: riggs
Date: Sat Feb 18 08:20:46 UTC 2017
New revision: 434332
URL: https://svnweb.freebsd.org/changeset/ports/434332

Log:
  Use c++11 by default, in preparation for Qt 5.7.1 update

  PR:		217051
  Submitted by:	rakuco

Changes:
  head/multimedia/vlc/Makefile
  head/multimedia/vlc/files/patch-git_92ec47e
  head/multimedia/vlc/files/patch-git_d2571e6
  head/multimedia/vlc/files/patch-include_vlc__atomic.h
  head/multimedia/vlc/files/patch-modules_gui_qt4_dialogs_messages.hpp
Comment 4 Thomas Zander freebsd_committer freebsd_triage 2017-02-18 08:28:49 UTC
Committed with a minor change to the patch:

compiler:c11 -> compiler:c++11-lib
Comment 5 Raphael Kubo da Costa freebsd_committer freebsd_triage 2017-02-18 10:11:31 UTC
Thanks a lot!
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-02-18 15:12:17 UTC
A commit references this bug:

Author: rakuco
Date: Sat Feb 18 15:11:37 UTC 2017
New revision: 434358
URL: https://svnweb.freebsd.org/changeset/ports/434358

Log:
  Add upstream patch to fix the build with the SKINS option after r434332.

  PR:		217051

Changes:
  head/multimedia/vlc/files/patch-git_a1e5e64