Update of /cvsroot/fink/dists/10.4-transitional/unstable/main/finkinfo/sci
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9519

Modified Files:
        emboss.info 
Added Files:
        emboss.patch 
Log Message:
upstream patch

--- NEW FILE: emboss.patch ---
diff -Naur EMBOSS-3.0.0/ajax/ajindex.c EMBOSS-3.0.0-patched/ajax/ajindex.c
--- EMBOSS-3.0.0/ajax/ajindex.c 2005-06-20 03:41:01.000000000 -0400
+++ EMBOSS-3.0.0-patched/ajax/ajindex.c 2005-08-04 22:50:00.000000000 -0400
@@ -35,10 +35,14 @@
                                    AjBool isread);
 static AjPBtpage  btreeFindINode(AjPBtcache cache, AjPBtpage page,
                                 const char *item);
+static AjPBtpage  btreeSecFindINode(AjPBtcache cache, AjPBtpage page,
+                                   const char *item);
 
 
 static AjPBtpage  btreePageFromKey(AjPBtcache cache, unsigned char *buf,
                                   const char *item);
+static AjPBtpage  btreeSecPageFromKey(AjPBtcache cache, unsigned char *buf,
+                                     const char *item);
 static ajint      btreeNumInBucket(AjPBtcache cache, ajlong pageno);
 static AjPBucket  btreeReadBucket(AjPBtcache cache, ajlong pageno);
 static void       btreeWriteBucket(AjPBtcache cache, const AjPBucket bucket,
@@ -55,6 +59,7 @@
                                 AjPStr const *keys, const ajlong *ptrs,
                                 ajint nkeys);
 static AjBool     btreeNodeIsFull(const AjPBtcache cache, AjPBtpage page);
+static AjBool     btreeNodeIsFullSec(const AjPBtcache cache, AjPBtpage page);
 static void       btreeInsertNonFull(AjPBtcache cache, AjPBtpage page,
                                     const AjPStr key, ajlong less,
                                     ajlong greater);
@@ -808,7 +813,7 @@
     root = btreeCacheLocate(cache,0L);
 
     if(!root)
-       ajFatal("Something has unlocked the PRI root cache page\n");
+       ajFatal("The PRI root cache page has been unlocked\n");
     
     if(!cache->level)
        return root;
@@ -863,6 +868,48 @@
 
 
 
+/* @funcstatic btreeSecFindINode 
*************************************************
+**
+** Recursive search for insert node in a secondary tree
+**
+** @param [u] cache [AjPBtcache] cache
+** @param [u] page [AjPBtpage] page
+** @param [r] item [const char*] key to search for 
+**
+** @return [AjPBtpage] leaf node where item should be inserted
+** @@
+******************************************************************************/
+
+static AjPBtpage btreeSecFindINode(AjPBtcache cache, AjPBtpage page,
+                                const char *item)
+{
+    AjPBtpage ret = NULL;
+    AjPBtpage pg  = NULL;
+
+    unsigned char *buf = NULL;
+    ajint status       = 0;
+    ajint ival         = 0;
+
+    /* ajDebug("In btreeSecFindINode\n"); */
+    
+    ret = page;
+    buf = page->buf;
+    GBT_NODETYPE(buf,&ival);
+    if(ival != BT_LEAF)
+    {
+       status = ret->dirty;
+       ret->dirty = BT_LOCK;   /* Lock in case of lots of overflow pages */
+       pg = btreeSecPageFromKey(cache,buf,item);
+       ret->dirty = status;
+       ret = btreeSecFindINode(cache,pg,item);
+    }
+    
+    return ret;
+}
+
+
+
+
 /* @funcstatic btreePageFromKey *******************************************
 **
 ** Return next lower index page given a key
@@ -928,6 +975,71 @@
 
 
 
+/* @funcstatic btreeSecPageFromKey *******************************************
+**
+** Return next lower index page given a key in a secondary tree
+**
+** @param [u] cache [AjPBtcache] cache
+** @param [u] buf [unsigned char *] page buffer
+** @param [r] key [const char *] key to search for 
+**
+** @return [AjPBtpage] pointer to a page
+** @@
+******************************************************************************/
+
+static AjPBtpage btreeSecPageFromKey(AjPBtcache cache, unsigned char *buf,
+                                    const char *key)
+{
+    unsigned char *rootbuf = NULL;
+    ajint nkeys = 0;
+    ajint order = 0;
+    ajint i;
+    
+    ajlong blockno = 0L;
+    AjPStr *karray = NULL;
+    ajlong *parray = NULL;
+    AjPBtpage page = NULL;
+    
+    /* ajDebug("In btreePageFromKey\n"); */
+    
+    rootbuf = buf;
+
+
+    GBT_NKEYS(rootbuf,&nkeys);
+    order = cache->sorder;
+
+    AJCNEW0(karray,order);
+    AJCNEW0(parray,order);
+    for(i=0;i<order;++i)
+       karray[i] = ajStrNew();
+
+    btreeGetKeys(cache,rootbuf,&karray,&parray);
+    i = 0;
+    while(i!=nkeys && strcmp(key,karray[i]->Ptr)>=0)
+       ++i;
+    if(i==nkeys)
+    {
+       if(strcmp(key,karray[i-1]->Ptr)<0)
+           blockno = parray[i-1];
+       else
+           blockno = parray[i];
+    }
+    else
+       blockno = parray[i];
+
+    for(i=0;i<order;++i)
+       ajStrDel(&karray[i]);
+    AJFREE(karray);
+    AJFREE(parray);
+
+    page =  ajBtreeCacheRead(cache,blockno);
+
+    return page;
+}
+
+
+
+
 /* @func ajBtreeIdNew *********************************************
 **
 ** Constructor for index bucket ID informationn
@@ -1617,6 +1729,36 @@
 
 
 
+/* @funcstatic btreeNodeIsFullSec *****************************************
+**
+** Tests whether a secondary node is full of keys
+**
+** @param [r] cache [const AjPBtcache] cache
+** @param [u] page [AjPBtpage] original page
+**
+** @return [AjBool] true if full
+** @@
+******************************************************************************/
+
+static AjBool btreeNodeIsFullSec(const AjPBtcache cache, AjPBtpage page)
+{
+    unsigned char *buf = NULL;
+    ajint nkeys = 0;
+
+    /* ajDebug("In btreeNodeIsFull\n"); */
+
+    buf = page->buf;
+    GBT_NKEYS(buf,&nkeys);
+
+    if(nkeys == cache->sorder - 1)
+       return ajTrue;
+
+    return ajFalse;
+}
+
+
+
+
 /* @funcstatic btreeInsertNonFull *****************************************
 **
 ** Insert a key into a non-full node
@@ -6967,7 +7109,7 @@
        pripage = btreeCacheLocate(cache,0L);
        pripage->dirty = BT_LOCK;
 
-       ajDebug("Created secondary tree at block %d\n",(ajint)secrootpage);
+       /* ajDebug("Created 2ry tree at block %d\n",(ajint)secrootpage); */
     }
     else
     {
@@ -9070,7 +9212,7 @@
     if(!cache->slevel)
        return root;
     
-    ret = btreeFindINode(cache,root,key);
+    ret = btreeSecFindINode(cache,root,key);
 
     return ret;
 }
@@ -9694,7 +9836,7 @@
     
     /* ajDebug("In btreeInsertKeySec\n"); */
 
-    if(!btreeNodeIsFull(cache,page))
+    if(!btreeNodeIsFullSec(cache,page))
     {
        btreeInsertNonFullSec(cache,page,key,less,greater);
        return;
@@ -10572,7 +10714,7 @@
 
     list = ajListNew();
 
-    order = cache->order;
+    order = cache->sorder;
 
     AJCNEW0(karray,order);
     AJCNEW0(parray,order);
diff -Naur EMBOSS-3.0.0/ajax/ajpdb.c EMBOSS-3.0.0-patched/ajax/ajpdb.c
--- EMBOSS-3.0.0/ajax/ajpdb.c   2005-07-12 12:29:41.000000000 -0400
+++ EMBOSS-3.0.0-patched/ajax/ajpdb.c   2005-08-19 16:49:00.000000000 -0400
@@ -1198,7 +1198,7 @@
     osstr = ajStrNew();
     xstr  = ajStrNew();
 
-    /* Start of main application loop */
+    /* Start of main loop */
     while(ajFileReadLine(inf,&line))
     {
        if(ajStrPrefixC(line,"XX"))
@@ -1313,6 +1313,8 @@
            
            (ret)->Nchn = ncha;
            (ret)->Ngp  = ngrp;
+
+           continue;
        }
        
 
@@ -1382,7 +1384,11 @@
            ajStrToken(&token,&handle,NULL);
            ajStrToInt(token,&mod);
            if((mode == 0) && (mod!=1))
-               break;
+             {
+               /* break; */
+               /* Discard remaining AT lines */
+               while(ajFileReadLine(inf,&line) && ajStrPrefixC(line,"AT"));
+             }
 
            /* Chain number */
            ajStrToken(&token,&handle,NULL);
@@ -1463,7 +1469,10 @@
                            "[EMAIL PROTECTED]");
            }
            else
+             {
                ajListPushApp((ret)->Chains[chn-1]->Atoms,(void *)atom);
+             }
+           continue;
        }
        
        /* Parse residue line */
@@ -1479,8 +1488,11 @@
            ajStrToken(&token,&handle,NULL);
            ajStrToInt(token,&mod);
            if((mode == 0) && (mod!=1))
-               break;
-
+             {
+               /* break;*/
+               /* Discard remaining RE lines */
+               while(ajFileReadLine(inf,&line) && ajStrPrefixC(line,"RE"));
+             }
            /* Chain number */
            ajStrToken(&token,&handle,NULL);
            ajStrToInt(token,&chn);
@@ -1585,6 +1597,8 @@
             ajStrToFloat(token,&residue->pol_rel);
 
            ajListPushApp((ret)->Chains[chn-1]->Residues,(void *)residue);  
+
+           continue;
        }
     }
     /* End of main application loop */
diff -Naur EMBOSS-3.0.0/jemboss/org/emboss/jemboss/server/JembossServer.java 
EMBOSS-3.0.0-patched/jemboss/org/emboss/jemboss/server/JembossServer.java
--- EMBOSS-3.0.0/jemboss/org/emboss/jemboss/server/JembossServer.java   
2004-10-29 08:07:02.000000000 -0400
+++ EMBOSS-3.0.0-patched/jemboss/org/emboss/jemboss/server/JembossServer.java   
2005-08-30 13:22:00.000000000 -0400
@@ -973,7 +973,10 @@
     {
       public boolean accept(File cwd, String name)
       {
-        return name.endsWith(".png");
+        if( name.endsWith(".png") ||
+            name.endsWith(".dat") )
+          return true;
+        return false;
       };
     });
 

Index: emboss.info
===================================================================
RCS file: 
/cvsroot/fink/dists/10.4-transitional/unstable/main/finkinfo/sci/emboss.info,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- emboss.info 19 Jul 2005 00:16:05 -0000      1.7
+++ emboss.info 13 Sep 2005 01:18:52 -0000      1.8
@@ -1,6 +1,6 @@
 Package: emboss
 Version: 3.0.0
-Revision: 1
+Revision: 2
 Depends: %N-shlibs (= %v-%r), x11, libpng3-shlibs, libjpeg-shlibs, gd2-shlibs, 
system-java14
 BuildDepends: libpng3, libjpeg, gd2, libiconv-dev, x11-dev, system-java14-dev
 #Replaces: emboss (<< 2.7.1-2)
@@ -9,6 +9,7 @@
   Primary: ftp://emboss.open-bio.org/pub/EMBOSS/
 <<
 Source-MD5: fa72feded9ab9272e3e731c09f545dcc
+Patch: %n.patch
 ConfigureParams: 
--with-java=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home 
--with-javaos=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/include
 
 Installscript: <<
    make install DESTDIR=%d



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to