Skip to content

Commit

Permalink
* Update patch of ncbi_tools to enable compilation on macOS Sequoia -…
Browse files Browse the repository at this point in the history
… careful not to let text editor clean up whitespace!

* Removing platform from portfile, suppresses warning
  • Loading branch information
weitzner committed Sep 19, 2024
1 parent 048f899 commit d9f502f
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 3 deletions.
1 change: 0 additions & 1 deletion science/ncbi_tools/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ PortSystem 1.0

name ncbi_tools
categories science
platforms darwin
license public-domain
maintainers nomaintainer

Expand Down
78 changes: 76 additions & 2 deletions science/ncbi_tools/files/patch-fix-build.diff
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
+++ ncbi/corelib/ncbimisc.c 2021-05-21 18:20:54.000000000 -0700
@@ -1266,7 +1266,7 @@
if (len < 1) return NULL;

rsult = (Nlm_CharPtr) MemNew (len + 3);
- if (rsult == NULL) return;
+ if (rsult == NULL) return NULL;
tmp = rsult;

for (i = 0; /* local [i] != NULL */ i < numitems; i++) {
--- ncbi/make/makedis.csh 23 Mar 2009 17:10:14 -0000
+++ ncbi/make/makedis.csh 9 Nov 2009 18:44:01 -0000
Expand All @@ -62,3 +62,77 @@
breaksw
case NetBSD:
set platform=netbsd
--- ncbi/corelib/ncbimain.c.orig 2002-07-09 09:20:17
+++ ncbi/corelib/ncbimain.c 2024-09-18 14:28:01
@@ -75,7 +75,7 @@
* setups argc and argv
*
*****************************************************************************/
-#ifdef OS_MSWIN
+#if defined OS_MSWIN || defined OS_UNIX_DARWIN
int
#endif
main(int argc, char *argv[])
--- ncbi/tools/kappa.c.orig 2012-04-30 06:45:01
+++ ncbi/tools/kappa.c 2024-09-18 14:58:32
@@ -2197,7 +2197,7 @@
/**
* Callbacks used by Blast_RedoOneMatch and
* Blast_RedoOneMatchSmithWaterman */
-static const Blast_RedoAlignCallbacks
+static const Blast_RedoAlignCallbacks *
redo_align_callbacks = {
Kappa_CalcLambda,
Kappa_SequenceGetRange,
--- ncbi/tools/ncbisort.c.orig 2006-05-10 14:47:17
+++ ncbi/tools/ncbisort.c 2024-09-18 14:40:01
@@ -689,7 +689,7 @@
of the fraction. Strings not of this form are considered to be zero. */
static Int4 SORTFracCompare(register UcharPtr a, register UcharPtr b)
{
- register tmpa = UCHAR(*a), tmpb = UCHAR(*b);
+ register int tmpa = UCHAR(*a), tmpb = UCHAR(*b);

if (tmpa == '.' && tmpb == '.') {
do
--- ncbi/tools/pattern1.c.orig 2006-08-04 15:11:17
+++ ncbi/tools/pattern1.c 2024-09-18 14:42:18
@@ -741,7 +741,7 @@

/*Do a word-by-word bit-wise or of a and b and put the result in
result; return 1 if there are any non-zero words*/
-static and(Int4 *result, Int4 *a, Int4 *b, patternSearchItems *patternSearch)
+static Int4 and(Int4 *result, Int4 *a, Int4 *b, patternSearchItems *patternSearch)
{
Int4 i; /*index over words*/
Int4 returnValue = 0;
--- ncbi/api/asn2ff4.c.orig 2001-10-02 10:13:15
+++ ncbi/api/asn2ff4.c 2024-09-18 14:36:13
@@ -1344,7 +1344,7 @@
* Compare two ImpFeats by name and location
* returns 1 for matching features otherwise returns 0
******************************************************************************/
-static CmpImpFeat (ImpFeatPtr f1, ImpFeatPtr f2)
+static int CmpImpFeat (ImpFeatPtr f1, ImpFeatPtr f2)
{
if (f1 == NULL && f2)
return 0;
--- ncbi/api/asn2ff2.c.orig 2024-09-18 22:02:18
+++ ncbi/api/asn2ff2.c 2024-09-18 22:36:29
@@ -220,6 +220,7 @@
#include <utilpub.h>
#include <ffprint.h>
#include <seqmgr.h>
+#include <stdbool.h>


NLM_EXTERN Int2 GetGenDate PROTO ((Asn2ffJobPtr ajp, GBEntryPtr gbp, CharPtr buffer));
@@ -1355,7 +1356,7 @@
return newstring;
}

-static ChoicePID(SeqIdPtr sid)
+static bool ChoicePID(SeqIdPtr sid)
{

DbtagPtr db;

0 comments on commit d9f502f

Please sign in to comment.