about summary refs log tree commit diff
path: root/pkgs/applications/office
diff options
context:
space:
mode:
authorYury G. Kudryashov <urkud.urkud@gmail.com>2012-01-26 15:27:03 +0000
committerYury G. Kudryashov <urkud.urkud@gmail.com>2012-01-26 15:27:03 +0000
commit5b132f6e96a9794018ae1c085da482b381d1e039 (patch)
treeff54ae514799540c093adcfeca0d501b75cde506 /pkgs/applications/office
parentf878980c8b78a639b3feabd1f8f9ed9f1b7c388c (diff)
parentd9de74edd67f7dc31f5297bc785712afb322dbdd (diff)
svn merge ^/nixpkgs/trunk
Conflicts: cups, all-packages.nix (gcc45_debug)

svn path=/nixpkgs/branches/stdenv-updates/; revision=31863
Diffstat (limited to 'pkgs/applications/office')
-rw-r--r--pkgs/applications/office/ledger/2.6.3.nix (renamed from pkgs/applications/office/ledger/default.nix)0
-rw-r--r--pkgs/applications/office/ledger/3.0.nix9
-rw-r--r--pkgs/applications/office/openoffice/generate-libreoffice-srcs.sh26
-rw-r--r--pkgs/applications/office/openoffice/libreoffice-srcs.nix78
-rw-r--r--pkgs/applications/office/openoffice/libreoffice.nix137
5 files changed, 246 insertions, 4 deletions
diff --git a/pkgs/applications/office/ledger/default.nix b/pkgs/applications/office/ledger/2.6.3.nix
index c1cd4b42a02aa..c1cd4b42a02aa 100644
--- a/pkgs/applications/office/ledger/default.nix
+++ b/pkgs/applications/office/ledger/2.6.3.nix
diff --git a/pkgs/applications/office/ledger/3.0.nix b/pkgs/applications/office/ledger/3.0.nix
index 0df148ce39077..325ab3b0a0f91 100644
--- a/pkgs/applications/office/ledger/3.0.nix
+++ b/pkgs/applications/office/ledger/3.0.nix
@@ -2,15 +2,15 @@
 , pcre, expat, boost, mpfr, git, texinfo }:
 
 let
-  rev = "cf35984971341b8a8688";
+  rev = "d2915c66";
 in
 stdenv.mkDerivation {
-  name = "ledger3-${rev}";
+  name = "ledger3-2012.01.${rev}";
 
   src = fetchgit {
     url = "git://github.com/jwiegley/ledger.git";
     inherit rev;
-    sha256 = "4078983db9fc8d232fa71a31b47e505c531971b4515d6ef723e7d333a2352d2a";
+    sha256 = "a489c8b1c48889040d2cebaac1a0019e90acac0b51c9abf7914944dcb4b801e7";
   };
 
   buildInputs = [
@@ -24,7 +24,8 @@ stdenv.mkDerivation {
 
   buildPhase = ''
     sed -i acprep \
-      -e 's|search_prefixes = .*|search_prefixes = ["${boost}"]|'
+      -e 's|search_prefixes = .*|search_prefixes = ["${boost}"]|' \
+      -e 's|/usr/bin/python|${python}/bin/python|'
     export MAKEFLAGS="-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES"
     python acprep update --no-pch --prefix=$out
   '';
diff --git a/pkgs/applications/office/openoffice/generate-libreoffice-srcs.sh b/pkgs/applications/office/openoffice/generate-libreoffice-srcs.sh
new file mode 100644
index 0000000000000..97bf2b32c9ce6
--- /dev/null
+++ b/pkgs/applications/office/openoffice/generate-libreoffice-srcs.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+VERSIONBASE=3.4.5
+
+VERSION=3.4.5.2
+
+if [ $# -gt 2 ]; then
+  VERSIONBASE=$1
+  VERSION=$2
+fi
+
+echo '{fetchurl} : ['
+
+for a in artwork base bootstrap calc components extensions extras filters \
+  help impress libs-core libs-extern libs-extern-sys libs-gui postprocess \
+  translations ure writer sdk testing; do
+
+  URL=http://download.documentfoundation.org/libreoffice/src/$VERSIONBASE/libreoffice-$a-$VERSION.tar.bz2
+
+  echo '(fetchurl {'
+  echo "  url = \"$URL\";"
+  echo "  sha256 = \"`nix-prefetch-url $URL`\";"
+  echo '})'
+done
+
+echo ']'
diff --git a/pkgs/applications/office/openoffice/libreoffice-srcs.nix b/pkgs/applications/office/openoffice/libreoffice-srcs.nix
new file mode 100644
index 0000000000000..ed795c9a79fe1
--- /dev/null
+++ b/pkgs/applications/office/openoffice/libreoffice-srcs.nix
@@ -0,0 +1,78 @@
+{fetchurl} : [
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-artwork-3.4.5.2.tar.bz2";
+  sha256 = "01vi1njw0agpvxi0141k2arzhgq1kjbda7sj1l0l304qj9n78b1q";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-base-3.4.5.2.tar.bz2";
+  sha256 = "0f5rsyrn33iz0sny3wxsghv7c7yrbhas42yarb5rq958i3kpm6wz";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-calc-3.4.5.2.tar.bz2";
+  sha256 = "1l00y0qj1s9m31jmqg7q7bczxa5xsng388nqc9zc3vd6zjf4xy9i";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-components-3.4.5.2.tar.bz2";
+  sha256 = "1sq6yl06x006wxj1i89lv75sskb1bkxws82rcj1gvih6r8czih52";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-extensions-3.4.5.2.tar.bz2";
+  sha256 = "18xhk9h9vl9qhwlgv8ks3xi6hls2vgnkygnz1yhpf4p2g2y6nv7z";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-extras-3.4.5.2.tar.bz2";
+  sha256 = "0zxm30na6hzpjfasi1g890magf63kmg39y6y56wz9hv2z9p5q8jv";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-filters-3.4.5.2.tar.bz2";
+  sha256 = "002qxqav39530csraq16ga4fnvw8v9wqbvp88b6lzi2m5yqpbl46";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-help-3.4.5.2.tar.bz2";
+  sha256 = "1agsqzz73dmsy2jsw63qq1ljx4h0ppz7zwqllc7617yiak0rqsqq";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-impress-3.4.5.2.tar.bz2";
+  sha256 = "0ivabx4wl7dkfalr0z4gqm5976phc6mkidnv1i580ixrf0zdz483";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-libs-core-3.4.5.2.tar.bz2";
+  sha256 = "0blwd58hf51iixikrjrlqdm6n40wv5k2c9c8krfzxfcvk20mvv4b";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-libs-extern-3.4.5.2.tar.bz2";
+  sha256 = "01cm3fjfj08a7b8i6iszml2ly1wa2hnkqqq1irvjb0wb1fjjxq3s";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-libs-extern-sys-3.4.5.2.tar.bz2";
+  sha256 = "1528n6mnlhpdhi9zfvqziwr6knsak212ghjww0jlfh31ky3whlh0";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-libs-gui-3.4.5.2.tar.bz2";
+  sha256 = "0win8si2yjkbfrwx46dw6as82iw7x4wd53cirncsrwvzksdqphcr";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-postprocess-3.4.5.2.tar.bz2";
+  sha256 = "1rspqy1drfvj3rdfx8d7wbwn17vw08n26qmb98xwkgf5najdpfnp";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-translations-3.4.5.2.tar.bz2";
+  sha256 = "0ngynrskq6h58gybswcpklj49cyvh0igksngbr0gz6n1yq3471iz";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-ure-3.4.5.2.tar.bz2";
+  sha256 = "0wg06gbaq3ynqzaxaaqgxkjssxnggw6xqgfm63rmn9c1cd4q0mzy";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-writer-3.4.5.2.tar.bz2";
+  sha256 = "0k7xf94abavdzpns1z13phl3vjz0xkfv2h5sn7rgpr3dy184klxh";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-sdk-3.4.5.2.tar.bz2";
+  sha256 = "1f9iv875aw9sic4gl45ik1vx24gpq9iarjl673wz6l0wxr6hgrgw";
+})
+(fetchurl {
+  url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-testing-3.4.5.2.tar.bz2";
+  sha256 = "05sk3li5jgmjv722ncsr2i7arhmsvkkvmh4qw7xl70p8dpxhla8q";
+})
+]
diff --git a/pkgs/applications/office/openoffice/libreoffice.nix b/pkgs/applications/office/openoffice/libreoffice.nix
new file mode 100644
index 0000000000000..5fde0cfa28503
--- /dev/null
+++ b/pkgs/applications/office/openoffice/libreoffice.nix
@@ -0,0 +1,137 @@
+{ stdenv, fetchurl, pam, python, tcsh, libxslt, perl, ArchiveZip
+, CompressZlib, zlib, libjpeg, expat, pkgconfig, freetype, libwpd
+, libxml2, db4, sablotron, curl, libXaw, fontconfig, libsndfile, neon
+, bison, flex, zip, unzip, gtk, libmspack, getopt, file, cairo, which
+, icu, boost, jdk, ant, libXext, libX11, libXtst, libXi, cups
+, libXinerama, openssl, gperf, cppunit, GConf, ORBit2
+, autoconf, openldap, postgresql, bash
+, langs ? [ "en-US" "ca" "ru" "eo" "fr" "nl" "de" "en-GB" ]
+}:
+
+throw "The expression for libreoffice is still not ready"
+
+stdenv.mkDerivation rec {
+  name = "libreoffice-3.4.5.2";
+
+  srcs_download = import ./libreoffice-srcs.nix { inherit fetchurl; };
+
+  src = fetchurl {
+    url = "http://download.documentfoundation.org/libreoffice/src/3.4.5/libreoffice-bootstrap-3.4.5.2.tar.bz2";
+    sha256 = "05xz6ykddrm6mrgl9jssr2xpg2ir0x6c1c3n1cph0mvd0hiz58x9";
+  };
+
+  preConfigure = ''
+    sed -i 's,/usr/bin/env bash,${bash}/bin/bash,' Makefile.in bin/unpack-sources
+
+    # Needed to find genccode
+    PATH=$PATH:${icu}/sbin
+  '';
+
+  buildPhase = ''
+    for a in $srcs_download; do
+      FILE=$(basename $a)
+      # take out the hash
+      cp -v $a src/$(echo $FILE | sed 's/[^-]*-//')
+    done
+
+    # Remove an exit 1, ignoring the lack of wget or curl
+    sed '/wget nor curl/{n;d}' -i download
+    ./download
+
+    # Fix svtools: hardcoded jpeg path
+    sed -i -e 's,^JPEG3RDLIB=.*,JPEG3RDLIB=${libjpeg}/lib/libjpeg.so,' solenv/inc/libs.mk
+    # Fix sysui: wants to create a tar for root
+    sed -i -e 's,--own.*root,,' sysui/desktop/slackware/makefile.mk
+    # Fix libtextcat: wants to set rpath to /usr/local/lib
+    sed -i -e 's,^CONFIGURE_FLAGS.*,& --prefix='$TMPDIR, libtextcat/makefile.mk
+    # Fix hunspell: the checks fail due to /bin/bash missing, and I find this fix easier
+    sed -i -e 's,make && make check,make,' hunspell/makefile.mk
+    # Fix redland: wants to set rpath to /usr/local/lib
+    sed -i -e 's,^CONFIGURE_FLAGS.*,& --prefix='$TMPDIR, redland/redland/makefile.mk \
+      redland/raptor/makefile.mk redland/rasqal/makefile.mk
+
+    # This to aovid using /lib:/usr/lib at linking
+    sed -i '/gb_LinkTarget_LDFLAGS/{ n; /rpath-link/d;}' solenv/gbuild/platform/unxgcc.mk
+
+    find -name "*.cmd" -exec sed -i s,/lib:/usr/lib,, {} \;
+
+    make
+  '';
+
+  configureFlags = [
+    # Helpful, while testing the expression
+    # "--with-num-cpus=4"
+
+    "--enable-verbose"
+
+    # Without these, configure does not finish
+    "--disable-gnome-vfs"
+    "--disable-gstreamer"
+    "--disable-opengl"
+    "--without-junit"
+    "--without-system-mythes"
+
+    # Without this, it wants to download
+    "--with-cairo"
+    "--with-system-libs"
+    "--with-system-python"
+    "--with-system-boost"
+    "--with-system-db"
+
+    # I imagine this helps. Copied from go-oo.
+    "--disable-epm"
+    "--disable-fontooo"
+    "--disable-gnome-vfs"
+    "--disable-gnome-vfs"
+    "--disable-mathmldtd"
+    "--disable-mozilla"
+    "--disable-odk"
+    "--disable-pasf"
+    "--disable-dbus"
+    "--disable-kde"
+    "--disable-kde4"
+    "--disable-mono"
+    "--with-package-format=native"
+    "--with-jdk-home=${jdk}"
+    "--with-ant-home=${ant}"
+    "--without-afms"
+    "--without-dict"
+    "--without-fonts"
+    "--without-myspell-dicts"
+    "--without-nas"
+    "--without-ppds"
+    "--without-system-agg"
+    "--without-system-beanshell"
+    "--without-system-hsqldb"
+    "--without-system-xalan"
+    "--without-system-xerces"
+    "--without-system-xml-apis"
+    "--without-system-xt"
+    "--without-system-jars"
+    "--without-system-hunspell"
+    "--without-system-altlinuxhyph"
+    "--without-system-lpsolve"
+    "--without-system-graphite"
+    "--without-system-mozilla"
+    "--without-system-libwps"
+    "--without-system-libwpg"
+    "--without-system-redland"
+  ];
+
+  buildInputs = [
+    pam python tcsh libxslt perl ArchiveZip CompressZlib zlib 
+    libjpeg expat pkgconfig freetype libwpd libxml2 db4 sablotron curl 
+    libXaw fontconfig libsndfile neon bison flex zip unzip gtk libmspack 
+    getopt file jdk cairo which icu boost libXext libX11 libXtst libXi
+    cups libXinerama openssl gperf GConf ORBit2
+    ant autoconf openldap postgresql cppunit
+  ];
+
+  meta = {
+    description = "Libre-office, variant of openoffice.org";
+    homepage = http://libreoffice.org/;
+    license = "LGPL";
+    maintainers = [ stdenv.lib.maintainers.viric ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}