git: 8fd55d46d939 - main - biology/cufflinks: Unbreak

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 28 Jul 2022 03:43:32 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8fd55d46d939263df2c327093c6bb21d74a29c0d

commit 8fd55d46d939263df2c327093c6bb21d74a29c0d
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-07-28 03:43:06 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-07-28 03:43:06 +0000

    biology/cufflinks: Unbreak
---
 biology/cufflinks/Makefile                   |  5 ++--
 biology/cufflinks/files/patch-configure.ac   |  9 ++++++++
 biology/cufflinks/files/patch-src_GBase.h    | 11 ++++++++-
 biology/cufflinks/files/patch-src_codons.cpp | 24 ++++++++++++++++++++
 biology/cufflinks/files/patch-src_gdna.cpp   | 34 ++++++++++++++++++++++++++++
 biology/cufflinks/files/patch-src_gdna.h     | 12 ++++++++++
 biology/cufflinks/files/patch-src_gff.cpp    | 11 +++++++++
 biology/cufflinks/files/patch-src_gff.h      | 34 ++++++++++++++++++++++++++++
 8 files changed, 137 insertions(+), 3 deletions(-)

diff --git a/biology/cufflinks/Makefile b/biology/cufflinks/Makefile
index 99de4da20665..caaf6e63305a 100644
--- a/biology/cufflinks/Makefile
+++ b/biology/cufflinks/Makefile
@@ -17,11 +17,12 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
 		libhts.so:biology/htslib
 
-BROKEN=		error: expected ';' at end of declaration
-
 USES=		autoreconf compiler:c++11-lang eigen:3 gmake python shebangfix
+
 SHEBANG_FILES=	src/cuffmerge
+
 GNU_CONFIGURE=	yes
+
 USE_GITHUB=	yes
 GH_ACCOUNT=	cole-trapnell-lab
 
diff --git a/biology/cufflinks/files/patch-configure.ac b/biology/cufflinks/files/patch-configure.ac
index 5d8f553f27ad..4347dcbe7503 100644
--- a/biology/cufflinks/files/patch-configure.ac
+++ b/biology/cufflinks/files/patch-configure.ac
@@ -23,6 +23,15 @@
  esac
  
  AC_ARG_ENABLE(vectorize,    [  --enable-vectorize        Enable GCC auto-vectorization],
+@@ -111,7 +112,7 @@ AC_ARG_ENABLE(profiling,      [  --enable-profiling   
+ 	  [ext_LDFLAGS="-lprofiler -ltcmalloc"], [])
+ 	  
+ CFLAGS="${generic_CFLAGS} ${ext_CFLAGS} ${user_CFLAGS} ${debug_CFLAGS} ${OPENMP_CFLAGS}"
+-CXXFLAGS="$CFLAGS -std=c++03"
++CXXFLAGS="$CFLAGS -std=c++14"
+ CXXFLAGS="${CXXFLAGS} ${BOOST_CPPFLAGS} ${BAM_CPPFLAGS} ${EIGEN_CPPFLAGS}"
+ user_LDFLAGS="$LDFLAGS"
+ LDFLAGS="${ext_LDFLAGS} ${user_LDFLAGS}"
 @@ -120,7 +121,6 @@ LDFLAGS="${ext_LDFLAGS} ${user_LDFLAGS}"
  AC_CHECK_MEMBERS([struct sysinfo.totalram], [], [], [#include <sys/sysinfo.h>])
  AC_CHECK_DECLS([sysctl, CTL_HW, HW_PHYSMEM], [], [], [#include <sys/sysctl.h>])
diff --git a/biology/cufflinks/files/patch-src_GBase.h b/biology/cufflinks/files/patch-src_GBase.h
index d7475a73dcb4..757bd8831c36 100644
--- a/biology/cufflinks/files/patch-src_GBase.h
+++ b/biology/cufflinks/files/patch-src_GBase.h
@@ -1,4 +1,4 @@
---- src/GBase.h.orig	2019-05-25 22:08:19 UTC
+--- src/GBase.h.orig	2019-07-06 16:28:01 UTC
 +++ src/GBase.h
 @@ -1,6 +1,6 @@
  #ifndef G_BASE_DEFINED
@@ -8,3 +8,12 @@
  //mostly for MinGW
  #define _POSIX_SOURCE
  #endif
+@@ -71,7 +71,7 @@ typedef int16_t int16;
+ typedef uint16_t uint16;
+ 
+ typedef unsigned char uchar;
+-typedef unsigned char byte;
++typedef unsigned char bytex;
+ 
+ #ifndef MAXUINT
+ #define MAXUINT ((unsigned int)-1)
diff --git a/biology/cufflinks/files/patch-src_codons.cpp b/biology/cufflinks/files/patch-src_codons.cpp
new file mode 100644
index 000000000000..0867df1e5bdf
--- /dev/null
+++ b/biology/cufflinks/files/patch-src_codons.cpp
@@ -0,0 +1,24 @@
+--- src/codons.cpp.orig	2022-07-28 03:23:12 UTC
++++ src/codons.cpp
+@@ -48,9 +48,9 @@ static bool isCodonTableReady=codonTableInit();
+ 
+ unsigned short packCodon(char n1, char n2, char n3) {
+  //assumes they are uppercase already!
+- byte b1=n1-'A';
+- byte b2=n2-'A';
+- byte b3=n3-'A';
++ bytex b1=n1-'A';
++ bytex b2=n2-'A';
++ bytex b3=n3-'A';
+  b1 |= (b2 << 5); 
+  b2 = (b2 >> 3) | (b3 << 2);
+  return ( ((unsigned short)b2) << 8) + b1;
+@@ -68,7 +68,7 @@ bool codonTableInit() {
+ 
+ 
+ char Codon::translate() {
+- for (byte i=0;i<3;i++) nuc[i]=toupper(nuc[i]);
++ for (bytex i=0;i<3;i++) nuc[i]=toupper(nuc[i]);
+  unsigned short aacode=packCodon(nuc[0], nuc[1], nuc[2]);
+  return codonTable[aacode];
+  }
diff --git a/biology/cufflinks/files/patch-src_gdna.cpp b/biology/cufflinks/files/patch-src_gdna.cpp
new file mode 100644
index 000000000000..c305e2a0b8b1
--- /dev/null
+++ b/biology/cufflinks/files/patch-src_gdna.cpp
@@ -0,0 +1,34 @@
+--- src/gdna.cpp.orig	2022-07-28 03:26:30 UTC
++++ src/gdna.cpp
+@@ -11,8 +11,8 @@ const char* IUPAC_COMP  ="TtGgAaCcAaKkYyWwSsRrMmBbDdHh
+ #define G_2BIT 2 // 10
+ #define T_2BIT 3 // 11
+ 
+-static byte ntCompTable[256];
+-static byte nt2bit[256]; //maps any character to a 2bit base value (with N = A)
++static bytex ntCompTable[256];
++static bytex nt2bit[256]; //maps any character to a 2bit base value (with N = A)
+ static char v_2bit2nt[4] = {'A','C','G','T'};
+ 
+ //----------------------
+@@ -21,9 +21,9 @@ static bool gdna_Ready=gDnaInit();
+ 
+ //----------------------
+ 
+-byte gdna2bit(char* &nt, int n) {
++bytex gdna2bit(char* &nt, int n) {
+ // Pack n bases into a byte (n can be 1..4)
+-byte out = 0;
++bytex out = 0;
+ while (n && *nt) {
+     n--;
+     out <<= 2;
+@@ -43,7 +43,7 @@ char ntComplement(char c) {
+  return ntCompTable[(int)c];
+  }
+ 
+-char g2bit2base(byte v2bit) {
++char g2bit2base(bytex v2bit) {
+  return v_2bit2nt[v2bit & 0x03 ];
+ }
+ 
diff --git a/biology/cufflinks/files/patch-src_gdna.h b/biology/cufflinks/files/patch-src_gdna.h
new file mode 100644
index 000000000000..73ec345a705e
--- /dev/null
+++ b/biology/cufflinks/files/patch-src_gdna.h
@@ -0,0 +1,12 @@
+--- src/gdna.h.orig	2022-07-28 03:14:39 UTC
++++ src/gdna.h
+@@ -9,7 +9,7 @@ char* reverseComplement(char* seq, int slen=0);
+ 
+ bool gDnaInit();
+ 
+-byte gdna2bit(char* &nt, int n=4); //pack n bases into a byte (n can be 1..4)
+-char g2bit2base(byte v2bit); //convert the 2-bit value into 'A', 'C', 'G' or 'T'
++bytex gdna2bit(char* &nt, int n=4); //pack n bases into a byte (n can be 1..4)
++char g2bit2base(bytex v2bit); //convert the 2-bit value into 'A', 'C', 'G' or 'T'
+ 
+ #endif
diff --git a/biology/cufflinks/files/patch-src_gff.cpp b/biology/cufflinks/files/patch-src_gff.cpp
new file mode 100644
index 000000000000..3bca48213b0a
--- /dev/null
+++ b/biology/cufflinks/files/patch-src_gff.cpp
@@ -0,0 +1,11 @@
+--- src/gff.cpp.orig	2022-07-28 03:24:45 UTC
++++ src/gff.cpp
+@@ -21,7 +21,7 @@ const uint gfo_flag_BY_EXON          = 0x00000020; //c
+ const uint gfo_flag_DISCARDED        = 0x00000100;
+ const uint gfo_flag_LST_KEEP         = 0x00000200;
+ const uint gfo_flag_LEVEL_MSK        = 0x00FF0000;
+-const byte gfo_flagShift_LEVEL           = 16;
++const bytex gfo_flagShift_LEVEL           = 16;
+ 
+ void gffnames_ref(GffNames* &n) {
+   if (n==NULL) n=new GffNames();
diff --git a/biology/cufflinks/files/patch-src_gff.h b/biology/cufflinks/files/patch-src_gff.h
new file mode 100644
index 000000000000..53cb996ef782
--- /dev/null
+++ b/biology/cufflinks/files/patch-src_gff.h
@@ -0,0 +1,34 @@
+--- src/gff.h.orig	2022-07-28 03:20:26 UTC
++++ src/gff.h
+@@ -42,7 +42,7 @@ extern const uint gfo_flag_DISCARDED; //should not be 
+ extern const uint gfo_flag_LST_KEEP; //GffObj from GffReader::gflst is to be kept (not deallocated)
+                                      //when GffReader is destroyed
+ extern const uint gfo_flag_LEVEL_MSK; //hierarchical level: 0 = no parent
+-extern const byte gfo_flagShift_LEVEL;
++extern const bytex gfo_flagShift_LEVEL;
+ 
+ extern bool gff_show_warnings;
+ 
+@@ -508,18 +508,18 @@ class GffObj:public GSeg { (public)
+     if (v) flags |= gfo_flag_CHILDREN_PROMOTED;
+       else flags &= ~gfo_flag_CHILDREN_PROMOTED;
+      }
+-  void setLevel(byte v) {
++  void setLevel(bytex v) {
+     if (v==0) flags &= ~gfo_flag_LEVEL_MSK;
+          else flags &= ~(((uint)v) << gfo_flagShift_LEVEL);
+     }
+-  byte incLevel() {
++  bytex incLevel() {
+     uint v=((flags & gfo_flag_LEVEL_MSK) >> gfo_flagShift_LEVEL);
+     v++;
+     flags &= ~(v << gfo_flagShift_LEVEL);
+     return v;
+     }
+-  byte getLevel() {
+-    return ((byte)((flags & gfo_flag_LEVEL_MSK) >> gfo_flagShift_LEVEL));
++  bytex getLevel() {
++    return ((bytex)((flags & gfo_flag_LEVEL_MSK) >> gfo_flagShift_LEVEL));
+     }
+ 
+   bool isValidTranscript() {