1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 17:41:12 +00:00
nixpkgs/pkgs/applications
aszlig b017935103
vlc: Fix build for Qt >= 5.7.0
This basically does something similar than the AUR build:

https://aur.archlinux.org/packages/vlc-qt5/

On our side, all there is to do is to force compiling using C++11 mode
and use a patch that the AUR package took from the following upstream
patchwork URL:

https://patches.videolan.org/patch/14061/

Instead of passing CXXFLAGS to the configure script, I'm using sed here
to make sure we don't override flags figured out by configure.

For example if ./configure is used with CXXFLAGS=-std=c++11 appended or
prepended, we have something like:

... -I../include   -std=c++11 -Wall -Wextra -Wsign-compare ...

While if we don't do that at all, we have something like:

... -I../include   -g -O2 -Wall -Wextra -Wsign-compare ...

Another way would be to use NIX_CFLAGS_COMPILE, but that would affect
even compilation of C code and thus resulting in a bunch of warnings
like this:

cc1: warning: command line option '-std=c++11' is valid for C++/ObjC++
              but not for C

So with our approach the flags during build look much better:

... -I../include   -std=c++11 -g -O2 -Wall -Wextra -Wsign-compare ...

Another thing I've changed is that the vlc_qt5 attribute in
all-packages.nix now uses the latest Qt 5 version, because the build for
Qt >= 5.7.0 is now no longer broken.

I've also ordered the preConfigure attribute before the configureFlags
attribute, because it makes more sense in terms of context (pre ->
configure -> post).

Tested by building on x86_64-linux with libsForQt56.vlc, libsForQt58.vlc
and vlc (the Qt 4 version, just to be sure I didn't accidentally break
it).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @ttuegel
2017-04-19 05:09:47 +02:00
..
altcoins Merge pull request #24818 from dbrock/ethabi 2017-04-13 08:52:17 -04:00
audio mesa: reduce usage of the attribute and explain why 2017-04-16 13:03:15 +02:00
backup
display-managers lightdm: 1.18.1 -> 1.22.0 (#24545) 2017-04-02 10:04:32 +01:00
editors Merge pull request #24888 from Ralith/electron 2017-04-18 21:47:33 +01:00
gis
graphics inkscape: add potrace 2017-04-17 22:10:05 +01:00
inferno
kde kdeApplications.kolourpaint: init at 16.12.3 2017-04-18 14:18:19 +02:00
misc dbvisualizer: 9.5 -> 9.5.7 2017-04-16 17:34:22 -04:00
networking pidgin-carbons: init at 0.1.3 2017-04-18 09:26:05 -07:00
office fava: 1.2 -> 1.3 2017-04-13 16:29:26 +02:00
science simgrid: fixup sandboxed build after update #24915 2017-04-16 14:15:32 +02:00
search recoll: 1.21.3 -> 1.23.1 2017-03-22 17:14:30 -05:00
taxes
version-management git-lfs: 1.3.1 -> 2.0.2 2017-04-18 21:39:12 +02:00
video vlc: Fix build for Qt >= 5.7.0 2017-04-19 05:09:47 +02:00
virtualization Merge pull request #24632 from NeQuissimus/docker_17_04 2017-04-05 20:51:14 -04:00
window-managers ratpoison: 1.4.8 -> 1.4.9 2017-04-17 21:39:33 +02:00