summary refs log tree commit diff
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
authorMartin Bravenboer <martin.bravenboer@logicblox.com>2006-07-17 20:41:15 +0000
committerMartin Bravenboer <martin.bravenboer@logicblox.com>2006-07-17 20:41:15 +0000
commitc79c39f61f6600bc1c91031bf19ad011ee623b44 (patch)
tree31848fd292cca4c16b65e6393604fb2b6ea9cd31 /pkgs/tools/graphics
parentbb3cfbe2a3105472d83ea086f968ea5fa05e49c7 (diff)
downloadnixlib-c79c39f61f6600bc1c91031bf19ad011ee623b44.tar
nixlib-c79c39f61f6600bc1c91031bf19ad011ee623b44.tar.gz
nixlib-c79c39f61f6600bc1c91031bf19ad011ee623b44.tar.bz2
nixlib-c79c39f61f6600bc1c91031bf19ad011ee623b44.tar.lz
nixlib-c79c39f61f6600bc1c91031bf19ad011ee623b44.tar.xz
nixlib-c79c39f61f6600bc1c91031bf19ad011ee623b44.tar.zst
nixlib-c79c39f61f6600bc1c91031bf19ad011ee623b44.zip
Problems with darwinports host. Added patches here.
svn path=/nixpkgs/trunk/; revision=5752
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/transfig/default.nix16
-rw-r--r--pkgs/tools/graphics/transfig/patch-fig2dev-dev-gensvg.c21
-rw-r--r--pkgs/tools/graphics/transfig/patch-fig2dev-fig2dev.h19
-rw-r--r--pkgs/tools/graphics/transfig/patch-transfig-Imakefile22
4 files changed, 65 insertions, 13 deletions
diff --git a/pkgs/tools/graphics/transfig/default.nix b/pkgs/tools/graphics/transfig/default.nix
index f8237651e410..1f34a8397aa3 100644
--- a/pkgs/tools/graphics/transfig/default.nix
+++ b/pkgs/tools/graphics/transfig/default.nix
@@ -20,21 +20,11 @@ stdenv.mkDerivation rec {
     ./patch-fig2dev-Imakefile;
 
   prefixPatch3 =
-    fetchurl {
-      url = "http://www.darwinports.org/darwinports/dports/print/transfig/files/patch-transfig-Imakefile";
-      md5 = "1cfe0df7d3448f6ff914a7a2d85e6f50";
-    };
+    ./patch-transfig-Imakefile
 
   varargsPatch =
-    fetchurl {
-      url = "http://www.darwinports.org/darwinports/dports/print/transfig/files/patch-fig2dev-fig2dev.h";
-      md5 = "da3cd4f9bee619818c890c5692f042c1";
-    };
+    ./patch-fig2dev-fig2dev.h;
 
   gensvgPatch =
-    fetchurl {
-      url = "http://www.darwinports.org/darwinports/dports/print/transfig/files/patch-fig2dev-dev-gensvg.c";
-      md5 = "66a97cbfc313be48183beeeb950e2c86";
-    };
-
+    ./patch-fig2dev-dev-gensvg.c;
 }
diff --git a/pkgs/tools/graphics/transfig/patch-fig2dev-dev-gensvg.c b/pkgs/tools/graphics/transfig/patch-fig2dev-dev-gensvg.c
new file mode 100644
index 000000000000..5bd05c97be8e
--- /dev/null
+++ b/pkgs/tools/graphics/transfig/patch-fig2dev-dev-gensvg.c
@@ -0,0 +1,21 @@
+--- fig2dev/dev/gensvg.c.orig	Wed Jul 23 16:39:14 2003
++++ fig2dev/dev/gensvg.c	Wed Jul 23 16:39:52 2003
+@@ -692,16 +692,14 @@
+     if (t->angle != 0) {
+ 	fprintf (tfp, "<g transform=\"translate(%d,%d) rotate(%d)\" >\n",
+ 		 (int) (t->base_x * mag), (int) (t->base_y * mag), degrees (t->angle));
+-	fprintf (tfp, "<text x=\"0\" y=\"0\" fill=\"#%6.6x\"  font-family=\"%s\" 
+-		 font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\" >\n",
++	fprintf (tfp, "<text x=\"0\" y=\"0\" fill=\"#%6.6x\"  font-family=\"%s\" font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\" >\n",
+ 		 rgbColorVal (t->color), family[(int) ceil ((t->font + 1) / 4)],
+ 		 (t->font % 2 == 0 ? "normal" : "italic"),
+ 		 (t->font % 4 < 2 ? "normal" : "bold"), (int) (ceil (t->size * 12 * mag)),
+ 		 anchor[t->type]);
+     }
+     else
+-	fprintf (tfp, "<text x=\"%d\" y=\"%d\" fill=\"#%6.6x\"  font-family=\"%s\" 
+-		 font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\" >\n",
++	fprintf (tfp, "<text x=\"%d\" y=\"%d\" fill=\"#%6.6x\"  font-family=\"%s\" font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\" >\n",
+ 		 (int) (t->base_x * mag), (int) (t->base_y * mag), rgbColorVal (t->color),
+ 		 family[(int) ceil ((t->font + 1) / 4)],
+ 		 (t->font % 2 == 0 ? "normal" : "italic"),
diff --git a/pkgs/tools/graphics/transfig/patch-fig2dev-fig2dev.h b/pkgs/tools/graphics/transfig/patch-fig2dev-fig2dev.h
new file mode 100644
index 000000000000..3f330c164e7e
--- /dev/null
+++ b/pkgs/tools/graphics/transfig/patch-fig2dev-fig2dev.h
@@ -0,0 +1,19 @@
+--- fig2dev/fig2dev.h.orig	Thu Dec 19 07:45:28 2002
++++ fig2dev/fig2dev.h	Tue Jan  7 20:08:45 2003
+@@ -22,7 +22,6 @@
+ #include <sys/file.h>
+ #include <signal.h>
+ #include <string.h>
+-#include <varargs.h>
+ #include <pwd.h>
+ #include <errno.h>
+ #include <time.h>
+@@ -210,7 +209,7 @@
+ #endif /* MAXPATHLEN */
+ #endif /* PATH_MAX */
+ 
+-#if ( !defined(__NetBSD__) && !defined(__DARWIN__))
++#if ( !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DARWIN__))
+ extern int		sys_nerr, errno;
+ #endif
+ 
diff --git a/pkgs/tools/graphics/transfig/patch-transfig-Imakefile b/pkgs/tools/graphics/transfig/patch-transfig-Imakefile
new file mode 100644
index 000000000000..4639658dccd8
--- /dev/null
+++ b/pkgs/tools/graphics/transfig/patch-transfig-Imakefile
@@ -0,0 +1,22 @@
+--- transfig/Imakefile.orig	Thu Mar 25 22:10:42 2004
++++ transfig/Imakefile	Thu Mar 25 22:14:04 2004
+@@ -14,11 +14,18 @@
+ XCOMM party to do so, with the only requirement being that this copyright 
+ XCOMM notice remain intact.
+ 
++BINDIR = __PREFIX/bin
++USRLIBDIR = __PREFIX/lib
++DESTDIR = __DESTROOT
++MKDIRHIER = mkdirhier
++MANDIR = __PREFIX/share/man/$(MANSUFFIX)
++INSTALLFLAGS = -c
++
+ XCOMM Uncomment the USELATEX2E flag in the transfig/Imakefile file to use the
+ XCOMM \\usepackage{} command for LaTeX2e. 
+ XCOMM The default is to use \\documentstyle{} for LaTeX209.
+ 
+-XCOMM USELATEX2E = -DLATEX2E
++USELATEX2E = -DLATEX2E
+ 
+ XCOMM ******* DON'T CHANGE ANYTHIN BELOW THIS POINT *******
+