From 63b934c36f32f2fd06b4cf9cab06b63b46e3549d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@vicerveza.homeunix.net> Date: Tue, 13 Mar 2012 21:23:25 +0000 Subject: [PATCH] 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 --- .../openoffice/disable-uimpress-test.patch | 20 +++++++++++ .../office/openoffice/libreoffice.nix | 34 ++++++++++++------- pkgs/top-level/all-packages.nix | 5 +-- 3 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 pkgs/applications/office/openoffice/disable-uimpress-test.patch 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 = { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ecf3b5482018..0899a5f0d803 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6973,11 +6973,12 @@ let librecad = callPackage ../applications/misc/librecad { }; libreoffice = callPackage ../applications/office/openoffice/libreoffice.nix { + # gnumake381 works much faster than 3.82, but does not allow multiprocess builds + stdenv = overrideInStdenv stdenv [ gnumake381 ]; + inherit (perlPackages) ArchiveZip CompressZlib; inherit (gnome) GConf ORBit2 gnome_vfs; inherit (gst_all) gstreamer gstPluginsBase; - postgresql = postgresql91; - force = getConfig [ "libreoffice" "force" ] false; }; lingot = callPackage ../applications/audio/lingot {