commit:     d11fa811ea39d044575471f7c4006bab88e23bfe
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Fri Mar 29 20:44:26 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May  8 10:43:28 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d11fa811

sci-biology/velvet: Fix incompatible pointer types in 1.2.10

* C99 porting. Split multi-assignments of NULLs into multiple lines
* Also added dependencies on OpenMP if USE=openmp is enabled

[sam: Formatting tweaks to commit msg.]

Closes: https://bugs.gentoo.org/919223
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/35993
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../velvet-1.2.10-incompatible-pointers.patch      | 27 ++++++++++++++++++++++
 sci-biology/velvet/velvet-1.2.10.ebuild            | 13 +++++++++--
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/sci-biology/velvet/files/velvet-1.2.10-incompatible-pointers.patch 
b/sci-biology/velvet/files/velvet-1.2.10-incompatible-pointers.patch
new file mode 100644
index 000000000000..e736655ae5bc
--- /dev/null
+++ b/sci-biology/velvet/files/velvet-1.2.10-incompatible-pointers.patch
@@ -0,0 +1,27 @@
+diff --git a/velvet_1.2.10.orig/src/readSet.c b/velvet_1.2.10/src/readSet.c
+index f58122e..26e579c 100644
+--- a/src/readSet.c
++++ b/src/readSet.c
+@@ -638,7 +638,8 @@ static void readFastXFile(int fileType, SequencesWriter 
*seqWriteInfo, char *fil
+       FileGZOrAuto file;
+       IDnum counter = 0;
+ 
+-        file.gzFile = file.autoFile = NULL;
++        file.autoFile = NULL;
++        file.gzFile = NULL;
+         if (fileType == AUTO) {
+               file.autoFile = openFileAuto(filename);
+                 if (!file.autoFile)
+@@ -677,8 +678,10 @@ static void readFastXPair(int fileType, SequencesWriter 
*seqWriteInfo, char *fil
+       if (cat==REFERENCE)
+               exitErrorf(EXIT_FAILURE, false, "Cannot read reference sequence 
in 'separate' read mode");
+ 
+-        file1.gzFile = file1.autoFile = NULL;
+-        file2.gzFile = file2.autoFile = NULL;
++        file1.autoFile = NULL;
++        file2.autoFile = NULL;
++        file1.autoFile = NULL;
++        file2.autoFile = NULL;
+         if (fileType == AUTO) {
+               file1.autoFile = openFileAuto(filename1);
+                 if (!file1.autoFile)

diff --git a/sci-biology/velvet/velvet-1.2.10.ebuild 
b/sci-biology/velvet/velvet-1.2.10.ebuild
index ea0b3630b78b..bb1a0b441b1e 100644
--- a/sci-biology/velvet/velvet-1.2.10.ebuild
+++ b/sci-biology/velvet/velvet-1.2.10.ebuild
@@ -16,7 +16,16 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="doc openmp"
 
-BDEPEND="doc? ( virtual/latex-base )"
+BDEPEND="doc? ( virtual/latex-base )
+        openmp? (
+                || (
+                        sys-devel/gcc[openmp]
+                        sys-devel/clang-runtime[openmp]
+                )
+        )
+"
+
+PATCHES=( "${FILESDIR}/${P}-incompatible-pointers.patch" )
 
 src_prepare() {
        default
@@ -49,7 +58,7 @@ src_prepare() {
                CFLAGS="${CFLAGS}"
                OPT="${CFLAGS}"
        )
-       use openmp && MAKE_XOPTS+=( OPENMP=1 )
+       use openmp && MAKE_XOPTS+=( OPENMP=1 ) && tc-check-openmp
        [[ ! -z "${VELVET_MAXKMERLENGTH}" ]] && MAKE_XOPTS+=( 
MAXKMERLENGTH=${VELVET_MAXKMERLENGTH} )
        [[ ! -z "${VELVET_CATEGORIES}" ]] && MAKE_XOPTS+=( 
CATEGORIES=${VELVET_CATEGORIES} )
        [[ ! -z "${VELVET_BIGASSEMBLY}" ]] && MAKE_XOPTS+=( 
BIGASSEMBLY=${VELVET_BIGASSEMBLY} )

Reply via email to