biology/cdbfasta: Update to 2018.10.05
Fix build for c++17 Improve pkg-descr Add license Reported by: pkg-fallout
This commit is contained in:
parent
506e859aa1
commit
cc903ba092
8 changed files with 248 additions and 24 deletions
|
@ -1,17 +1,17 @@
|
|||
PORTNAME= cdbfasta
|
||||
PORTVERSION= 2010.07.22
|
||||
PORTVERSION= 2018.10.05
|
||||
CATEGORIES= biology
|
||||
MASTER_SITES= http://acadix.biz/Ports/distfiles/
|
||||
|
||||
MAINTAINER= jwb@FreeBSD.org
|
||||
COMMENT= Fast indexing and retrieval of FASTA records from flat file databases
|
||||
WWW= https://sourceforge.net/projects/cdbfasta/
|
||||
|
||||
# LICENSE= unspecified
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||
LICENSE= ART20
|
||||
|
||||
USES= gmake
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= gpertea
|
||||
GH_TAGNAME= 014498c
|
||||
|
||||
PLIST_FILES= bin/cdbfasta bin/cdbyank
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
SHA256 (cdbfasta-2010.07.22.tar.gz) = 68767e8b2fb9de5a6d68ee16df73293f65e02f05cf2f747a9dd6b8854766722c
|
||||
SIZE (cdbfasta-2010.07.22.tar.gz) = 59735
|
||||
TIMESTAMP = 1689000001
|
||||
SHA256 (gpertea-cdbfasta-2018.10.05-014498c_GH0.tar.gz) = bba537d252b1ebcc60f91137c6d6924a4d36f024bc15fdb5de83d3f55332db8b
|
||||
SIZE (gpertea-cdbfasta-2018.10.05-014498c_GH0.tar.gz) = 63985
|
||||
|
|
|
@ -1,26 +1,32 @@
|
|||
--- Makefile.orig 2009-12-03 20:17:51 UTC
|
||||
--- Makefile.orig 2018-10-05 18:26:32 UTC
|
||||
+++ Makefile
|
||||
@@ -18,7 +18,10 @@ else
|
||||
MARCH =
|
||||
endif
|
||||
|
||||
@@ -1,6 +1,8 @@ SEARCHDIRS := -I${GCLDIR}
|
||||
GCLDIR := ./gclib
|
||||
SEARCHDIRS := -I${GCLDIR}
|
||||
-CC := g++
|
||||
+# Use the correct compiler (CXX, not CC) and respect the environment
|
||||
+# by using ?=
|
||||
+CXX ?= g++
|
||||
+
|
||||
BASEFLAGS = -Wall ${SEARCHDIRS} $(MARCH) -DENABLE_COMPRESSION=0 -D_FILE_OFFSET_BITS=64 \
|
||||
+CXX ?= g++
|
||||
|
||||
BASEFLAGS = -Wall ${SEARCHDIRS} $(MARCH) -DENABLE_COMPRESSION=1 -D_FILE_OFFSET_BITS=64 \
|
||||
-D_LARGEFILE_SOURCE -fno-exceptions -fno-rtti -fno-strict-aliasing \
|
||||
-D_REENTRANT
|
||||
@@ -33,30 +36,30 @@ else
|
||||
@@ -9,39 +11,38 @@ ifeq ($(findstring debug,$(MAKECMDGOALS)),)
|
||||
|
||||
ifeq ($(findstring debug,$(MAKECMDGOALS)),)
|
||||
DBGFLAGS = -O2 -g -DNDEBUG
|
||||
- LDFLAGS =
|
||||
else
|
||||
DBGFLAGS = -g -DDEBUG -D_DEBUG
|
||||
- LDFLAGS = -g
|
||||
+ LDFLAGS += -g
|
||||
endif
|
||||
|
||||
ifeq ($(findstring nommap,$(MAKECMDGOALS)),)
|
||||
- CFLAGS = $(DBGFLAGS) $(BASEFLAGS)
|
||||
+ CXXFLAGS = $(DBGFLAGS) $(BASEFLAGS)
|
||||
+ CXXFLAGS += $(DBGFLAGS) $(BASEFLAGS)
|
||||
else
|
||||
- CFLAGS = $(DBGFLAGS) $(BASEFLAGS) -DNO_MMAP
|
||||
+ CXXFLAGS = $(DBGFLAGS) $(BASEFLAGS) -DNO_MMAP
|
||||
+ CXXFLAGS += $(DBGFLAGS) $(BASEFLAGS) -DNO_MMAP
|
||||
endif
|
||||
|
||||
%.o : %.c
|
||||
|
@ -46,9 +52,11 @@
|
|||
# C/C++ linker
|
||||
|
||||
-LINKER := g++
|
||||
+LINKER := ${CXX}
|
||||
#LDFLAGS =
|
||||
#uncomment this when ENABLE_COMPRESSION
|
||||
-LDFLAGS = -lz
|
||||
+LINKER := ${CXX}
|
||||
+LDFLAGS = -lz
|
||||
#if ENABLE_COMPRESSION is not needed,
|
||||
# LDFLAGS =
|
||||
+LDFLAGS += -lz
|
||||
|
||||
.PHONY : all
|
||||
all: cdbfasta cdbyank
|
||||
|
|
40
biology/cdbfasta/files/patch-gclib_GBase.cpp
Normal file
40
biology/cdbfasta/files/patch-gclib_GBase.cpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
--- gclib/GBase.cpp.orig 2023-07-10 09:56:17 UTC
|
||||
+++ gclib/GBase.cpp
|
||||
@@ -234,7 +234,7 @@ bool GstrEq(const char* a, const char* b) {
|
||||
|
||||
bool GstrEq(const char* a, const char* b) {
|
||||
if (a==NULL || b==NULL) return false;
|
||||
- register int i=0;
|
||||
+ int i=0;
|
||||
while (a[i]==b[i]) {
|
||||
if (a[i]==0) return true;
|
||||
++i;
|
||||
@@ -244,7 +244,7 @@ bool GstriEq(const char* a, const char* b) {
|
||||
|
||||
bool GstriEq(const char* a, const char* b) {
|
||||
if (a==NULL || b==NULL) return false;
|
||||
- register int i=0;
|
||||
+ int i=0;
|
||||
while (tolower((unsigned char)a[i])==tolower((unsigned char)b[i])) {
|
||||
if (a[i]==0) return true;
|
||||
}
|
||||
@@ -253,7 +253,7 @@ int Gstricmp(const char* a, const char* b, int n) {
|
||||
|
||||
int Gstricmp(const char* a, const char* b, int n) {
|
||||
if (a==NULL || b==NULL) return a==NULL ? -1 : 1;
|
||||
- register int ua, ub;
|
||||
+ int ua, ub;
|
||||
if (n<0) {
|
||||
while ((*a!=0) && (*b!=0)) {
|
||||
ua=tolower((unsigned char)*a);
|
||||
@@ -662,8 +662,8 @@ int strhash(const char* str){
|
||||
|
||||
//hash function used for strings in GHash
|
||||
int strhash(const char* str){
|
||||
- register int h=0;
|
||||
- register int g;
|
||||
+ int h=0;
|
||||
+ int g;
|
||||
while (*str) {
|
||||
h=(h<<4)+*str++;
|
||||
g=h&0xF0000000;
|
65
biology/cdbfasta/files/patch-gclib_GHash.hh
Normal file
65
biology/cdbfasta/files/patch-gclib_GHash.hh
Normal file
|
@ -0,0 +1,65 @@
|
|||
--- gclib/GHash.hh.orig 2023-07-10 09:56:48 UTC
|
||||
+++ gclib/GHash.hh
|
||||
@@ -544,7 +544,7 @@ template <class OBJ> char* GHash<OBJ>::NextKey() {
|
||||
}
|
||||
|
||||
template <class OBJ> char* GHash<OBJ>::NextKey() {
|
||||
- register int pos=fCurrentEntry;
|
||||
+ int pos=fCurrentEntry;
|
||||
while (pos<fCapacity && hash[pos].hash<0) pos++;
|
||||
if (pos==fCapacity) {
|
||||
fCurrentEntry=fCapacity;
|
||||
@@ -557,7 +557,7 @@ template <class OBJ> OBJ* GHash<OBJ>::NextData() {
|
||||
}
|
||||
|
||||
template <class OBJ> OBJ* GHash<OBJ>::NextData() {
|
||||
- register int pos=fCurrentEntry;
|
||||
+ int pos=fCurrentEntry;
|
||||
while (pos<fCapacity && hash[pos].hash<0) pos++;
|
||||
if (pos==fCapacity) {
|
||||
fCurrentEntry=fCapacity;
|
||||
@@ -571,7 +571,7 @@ template <class OBJ> OBJ* GHash<OBJ>::NextData(char* &
|
||||
}
|
||||
|
||||
template <class OBJ> OBJ* GHash<OBJ>::NextData(char* &nextkey) {
|
||||
- register int pos=fCurrentEntry;
|
||||
+ int pos=fCurrentEntry;
|
||||
while (pos<fCapacity && hash[pos].hash<0) pos++;
|
||||
if (pos==fCapacity) {
|
||||
fCurrentEntry=fCapacity;
|
||||
@@ -589,7 +589,7 @@ template <class OBJ> int GHash<OBJ>::First() const {
|
||||
|
||||
// Get first non-empty entry
|
||||
template <class OBJ> int GHash<OBJ>::First() const {
|
||||
- register int pos=0;
|
||||
+ int pos=0;
|
||||
while(pos<fCapacity){ if(0<=hash[pos].hash) break; pos++; }
|
||||
GASSERT(fCapacity<=pos || 0<=hash[pos].hash);
|
||||
return pos;
|
||||
@@ -597,7 +597,7 @@ template <class OBJ> int GHash<OBJ>::Last() const {
|
||||
|
||||
// Get last non-empty entry
|
||||
template <class OBJ> int GHash<OBJ>::Last() const {
|
||||
- register int pos=fCapacity-1;
|
||||
+ int pos=fCapacity-1;
|
||||
while(0<=pos){ if(0<=hash[pos].hash) break; pos--; }
|
||||
GASSERT(pos<0 || 0<=hash[pos].hash);
|
||||
return pos;
|
||||
@@ -624,7 +624,7 @@ template <class OBJ> void GHash<OBJ>::Clear(){
|
||||
|
||||
// Remove all
|
||||
template <class OBJ> void GHash<OBJ>::Clear(){
|
||||
- register int i;
|
||||
+ int i;
|
||||
for(i=0; i<fCapacity; i++){
|
||||
if(hash[i].hash>=0){
|
||||
if (hash[i].keyalloc) GFREE((hash[i].key));
|
||||
@@ -681,7 +681,7 @@ template <class OBJ> GHash<OBJ>::~GHash(){
|
||||
|
||||
// Destroy table
|
||||
template <class OBJ> GHash<OBJ>::~GHash(){
|
||||
- register int i;
|
||||
+ int i;
|
||||
for(i=0; i<fCapacity; i++){
|
||||
if(hash[i].hash>=0){
|
||||
if (hash[i].keyalloc) GFREE((hash[i].key));
|
98
biology/cdbfasta/files/patch-gclib_GStr.cpp
Normal file
98
biology/cdbfasta/files/patch-gclib_GStr.cpp
Normal file
|
@ -0,0 +1,98 @@
|
|||
--- gclib/GStr.cpp.orig 2023-07-10 09:57:46 UTC
|
||||
+++ gclib/GStr.cpp
|
||||
@@ -424,8 +424,8 @@ GStr& GStr::trim(char c) {
|
||||
}
|
||||
|
||||
GStr& GStr::trim(char c) {
|
||||
- register int istart;
|
||||
- register int iend;
|
||||
+ int istart;
|
||||
+ int iend;
|
||||
for (istart=0; istart<length() && my_data->chars[istart]==c;istart++) ;
|
||||
if (istart==length()) {
|
||||
make_unique(); //edit operation ahead
|
||||
@@ -444,8 +444,8 @@ GStr& GStr::trim(const char* c) {
|
||||
}
|
||||
|
||||
GStr& GStr::trim(const char* c) {
|
||||
- register int istart;
|
||||
- register int iend;
|
||||
+ int istart;
|
||||
+ int iend;
|
||||
for (istart=0; istart<length() && strchr(c, my_data->chars[istart])!=NULL ;istart++) ;
|
||||
if (istart==length()) {
|
||||
prep_data(0); //string was entirely trimmed
|
||||
@@ -464,8 +464,8 @@ GStr& GStr::trimR(char c) {
|
||||
|
||||
GStr& GStr::trimR(char c) {
|
||||
//only trim the right end
|
||||
- //register int istart;
|
||||
- register int iend;
|
||||
+ //int istart;
|
||||
+ int iend;
|
||||
for (iend=length()-1; iend>=0 && my_data->chars[iend]==c;iend--) ;
|
||||
if (iend==-1) {
|
||||
make_unique();
|
||||
@@ -488,7 +488,7 @@ GStr& GStr::trimR(const char* c) {
|
||||
}
|
||||
|
||||
GStr& GStr::trimR(const char* c) {
|
||||
- register int iend;
|
||||
+ int iend;
|
||||
for (iend=length()-1; iend>=0 && strchr(c,my_data->chars[iend])!=NULL;iend--) ;
|
||||
if (iend==-1) {
|
||||
make_unique();
|
||||
@@ -511,7 +511,7 @@ GStr& GStr::chomp(const char* cstr) {
|
||||
|
||||
|
||||
GStr& GStr::chomp(const char* cstr) {
|
||||
- register int iend;
|
||||
+ int iend;
|
||||
if (cstr==NULL || *cstr==0) return *this;
|
||||
//check if this ends with cstr
|
||||
int cend=strlen(cstr)-1;
|
||||
@@ -537,7 +537,7 @@ GStr& GStr::trimL(char c) {
|
||||
}
|
||||
|
||||
GStr& GStr::trimL(char c) {
|
||||
- register int istart;
|
||||
+ int istart;
|
||||
for (istart=0; istart<length() && my_data->chars[istart]==c;istart++) ;
|
||||
if (istart==length()) {
|
||||
prep_data(0); //string was entirely trimmed
|
||||
@@ -554,7 +554,7 @@ GStr& GStr::trimL(const char* c) {
|
||||
}
|
||||
|
||||
GStr& GStr::trimL(const char* c) {
|
||||
- register int istart;
|
||||
+ int istart;
|
||||
for (istart=0; istart<length() && strchr(c,my_data->chars[istart])!=NULL;istart++) ;
|
||||
if (istart==length()) {
|
||||
prep_data(0); //string was entirely trimmed
|
||||
@@ -700,7 +700,7 @@ bool GStr::is_space() const {
|
||||
if (my_data == &null_data)
|
||||
return false;
|
||||
|
||||
- for (register const char *p = my_data->chars; *p; p++)
|
||||
+ for (const char *p = my_data->chars; *p; p++)
|
||||
if (!isspace(*p))
|
||||
return false;
|
||||
|
||||
@@ -1083,7 +1083,7 @@ GStr& GStr::upper() {
|
||||
|
||||
GStr& GStr::upper() {
|
||||
make_unique(); //edit operation ahead
|
||||
- for (register char *p = chrs(); *p; p++)
|
||||
+ for (char *p = chrs(); *p; p++)
|
||||
*p = (char) toupper(*p);
|
||||
|
||||
return *this;
|
||||
@@ -1094,7 +1094,7 @@ GStr& GStr::lower() {
|
||||
GStr& GStr::lower() {
|
||||
make_unique();
|
||||
|
||||
- for (register char *p = chrs(); *p; p++)
|
||||
+ for (char *p = chrs(); *p; p++)
|
||||
*p = (char) tolower(*p);
|
||||
|
||||
return *this;
|
11
biology/cdbfasta/files/patch-gclib_gcdb.cpp
Normal file
11
biology/cdbfasta/files/patch-gclib_gcdb.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- gclib/gcdb.cpp.orig 2023-07-10 09:57:25 UTC
|
||||
+++ gclib/gcdb.cpp
|
||||
@@ -99,7 +99,7 @@ static unsigned int gcdb_strlen(const char *s) {
|
||||
#define gcdb_seek_begin(fd) (gcdb_seek_set((fd),(gcdb_seek_pos) 0))
|
||||
|
||||
static unsigned int gcdb_strlen(const char *s) {
|
||||
- register char *t;
|
||||
+ char *t;
|
||||
t = (char*)s;
|
||||
for (;;) {
|
||||
if (!*t) return t - s;
|
|
@ -1 +1,2 @@
|
|||
Fast indexing and retrieval of FASTA records from flat file data bases.
|
||||
Cdbfasta creates an index file for a multi-FASTA file to facilitate
|
||||
fast retrieval of any sequence using cdbyank.
|
||||
|
|
Loading…
Reference in a new issue