pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/biology/subread



Module Name:    pkgsrc
Committed By:   bacon
Date:           Mon Jan 20 17:29:59 UTC 2025

Added Files:
        pkgsrc/biology/subread: DESCR Makefile PLIST distinfo
        pkgsrc/biology/subread/files: Makefile.pkg
        pkgsrc/biology/subread/patches: patch-HelperFunctions.c
            patch-core-junction.c patch-gene-algorithms.c patch-input-files.c
            patch-long-hashtable.c patch-longread-one_LRMsorted-hashtable.c
            patch-longread-one_Makefile patch-longread-one_longread-mapping.c
            patch-read-repair.c patch-sambam-file.c patch-sorted-hashtable.c
            patch-subread.h

Log Message:
biology/subread: Alignment, quantification, SNPs

The Subread package comprises a suite of software programs for
processing next-gen sequencing read data including:

    Subread: a general-purpose read aligner which can align both
    genomic DNA-seq and RNA-seq reads. It can also be used to
    discover genomic mutations including short indels and structural
    variants.

    Subjunc: a read aligner developed for aligning RNA-seq reads
    and for the detection of exon-exon junctions. Gene fusion events
    can be detected as well.

    featureCounts: a software program developed for counting
    reads to genomic features such as genes, exons, promoters and
    genomic bins.

    Sublong: a long-read aligner that is designed based on
    seed-and-vote.

    exactSNP: a SNP caller that discovers SNPs by testing signals
    against local background noises.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/biology/subread/DESCR \
    pkgsrc/biology/subread/Makefile pkgsrc/biology/subread/PLIST \
    pkgsrc/biology/subread/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/biology/subread/files/Makefile.pkg
cvs rdiff -u -r0 -r1.1 pkgsrc/biology/subread/patches/patch-HelperFunctions.c \
    pkgsrc/biology/subread/patches/patch-core-junction.c \
    pkgsrc/biology/subread/patches/patch-gene-algorithms.c \
    pkgsrc/biology/subread/patches/patch-input-files.c \
    pkgsrc/biology/subread/patches/patch-long-hashtable.c \
    pkgsrc/biology/subread/patches/patch-longread-one_LRMsorted-hashtable.c \
    pkgsrc/biology/subread/patches/patch-longread-one_Makefile \
    pkgsrc/biology/subread/patches/patch-longread-one_longread-mapping.c \
    pkgsrc/biology/subread/patches/patch-read-repair.c \
    pkgsrc/biology/subread/patches/patch-sambam-file.c \
    pkgsrc/biology/subread/patches/patch-sorted-hashtable.c \
    pkgsrc/biology/subread/patches/patch-subread.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/biology/subread/DESCR
diff -u /dev/null pkgsrc/biology/subread/DESCR:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/DESCR        Mon Jan 20 17:29:58 2025
@@ -0,0 +1,21 @@
+The Subread package comprises a suite of software programs for
+processing next-gen sequencing read data including:
+
+    Subread: a general-purpose read aligner which can align both
+    genomic DNA-seq and RNA-seq reads. It can also be used to
+    discover genomic mutations including short indels and structural
+    variants.
+
+    Subjunc: a read aligner developed for aligning RNA-seq reads
+    and for the detection of exon-exon junctions. Gene fusion events
+    can be detected as well.
+
+    featureCounts: a software program developed for counting
+    reads to genomic features such as genes, exons, promoters and
+    genomic bins.
+
+    Sublong: a long-read aligner that is designed based on
+    seed-and-vote.
+
+    exactSNP: a SNP caller that discovers SNPs by testing signals
+    against local background noises.
Index: pkgsrc/biology/subread/Makefile
diff -u /dev/null pkgsrc/biology/subread/Makefile:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/Makefile     Mon Jan 20 17:29:58 2025
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1 2025/01/20 17:29:58 bacon Exp $
+
+DISTNAME=      ${PKGNAME}-source
+PKGNAME=       subread-2.0.8
+CATEGORIES=    biology
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=subread/}
+
+MAINTAINER=    bacon%NetBSD.org@localhost
+HOMEPAGE=      https://subread.sourceforge.net/
+COMMENT=       High-performance read alignment, quantification and mutation discovery
+LICENSE=       gnu-gpl-v3
+
+# Subread is designed to issue a warning if free memory is below 3 GiB.
+# It currently does not check free memory on NetBSD due to the lack of
+# libsysinfo.  We could add NetBSD-specific code, but it would be a better use
+# of time to port libsysinfo to NetBSD since it's useful for other apps.
+# The libsysinfo package is only for SunOS at the time of this writing.
+# FreeBSD has a libsysinfo port that may serve as a model for NetBSD.
+NOT_FOR_PLATFORMS+=    NetBSD-*-*
+
+USE_TOOLS+=    gmake
+
+WRKSRC=                ${WRKDIR}/subread-2.0.8-source/src
+
+CFLAGS+=       -fcommon
+MAKE_FILE=     ${FILESDIR}/Makefile.pkg
+INSTALL_TARGET=        install-strip
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/biology/subread/PLIST
diff -u /dev/null pkgsrc/biology/subread/PLIST:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/PLIST        Mon Jan 20 17:29:58 2025
@@ -0,0 +1,17 @@
+@comment $NetBSD: PLIST,v 1.1 2025/01/20 17:29:58 bacon Exp $
+bin/detectionCall
+bin/exactSNP
+bin/featureCounts
+bin/flattenGTF
+bin/genRandomReads
+bin/propmapped
+bin/qualityScores
+bin/removeDup
+bin/repair
+bin/subindel
+bin/subjunc
+bin/sublong
+bin/subread-align
+bin/subread-buildindex
+bin/subread-fullscan
+bin/txUnique
Index: pkgsrc/biology/subread/distinfo
diff -u /dev/null pkgsrc/biology/subread/distinfo:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/distinfo     Mon Jan 20 17:29:58 2025
@@ -0,0 +1,17 @@
+$NetBSD: distinfo,v 1.1 2025/01/20 17:29:58 bacon Exp $
+
+BLAKE2s (subread-2.0.8-source.tar.gz) = ddf9b8e627210aa133e019496deb90fdba8a387585ca9403fa630192f44211ee
+SHA512 (subread-2.0.8-source.tar.gz) = 740c14243fbf24ccd7316966788575f8f310a442acd8bb978e330797805b9568fb719cde28afb9e747170c92835b1661c12ce045e3bf1452a71e0286d73a0ad7
+Size (subread-2.0.8-source.tar.gz) = 26074498 bytes
+SHA1 (patch-HelperFunctions.c) = fac250be541ec76fef1cb439a4849050fd8be420
+SHA1 (patch-core-junction.c) = 481cd069aa42d673bbc10c80bb9548547e808b0c
+SHA1 (patch-gene-algorithms.c) = 35667746d92a3060a70229d69cdefd862da1a4c1
+SHA1 (patch-input-files.c) = 5058ff5d00b2afb57ff4127a7ba737753cb47c58
+SHA1 (patch-long-hashtable.c) = 794139ee464a313a424ca929e3009df99d57dbf6
+SHA1 (patch-longread-one_LRMsorted-hashtable.c) = d46ea9b73dee4f0531a002c22099865e3cce1034
+SHA1 (patch-longread-one_Makefile) = 138e6cf370a1b566738eb98793d40a61b4837320
+SHA1 (patch-longread-one_longread-mapping.c) = de09092da544f2286f4a5fee7a70c08135e44b40
+SHA1 (patch-read-repair.c) = 4d7085ec8558647c7d92f5d0697b04b526496a75
+SHA1 (patch-sambam-file.c) = 16d3bf05718db64518cfd94e6574b2c3a0794c79
+SHA1 (patch-sorted-hashtable.c) = 36d4668a3fac89b7b8fa750197962d17deaa4ed5
+SHA1 (patch-subread.h) = b3d27a6f964ffece4b51ec59d5fd95fbd6ead160

Index: pkgsrc/biology/subread/files/Makefile.pkg
diff -u /dev/null pkgsrc/biology/subread/files/Makefile.pkg:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/files/Makefile.pkg   Mon Jan 20 17:29:58 2025
@@ -0,0 +1,104 @@
+
+
+include makefile.version
+
+CCFLAGS = -DMAKE_FOR_EXON  -DMAKE_STANDALONE \
+       -DSUBREAD_VERSION=\"${SUBREAD_VERSION}\"  -D_FILE_OFFSET_BITS=64
+LDFLAGS += -DMAKE_FOR_EXON -DMAKE_STANDALONE -pthread -lz -lm
+CC ?= gcc
+CC += ${CCFLAGS}
+
+BINS   = detectionCall sublong repair txUnique featureCounts removeDup \
+       exactSNP subread-buildindex subindel  subread-align subjunc \
+       qualityScores subread-fullscan propmapped flattenGTF \
+
+MKDIR  ?= mkdir -p
+INSTALL        ?= install
+DESTDIR        ?= .
+PREFIX ?= local
+STRIP  ?= strip
+
+ALL_LIBS= core core-junction core-indel sambam-file sublog gene-algorithms hashtable input-files sorted-hashtable gene-value-index exon-algorithms HelperFunctions interval_merge long-hashtable 
core-bigtable seek-zlib input-blc
+ALL_OBJECTS=$(addsuffix .o, ${ALL_LIBS})
+ALL_H=$(addsuffix .h, ${ALL_LIBS})
+ALL_C=$(addsuffix .c, ${ALL_LIBS})
+
+all: genRandomReads detectionCall sublong repair txUnique featureCounts removeDup exactSNP subread-buildindex subindel  subread-align subjunc qualityScores subread-fullscan propmapped flattenGTF # 
samMappedBases mergeVCF  testZlib
+       mkdir -p ../bin/utilities
+       mv longread-one/LRM longread-one/sublong
+       mv longread-one/sublong subread-align subjunc featureCounts  subindel exactSNP subread-buildindex ../bin/
+       mv detectionCall genRandomReads repair propmapped qualityScores removeDup subread-fullscan txUnique flattenGTF ../bin/utilities
+
+sublong: longread-one/longread-mapping.c  ${ALL_OBJECTS}
+       echo " " > longread-one/make.version
+       rm -f longread-one/*.o
+       cd longread-one && $(MAKE)
+
+genRandomReads: gen_rand_reads.c ${ALL_OBJECTS}
+       ${CC} -o genRandomReads gen_rand_reads.c ${ALL_OBJECTS} ${LDFLAGS}
+
+flattenGTF: flattenAnnotations.c ${ALL_OBJECTS}
+       ${CC} -o flattenGTF flattenAnnotations.c  ${ALL_OBJECTS} ${LDFLAGS}
+
+detectionCall: detection-calls.c        ${ALL_OBJECTS}
+       ${CC} -o detectionCall detection-calls.c  ${ALL_OBJECTS} ${LDFLAGS}
+
+repair: read-repair.c   ${ALL_OBJECTS}
+       ${CC} -o repair read-repair.c  ${ALL_OBJECTS} ${LDFLAGS}
+
+txUnique: tx-unique.c tx-unique.h       ${ALL_OBJECTS}
+       ${CC} -o txUnique tx-unique.c  ${ALL_OBJECTS} ${LDFLAGS}
+
+globalReassembly: global-reassembly.c ${ALL_OBJECTS}
+       ${CC} -o globalReassembly  global-reassembly.c ${ALL_OBJECTS} ${LDFLAGS}
+
+propmapped: propmapped.c ${ALL_OBJECTS}
+       ${CC} -o propmapped propmapped.c ${ALL_OBJECTS} ${LDFLAGS}
+
+exactSNP: SNPCalling.c SNPCalling.h  ${ALL_OBJECTS}
+       ${CC}  -o exactSNP SNPCalling.c  ${ALL_OBJECTS} ${LDFLAGS}
+
+subread-buildindex: index-builder.c subread.h ${ALL_OBJECTS}
+       ${CC}  -o subread-buildindex  index-builder.c ${ALL_OBJECTS} ${LDFLAGS}
+
+removeDup: removeDupReads.c removeDupReads.h subread.h ${ALL_OBJECTS}
+       ${CC} -o  removeDup removeDupReads.c  ${ALL_OBJECTS} ${LDFLAGS}
+
+subindel: SUBindel.c core.h subread.h  ${ALL_OBJECTS}
+       ${CC} -o subindel SUBindel.c ${ALL_OBJECTS} ${LDFLAGS}
+
+featureCounts: readSummary.c subread.h  ${ALL_OBJECTS}
+       ${CC} -o featureCounts readSummary.c ${ALL_OBJECTS} ${LDFLAGS}
+
+subread-align: core-interface-aligner.c  ${ALL_OBJECTS}
+       ${CC} -o subread-align core-interface-aligner.c  ${ALL_OBJECTS} ${LDFLAGS} 
+
+subjunc: core-interface-subjunc.c  ${ALL_OBJECTS}
+       ${CC} -o subjunc core-interface-subjunc.c  ${ALL_OBJECTS} ${LDFLAGS} 
+
+subtools: subtools.c ${ALL_OBJECTS}
+       ${CC} -o subtools subtools.c ${ALL_OBJECTS} ${LDFLAGS} 
+
+qualityScores: qualityScores.c ${ALL_OBJECTS}
+       ${CC} -o qualityScores qualityScores.c  ${ALL_OBJECTS}  ${LDFLAGS}
+
+subread-fullscan: fullscan.c  ${ALL_OBJECTS}
+       ${CC} -o subread-fullscan fullscan.c  ${ALL_OBJECTS}  ${LDFLAGS}
+
+.PHONY:        clean install install-strip
+
+install-strip: install
+       ${STRIP} ${DESTDIR}${PREFIX}/bin/*
+
+install:
+       ${MKDIR} ${DESTDIR}${PREFIX}/bin
+       ${INSTALL} -c \
+               ../bin/exactSNP \
+               ../bin/featureCounts \
+               ../bin/sub* \
+               ../bin/utilities/* \
+               ${DESTDIR}${PREFIX}/bin
+
+clean:
+       rm -f core featureCounts exactSNP removeDup subread-buildindex \
+               ${ALL_OBJECTS}

Index: pkgsrc/biology/subread/patches/patch-HelperFunctions.c
diff -u /dev/null pkgsrc/biology/subread/patches/patch-HelperFunctions.c:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-HelperFunctions.c      Mon Jan 20 17:29:59 2025
@@ -0,0 +1,57 @@
+$NetBSD: patch-HelperFunctions.c,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Use standard compiler macros
+
+--- HelperFunctions.c.orig     2024-07-25 00:30:10.000000000 +0000
++++ HelperFunctions.c
+@@ -26,7 +26,7 @@
+ #include <pthread.h>
+ 
+ 
+-#ifdef MACOS
++#ifdef __APPLE__
+ 
+ #include <sys/types.h>
+ #include <sys/socket.h>
+@@ -47,8 +47,10 @@
+ #include <sys/ioctl.h>
+ #include <netinet/in.h>
+ #include <net/if.h>
++#ifndef __APPLE__
+ #include <sys/sysinfo.h>
+ #endif
++#endif
+ #include <sys/types.h>
+ #endif
+ 
+@@ -860,10 +862,10 @@ int strcmp_number(char * s1, char * s2)
+ 
+ int mac_str(char * str_buff)
+ {
+-#if defined(FREEBSD) || defined(__MINGW32__)
++#if defined(__FreeBSD__) || defined(__MINGW32__)
+       return 1;
+ #else
+-#ifdef MACOS
++#ifdef __APPLE__
+     int         mib[6], x1, ret = 1;
+       size_t          len;
+     char            *buf;
+@@ -2719,7 +2721,7 @@ void main(){
+ 
+ int get_free_total_mem(size_t * total, size_t * free_mem){
+ 
+-#ifdef FREEBSD
++#ifdef __FreeBSD__
+     return -1;
+ #endif
+ 
+@@ -2731,7 +2733,7 @@ int get_free_total_mem(size_t * total, s
+       (*free_mem) = statex.ullAvailPhys;
+       return 0;
+ #else
+-#ifdef MACOS
++#ifdef __APPLE__
+     mach_msg_type_number_t count = HOST_VM_INFO_COUNT;
+     vm_statistics_data_t vmstat;
+     int page_size = getpagesize();
Index: pkgsrc/biology/subread/patches/patch-core-junction.c
diff -u /dev/null pkgsrc/biology/subread/patches/patch-core-junction.c:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-core-junction.c        Mon Jan 20 17:29:59 2025
@@ -0,0 +1,14 @@
+$NetBSD: patch-core-junction.c,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Portability
+
+--- core-junction.c.orig       2018-11-08 15:19:02 UTC
++++ core-junction.c
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ #include <ctype.h>
+ #include <assert.h>
++#include <unistd.h>
+ #include "subread.h"
+ #include "sublog.h"
+ #include "gene-value-index.h"
Index: pkgsrc/biology/subread/patches/patch-gene-algorithms.c
diff -u /dev/null pkgsrc/biology/subread/patches/patch-gene-algorithms.c:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-gene-algorithms.c      Mon Jan 20 17:29:59 2025
@@ -0,0 +1,60 @@
+$NetBSD: patch-gene-algorithms.c,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Use standard compiler macros
+
+--- gene-algorithms.c.orig     2024-07-25 00:30:10.000000000 +0000
++++ gene-algorithms.c
+@@ -29,7 +29,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ 
+-#ifndef FREEBSD
++#ifndef __FreeBSD__
+ #include <sys/timeb.h>
+ #endif
+ 
+@@ -45,7 +45,7 @@ void non_func(const char * fmt, ...)
+ 
+ void subread_lock_release(subread_lock_t * lock)
+ {
+-      #ifdef MACOS
++      #ifdef __APPLE__
+       pthread_mutex_unlock(lock);
+       #else
+       pthread_spin_unlock(lock);
+@@ -54,7 +54,7 @@ void subread_lock_release(subread_lock_t
+ void subread_lock_occupy(subread_lock_t * lock)
+ {
+ 
+-      #ifdef MACOS
++      #ifdef __APPLE__
+       pthread_mutex_lock(lock);
+       #else
+       pthread_spin_lock(lock);
+@@ -62,7 +62,7 @@ void subread_lock_occupy(subread_lock_t
+ }
+ 
+ void subread_destroy_lock(subread_lock_t * lock) {
+-      #ifdef MACOS
++      #ifdef __APPLE__
+       pthread_mutex_destroy(lock);
+       #else
+       pthread_spin_destroy(lock);
+@@ -71,7 +71,7 @@ void subread_destroy_lock(subread_lock_t
+ 
+ void subread_init_lock(subread_lock_t * lock)
+ {
+-      #ifdef MACOS
++      #ifdef __APPLE__
+       pthread_mutex_init(lock, NULL);
+       #else
+       pthread_spin_init(lock, PTHREAD_PROCESS_PRIVATE);
+@@ -1378,7 +1378,7 @@ int load_offsets(gene_offset_t* offsets
+ 
+ double miltime(){
+       double ret;
+-      #ifdef FREEBSD
++      #ifdef __FreeBSD__
+               struct timeval tp;
+               struct timezone tz;
+               tz.tz_minuteswest=0;
Index: pkgsrc/biology/subread/patches/patch-input-files.c
diff -u /dev/null pkgsrc/biology/subread/patches/patch-input-files.c:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-input-files.c  Mon Jan 20 17:29:59 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-input-files.c,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Use standard compiler macros
+
+--- input-files.c.orig 2024-07-26 04:36:04.000000000 +0000
++++ input-files.c
+@@ -48,7 +48,7 @@ FILE * f_subr_open(const char * fname, c
+ #ifdef __MINGW32__
+               return fopen64(fname, mode);
+ #else
+-#if defined(__LP64__) || defined(_LP64) || defined(MACOS) 
++#if defined(__LP64__) || defined(_LP64) || defined(__APPLE__) || defined(__FreeBSD__)
+               return fopen(fname, mode);
+ #else
+               return fopen64(fname, mode);
Index: pkgsrc/biology/subread/patches/patch-long-hashtable.c
diff -u /dev/null pkgsrc/biology/subread/patches/patch-long-hashtable.c:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-long-hashtable.c       Mon Jan 20 17:29:59 2025
@@ -0,0 +1,17 @@
+$NetBSD: patch-long-hashtable.c,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Use standard compiler macros
+
+--- long-hashtable.c.orig      2024-07-25 00:30:10.000000000 +0000
++++ long-hashtable.c
+@@ -21,8 +21,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#ifndef MACOS
+-#ifndef FREEBSD
++#ifndef __APPLE__
++#ifndef __FreeBSD__
+ #include <malloc.h>
+ #endif
+ #endif
Index: pkgsrc/biology/subread/patches/patch-longread-one_LRMsorted-hashtable.c
diff -u /dev/null pkgsrc/biology/subread/patches/patch-longread-one_LRMsorted-hashtable.c:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-longread-one_LRMsorted-hashtable.c     Mon Jan 20 17:29:59 2025
@@ -0,0 +1,19 @@
+$NetBSD: patch-longread-one_LRMsorted-hashtable.c,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Use standard compiler macros
+
+--- longread-one/LRMsorted-hashtable.c.orig    2018-11-08 14:47:43 UTC
++++ longread-one/LRMsorted-hashtable.c
+@@ -22,11 +22,9 @@
+ #include <string.h>
+ #include "LRMsorted-hashtable.h"
+ 
+-#ifndef MACOS
+-#ifndef FREEBSD
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
+ #include <malloc.h>
+ #endif
+-#endif
+ 
+ #include<math.h>
+ #include "LRMfile-io.h"
Index: pkgsrc/biology/subread/patches/patch-longread-one_Makefile
diff -u /dev/null pkgsrc/biology/subread/patches/patch-longread-one_Makefile:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-longread-one_Makefile  Mon Jan 20 17:29:59 2025
@@ -0,0 +1,36 @@
+$NetBSD: patch-longread-one_Makefile,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Respect env
+
+--- longread-one/Makefile.orig 2024-07-25 00:35:55 UTC
++++ longread-one/Makefile
+@@ -1,12 +1,12 @@
+-CC_EXEC = gcc
+ OPT_LEVEL = 3
+ 
+ include ../makefile.version
+ include make.version
+ 
+-CCFLAGS =  ${MACOS} -O${OPT_LEVEL} -Wall  -DMAKE_FOR_EXON  -D MAKE_STANDALONE  -D_FILE_OFFSET_BITS=64 -DSUBREAD_VERSION=\"${SUBREAD_VERSION}\" ${WARNING_LEVEL} ${MINGW32}
+-LDFLAGS =  -lpthread -lz -lm -O${OPT_LEVEL} -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST
+-CC = ${CC_EXEC}  ${CCFLAGS}  -fmessage-length=0  -ggdb
++CC ?= gcc
++CCFLAGS += -DMAKE_FOR_EXON  -D MAKE_STANDALONE  -D_FILE_OFFSET_BITS=64 \
++          -DSUBREAD_VERSION=\"${SUBREAD_VERSION}\" ${WARNING_LEVEL} ${MINGW32}
++LDFLAGS +=  -lpthread -lz -lm -O${OPT_LEVEL} -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST
+ 
+ ALL_LIBS=LRMsorted-hashtable LRMbase-index LRMchro-event LRMhelper LRMseek-zlib LRMfile-io LRMhashtable
+ ALL_OBJECTS=$(addsuffix .o, ${ALL_LIBS})
+@@ -19,9 +19,8 @@ clean:
+ clean:
+       rm -f *.o LRM
+ 
+-LRM: longread-mapping.c  ${ALL_OBJECTS} 
+-      ${CC} -o LRM longread-mapping.c   ${ALL_OBJECTS}  ${LDFLAGS}
++LRM: longread-mapping.c  ${ALL_OBJECTS}
++      ${CC} -o LRM ${CFLAGS} longread-mapping.c   ${ALL_OBJECTS}  ${LDFLAGS}
+ 
+ $(ALL_OBJECTS): $(ALL_C) $(ALL_H)
+-      $(CC) -o $@ -c $(subst .o,.c,$@)
+-      
++      $(CC) -o $@ -c ${CFLAGS} $(subst .o,.c,$@)
Index: pkgsrc/biology/subread/patches/patch-longread-one_longread-mapping.c
diff -u /dev/null pkgsrc/biology/subread/patches/patch-longread-one_longread-mapping.c:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-longread-one_longread-mapping.c        Mon Jan 20 17:29:59 2025
@@ -0,0 +1,42 @@
+$NetBSD: patch-longread-one_longread-mapping.c,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Add FreeBSD support
+
+--- longread-one/longread-mapping.c.orig       2021-03-30 13:58:29 UTC
++++ longread-one/longread-mapping.c
+@@ -30,7 +30,9 @@
+ #ifndef __MINGW32__
+ #include <sys/resource.h>
+ #endif
++#ifndef __FreeBSD__
+ #include <sys/timeb.h>
++#endif
+ #include <sys/stat.h>
+ #include <locale.h>
+ #include <ctype.h>
+@@ -225,6 +227,17 @@ int LRMvalidate_and_init_context(LRMcontext_t ** conte
+ #endif
+ double LRMmiltime(){
+       double ret;
++#ifdef __FreeBSD__
++
++      struct timeval tp;
++      struct timezone tz;
++      tz.tz_minuteswest=0;
++      tz.tz_dsttime=0;
++      gettimeofday(&tp,&tz);
++      ret = tp.tv_sec+ 0.001*0.001* tp.tv_usec; 
++
++#else
++
+       #ifdef LRM_CLOCK_USE_GETTIME
+       struct timespec tsc;
+       clock_gettime(CLOCK_REALTIME, &tsc);
+@@ -235,6 +248,7 @@ double LRMmiltime(){
+       ret = trp.time*1.0+(trp.millitm*1.0/1000.0);
+       #endif
+ 
++#endif
+       return ret;
+ }
+ 
Index: pkgsrc/biology/subread/patches/patch-read-repair.c
diff -u /dev/null pkgsrc/biology/subread/patches/patch-read-repair.c:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-read-repair.c  Mon Jan 20 17:29:59 2025
@@ -0,0 +1,14 @@
+$NetBSD: patch-read-repair.c,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Portability
+
+--- read-repair.c.orig 2018-11-08 15:20:06 UTC
++++ read-repair.c
+@@ -3,6 +3,7 @@
+ #include <string.h>
+ #include <getopt.h>
+ #include <zlib.h>
++#include <unistd.h>
+ #include "subread.h"
+ #include "core.h"
+ #include "input-files.h"
Index: pkgsrc/biology/subread/patches/patch-sambam-file.c
diff -u /dev/null pkgsrc/biology/subread/patches/patch-sambam-file.c:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-sambam-file.c  Mon Jan 20 17:29:59 2025
@@ -0,0 +1,14 @@
+$NetBSD: patch-sambam-file.c,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Portability
+
+--- sambam-file.c.orig 2024-07-25 00:30:10.000000000 +0000
++++ sambam-file.c
+@@ -30,6 +30,7 @@
+ #include <string.h>
+ #include <assert.h>
+ #include <ctype.h>
++#include <unistd.h>
+ #include "subread.h"
+ #include "core.h"
+ #include "HelperFunctions.h"
Index: pkgsrc/biology/subread/patches/patch-sorted-hashtable.c
diff -u /dev/null pkgsrc/biology/subread/patches/patch-sorted-hashtable.c:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-sorted-hashtable.c     Mon Jan 20 17:29:59 2025
@@ -0,0 +1,19 @@
+$NetBSD: patch-sorted-hashtable.c,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Use standard compiler macros
+
+--- sorted-hashtable.c.orig    2018-11-08 03:33:50 UTC
++++ sorted-hashtable.c
+@@ -23,11 +23,9 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#ifndef MACOS
+-#ifndef FREEBSD
++#if !defined(__FreeBSD__) && !defined(__APPLE__)
+ #include <malloc.h>
+ #endif
+-#endif
+ 
+ #include<math.h>
+ #include"core.h"
Index: pkgsrc/biology/subread/patches/patch-subread.h
diff -u /dev/null pkgsrc/biology/subread/patches/patch-subread.h:1.1
--- /dev/null   Mon Jan 20 17:29:59 2025
+++ pkgsrc/biology/subread/patches/patch-subread.h      Mon Jan 20 17:29:59 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-subread.h,v 1.1 2025/01/20 17:29:59 bacon Exp $
+
+# Use standard compiler macros
+
+--- subread.h.orig     2024-07-25 00:30:10.000000000 +0000
++++ subread.h
+@@ -114,7 +114,7 @@
+ #define USE_POSIX_MUTEX_LOCK
+ #endif
+ 
+-#if defined(MACOS) || defined(FREEBSD) || defined(USE_POSIX_MUTEX_LOCK)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(USE_POSIX_MUTEX_LOCK)
+ typedef pthread_mutex_t subread_lock_t;
+ #define pthread_spinlock_t pthread_mutex_t
+ #define pthread_spin_lock pthread_mutex_lock



Home | Main Index | Thread Index | Old Index