about summary refs log tree commit diff
path: root/pkgs/applications/office/openoffice/default.nix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-11-10 21:37:16 +0000
committerLudovic Courtès <ludo@gnu.org>2010-11-10 21:37:16 +0000
commit4b6e0f08467edc70537c4e33d72e0e1efed7a69d (patch)
treefec85449de1b8f865d72f0c2fbf011c75860902c /pkgs/applications/office/openoffice/default.nix
parent1410156f2a6562ed19c2792f1c8a12deefe7f831 (diff)
downloadnixlib-4b6e0f08467edc70537c4e33d72e0e1efed7a69d.tar
nixlib-4b6e0f08467edc70537c4e33d72e0e1efed7a69d.tar.gz
nixlib-4b6e0f08467edc70537c4e33d72e0e1efed7a69d.tar.bz2
nixlib-4b6e0f08467edc70537c4e33d72e0e1efed7a69d.tar.lz
nixlib-4b6e0f08467edc70537c4e33d72e0e1efed7a69d.tar.xz
nixlib-4b6e0f08467edc70537c4e33d72e0e1efed7a69d.tar.zst
nixlib-4b6e0f08467edc70537c4e33d72e0e1efed7a69d.zip
OpenOffice.org: Force compilation with GCC 4.5.
svn path=/nixpkgs/branches/stdenv-updates/; revision=24652
Diffstat (limited to 'pkgs/applications/office/openoffice/default.nix')
-rw-r--r--pkgs/applications/office/openoffice/default.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/applications/office/openoffice/default.nix b/pkgs/applications/office/openoffice/default.nix
index 67f01f3b9721..dae4ebdcc3a2 100644
--- a/pkgs/applications/office/openoffice/default.nix
+++ b/pkgs/applications/office/openoffice/default.nix
@@ -21,6 +21,22 @@ stdenv.mkDerivation rec {
 
   patches = [ ./oo.patch  ./root-required.patch ];
 
+  postPatch =
+    /* Compiling with GCC 4.5 fails:
+
+         Compiling: cppu/source/AffineBridge/AffineBridge.cxx
+         [...]
+         ../../inc/uno/lbnames.h:67:2: error: #error "Supported gcc majors are 2 , 3 and 4 <= 4.4.  Unsupported gcc major version."
+
+       However, we can't compile with GCC 4.4 because then we'd end up with
+       two different versions of libstdc++ (because the deps are compiled
+       with 4.5), which isn't supported (link time error.)
+
+       Thus, force compilation with 4.5 and hope for the best.  */
+    '' sed -i *"/cppu/inc/uno/lbnames.h" \
+           -es 's/#[[:blank:]]*error "Supported.*$//g'
+    '';
+
   src_system = fetchurl {
       url = "${downloadRoot}/${if versionDirs then version + "/" else ""}OOo_${version}_src_system.tar.bz2";
       sha256 = "0giy3sza64ij19w7b06rxcrkrb5kq2fvkz486vh3mv08s8xa8zfc";