nixpkgs/pkgs
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
..
applications vlc: Fix build for Qt >= 5.7.0 2017-04-19 05:09:47 +02:00
build-support docker: improve reproducibility of layers 2017-04-16 22:46:24 -04:00
common-updater maintainers: Add script to patch version/sha256 in .nix files 2017-02-19 16:51:17 +02:00
data Merge pull request #24993 from romildo/upd.elementary-icon-theme 2017-04-18 22:09:15 +02:00
desktops Merge pull request #24992 from romildo/upd.mate 2017-04-18 22:09:01 +02:00
development Merge pull request #23073 from volth/libguestfs-1.34 2017-04-19 02:01:54 +02:00
games Merge pull request #24521 from orivej/instead-launcher 2017-04-18 01:36:40 +02:00
misc Merge pull request #25002 from romildo/upd.flat-plat 2017-04-18 21:41:34 +02:00
os-specific linux: 4.4.61 -> 4.4.62 2017-04-18 08:22:23 -04:00
servers Merge pull request #24974 from Ericson2314/mapNullable 2017-04-17 17:12:14 -04:00
shells Merge pull request #24760 from matthewbauer/linux-only-pkgs 2017-04-09 14:18:10 +02:00
stdenv stdenv: ARM bootstrap: Update bootstrap tarballs to latest hydra-built ones 2017-04-15 01:52:33 +03:00
test
tools Merge pull request #24977 from dsprenkels/master 2017-04-18 22:29:06 +02:00
top-level vlc: Fix build for Qt >= 5.7.0 2017-04-19 05:09:47 +02:00