chromium: Remove version 24 specific stuff.

This gets rid of the patch for newer pulseaudio library versions.

In addition, we now have protobuf and pciutils in default dependencies, as those
are required (or better: optional, but recommended and thus activated by the
default gyp options) by versions >= 25.

Also, we now no longer depend on libpng, but I'm not dropping this, as we want
to get back to libpng from nixpkgs again 'real soon'.

The stack-protector flag is now disabled by default accross all versions, and
probably didn't hurt back in version 24, but at least we're now no longer add it
dependant on a particular version.

And those pesky post/onlyXX version booleans are now pre/postXX, to ensure
better clarity.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2013-02-27 21:36:00 +01:00
parent b3c3579172
commit 3423ea9e7b
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961
2 changed files with 12 additions and 32 deletions

View File

@ -13,13 +13,11 @@
, gcc, bison, gperf
, glib, gtk, dbus_glib
, libXScrnSaver, libXcursor, mesa
# dependencies for v25
, libvpx
# dependencies for >= v25
, protobuf
# dependencies for v25 only
, libvpx
# dependencies for >= v26
, speechd, libXdamage
@ -59,7 +57,7 @@ let
use_system_libexpat = true;
use_system_libexif = true;
use_system_libjpeg = true;
use_system_libpng = !post24;
use_system_libpng = false; # PNG dlopen() version conflict
use_system_libusb = true;
use_system_libxml = true;
use_system_speex = true;
@ -76,7 +74,7 @@ let
use_system_skia = false;
use_system_sqlite = false; # http://crbug.com/22208
use_system_v8 = false;
} // optionalAttrs (post24 && !post25) {
} // optionalAttrs pre26 {
use_system_libvpx = true;
use_system_protobuf = true;
};
@ -89,14 +87,8 @@ let
libusb1 libexif
];
post23 = !versionOlder sourceInfo.version "24.0.0.0";
post24 = !versionOlder sourceInfo.version "25.0.0.0";
post25 = !versionOlder sourceInfo.version "26.0.0.0";
only24 = post23 && !post24;
only25 = post24 && !post25;
maybeFixPulseAudioBuild = optional (only24 && pulseSupport)
./pulse_audio_fix.patch;
pre26 = versionOlder sourceInfo.version "26.0.0.0";
post25 = !pre26;
in stdenv.mkDerivation rec {
name = "${packageName}-${version}";
@ -119,13 +111,13 @@ in stdenv.mkDerivation rec {
krb5
glib gtk dbus_glib
libXScrnSaver libXcursor mesa
pciutils protobuf
] ++ optional gnomeKeyringSupport libgnome_keyring
++ optionals gnomeSupport [ gconf libgcrypt ]
++ optional enableSELinux libselinux
++ optional cupsSupport libgcrypt
++ optional pulseSupport pulseaudio
++ optionals post24 [ pciutils protobuf ]
++ optional only25 libvpx
++ optional pre26 libvpx
++ optionals post25 [ speechd libXdamage ];
opensslPatches = optional useOpenSSL openssl.patches;
@ -134,15 +126,14 @@ in stdenv.mkDerivation rec {
patches = optional cupsSupport ./cups_allow_deprecated.patch
++ optional pulseSupport ./pulseaudio_array_bounds.patch
++ maybeFixPulseAudioBuild
++ optional post25 ./clone_detached.patch
# XXX: Remove after stdenv-updates merge!
++ singleton "/dev/null";
postPatch = optionalString useOpenSSL ''
postPatch = ''
sed -i -r -e 's/-f(stack-protector)(-all)?/-fno-\1/' build/common.gypi
'' + optionalString useOpenSSL ''
cat $opensslPatches | patch -p1 -d third_party/openssl/openssl
'' + optionalString post24 ''
sed -i -r -e "s/-f(stack-protector)(-all)?/-fno-\1/" build/common.gypi
'' + optionalString post25 ''
sed -i -e 's|/usr/bin/gcc|gcc|' \
third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp

View File

@ -1,11 +0,0 @@
--- chromium-build/media/audio/pulse/pulse_output.cc.orig 2012-10-26 09:44:38.509209905 -0700
+++ chromium-build/media/audio/pulse/pulse_output.cc 2012-10-26 09:45:32.178819603 -0700
@@ -86,7 +86,7 @@
// All channel maps have the same size array of channel positions.
for (unsigned int channel = 0; channel != CHANNELS_MAX; ++channel) {
- int channel_position = kChannelOrderings[channel_layout][channel];
+ int channel_position = ChannelOrder(channel_layout, static_cast<Channels>(channel));
if (channel_position > -1) {
channel_map.map[channel_position] = ChromiumToPAChannelPosition(
static_cast<Channels>(channel));