diff options
author | wiedi <wiedi@pkgsrc.org> | 2014-02-08 12:27:14 +0000 |
---|---|---|
committer | wiedi <wiedi@pkgsrc.org> | 2014-02-08 12:27:14 +0000 |
commit | 898b99a8d5526ac9e6a46e28db01f08db236952b (patch) | |
tree | b6c0b8e5a47ea19a6af2130c083cda9126306a38 /biology/plinkseq/patches | |
parent | 34ad60abd931ca6e99924990fe8314d9e42f6f07 (diff) | |
download | pkgsrc-898b99a8d5526ac9e6a46e28db01f08db236952b.tar.gz |
fix build on SunOS
Diffstat (limited to 'biology/plinkseq/patches')
-rw-r--r-- | biology/plinkseq/patches/patch-browser_main.c | 16 | ||||
-rw-r--r-- | biology/plinkseq/patches/patch-browser_mongoose.c | 15 | ||||
-rw-r--r-- | biology/plinkseq/patches/patch-lib_annot.cpp | 14 | ||||
-rw-r--r-- | biology/plinkseq/patches/patch-lib_annot.h | 14 | ||||
-rw-r--r-- | biology/plinkseq/patches/patch-lib_token.cpp | 72 |
5 files changed, 131 insertions, 0 deletions
diff --git a/biology/plinkseq/patches/patch-browser_main.c b/biology/plinkseq/patches/patch-browser_main.c new file mode 100644 index 00000000000..4b698bb5843 --- /dev/null +++ b/biology/plinkseq/patches/patch-browser_main.c @@ -0,0 +1,16 @@ +$NetBSD: patch-browser_main.c,v 1.1 2014/02/08 12:27:14 wiedi Exp $ + +not needed on sunos +--- browser/main.c.orig 2011-11-17 17:17:36.000000000 +0000 ++++ browser/main.c +@@ -21,8 +21,10 @@ + #if defined(_WIN32)
+ #define _CRT_SECURE_NO_WARNINGS // Disable deprecation warning in VS2005
+ #else
++#if !defined(__sun)
+ #define _XOPEN_SOURCE 600 // For PATH_MAX on linux
+ #endif
++#endif
+
+ #include <sys/stat.h>
+ #include <stdio.h>
diff --git a/biology/plinkseq/patches/patch-browser_mongoose.c b/biology/plinkseq/patches/patch-browser_mongoose.c new file mode 100644 index 00000000000..2a6d30d53e6 --- /dev/null +++ b/biology/plinkseq/patches/patch-browser_mongoose.c @@ -0,0 +1,15 @@ +$NetBSD: patch-browser_mongoose.c,v 1.1 2014/02/08 12:27:14 wiedi Exp $ + +not needed on sunos +--- browser/mongoose.c.orig 2011-11-17 17:17:36.000000000 +0000 ++++ browser/mongoose.c +@@ -21,7 +21,9 @@ + #if defined(_WIN32)
+ #define _CRT_SECURE_NO_WARNINGS // Disable deprecation warning in VS2005
+ #else
++#if !defined(__sun)
+ #define _XOPEN_SOURCE 600 // For flockfile() on Linux
++#endif
+ #define _LARGEFILE_SOURCE // Enable 64-bit file offsets
+ #define __STDC_FORMAT_MACROS // <inttypes.h> wants this for C++
+ #endif
diff --git a/biology/plinkseq/patches/patch-lib_annot.cpp b/biology/plinkseq/patches/patch-lib_annot.cpp new file mode 100644 index 00000000000..1b67dd4dde4 --- /dev/null +++ b/biology/plinkseq/patches/patch-lib_annot.cpp @@ -0,0 +1,14 @@ +$NetBSD: patch-lib_annot.cpp,v 1.1 2014/02/08 12:27:14 wiedi Exp $ + +rename to avoid collision on sunos +--- lib/annot.cpp.orig 2012-03-19 20:00:45.000000000 +0000 ++++ lib/annot.cpp +@@ -34,7 +34,7 @@ std::map<seq_annot_t,std::string> popula + m[SPLICE3] = "splice3"; + m[ESPLICE3] = "esplice3"; + m[ESPLICE5] = "esplice5"; +- m[FS] = "frameshift"; ++ m[FS_] = "frameshift"; + m[RT] = "readthrough"; + return m; + } diff --git a/biology/plinkseq/patches/patch-lib_annot.h b/biology/plinkseq/patches/patch-lib_annot.h new file mode 100644 index 00000000000..aa6570c0ced --- /dev/null +++ b/biology/plinkseq/patches/patch-lib_annot.h @@ -0,0 +1,14 @@ +$NetBSD: patch-lib_annot.h,v 1.1 2014/02/08 12:27:14 wiedi Exp $ + +rename to avoid collision on sunos +--- lib/annot.h.orig 2012-03-19 11:35:59.000000000 +0000 ++++ lib/annot.h +@@ -35,7 +35,7 @@ enum seq_annot_t { UNDEF = 0 , // + ESPLICE5 = 27 , // Essential 5' splice-site + ESPLICE3 = 28 , // Essential 3' splice-site + NON = 24 , // nonsense allele +- FS = 25 , // frameshift ++ FS_ = 25 , // frameshift + RT = 26 }; // readthrough + + struct SeqInfo { diff --git a/biology/plinkseq/patches/patch-lib_token.cpp b/biology/plinkseq/patches/patch-lib_token.cpp new file mode 100644 index 00000000000..61510f40f39 --- /dev/null +++ b/biology/plinkseq/patches/patch-lib_token.cpp @@ -0,0 +1,72 @@ +$NetBSD: patch-lib_token.cpp,v 1.1 2014/02/08 12:27:14 wiedi Exp $ + +fix math ambiguity on sunos +--- lib/token.cpp.orig 2012-03-17 17:06:01.000000000 +0000 ++++ lib/token.cpp +@@ -1232,7 +1232,7 @@ Token Token::operator^(const Token & rhs + const int sz = size(); + if ( sz == 0 ) return Token(); + std::vector<double> ans( sz ); +- if ( rhs.is_int() ) for (int i=0; i<sz; i++) ans[i] = pow( ivec[i] , rhs.ival ); ++ if ( rhs.is_int() ) for (int i=0; i<sz; i++) ans[i] = pow( ivec[i] , (double) rhs.ival ); + else if ( rhs.is_float() ) for (int i=0; i<sz; i++) ans[i] = pow( ivec[i] , rhs.fval ); + return Token( ans ); + } +@@ -1249,7 +1249,7 @@ Token Token::operator^(const Token & rhs + + if ( is_int() ) + { +- if ( rhs.is_int() ) return Token( pow( ival , rhs.ival ) ); ++ if ( rhs.is_int() ) return Token( pow( ival , (double) rhs.ival ) ); + if ( rhs.is_float() ) return Token( pow( ival , rhs.fval ) ); + } + if ( is_float() ) +@@ -2141,7 +2141,7 @@ Token TokenFunctions::fn_set( const Toke + + Token TokenFunctions::fn_sqrt( const Token & tok ) const + { +- if ( tok.is_int() ) return Token( sqrt( tok.as_int() ) ); ++ if ( tok.is_int() ) return Token( sqrt( (double) tok.as_int() ) ); + if ( tok.is_float() ) return Token( sqrt( tok.as_float() ) ); + if ( tok.is_int_vector() || tok.is_float_vector() ) + { +@@ -2154,7 +2154,7 @@ Token TokenFunctions::fn_sqrt( const Tok + + Token TokenFunctions::fn_log( const Token & tok ) const + { +- if ( tok.is_int() ) return Token( log( tok.as_int() ) ); ++ if ( tok.is_int() ) return Token( log( (double) tok.as_int() ) ); + if ( tok.is_float() ) return Token( log( tok.as_float() ) ); + if ( tok.is_int_vector() || tok.is_float_vector() ) + { +@@ -2168,7 +2168,7 @@ Token TokenFunctions::fn_log( const Toke + + Token TokenFunctions::fn_log10( const Token & tok ) const + { +- if ( tok.is_int() ) return Token( log10( tok.as_int() ) ); ++ if ( tok.is_int() ) return Token( log10( (double) tok.as_int() ) ); + if ( tok.is_float() ) return Token( log10( tok.as_float() ) ); + if ( tok.is_int_vector() || tok.is_float_vector() ) + { +@@ -2181,7 +2181,7 @@ Token TokenFunctions::fn_log10( const To + + Token TokenFunctions::fn_exp( const Token & tok ) const + { +- if ( tok.is_int() ) return Token( exp( tok.as_int() ) ); ++ if ( tok.is_int() ) return Token( exp( (double) tok.as_int() ) ); + if ( tok.is_float() ) return Token( exp( tok.as_float() ) ); + if ( tok.is_int_vector() || tok.is_float_vector() ) + { +@@ -2202,10 +2202,10 @@ Token TokenFunctions::fn_pow( const Toke + + if ( is_int_type && tok2.is_int() ) + { +- if ( tok.is_scalar() ) return Token( (int)(pow( tok.as_int() , tok2.as_int() )) ); ++ if ( tok.is_scalar() ) return Token( (int)(pow( tok.as_int() , (double) tok2.as_int() )) ); + std::vector<int> ans = tok.as_int_vector(); + const int ev = tok2.as_int(); +- for (int i=0; i<ans.size(); i++) ans[i] = (int)(pow( ans[i] , ev ) ); ++ for (int i=0; i<ans.size(); i++) ans[i] = (int)(pow( ans[i] , (double) ev ) ); + return Token( ans ); + } + |