about summary refs log tree commit diff
path: root/pkgs/applications/office
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-03-13 21:23:25 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-03-13 21:23:25 +0000
commit63b934c36f32f2fd06b4cf9cab06b63b46e3549d (patch)
treed7deb00148866d1bc7289d1cab490af08e4128e6 /pkgs/applications/office
parent199cc0ce514953861dee775c2352536bdcbf157b (diff)
downloadnixlib-63b934c36f32f2fd06b4cf9cab06b63b46e3549d.tar
nixlib-63b934c36f32f2fd06b4cf9cab06b63b46e3549d.tar.gz
nixlib-63b934c36f32f2fd06b4cf9cab06b63b46e3549d.tar.bz2
nixlib-63b934c36f32f2fd06b4cf9cab06b63b46e3549d.tar.lz
nixlib-63b934c36f32f2fd06b4cf9cab06b63b46e3549d.tar.xz
nixlib-63b934c36f32f2fd06b4cf9cab06b63b46e3549d.tar.zst
nixlib-63b934c36f32f2fd06b4cf9cab06b63b46e3549d.zip
Next attempt at building libreoffice. I reached it to build it in the build environment,
but I don't know if make install will succeed.

I also added the translations, that could work with luck.

I removed the force field.


svn path=/nixpkgs/trunk/; revision=33048
Diffstat (limited to 'pkgs/applications/office')
-rw-r--r--pkgs/applications/office/openoffice/disable-uimpress-test.patch20
-rw-r--r--pkgs/applications/office/openoffice/libreoffice.nix34
2 files changed, 42 insertions, 12 deletions
diff --git a/pkgs/applications/office/openoffice/disable-uimpress-test.patch b/pkgs/applications/office/openoffice/disable-uimpress-test.patch
new file mode 100644
index 000000000000..5c2831dbcd5b
--- /dev/null
+++ b/pkgs/applications/office/openoffice/disable-uimpress-test.patch
@@ -0,0 +1,20 @@
+We've to disable this test, because it wants a working fontconfig.
+Otherwise it fails telling fontconfig can't read its config file.
+
+diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk
+index 4fd3a95..10fa388 100644
+--- a/sd/Module_sd.mk
++++ b/sd/Module_sd.mk
+@@ -41,9 +41,9 @@ $(eval $(call gb_Module_add_targets,sd,\
+ ))
+ 
+ ifneq ($(OS),DRAGONFLY)
+-$(eval $(call gb_Module_add_check_targets,sd,\
+-    CppunitTest_sd_uimpress \
+-))
++#$(eval $(call gb_Module_add_check_targets,sd,\
++#    CppunitTest_sd_uimpress \
++#))
+ # disabled for now, seems to have incomplete deps and hangs on a build from scratch
+ #    CppunitTest_sd_filters_test \
+ 
diff --git a/pkgs/applications/office/openoffice/libreoffice.nix b/pkgs/applications/office/openoffice/libreoffice.nix
index 37093c959a74..ee42a5cd676b 100644
--- a/pkgs/applications/office/openoffice/libreoffice.nix
+++ b/pkgs/applications/office/openoffice/libreoffice.nix
@@ -5,21 +5,23 @@
 , icu, boost, jdk, ant, libXext, libX11, libXtst, libXi, cups
 , libXinerama, openssl, gperf, cppunit, GConf, ORBit2, poppler
 , librsvg, gnome_vfs, gstreamer, gstPluginsBase, mesa
-, autoconf, automake, openldap, postgresql, bash
+, autoconf, automake, openldap, bash
 , langs ? [ "en-US" "ca" "ru" "eo" "fr" "nl" "de" "en-GB" ]
-, force ? false
 }:
 
-# **  Checking with hydra if it builds totally **
-#if !force then
-#  throw ''The expression for libreoffice is still not ready.
-#  Set config.libreoffice.force = true; if you want to try it anyway.''
-#else
+let
+  langsSpaces = stdenv.lib.concatStringsSep " " langs;
+in
 stdenv.mkDerivation rec {
   name = "libreoffice-3.5.0.3";
 
   srcs_download = import ./libreoffice-srcs.nix { inherit fetchurl; };
 
+  src_translation = fetchurl {
+    url = "http://download.documentfoundation.org/libreoffice/src/3.5.0/libreoffice-translations-3.5.0.3.tar.xz";
+    sha256 = "0kk1jb4axjvkmg22yhxx4p9522zix6rr5cs0c5rxzlkm63qw6h8w";
+  };
+
   src = fetchurl {
     url = "http://download.documentfoundation.org/libreoffice/src/3.5.0/libreoffice-core-3.5.0.3.tar.xz";
     sha256 = "04hvlj6wzbj3zjpfjq975mgdmf902ywyf94nxcv067asg83qfcvr";
@@ -27,14 +29,24 @@ stdenv.mkDerivation rec {
 
   configureScript = "./autogen.sh";
 
+  patches = [ ./disable-uimpress-test.patch ];
+
   preConfigure = ''
+    tar xf $src_translation
+    # I think libreoffice expects by default the translations in ./translations
+    mv libreoffice-translations-3.5.0.3/translations .
+
+    sed -i 's,/bin/bash,${bash}/bin/bash,' sysui/desktop/share/makefile.mk
     sed -i 's,/usr/bin/env bash,${bash}/bin/bash,' bin/unpack-sources \
       solenv/bin/install-gdb-printers solenv/bin/striplanguagetags.sh
 
-    sed -i 's,/usr/bin/env perl,${perl}/bin/perl,' solenv/bin/concat-deps.pl
+    sed -i 's,/usr/bin/env perl,${perl}/bin/perl,' solenv/bin/concat-deps.pl solenv/bin/ooinstall
+    sed -i 's,ANT_OPTS+="\(.*\)",ANT_OPTS+=\1,' apache-commons/java/*/makefile.mk
 
     # Needed to find genccode
     PATH=$PATH:${icu}/sbin
+
+    export configureFlagsArray=("--with-lang=${langsSpaces}")
   '';
 
   buildPhase = ''
@@ -64,9 +76,6 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags = [
-    # Helpful, while testing the expression
-    "--with-num-cpus=4"
-
     "--enable-verbose"
 
     # Without these, configure does not finish
@@ -91,6 +100,7 @@ stdenv.mkDerivation rec {
     "--disable-kde"
     "--disable-kde4"
     "--disable-mono"
+    "--disable-postgresql-sdbc"
     "--with-package-format=native"
     "--with-jdk-home=${jdk}"
     "--with-ant-home=${ant}"
@@ -130,7 +140,7 @@ stdenv.mkDerivation rec {
     libXaw fontconfig libsndfile neon bison flex zip unzip gtk libmspack 
     getopt file jdk cairo which icu boost libXext libX11 libXtst libXi mesa
     cups libXinerama openssl gperf GConf ORBit2 gnome_vfs gstreamer gstPluginsBase
-    ant autoconf openldap postgresql cppunit poppler librsvg automake
+    ant autoconf openldap cppunit poppler librsvg automake
   ];
 
   meta = {