summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2011-09-26 04:48:35 +0000
committerMichael Raskin <7c6f434c@mail.ru>2011-09-26 04:48:35 +0000
commit0b9c88cba1a2d8b01df57fd6fdb314a36d7c8294 (patch)
treefc98d8186906b5ee951c7d363c73d68d6cb35ed4 /pkgs
parent1d9c2ff41365c388fe04b2b206bd1057b3ce60ec (diff)
downloadnixpkgs-0b9c88cba1a2d8b01df57fd6fdb314a36d7c8294.tar
nixpkgs-0b9c88cba1a2d8b01df57fd6fdb314a36d7c8294.tar.gz
nixpkgs-0b9c88cba1a2d8b01df57fd6fdb314a36d7c8294.tar.bz2
nixpkgs-0b9c88cba1a2d8b01df57fd6fdb314a36d7c8294.tar.lz
nixpkgs-0b9c88cba1a2d8b01df57fd6fdb314a36d7c8294.tar.xz
nixpkgs-0b9c88cba1a2d8b01df57fd6fdb314a36d7c8294.tar.zst
nixpkgs-0b9c88cba1a2d8b01df57fd6fdb314a36d7c8294.zip
Taking a patch from ArchLinux to fix altermime build
svn path=/nixpkgs/trunk/; revision=29489
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/networking/altermime/altermime.patch48
-rw-r--r--pkgs/tools/networking/altermime/default.nix4
2 files changed, 51 insertions, 1 deletions
diff --git a/pkgs/tools/networking/altermime/altermime.patch b/pkgs/tools/networking/altermime/altermime.patch
new file mode 100644
index 00000000000..00ed513cf32
--- /dev/null
+++ b/pkgs/tools/networking/altermime/altermime.patch
@@ -0,0 +1,48 @@
+AUR patch for fixing build
+
+diff -Naur altermime-0.3.10/qpe.c altermime-0.3.10-new/qpe.c
+--- altermime-0.3.10/qpe.c	2008-11-16 09:45:45.000000000 +0100
++++ altermime-0.3.10-new/qpe.c	2010-11-24 14:28:43.153334114 +0100
+@@ -97,7 +97,7 @@
+ 				op+= strlen(paragraph);// +3; /** jump the output + =\r\n **/
+ 				out_remaining-= (strlen(paragraph)); // Was +3, updated to fix Outlook problems
+ 
+-				QPD fprintf(stdout, "Soft break (%d + %d > 76 char) for '%s'\n", current_line_length, charout_size, paragraph);
++				QPD fprintf(stdout, "Soft break (%zd + %d > 76 char) for '%s'\n", current_line_length, charout_size, paragraph);
+ 				
+ 				/** reinitialize the paragraph **/
+ 				paragraph[0] = '\0';
+@@ -108,7 +108,7 @@
+ 			}
+ 
+ 			snprintf(pp, pp_remaining, "%s", charout);
+-			QPD fprintf(stdout,"charout='%s', size=%d, pp_remain=%d result='%s'\n", charout, charout_size, pp_remaining, paragraph);
++			QPD fprintf(stdout,"charout='%s', size=%d, pp_remain=%zd result='%s'\n", charout, charout_size, pp_remaining, paragraph);
+ 			pp += charout_size;
+ 			pp_remaining -= charout_size;
+ 			p++;
+@@ -149,13 +149,13 @@
+ 	out_size = in_size *3;
+ 	in_buffer = malloc( sizeof(char) *in_size +1);
+ 	if (in_buffer == NULL) {
+-		QPD fprintf(stdout,"Error allocating %d bytes for input buffer\n", in_size);
++		QPD fprintf(stdout,"Error allocating %zd bytes for input buffer\n", in_size);
+ 		return -1;
+ 	}
+ 
+ 	out_buffer = malloc( sizeof(char) *out_size *3 +1);
+ 	if (in_buffer == NULL) {
+-		QPD fprintf(stdout,"Error allocating %d bytes for output buffer\n", out_size);
++		QPD fprintf(stdout,"Error allocating %zd bytes for output buffer\n", out_size);
+ 		return -1;
+ 	}
+ 
+@@ -169,7 +169,7 @@
+ 	  ** we segfault ;)  **/
+ 	*(in_buffer +in_size) = '\0';
+ 
+-	QPD fprintf(stdout,"file %s is loaded, size = %d\n", fname, in_size);
++	QPD fprintf(stdout,"file %s is loaded, size = %zd\n", fname, in_size);
+ 
+ 	qp_encode( out_buffer, out_size, in_buffer, in_size );
+ 
diff --git a/pkgs/tools/networking/altermime/default.nix b/pkgs/tools/networking/altermime/default.nix
index 3b0de2805be..a98f307c77d 100644
--- a/pkgs/tools/networking/altermime/default.nix
+++ b/pkgs/tools/networking/altermime/default.nix
@@ -26,7 +26,9 @@ rec {
   inherit (sourceInfo) name version;
   inherit buildInputs;
 
-  phaseNames = ["fixTarget" "doMakeInstall"];
+  patches = [./altermime.patch];
+
+  phaseNames = ["doPatch" "fixTarget" "doMakeInstall"];
   fixTarget = a.fullDepEntry (''
     sed -i Makefile -e "s@/usr/local@$out@"
     ensureDir "$out/bin"