From c56e966dc9b128f679a26118f128493c13b867bc Mon Sep 17 00:00:00 2001
From: Pietro Cerutti <gahr@FreeBSD.org>
Date: Thu, 17 Nov 2011 13:22:29 +0000
Subject: - unbreak

Feature safe:	yes
---
 biology/seaview/Makefile                       |  2 --
 biology/seaview/files/patch-use_mase_files.cxx | 29 ++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 biology/seaview/files/patch-use_mase_files.cxx

(limited to 'biology/seaview')

diff --git a/biology/seaview/Makefile b/biology/seaview/Makefile
index b5f68db04374..335f3e9aca8e 100644
--- a/biology/seaview/Makefile
+++ b/biology/seaview/Makefile
@@ -20,8 +20,6 @@ COMMENT=	Multiple DNA/protein sequence alignment editor
 LIB_DEPENDS=	fltk.1:${PORTSDIR}/x11-toolkits/fltk \
 		pdf.8:${PORTSDIR}/print/pdflib
 
-BROKEN=		does not compile
-
 NO_WRKSUBDIR=	yes
 EXTRACT_CMD=	${CAT}
 EXTRACT_BEFORE_ARGS=	#
diff --git a/biology/seaview/files/patch-use_mase_files.cxx b/biology/seaview/files/patch-use_mase_files.cxx
new file mode 100644
index 000000000000..6f437c439880
--- /dev/null
+++ b/biology/seaview/files/patch-use_mase_files.cxx
@@ -0,0 +1,29 @@
+--- use_mase_files.cxx.orig	2011-11-17 14:20:13.000000000 +0100
++++ use_mase_files.cxx	2011-11-17 14:20:01.000000000 +0100
+@@ -1457,8 +1457,6 @@
+ 
+ #else
+ 
+-extern "C" { int stat(char *, void *); }
+-
+ int check_path(char *fname)  
+ /* to check for presence of file fname 
+ searching for it through all path directories 
+@@ -1468,7 +1466,7 @@
+ #define Mxdir 200
+     char dir[Mxdir+1], *path, *deb, *fin;
+     int lf, ltot;
+-    static char stat_struct[250]; /* bigger than necessary */
++	 struct stat sb;
+     path=getenv("PATH"); 	/* get the list of path directories, 
+ 				    separated by :
+ 				*/
+@@ -1488,7 +1486,7 @@
+ 		    dir[ltot]='/';
+ 		    strcpy(dir+ltot+1,fname); 
+ 			/* now dir is appended with filename */
+-		    if( stat(dir, stat_struct)  == 0) return 0;
++		    if( stat(dir, &sb)  == 0) return 0;
+ 		    }
+ 	    deb=fin+1;
+ 	    }
-- 
cgit debian/1.2.3+git2.25.1-1-2-gaceb0