diff --git a/pkgs/applications/misc/acrobat-reader/builder.sh b/pkgs/applications/misc/acrobat-reader/builder.sh index e9966fcbfdba..a4b26cdeb09d 100644 --- a/pkgs/applications/misc/acrobat-reader/builder.sh +++ b/pkgs/applications/misc/acrobat-reader/builder.sh @@ -6,17 +6,23 @@ tar xvfz $src mkdir $out echo "unpacking reader..." -tar xvf installers/COMMON.TAR -C $out -tar xvf installers/LINUXRDR.TAR -C $out +tar xvf AdobeReader/COMMON.TAR -C $out +tar xvf AdobeReader/ILINXR.TAR -C $out + +# Disable this plugin for now (it needs LDAP, and I'm too lazy to add it). +rm $out/Reader/intellinux/plug_ins/PPKLite.api glibc=$(cat $NIX_GCC/nix-support/orig-glibc) patchelf --interpreter $glibc/lib/ld-linux.so.* $out/Reader/intellinux/bin/acroread -sed "s^REPLACE_ME^$out/Reader^" $out/bin/acroread.sh > $out/bin/acroread.sh.tmp -echo "#! $SHELL" > $out/bin/acroread.sh -echo "LD_LIBRARY_PATH=$libXt/lib:$libXp/lib:$libXext/lib:$libX11/lib" >> $out/bin/acroread.sh -cat $out/bin/acroread.sh.tmp >> $out/bin/acroread.sh -rm $out/bin/acroread.sh.tmp -chmod 755 $out/bin/acroread.sh -mv $out/bin/acroread.sh $out/bin/acroread +fullPath= +for i in $libPath; do + fullPath=$fullPath${fullPath:+:}$i/lib +done + +echo "#! $SHELL" > $out/bin/acroread.tmp +echo "LD_LIBRARY_PATH=$fullPath\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH" >> $out/bin/acroread.tmp +cat $out/bin/acroread >> $out/bin/acroread.tmp +chmod 755 $out/bin/acroread.tmp +mv $out/bin/acroread.tmp $out/bin/acroread diff --git a/pkgs/applications/misc/acrobat-reader/default.nix b/pkgs/applications/misc/acrobat-reader/default.nix index 665ba69bdce5..be96e47bf408 100644 --- a/pkgs/applications/misc/acrobat-reader/default.nix +++ b/pkgs/applications/misc/acrobat-reader/default.nix @@ -1,11 +1,12 @@ -{stdenv, fetchurl, libXt, libXp, libXext, libX11}: +{stdenv, fetchurl, libXt, libXp, libXext, libX11, glib, pango, atk, gtk, libstdcpp5, zlib}: stdenv.mkDerivation { - name = "acrobat-reader-5.0.10"; + name = "acrobat-reader-7.0"; builder = ./builder.sh; src = fetchurl { - url = http://ardownload.adobe.com/pub/adobe/acrobatreader/unix/5.x/linux-5010.tar.gz; - md5 = "9721b85d54aab1d9ece37758cc6d64f2"; + url = ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/AdbeRdr70_linux_enu.tar.gz; + md5 = "f847ce21e5d871837f2dc1d2f1baf9a9"; }; - inherit libXt libXp libXext libX11; + + libPath = [libXt libXp libXext libX11 glib pango atk gtk libstdcpp5 zlib]; } diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 8fb66915115c..af444eb87a45 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -1182,8 +1182,10 @@ rec { }; acroread = (import ../applications/misc/acrobat-reader) { - inherit fetchurl stdenv; + inherit fetchurl stdenv zlib; inherit (xlibs) libXt libXp libXext libX11; + inherit (gtkLibs) glib pango atk gtk; + libstdcpp5 = gcc33.gcc; }; eclipse = (import ../applications/editors/eclipse) {