From 3423ea9e7beabd2c00b4266cef2e0d187e00642c Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 27 Feb 2013 21:36:00 +0100 Subject: [PATCH] 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 --- .../networking/browsers/chromium/default.nix | 33 +++++++------------ .../browsers/chromium/pulse_audio_fix.patch | 11 ------- 2 files changed, 12 insertions(+), 32 deletions(-) delete mode 100644 pkgs/applications/networking/browsers/chromium/pulse_audio_fix.patch diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 2b20e26b3f98..5d191b2550d5 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -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 diff --git a/pkgs/applications/networking/browsers/chromium/pulse_audio_fix.patch b/pkgs/applications/networking/browsers/chromium/pulse_audio_fix.patch deleted file mode 100644 index 01ff89a9a63b..000000000000 --- a/pkgs/applications/networking/browsers/chromium/pulse_audio_fix.patch +++ /dev/null @@ -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(channel)); - if (channel_position > -1) { - channel_map.map[channel_position] = ChromiumToPAChannelPosition( - static_cast(channel));