From 2430f8e5620a6cd48b60e1b55ec54c54518c2dcf Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 8 Jun 2008 20:06:46 +0000 Subject: [PATCH] SF pidgin-latex version works somehow (very small formulae) svn path=/nixpkgs/trunk/; revision=12010 --- .../pidgin-latex/pidgin-latex-sf.nix | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/pidgin-latex-sf.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/pidgin-latex-sf.nix index 16277d4bcb9f..aebede6301f0 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/pidgin-latex-sf.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/pidgin-latex-sf.nix @@ -12,17 +12,27 @@ rec { ]; preBuild = FullDepEntry ('' - ensureDir $out/lib ensureDir $out/bin - ensureDir $out/share/pidgin/pidgin-latex ln -s $(which convert) $out/bin - ln -s $(which latex) $out/bin + ln -s $(which xelatex) $out/bin ln -s $(which dvips) $out/bin - ln -s ../../../lib/LaTeX.so $out/share/pidgin/pidgin-latex - '') ["minInit" "addInputs" "defEnsureDir"]; + + sed -e 's/-Wl,-soname//' -i Makefile + sed -e 's/\(PATH("\)latex/\1xelatex/' -i LaTeX.c + sed -e 's/|| execute(cmddvips, dvipsopts, 10) //' -i LaTeX.c + sed -e 's/ strcat([*]file_ps, "[.]ps");/ strcat(*file_ps, ".pdf");/' -i LaTeX.c + sed -e 's/\([*]convertopts\[5\]=[{]"\)\(\\"",\)/\1 -trim \2/' -i LaTeX.c + sed -e 's/\(#define HEADER ".*\)12pt\(.*\)"/\116pt\2\\\\usepackage{fontspec}\\\\usepackage{xunicode}"/' -i LaTeX.h + '') ["minInit" "addInputs" "defEnsureDir" "doUnpack"]; + + postInstall = FullDepEntry ('' + ensureDir $out/lib + ensureDir $out/share/pidgin-latex + ln -s ../../lib/pidgin/LaTeX.so $out/share/pidgin-latex + '') ["minInit" "defEnsureDir" "doMakeInstall"]; /* doConfigure should be specified separately */ - phaseNames = [ "preBuild" "doMakeInstall"]; + phaseNames = [ "preBuild" "doMakeInstall" "postInstall"]; name = "pidgin-latex-1.2.1"; meta = {