summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-10-03 21:03:36 +0200
committerDavid Seifert <soap@gentoo.org>2016-10-03 22:21:11 +0200
commitd3404c9626508bde878928d7f0ece6e392b5808d (patch)
tree7ea68ac9bcafc44c01c86c90b8dbb6fc465408c7 /sci-biology/consed
parentsci-biology/phrap: Revbump to EAPI=6 (diff)
downloadgentoo-d3404c9626508bde878928d7f0ece6e392b5808d.tar.gz
gentoo-d3404c9626508bde878928d7f0ece6e392b5808d.tar.bz2
gentoo-d3404c9626508bde878928d7f0ece6e392b5808d.zip
sci-biology/consed: Version bump to 29
* EAPI=6 * Allow for compiling with GCC 6 * [QA] Respect all user variables (CC, CXX, ...) * [QA] Fix various C and C++ related warnings * Fix perl shebangs to be portable Package-Manager: portage-2.3.1
Diffstat (limited to 'sci-biology/consed')
-rw-r--r--sci-biology/consed/Manifest2
-rw-r--r--sci-biology/consed/consed-29.ebuild111
-rw-r--r--sci-biology/consed/files/consed-29-fix-build-system.patch197
-rw-r--r--sci-biology/consed/files/consed-29-fix-c++14.patch376
-rw-r--r--sci-biology/consed/files/consed-29-fix-perl-shebang.patch701
-rw-r--r--sci-biology/consed/files/consed-29-fix-qa.patch275
6 files changed, 1662 insertions, 0 deletions
diff --git a/sci-biology/consed/Manifest b/sci-biology/consed/Manifest
index e9cd6b128266..6761fedbfeea 100644
--- a/sci-biology/consed/Manifest
+++ b/sci-biology/consed/Manifest
@@ -2,3 +2,5 @@ DIST consed-19-linux.tar.gz 29835559 SHA256 27501d714e4cd7ea04def6a7f985b674bc45
DIST consed-19-sources.tar.gz 6867357 SHA256 1db37b17608e49470926dae261c76d400cf3f9eb5feea52cd732e0bfa4cadee3
DIST consed-27-linux.tar.gz 1604 SHA256 d7baafcbcdbf1b25262578511da8a51758f48d97d9109b334978acd150461855 SHA512 dbafb8c8f40dbed82a0000314549452c372e447467ccd8ec1004f44946dd09fcffa065c36bcca4f3c0fd55a137e570c135f4f79820e3e6d98626f92413b2731b WHIRLPOOL ae319734572558dd0047dad085c9f907386be6f7f0041bac0df9e1ce5b7558c750d92ea747cc3e74c594c83bed4cd73f4b37b4d6b9e39fd7caa2a733d67d6e21
DIST consed-27-sources.tar.gz 1604 SHA256 d7baafcbcdbf1b25262578511da8a51758f48d97d9109b334978acd150461855 SHA512 dbafb8c8f40dbed82a0000314549452c372e447467ccd8ec1004f44946dd09fcffa065c36bcca4f3c0fd55a137e570c135f4f79820e3e6d98626f92413b2731b WHIRLPOOL ae319734572558dd0047dad085c9f907386be6f7f0041bac0df9e1ce5b7558c750d92ea747cc3e74c594c83bed4cd73f4b37b4d6b9e39fd7caa2a733d67d6e21
+DIST consed-29-linux.tar.gz 36172715 SHA256 98354e2507ef9026b82c89db199ff1de7e4ec3686fccd691d215acdcde34ce39 SHA512 63a95d84cb58009045a9d898c8b1a94f98516bed9189f624a5930338cc8f51562504257f309d945fafcc07e0811ffeea122b640789f75fbd6c94535178dab4dd WHIRLPOOL 26ebc1ee7114b0c609fd36c2c46b71c399bacb61f7db285ab36f296902964c14518c058e814a166b20a36c2d320280aeed0ca18b7104c6b503324bf27d4b57af
+DIST consed-29-sources.tar.gz 3258845 SHA256 e7d3c2bf60e0bb22025e0416d16cf9864fec8091811ec285a39db4cb46bc3fc6 SHA512 fd711a65a02ef1238cca12b90fe7fa9b67da6c37d43cd105f38c7b6475fbc073c1f4d7f99703dec9d3a0a7a2a9317cb14999a114bb6f52589cb9b6e34700eb93 WHIRLPOOL 5ac363f049b6b40554112f830e812e7ab7d334a0f6707ea4da981ed1e468109f3bd7669382aa77e93cf12c78cc95fb1085711dcc972c7ff22ffe6b73056bb2c2
diff --git a/sci-biology/consed/consed-29.ebuild b/sci-biology/consed/consed-29.ebuild
new file mode 100644
index 000000000000..159e10768847
--- /dev/null
+++ b/sci-biology/consed/consed-29.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="A genome sequence finishing program"
+HOMEPAGE="http://bozeman.mbt.washington.edu/consed/consed.html"
+SRC_URI="
+ ${P}-sources.tar.gz
+ ${P}-linux.tar.gz"
+
+LICENSE="phrap"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+COMMON_DEPEND="
+ x11-libs/libX11
+ x11-libs/motif:0
+ sci-biology/samtools:0.1-legacy
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-lang/perl
+ >=sci-biology/phred-071220-r1
+ >=sci-biology/phrap-1.080812-r2
+"
+
+S="${WORKDIR}"
+
+RESTRICT="fetch"
+PATCHES=(
+ "${FILESDIR}/${PN}-29-fix-build-system.patch"
+ "${FILESDIR}/${PN}-29-fix-c++14.patch"
+ "${FILESDIR}/${PN}-29-fix-qa.patch"
+ "${FILESDIR}/${PN}-29-fix-perl-shebang.patch"
+)
+
+pkg_nofetch() {
+ einfo "Please visit ${HOMEPAGE} and obtain the file"
+ einfo "\"sources.tar.gz\", then rename it to \"${P}-sources.tar.gz\""
+ einfo "and place it in ${DISTDIR},"
+ einfo "obtain the file"
+ einfo "\"consed_linux.tar.gz\", then rename it to \"${P}-linux.tar.gz\""
+ einfo "and place it in ${DISTDIR}"
+}
+
+src_prepare() {
+ default
+
+ sed \
+ -e "s!\$szPhredParameterFile = .*!\$szPhredParameterFile = \$ENV{'PHRED_PARAMETER_FILE'} || \'"${EPREFIX}"/usr/share/phred/phredpar.dat\';!" \
+ -e "s:/usr/local/genome:${EPREFIX}/usr:" \
+ -e "s:niceExe = \"/bin/nice\":niceExe = \"${EPREFIX}/usr/bin/nice\":" \
+ -e "s:/wt1/gordon/genome:${EPREFIX}/usr/bin:" \
+ -i scripts/* contributions/* || die
+}
+
+src_configure() {
+ append-cflags -std=gnu99
+ append-lfs-flags
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ SAMTOOLS_CPPFLAGS="-I${EPREFIX}/usr/include/bam-0.1-legacy" \
+ LIBS="-L${EPREFIX}/usr/$(get_libdir)" \
+ X11_LIBS="$($(tc-getPKG_CONFIG) --libs x11)" \
+ SAMTOOLS_LIBS="-lbam-0.1-legacy"
+}
+
+src_install() {
+ dobin consed misc/{mktrace/mktrace,phd2fasta/phd2fasta,454/sff2scf} scripts/* contributions/*
+
+ insinto /usr/lib/screenLibs
+ doins misc/*.{fa*,seq}
+
+ if use examples; then
+ insinto /usr/share/${PN}/examples
+ doins -r \
+ standard polyphred autofinish assembly_view 454_newbler \
+ align454reads align454reads_answer solexa_example \
+ solexa_example_answer selectRegions selectRegionsAnswer
+ fi
+
+ cat > 99consed <<-_EOF_ || die
+ CONSED_HOME=${EPREFIX}/usr
+ CONSED_PARAMETERS=${EPREFIX}/etc/consedrc
+ _EOF_
+ doenvd 99consed
+
+ dodoc README.txt *_announcement.txt
+}
+
+pkg_postinst() {
+ einfo "Package documentation is available at"
+ einfo "http://www.phrap.org/consed/distributions/README.${PV}.0.txt"
+}
diff --git a/sci-biology/consed/files/consed-29-fix-build-system.patch b/sci-biology/consed/files/consed-29-fix-build-system.patch
new file mode 100644
index 000000000000..27c9c552fe3f
--- /dev/null
+++ b/sci-biology/consed/files/consed-29-fix-build-system.patch
@@ -0,0 +1,197 @@
+Make build system semi-sane:
+* Respect CC, CXX, CFLAGS, CXXFLAGS, CPPFLAGS, LDFLAGS and LIBS
+* Remove default optimisation flags
+* Remove -fpermissive from DEFS (as source builds fine now)
+* Add large file support (LFS) via CPPFLAGS and not in Makefile
+
+--- a/makefile
++++ b/makefile
+@@ -47,23 +47,20 @@
+ #
+ # compilation
+ #
+-CXX= g++
+-KRCC= gcc
+-CC=gcc
++CXX ?= g++
++CC ?= gcc
+
+ #
+ #
+-CFLGS= -w -DINLINE_RWTPTRORDEREDVECTOR -DINLINE_RWTVALORDEREDVECTOR -DINLINE_MBTVALVECTOR -DLINUX_COMPILE -DSOCKLEN_T_DEFINED -D__BOOL_DEFINED -DANSI_C -DOFSTREAM_OPEN_WITHOUT_PERMISSIONS -fpermissive -DNO_POUND_POUND_MACROS -DUSE_USING_IN_PUBLIC_TEMPLATE_CLASSES -DINT_CHAR_OPERATOR -D_FILE_OFFSET_BITS=64 -DSAMTOOLS_AVAILABLE
++DEFS = -DINLINE_RWTPTRORDEREDVECTOR -DINLINE_RWTVALORDEREDVECTOR -DINLINE_MBTVALVECTOR -DLINUX_COMPILE -DSOCKLEN_T_DEFINED -D__BOOL_DEFINED -DANSI_C -DOFSTREAM_OPEN_WITHOUT_PERMISSIONS -DNO_POUND_POUND_MACROS -DUSE_USING_IN_PUBLIC_TEMPLATE_CLASSES -DINT_CHAR_OPERATOR -DSAMTOOLS_AVAILABLE
+
+-OPT= -O
+ #
+ # Include directory for template classes must be included
+ # in both compilation & link lines, even if .h file is
+ # found in default path. C front, gotta love it.
+ #
+-INC= -I/usr/X11R6/include -I/me1/gordon/samtools/samtools-0.1.18
++INCLUDES = $(SAMTOOLS_CPPFLAGS)
+
+-DEPENDENCIES=
+ #
+ #
+ # Linking
+@@ -80,12 +77,9 @@
+ # /lib/ld-linux.so.2 (0x003ee000)
+ #
+ # To fix cut/paste bug, I've made X11 always dynamic.
+-CLIBS= -lX11
+-LPATH= -L/usr/X11R6/lib
+-ARCHIVES= /usr/X11R6/lib/libXm.a \
+-/usr/X11R6/lib/libXt.a /usr/X11R6/lib/libSM.a \
+-/usr/X11R6/lib/libICE.a /usr/X11R6/lib/libXext.a /usr/X11R6/lib/libXmu.a \
+-/usr/X11R6/lib/libXp.a /usr/lib/libm.a /me1/gordon/samtools/samtools-0.1.18/libbam.a /me1/gordon/samtools/samtools-0.1.18/bcftools/libbcf.a /me1/gordon/zlib/zlib-1.2.5/libz.a
++
++MOTIF_LIBS ?= -lXt -lXm
++ALL_LIBS = $(LIBS) $(MOTIF_LIBS) $(X11_LIBS) $(SAMTOOLS_LIBS)
+
+
+
+@@ -94,7 +88,6 @@
+ #
+ #LDFLGS= -g
+ # static linking
+-LDFLGS= -g -rdynamic
+
+ #
+ # the subdirectory used by cfront compilers gets cleaned
+@@ -112,10 +105,10 @@
+ # general compilation rules for .cpp, .cxx, .c files
+ #
+ .cpp.o:
+- $(CXX) $(CFLGS) $(OPT) $(INC) -c $<
++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $(DEFS) -c $<
+
+ .c.o:
+- $(CXX) $(CFLGS) $(OPT) $(INC) -c $<
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $(DEFS) -c $<
+
+ #
+ # targets file included in generated makefile
+@@ -593,17 +586,23 @@
+ writeToRewriteReferenceFile.o \
+ xsynchronize.o
+
++SUBDIRS := misc/454 misc/mktrace misc/phd2fasta
++
++all: consed $(SUBDIRS)
++
++$(SUBDIRS):
++ $(MAKE) -C $@
++
++.PHONY: all $(SUBDIRS)
++
+ consed: $(CONSED_OBJS) makefile checkLicenseKeyStub.o
+- $(CXX) $(INC) $(LDFLGS) -o consed $(CONSED_OBJS) checkLicenseKeyStub.o \
+- $(ARCHIVES) $(LPATH) $(WARNINGS) $(CLIBS) $(XLIBS)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) -o consed $(CONSED_OBJS) checkLicenseKeyStub.o $(ALL_LIBS)
+
+ trial_consed: $(CONSED_OBJS) makefile checkLicenseKey.o
+- $(CXX) $(INC) $(LDFLGS) -o trial_consed $(CONSED_OBJS) checkLicenseKey.o \
+- $(ARCHIVES) $(LPATH) $(WARNINGS) $(CLIBS) $(XLIBS)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) -o trial_consed $(CONSED_OBJS) checkLicenseKey.o $(ALL_LIBS)
+
+ pure: $(CONSED_OBJS) makefile checkLicenseKeyStub.o
+- $(PURIFY) $(CXX) $(INC) $(LDFLGS) -o consed $(CONSED_OBJS) checkLicenseKeyStub.o \
+- $(ARCHIVES) $(LPATH) $(WARNINGS) $(CLIBS) $(XLIBS)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) -o consed $(CONSED_OBJS) checkLicenseKeyStub.o $(ALL_LIBS)
+
+ clean:
+ rm -rf *.o core $(TEMPLATE_DIR)
+@@ -613,15 +612,15 @@
+ # the Solaris 5.x compiler cannot optimize the following
+
+ consedResources.o:
+- $(CXX) $(WARNINGS) $(CFLGS) $(INC) $(DEPENDENCIES) -c consedResources.cpp
++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $(DEFS) -c consedResources.cpp
+
+ consedResources2.o:
+- $(CXX) $(WARNINGS) $(CFLGS) $(INC) $(DEPENDENCIES) -c consedResources2.cpp
++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $(DEFS) -c consedResources2.cpp
+
+ # tlingit cannot optimize the following:
+
+ guiEditResources.o:
+- $(CXX) $(WARNINGS) $(CFLGS) $(INC) $(DEPENDENCIES) -c guiEditResources.cpp
++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $(DEFS) -c guiEditResources.cpp
+
+ guiEditResources.o : \
+ assemblyViewTagTypeAndLine.h assert.h bIsNumericDouble.h \
+--- a/misc/454/Makefile
++++ b/misc/454/Makefile
+@@ -0,0 +1,16 @@
++CC ?= cc
++LIBM = -lm
++
++DEFS = -DANSI_C
++
++OBJS= sff2scf.c
++
++sff2scf: $(OBJS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBM)
++
++.c.o:
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $<
++
++clean:
++ rm -f $(OBJS) sff2scf
++
+--- a/misc/mktrace/Makefile
++++ b/misc/mktrace/Makefile
+@@ -1,13 +1,17 @@
+-CC= cc
+-CFLAGS= -g
+-CLIB= -lm
++CC ?= cc
++LIBM = -lm
++
++DEFS = -DANSI_C
+
+ OBJS= mktrace.o readFASTA.o writeSCF.o synTrace.o \
+ freeTrace.o rwUtil.o writePhd.o getTime.o \
+ readQUAL.o
+
+ mktrace: $(OBJS)
+- $(CC) $(CFLAGS) -o mktrace $(OBJS) $(CLIB)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBM)
++
++.c.o:
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $<
+
+ clean:
+ rm -f $(OBJS) mktrace
+--- a/misc/phd2fasta/Makefile
++++ b/misc/phd2fasta/Makefile
+@@ -1,8 +1,9 @@
+-CC=cc
+-CFLAGS=-O -w
+-CLIB=-lm
++CC ?= cc
++LIBM = -lm
+
+-OBJ= phd2fasta.o \
++DEFS = -DANSI_C
++
++OBJS= phd2fasta.o \
+ readParam.o initParam.o checkParam.o \
+ freeParam.o helpParam.o \
+ readFOF.o readDIR.o readFOX.o \
+@@ -15,10 +16,11 @@
+
+ INC= phd2fasta.h
+
+-SRC = $(OBJ:.o=.c)
+-
+-phd2fasta: $(OBJ)
+- $(CC) $(CFLAGS) -o phd2fasta $(OBJ) $(CLIB)
++phd2fasta: $(OBJS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBM)
++
++.c.o:
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $<
+
+ clean:
+ rm -f $(OBJ) phd2fasta
diff --git a/sci-biology/consed/files/consed-29-fix-c++14.patch b/sci-biology/consed/files/consed-29-fix-c++14.patch
new file mode 100644
index 000000000000..212b8d63d1e3
--- /dev/null
+++ b/sci-biology/consed/files/consed-29-fix-c++14.patch
@@ -0,0 +1,376 @@
+Fix building with C++14:
+* Add 'noexcept(false)' to throwing destructors in C++11 mode
+* Properly guard C declarations with extern "C" scopes
+* Avoid erroneous overloaded suffix operator errors, due to missing spaces
+* Add explicit casts to avoid -Wnarrowing errors
+* Add 'this->' for dependent identifiers in derived class templates,
+ previously required -fpermissive
+
+--- a/bvAlignedReads.cpp
++++ b/bvAlignedReads.cpp
+@@ -126,7 +126,11 @@
+ }
+
+
+-bvAlignedReads :: ~bvAlignedReads() {
++bvAlignedReads :: ~bvAlignedReads()
++#if __cplusplus >= 201103L
++ noexcept(false)
++#endif
++{
+
+
+ assert( pBamView_->aBVAlignedReads_.remove( this ) );
+--- a/bvAlignedReads.h
++++ b/bvAlignedReads.h
+@@ -81,7 +81,11 @@
+ const FileName& filReferenceSequenceFile,
+ bamView* pBamView );
+
+- ~bvAlignedReads();
++ ~bvAlignedReads()
++#if __cplusplus >= 201103L
++ noexcept(false)
++#endif
++ ;
+
+ bool operator==( const bvAlignedReads& myBVAlignedReads ) const {
+ return( this == &myBVAlignedReads );
+--- a/chromatData.h
++++ b/chromatData.h
+@@ -58,6 +58,9 @@
+ #ifndef CHROMATDATA_DEFINED
+ #define CHROMATDATA_DEFINED
+
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ #ifndef FLOAT
+ #define FLOAT double
+@@ -131,4 +134,8 @@
+ int freeChromatData();
+ #endif
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+--- a/compareContigs.cpp
++++ b/compareContigs.cpp
+@@ -126,6 +126,9 @@
+
+
+ compareContigs :: ~compareContigs()
++#if __cplusplus >= 201103L
++ noexcept(false)
++#endif
+ {
+
+ if ( !bCalledFromMakeJoins_ ) {
+--- a/compareContigs.h
++++ b/compareContigs.h
+@@ -137,7 +137,11 @@
+ compareContigs( ContigWin* pContigWin, const int nConsPos1);
+ compareContigs(); // for assemblyView
+
+- ~compareContigs();
++ ~compareContigs()
++#if __cplusplus >= 201103L
++ noexcept(false)
++#endif
++ ;
+
+ // this makes RWTPtrOrderedVector in ConsEd happy
+ bool operator==( const compareContigs& compC ) const {
+
+--- a/filePopupAndGetAceFilename.cpp
++++ b/filePopupAndGetAceFilename.cpp
+@@ -317,7 +317,7 @@
+ struct tm* pTM = localtime( &( pAceFile->stat_.st_mtime ) );
+
+ strftime( szDateTime, nDateTimeSize,
+- quote(%H)":"quote(%M)":"quote(%S)" %e-%h-%Y",
++ quote(%H) ":" quote(%M) ":" quote(%S) " %e-%h-%Y",
+ pTM );
+
+ RWCString soDescription = RWCString( szDateTime ) + " " + (*pAceFile);
+@@ -620,7 +620,7 @@
+ struct tm* pTM = localtime( &( pAceFile->stat_.st_mtime ) );
+
+ strftime( szDateTime, nDateTimeSize,
+- quote(%H)":"quote(%M)":"quote(%S)" %e-%h-%Y",
++ quote(%H) ":" quote(%M) ":" quote(%S) " %e-%h-%Y",
+ pTM );
+
+ RWCString soDescription = RWCString( szDateTime ) + " " + (*pAceFile);
+--- a/findTraceExtrema.h
++++ b/findTraceExtrema.h
+@@ -44,8 +44,15 @@
+
+ #include "chromatData.h"
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ int findTraceExtrema( ChromatData *chromatData );
+
++#ifdef __cplusplus
++}
++#endif
+
+ #endif
+
+--- a/makeUpper.h
++++ b/makeUpper.h
+@@ -42,6 +42,14 @@
+ #ifndef MAKEUPPER_INCLUDED
+ #define MAKEUPPER_INCLUDED
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ void makeUpper( char* szStringOfMixedCase );
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+--- a/nextPhredPipeline.cpp
++++ b/nextPhredPipeline.cpp
+@@ -476,7 +476,7 @@
+ void nextPhredPipeline :: openAndLockControlFile() {
+
+
+- nFDControlFile_ = open( filControlFile_.data(), O_CREAT |O_RDWR );
++ nFDControlFile_ = open( filControlFile_.data(), O_CREAT |O_RDWR, 0600);
+ if ( nFDControlFile_ == -1 ) {
+ THROW_FILE_ERROR( filControlFile_ );
+ }
+--- a/readABI.h
++++ b/readABI.h
+@@ -56,10 +56,18 @@
+
+ #include "chromatData.h"
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ #ifdef ANSI_C
+ ChromatData *readABI( char *fn, int *status );
+ #else
+ ChromatData *readABI();
+ #endif
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+--- a/readData.h
++++ b/readData.h
+@@ -44,6 +44,14 @@
+
+ #include "chromatData.h"
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ ChromatData *readData( char *filename, int* status );
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+--- a/readESD.h
++++ b/readESD.h
+@@ -53,6 +53,10 @@
+
+ #include "chromatData.h"
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ typedef unsigned int4 DWORD;
+ typedef unsigned char TCHAR;
+ typedef char BYTE;
+@@ -187,5 +191,7 @@
+ ChromatData *readESD();
+ #endif
+
+-
++#ifdef __cplusplus
++}
++#endif
+
+--- a/readSCF.h
++++ b/readSCF.h
+@@ -56,6 +56,10 @@
+
+ #include "chromatData.h"
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /* ---- Constants ---- */
+ #define SCF_MAGIC (((((int4)'.'<<8)+(int4)'s'<<8)+(int4)'c'<<8)+(int4)'f')
+ #define scale(V,OLDMAX,NEWMAX) (int2)( (FLOAT) V * (FLOAT) NEWMAX / (FLOAT) OLDMAX )
+@@ -144,4 +148,8 @@
+ int readSCF3();
+ #endif
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+--- a/readsense_bitmaps.h
++++ b/readsense_bitmaps.h
+@@ -56,10 +56,10 @@
+ static const int forward_bitmap_height = 19;
+ static char forward_bitmap_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+- 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00,
+- 0xf8, 0xff, 0x00, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff, 0x07,
+- 0xf8, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0x07, 0xf8, 0xff, 0x1f, 0x00,
+- 0xf8, 0xff, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
++ 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, (char)0xf8, 0x07, 0x00, 0x00,
++ (char)0xf8, (char)0xff, 0x00, 0x00, (char)0xf8, (char)0xff, 0x3f, 0x00, (char)0xf8, (char)0xff, (char)0xff, 0x07,
++ (char)0xf8, (char)0xff, (char)0xff, 0x0f, (char)0xf8, (char)0xff, (char)0xff, 0x07, (char)0xf8, (char)0xff, 0x1f, 0x00,
++ (char)0xf8, (char)0xff, 0x00, 0x00, (char)0xf8, 0x07, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00};
+
+@@ -67,10 +67,10 @@
+ static const int reverse_bitmap_height = 19;
+ static char reverse_bitmap_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xf8, 0x07,
+- 0x00, 0xc0, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0x07,
+- 0xfc, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0x07,
+- 0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x07,
++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, (char)0xf8, 0x07,
++ 0x00, (char)0xc0, (char)0xff, 0x07, 0x00, (char)0xff, (char)0xff, 0x07, (char)0xf8, (char)0xff, (char)0xff, 0x07,
++ (char)0xfc, (char)0xff, (char)0xff, 0x07, (char)0xf8, (char)0xff, (char)0xff, 0x07, 0x00, (char)0xfe, (char)0xff, 0x07,
++ 0x00, (char)0xc0, (char)0xff, 0x07, 0x00, 0x00, (char)0xf8, 0x07, 0x00, 0x00, 0x00, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00};
+
+--- a/readType.h
++++ b/readType.h
+@@ -56,11 +56,19 @@
+
+ #include "chromatData.h"
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ #ifdef ANSI_C
+ int readType( char *filename );
+ #else
+ int readType();
+ #endif
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+
+--- a/rwtptrsortedvector.h
++++ b/rwtptrsortedvector.h
+@@ -57,7 +57,6 @@
+ #ifdef USE_USING_IN_PUBLIC_TEMPLATE_CLASSES
+ using RWTPtrOrderedVector<TP>::nCurrentLength_;
+ using RWTPtrOrderedVector<TP>::isEmpty;
+- using RWTPtrOrderedVector<TP>::nCurrentLength_;
+ using RWTPtrOrderedVector<TP>::length;
+ using RWTPtrOrderedVector<TP>::ppArray_;
+ using RWTPtrOrderedVector<TP>::data;
+@@ -84,7 +83,7 @@
+ if ( nInsertBeforeIndex == RW_NPOS )
+ nInsertBeforeIndex = nCurrentLength_;
+
+- insertAt( nInsertBeforeIndex, pVal );
++ this->insertAt( nInsertBeforeIndex, pVal );
+ }
+
+ // don't copy this. copy mbtValOrderedVectorOfRWCString's method instead
+--- a/rwtvalsortedvector.h
++++ b/rwtvalsortedvector.h
+@@ -74,7 +74,7 @@
+ if ( nPos == RW_NPOS )
+ nPos = nCurrentLength_;
+
+- insertAt( nPos, val );
++ this->insertAt( nPos, val );
+ }
+
+
+--- a/rwUtil.h
++++ b/rwUtil.h
+@@ -51,6 +51,10 @@
+ *|***************************************************************************|*
+ */
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ #ifdef ANSI_C
+ int2 inSwpSint2( char *ptr );
+ int4 inSwpSint4( char *ptr );
+@@ -97,3 +101,6 @@
+ int writeUint4();
+ #endif
+
++#ifdef __cplusplus
++}
++#endif
+--- a/soGetDateTime.cpp
++++ b/soGetDateTime.cpp
+@@ -62,13 +62,13 @@
+ else if ( nFormat == nDotInMiddle ) {
+ strftime( szDateTime,
+ nDateTimeSize,
+- "%y%m%d."quote(%H)quote(%M)quote(%S),
++ "%y%m%d." quote(%H)quote(%M)quote(%S),
+ localtime( &timee ) );
+ }
+ else {
+ strftime( szDateTime,
+ nDateTimeSize,
+- "%y%m%d:"quote(%H)quote(%M)quote(%S),
++ "%y%m%d:" quote(%H)quote(%M)quote(%S),
+ localtime( &timee ) );
+ }
+
+--- a/szGetTime.h
++++ b/szGetTime.h
+@@ -42,9 +42,15 @@
+ #ifndef szGetTime_included
+ #define szGetTime_included
+
+-char *szGetTime();
++#ifdef __cplusplus
++extern "C" {
++#endif
+
++char *szGetTime();
+
++#ifdef __cplusplus
++}
++#endif
+
+ #endif
+
diff --git a/sci-biology/consed/files/consed-29-fix-perl-shebang.patch b/sci-biology/consed/files/consed-29-fix-perl-shebang.patch
new file mode 100644
index 000000000000..a27a3537a8d1
--- /dev/null
+++ b/sci-biology/consed/files/consed-29-fix-perl-shebang.patch
@@ -0,0 +1,701 @@
+Make perl shebangs portable, such that the scripts can also be used on Gentoo Prefix.
+Rationale: https://blogs.gentoo.org/mgorny/2016/02/08/a-quick-note-on-portable-shebangs/
+
+--- a/contributions/ace2fof
++++ b/contributions/ace2fof
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # .-----------------------------------------------------------------------------------.
+ # | |
+@@ -107,6 +107,7 @@
+ # | |
+ # `-----------------------------------------------------------------------------------'
+ #Fixed this file for taking Aracne's Ace file by syang 05152002
++use warnings;
+ use strict;
+ use POSIX qw(fmod);
+
+--- a/contributions/ace2OligosWithComments.perl
++++ b/contributions/ace2OligosWithComments.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # ace2Oligos.perl
+ #
+@@ -18,6 +18,8 @@
+ # Rev: 020528 to print comments in oligo tags upon request (Peter Kos)
+ #
+
++use warnings;
++
+ $szUsage = "\nUsage: $0 (name of ace file) (name of oligo file) [Print|Comment|PrintComment]\n";
+
+ die "$szUsage" if (( $#ARGV != 1 ) && ( $#ARGV != 2 ));
+--- a/contributions/aceContigs2Phds.perl
++++ b/contributions/aceContigs2Phds.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # aceContigs2Phd.perl
+ #
+@@ -13,6 +13,8 @@
+ # Acknowledgements: Borrowed as much as I could from determineReadTypes.Perl
+ # and fasta2Phd.perl
+
++use warnings;
++
+ $szUsage = "Usage: aceContigs2Phds.perl [-s minimum-contig-size] <name of ace file>";
+ $nContigLimit = 2000;
+
+--- a/contributions/acestatus.pl
++++ b/contributions/acestatus.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # acestatus.pl
+ # author: Cliff Wollam
+@@ -14,6 +14,7 @@
+ # USAGE FROM THE COMMAND LINE:
+ # acestatus.pl ace_filename
+
++use warnings;
+ use strict;
+
+ if($#ARGV >= 0) {
+--- a/contributions/cons.perl
++++ b/contributions/cons.perl
+@@ -1,5 +1,6 @@
+-#!/usr/bin/perl
++#!/usr/bin/env perl
+
++use warnings;
+ use strict;
+ use Cwd;
+
+--- a/contributions/mergeAces.perl
++++ b/contributions/mergeAces.perl
+@@ -1,4 +1,4 @@
+-#! /usr/local/bin/perl -w
++#!/usr/bin/env perl
+
+ # Bugs and complaints to Bill Gilliland, billg@ucdavis.edu.
+ # mergeAces.perl v. 0.2 5/22/01
+@@ -9,6 +9,7 @@
+ # project directory (if it doesn't already exist) with all the cgrams
+ # and phd files of the original projects.
+
++use warnings;
+ use Getopt::Long;
+ use File::Copy;
+ $pathRoot = $ENV{"PWD"};
+--- a/contributions/phredPhrapWithPhdBalls
++++ b/contributions/phredPhrapWithPhdBalls
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # phredPhrapWithPhdBalls
+ # modified from phredPhrap by Ben Allen at LANL
+@@ -73,6 +73,7 @@
+ # Rev: 120312 to not duplicate consensus tags during miniassembly
+ # Rev: 120717 Ben Allen (LANL) to use reads from phdballs as well as phd_dir
+
++use warnings;
+
+ $szVersion = "120312";
+
+--- a/contributions/recover_consensus_tags
++++ b/contributions/recover_consensus_tags
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # Purpose: Transfers all consensus tags from a set of old assemblies to
+ # a new assembly.
+@@ -14,6 +14,7 @@
+ # rct ace_filename <only ace file to be transfer (optional)>
+ # You must be in the edit_dir where the ace file is located
+
++use warnings;
+ use strict;
+
+
+--- a/contributions/revert_fof
++++ b/contributions/revert_fof
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # PURPOSE: If the user really screws up a read, to back out all changes.
+ # You must reassemble after using this.
+@@ -19,6 +19,8 @@
+ # phd extensions.
+ # revert_fof use file of files to give reads to revert 3/14/01 SL
+
++use warnings;
++
+ $szUsage = "Enter a file of files name, please!";
+
+ die $szUsage if ( $#ARGV != 0 );
+--- a/contributions/sff2phd.perl
++++ b/contributions/sff2phd.perl
+@@ -1,4 +1,5 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
++use warnings;
+ use strict;
+ # SFF to PHD files converter, with 454 paired reads and MID support
+ # Version 0.15 - 111229
+--- a/contributions/sff2phd_Samborskyy
++++ b/contributions/sff2phd_Samborskyy
+@@ -1,4 +1,5 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
++use warnings;
+ use strict;
+ # SFF to PHD files converter, with 454 paired reads and MID support
+ # Version 0.10 - 101110
+--- a/scripts/ace2Fasta.perl
++++ b/scripts/ace2Fasta.perl
+@@ -1,7 +1,9 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # Purpose: makes a contigs file out of an ace file
+
++use warnings;
++
+ $szUsage = "Usage: ace2Contigs.perl (ace file)";
+
+
+--- a/scripts/ace2Oligos.perl
++++ b/scripts/ace2Oligos.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # ace2Oligos.perl
+ #
+@@ -16,6 +16,8 @@
+ # Rev: 000330 to handle comments in oligo tags
+ #
+
++use warnings;
++
+ $szUsage = "Usage: ace2Oligos.perl (name of ace file) (name of oligo file)";
+
+ if ( $ARGV[0] eq "-V" || $ARGV[0] eq "-v" ) {
+--- a/scripts/add454Reads.perl
++++ b/scripts/add454Reads.perl
+@@ -1,11 +1,11 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # add454Reads.perl
+ # part of Consed package
+ #
+ # DG with help from Hao Wang to screen vector
+
+-
++use warnings;
+ use File::Basename;
+
+
+--- a/scripts/addReads2Consed.perl
++++ b/scripts/addReads2Consed.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # Purpose: called by consed in order to add new reads to an
+ # existing assembly without reassemblying
+@@ -29,6 +29,7 @@
+ # Rev: 080320 (David Gordon) to use discrep_lists instead of alignments
+ # Rev: 130828 (David Gordon) to handle slashes (/) in read names
+
++use warnings;
+
+ $szVersion = "130828";
+ if ( $#ARGV >= 0 ) {
+--- a/scripts/addSangerReads.perl
++++ b/scripts/addSangerReads.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # addSangerReads.perl
+
+@@ -32,7 +32,7 @@
+ # added is printed in a report ending with ".log". The name of this
+ # file is listed in auto.fof
+
+-
++use warnings;
+
+
+ $szVersion = "120717";
+--- a/scripts/addSolexaReads.perl
++++ b/scripts/addSolexaReads.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # addSolexaReads.perl
+
+@@ -54,7 +54,7 @@
+
+ $szUsage = "addSolexaReads.perl -ace (ace file) -fastqfof (solexa files) -fasta (fasta file) -readsList (file of list of desired reads) where -readsList is optional";
+
+-
++use warnings;
+ use Getopt::Long;
+
+ GetOptions( "ace=s" => \$szAceFile,
+--- a/scripts/alignRNA2Genomic.perl
++++ b/scripts/alignRNA2Genomic.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # alignRNA2Genomic.perl
+
+@@ -6,6 +6,8 @@
+ # consed-ready ace and phd ball with the RNA aligned against the
+ # genomic with introns being represented by large gaps
+
++use warnings;
++
+ $szVersion = "120717";
+
+ if ( $#ARGV == 0 ) {
+--- a/scripts/alignSolexaReads2Refs.perl
++++ b/scripts/alignSolexaReads2Refs.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # Input: a file where each line looks like this:
+ # (solexa seq file) (read prefix)
+@@ -10,6 +10,7 @@
+
+ # Output: a list of alignment files
+
++use warnings;
+
+ defined( $szConsedHome = $ENV{'CONSED_HOME'} ) ||
+ ( $szConsedHome = "/usr/local/genome" );
+--- a/scripts/amplifyTranscripts.perl
++++ b/scripts/amplifyTranscripts.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # PURPOSE: runs consed -autoPCRAmplify in order to pick pcr primers
+ # for a large group of regions
+@@ -40,7 +40,7 @@
+ # That is, the left primers are given in top strand orientation, and
+ # the right primers are given in bottom strand orientation.
+
+-
++use warnings;
+
+ defined( $szConsedHome = $ENV{'CONSED_HOME'} ) ||
+ ( $szConsedHome = "/usr/local/genome" );
+--- a/scripts/autoPrimers.perl
++++ b/scripts/autoPrimers.perl
+@@ -1,5 +1,6 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
++use warnings;
+
+ $szUsage = "autoPrimers.perl (fasta file of targets)";
+ $szVersion = "141226";
+--- a/scripts/bam2Ace.perl
++++ b/scripts/bam2Ace.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+
+ # Purpose: runs:
+@@ -6,6 +6,7 @@
+ # 2) consed -renameDuplicates
+ # 3) consed -removeColumnsOfPads
+
++use warnings;
+
+ $szUsage = "usage: bam2Ace.perl -bamFile (bam file) -regionsFile (regions file) (see README.txt for format of the regions file) -exec (consed executable name) -newAceFile (new ace file name) where the -exec (exec) is optional";
+
+--- a/scripts/convertBedToBamScape.perl
++++ b/scripts/convertBedToBamScape.perl
+@@ -1,4 +1,6 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
++
++use warnings;
+
+ $szUsage = "usage: convertBedToBamScape.perl (Bed file) (BamScape file) (fasta file of all sequences) (conversion of reference names--optional)";
+
+--- a/scripts/countEditedBases.perl
++++ b/scripts/countEditedBases.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # countEditedBases.perl
+ #
+@@ -11,6 +11,8 @@
+ #
+ #
+
++use warnings;
++
+ while(<>) {
+ if ( /^CO / ) {
+ @aWords = split;
+--- a/scripts/determineReadTypes.perl
++++ b/scripts/determineReadTypes.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ # determineReadTypes.perl
+ #
+ # Purpose: to write into the phd file information about the template
+@@ -173,6 +173,7 @@
+ #
+ ###############################################################
+
++use warnings;
+
+ # you can remove or comment out this line when you are satisfied with
+ # your customized version of this file.
+--- a/scripts/fasta2Ace.perl
++++ b/scripts/fasta2Ace.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # manyFasta2Ace.perl
+ #
+@@ -13,6 +13,7 @@
+ #
+ # NOTE: you must run this in edit_dir
+
++use warnings;
+ use Getopt::Long;
+
+ $szRevision = "141212";
+--- a/scripts/fasta2PhdBall.perl
++++ b/scripts/fasta2PhdBall.perl
+@@ -1,4 +1,6 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
++
++use warnings;
+
+ $nQuality = 20;
+
+--- a/scripts/fasta2Phd.perl
++++ b/scripts/fasta2Phd.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # fasta2Phd.perl
+ #
+@@ -20,6 +20,7 @@
+ # June 2002, Bill Gilliland to allow the user to specify
+ # the quality value
+
++use warnings;
+ use Getopt::Long;
+ GetOptions( "quality=i" => \$qualityValue);
+
+--- a/scripts/fastq2Phrap.perl
++++ b/scripts/fastq2Phrap.perl
+@@ -1,4 +1,6 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
++
++use warnings;
+
+ $szUsage = "fastq2Phrap.perl (fastq) or for paired reads fastq2Phrap.perl (fastq1) (fastq2) where fastq1 and fastq2 have corresponding mate pairs--e.g., the 5th read in fastq1 is the mate of the 5th read in fastq2--these fastq files are assumed to be in ../solexa_dir--not the current directory\n";
+
+--- a/scripts/filter454Reads.perl
++++ b/scripts/filter454Reads.perl
+@@ -1,6 +1,6 @@
+-#!/usr/bin/perl -w
+-
++#!/usr/bin/env perl
+
++use warnings;
+ use File::Basename;
+
+
+--- a/scripts/findSequenceMatchesForConsed.perl
++++ b/scripts/findSequenceMatchesForConsed.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # findSequenceMatchesForConsed.perl
+
+@@ -16,6 +16,8 @@
+ # REVISIONS: 021127 (DG) to write (project).(date).(time).fasta instead of
+ # (project).fasta.screen.ace.1.(date).(time).fasta
+
++use warnings;
++
+ $szVersion = "021127";
+
+ $szUsage = "Usage: findSequenceMatchesForConsed.perl (ace file) (crossmatch parameters, if any)";
+--- a/scripts/fixContigEnd.perl
++++ b/scripts/fixContigEnd.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # fixContigEnd.perl
+
+@@ -7,6 +7,7 @@
+ # consed -ace (acefile) -fixContigEnds
+ #
+
++use warnings;
+
+ $szUsage = "fixContigEnd.perl (fasta file of reads for input) (fof for ace file, output)";
+
+--- a/scripts/lib2Phd.perl
++++ b/scripts/lib2Phd.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # lib2Phd.perl
+ #
+@@ -23,6 +23,8 @@
+ # accept fasta library files as input. The output file is named
+ # according to the first, non-space block of text on each fasta defline.
+
++use warnings;
++
+ $nQuality = 20;
+
+ $szUsage = "Usage: lib2Phd.perl <name of file with fasta library>";
+--- a/scripts/makePhdBall.perl
++++ b/scripts/makePhdBall.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # PURPOSE: concatenate all phd file into a single phd.ball
+ # for the purpose of fast startup of consed
+@@ -9,6 +9,7 @@
+ #
+ # February 2008, David Gordon
+
++use warnings;
+
+ if ( $#ARGV >= 0 ) {
+ if ( $ARGV[0] eq "-v" || $ARGV[0] eq "-V" ) {
+--- a/scripts/makeRegionsFile.perl
++++ b/scripts/makeRegionsFile.perl
+@@ -1,10 +1,12 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # makeRegionsFile.perl
+ # To be used with consed -bam2Ace
+ # Takes a fasta file of sequences and makes a regions file that
+ # specifies the entire length of each sequence.
+
++use warnings;
++
+ $szUsage = "makeRegionsFile.perl (name of fasta file)";
+
+ $szVersion = "110914";
+--- a/scripts/orderPrimerPairs.perl
++++ b/scripts/orderPrimerPairs.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # PURPOSE: puts the primers in 96 well format for ordering.
+ # creates a file that can be emailed to
+@@ -13,6 +13,8 @@
+ # 2) a file of primer pairs, sorted by product size
+ # 3) a fasta file of the primers, for your convenience for analysis
+
++use warnings;
++
+ $| = 1;
+
+ $szUsage = "orderPrimerPairs.perl";
+--- a/scripts/phd2Ace.perl
++++ b/scripts/phd2Ace.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # phd2Ace.perl
+ #
+@@ -13,6 +13,8 @@
+ # REV: 981002 (David Gordon) for new ace format
+ # 981210 (DG) to eliminate warning message
+
++use warnings;
++
+ $szPhdDirPath = "../phd_dir";
+
+ $szUsage = "Usage: phd2Ace.perl <filename (without directory) of phd file>\nThe phd file is assumed to reside in $szPhdDirPath";
+--- a/scripts/phredPhrap
++++ b/scripts/phredPhrap
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # phredPhrap
+ #
+@@ -70,6 +70,8 @@
+ # Rev: 110609 to allow masking of vector sequence when doing miniassemblies
+ # Rev: 120312 to not duplicate consensus tags during miniassembly
+
++use warnings;
++
+ $szVersion = "120312";
+
+
+--- a/scripts/picard2Regions.perl
++++ b/scripts/picard2Regions.perl
+@@ -1,10 +1,12 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # PURPOSE: takes a file of locations in the format for bamScape custom
+ # navigation (Picard IntervalList format), adds 2000 bases of context
+ # to each side of each location, and prints a region file in format to
+ # be used by bam2Ace
+
++use warnings;
++
+ $szRevision = "140903"; # David Gordon
+
+ if ( defined( $ARGV[0] ) &&
+--- a/scripts/removeReads
++++ b/scripts/removeReads
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # PURPOSE: removes a list of chromats from an assembly. After running this,
+ # you must reassemble to create an ace file without the given phd files.
+@@ -16,6 +16,8 @@
+ # removeReads (name of fof's)
+ #
+
++use warnings;
++
+ $szUsage = "Usage: removeReads listOfReads.fof";
+
+ die "$szUsage" if ( $#ARGV != 0 );
+--- a/scripts/revertToUneditedRead
++++ b/scripts/revertToUneditedRead
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # PURPOSE: If the user really screws up a read, to back out all changes.
+ # You must reassemble after using this.
+@@ -16,6 +16,7 @@
+ # REV: 7/24/98 (DG)
+ # REV: 8/28/2013 (DG) to handle readnames with slashes (/)
+
++use warnings;
+
+ $szUsage = "Usage: revertToUneditedRead (read name without any .phd.# extension)";
+
+--- a/scripts/selectOneRegion.perl
++++ b/scripts/selectOneRegion.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # selectOneRegion.perl
+ #
+@@ -11,6 +11,7 @@
+ # and you will create an ace file chr15_51000000.ace or chr15_51000000.ace.1
+ # (or higher extension)
+
++use warnings;
+ use Getopt::Long;
+
+
+--- a/scripts/selectRegions.perl
++++ b/scripts/selectRegions.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+
+ # selectRegions.perl
+ #
+@@ -43,7 +43,7 @@
+ # my_new_ace.ace says what the ace file should be called (the
+ # extension may not start at 1 if there is already a .1
+
+-
++use warnings;
+
+ $SIG{__WARN__} = dieWhenGetWarning;
+ sub dieWhenGetWarning {
+--- a/scripts/tagRepeats.perl
++++ b/scripts/tagRepeats.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # PROGRAM: tagRepeats.perl
+ # PURPOSE: to put consensus tags on any found ALU or any other
+@@ -10,6 +10,7 @@
+ # INPUTS: The ace file. You must also provide a fasta file of the
+ # ALU or any other sequence you want to tag
+
++use warnings;
+
+ $szVersion = "090209";
+ if ( $#ARGV >= 0 ) {
+--- a/scripts/testSocket.perl
++++ b/scripts/testSocket.perl
+@@ -1,7 +1,8 @@
+-#! /usr/local/bin/perl -w
++#!/usr/bin/env perl
+
+ # open a socket to consed
+-
++
++use warnings;
+ use IO::Socket;
+
+ # Consed makes a file which has nothing but the port number.
+--- a/scripts/transferConsensusTags.perl
++++ b/scripts/transferConsensusTags.perl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/env perl
+ #
+ # Purpose: Transfers consensus tags from an old assembly to
+ # a new assembly.
+@@ -44,6 +44,8 @@
+ # Nov 2001, DG to handle cloneEnd tags which have orientation
+ # Mar 2012, DG to prevent duplicating tags after miniassembly
+
++use warnings;
++
+ $szUsage = "Usage: transferConsensusTags.perl (old ace file) (new ace file) (file of list of old contigs with consensus tags to be transferred)";
+
+ if ( $ARGV[0] eq "-V" || $ARGV[0] eq "-v" ) {
diff --git a/sci-biology/consed/files/consed-29-fix-qa.patch b/sci-biology/consed/files/consed-29-fix-qa.patch
new file mode 100644
index 000000000000..5bdf0264d25b
--- /dev/null
+++ b/sci-biology/consed/files/consed-29-fix-qa.patch
@@ -0,0 +1,275 @@
+Fix various QA violations, due to
+* implicit declarations
+* incorrect printf() format specifiers
+* incorrect function prototypes
+* remove unsafe gets() fucntion
+
+--- a/misc/454/sff2scf.c
++++ b/misc/454/sff2scf.c
+@@ -39,6 +39,7 @@
+ void writeScfFile(char *filearg, char *outfile);
+ void writeScfCommand(char *filearg, char *outfile);
+
++int sffinfo(int argc, char *argv[], FILE* pTempFile );
+
+ int main(int argc, char *argv[])
+ {
+--- a/misc/mktrace/mktrace.c
++++ b/misc/mktrace/mktrace.c
+@@ -70,9 +70,9 @@
+ else
+ {
+ printf( "enter FASTA filename: " );
+- gets( ifnm );
++ fgets( ifnm, sizeof(ifnm), stdin );
+ printf( "enter output filename: " );
+- gets( ofnm );
++ fgets( ofnm, sizeof(ofnm), stdin );
+ }
+
+ /*
+@@ -192,7 +192,7 @@
+ /*
+ ** Write phd file.
+ */
+- if( writePhd( ofnm, numBase, seq, qual, pos, numPoint, trace ) == ERROR )
++ if( writePhd( ofnm, numBase, seq, qual, pos, numPoint ) == ERROR )
+ {
+ fprintf( stderr, "mktrace: error: bad status: writePhd\n" );
+ free( seq );
+--- a/misc/mktrace/mktrace.h
++++ b/misc/mktrace/mktrace.h
+@@ -37,8 +37,8 @@
+ int writeSCF( char *filename, int numBase, char *seq, int numPoint, float **trace );
+ int freeTrace( float **trace );
+ char *readFASTA( char *filename, char *entryName, char *comments, int *len );
+-int writePhd( char *ofnm, int numBase, char *seq, int *pos, int numPoint );
+ int *readQUAL( char *filename, char *entryName, char *comments, int *len );
++char *getTime( void );
+ #else
+ int writePhd();
+ float **synTrace();
+--- a/misc/phd2fasta/phd2fasta.h
++++ b/misc/phd2fasta/phd2fasta.h
+@@ -276,6 +276,10 @@
+ Comments *comments, Seq *seq, TagList *tagList, char *emsg );
+ int checkIntString( char *string );
+ int delimiterTest( char *string, unsigned int mask );
++int checkParam( Option *option );
++char* getVersion( void );
++int showDoc( void );
++char* getTime( void );
+ #else
+ Option *getOption();
+ struct Tag *allocTag();
+--- a/misc/phd2fasta/readStdTag.c
++++ b/misc/phd2fasta/readStdTag.c
+@@ -699,11 +699,11 @@
+ if( fstat )
+ {
+ fprintf( stderr,
+- "readStdTag: %s: line: %d: unexpected delimiter %s\n",
++ "readStdTag: %s: line: %p: unexpected delimiter %s\n",
+ filename,
+ nline,
+ line );
+- sprintf( emsg, "%s: line: %d: unexpected delimiter %s\n",
++ sprintf( emsg, "%s: line: %p: unexpected delimiter %s\n",
+ filename,
+ nline,
+ line );
+--- a/misc/phd2fasta/readWholeReadTag.c
++++ b/misc/phd2fasta/readWholeReadTag.c
+@@ -393,11 +393,11 @@
+ if( fstat )
+ {
+ fprintf( stderr,
+- "readWholeReadTag: %s: line: %d: unexpected delimiter %s\n",
++ "readWholeReadTag: %s: line: %p: unexpected delimiter %s\n",
+ filename,
+ nline,
+ line );
+- sprintf( emsg, "%s: line: %d: unexpected delimiter %s\n",
++ sprintf( emsg, "%s: line: %p: unexpected delimiter %s\n",
+ filename,
+ nline,
+ line );
+--- a/misc/phd2fasta/writeFasta.c
++++ b/misc/phd2fasta/writeFasta.c
+@@ -39,7 +39,7 @@
+ #include "phd2fasta.h"
+
+ #ifdef ANSI_C
+-writeFasta( FILE *sfp, FILE *qfp, FILE *bfp,
++int writeFasta( FILE *sfp, FILE *qfp, FILE *bfp,
+ int outBasePosOption,
+ Comments *comments, Seq *seq, TagList *tagList, char *emsg )
+ #else
+--- a/motifutils.cpp
++++ b/motifutils.cpp
+@@ -202,13 +202,13 @@
+ void printButtonEvent( XButtonEvent* pEvent ) {
+
+ printf( "type = %d\n", pEvent->type );
+- printf( "serial = %d\n", pEvent->serial );
++ printf( "serial = %lu\n", pEvent->serial );
+ printf( "send_event = %s\n", szPrintBool( pEvent->send_event ) );
+- printf( "*display = %x\n", pEvent->display );
+- printf( "window = %x\n", pEvent->window );
+- printf( "root = %x\n", pEvent->root );
+- printf( "subwindow = %x\n", pEvent->subwindow );
+- printf( "time = %d\n", pEvent->time );
++ printf( "*display = %p\n", pEvent->display );
++ printf( "window = %lu\n", pEvent->window );
++ printf( "root = %lu\n", pEvent->root );
++ printf( "subwindow = %lu\n", pEvent->subwindow );
++ printf( "time = %lu\n", pEvent->time );
+ printf( "x = %d\n", pEvent->x );
+ printf( "y = %d\n", pEvent->y );
+ printf( "x_root = %d\n", pEvent->x_root );
+--- a/phaster2PhdBall.cpp
++++ b/phaster2PhdBall.cpp
+@@ -547,7 +547,7 @@
+
+ int nTokens =
+ sscanf( soLine_.data(),
+- "%s %*s %d %d %lld %s %s %*s %d %d %lld %s %s\n",
++ "%s %*s %d %d %ld %s %s %*s %d %d %ld %s %s\n",
+ soReadName_.data(),
+ &nRead1Left_,
+ &nRead1Right_,
+--- a/printAutoFinishMiscInfo.cpp
++++ b/printAutoFinishMiscInfo.cpp
+@@ -80,7 +80,7 @@
+ int nError = stat( (char*) soAceFileFullPathname.data(), &statBuffer );
+
+ if (nError == 0 ) {
+- fprintf( pAO,"size: %d date: %s\n",
++ fprintf( pAO,"size: %ld date: %s\n",
+ (long) statBuffer.st_size,
+ ctime( &( statBuffer.st_mtime )) );
+
+--- a/printAutoFinishParameters.cpp
++++ b/printAutoFinishParameters.cpp
+@@ -206,7 +206,7 @@
+ pCP->nInexactSearchForStringMaxPerCentMismatch_ );
+
+ fprintf( pAO, "! when using the inexact search for string, allow up to this\n");
+- fprintf( pAO, "! % mismatch: the sum of the insertion, deletion, and substitution\n");
++ fprintf( pAO, "! %% mismatch: the sum of the insertion, deletion, and substitution\n");
+ fprintf( pAO, "! differences divided by the length of the query string\n");
+ fprintf( pAO, "! (YES)\n");
+ fprintf( pAO, "consed.onlyAllowOneReadWriteConsedAtATime: %s\n",
+@@ -825,7 +825,7 @@
+ fprintf( pAO, "! template will be 1500 bases from the forward read. But if this template\n");
+ fprintf( pAO, "! has an insert that is shorter than average, the walk may walk into vector.\n");
+ fprintf( pAO, "! To be conservative, we may want to assume that the insert is somewhat \n");
+- fprintf( pAO, "! shorter than average. By default, we assume that it is 90% as large as \n");
++ fprintf( pAO, "! shorter than average. By default, we assume that it is 90%% as large as \n");
+ fprintf( pAO, "! the average. This parameter gives that percentage. This parameter\n");
+ fprintf( pAO, "! is used both by Consed and Autofinish.\n");
+ fprintf( pAO, "! (OK)\n");
+@@ -1249,9 +1249,9 @@
+ pCP->nAutoFinishConfidenceThatReadWillCoverSingleSubcloneRegion_ );
+
+ fprintf( pAO, "! Autofinish computes the per cent of existing reads are aligned at\n");
+- fprintf( pAO, "! each base position. Typically, this number starts at around 0% at\n");
+- fprintf( pAO, "! base position 1, rises to close to 100% at around base position 300,\n");
+- fprintf( pAO, "! and then drops again to 0% at base position 800 or so. This number\n");
++ fprintf( pAO, "! each base position. Typically, this number starts at around 0%% at\n");
++ fprintf( pAO, "! base position 1, rises to close to 100%% at around base position 300,\n");
++ fprintf( pAO, "! and then drops again to 0%% at base position 800 or so. This number\n");
+ fprintf( pAO, "! specifies how high the number must be for Autofinish to consider an\n");
+ fprintf( pAO, "! Autofinish read to cover a single subclone region.\n");
+ fprintf( pAO, "! (OK)\n");
+@@ -1295,7 +1295,7 @@
+ ( ( pCP->bCheckIfTooManyWalks_ ) ? "true" : "false" ) );
+
+ fprintf( pAO, "! this just checks if the number of walks, pcr ends, and unknown reads\n");
+- fprintf( pAO, "! exceeds 20% of the total number of reads. If this is exceeded, then \n");
++ fprintf( pAO, "! exceeds 20%% of the total number of reads. If this is exceeded, then \n");
+ fprintf( pAO, "! a warning message is given. Typically, such a warning indicates\n");
+ fprintf( pAO, "! that you have incorrectly customized determineReadTypes.perl\n");
+ fprintf( pAO, "! (OK)\n");
+@@ -1446,7 +1446,7 @@
+ ( ( pCP->bProcessMatePairsAtStartup_ ) ? "true" : "false" ) );
+
+ fprintf( pAO, "! This is necessary to show the mate pair flags, but it does add\n");
+- fprintf( pAO, "! around 15% to startup time.\n");
++ fprintf( pAO, "! around 15%% to startup time.\n");
+ fprintf( pAO, "! (OK)\n");
+ fprintf( pAO, "consed.maximumNumberOfTracesShown: %d\n",
+ pCP->nMaximumNumberOfTracesShown_ );
+@@ -1796,7 +1796,7 @@
+ (char*)pCP->soStoreTracePeakPositions_.data() );
+
+ fprintf( pAO, "! never, always or whenChromatAvailable\n");
+- fprintf( pAO, "! changing this to \"always\" increases memory usage by close to 100%,\n");
++ fprintf( pAO, "! changing this to \"always\" increases memory usage by close to 100%%,\n");
+ fprintf( pAO, "! especially if the assembler is Newbler. always means it will store\n");
+ fprintf( pAO, "! the positions if they are present in the phd file/ball.\n");
+ fprintf( pAO, "! \"whenChromatAvailable\" means it will store trace peak positions for\n");
+--- a/readPrimerScreenSequences.cpp
++++ b/readPrimerScreenSequences.cpp
+@@ -167,7 +167,7 @@
+ ++nSequenceNumber ) {
+ if ( pnLengthOfSequence[ nSequenceNumber ] !=
+ strlen( pszSequence[ nSequenceNumber ] ) ) {
+- sprintf( szErrorMessage, "inconsistency between pnLengthOfSequence %d and pszSequence %d for sequence number %d",
++ sprintf( szErrorMessage, "inconsistency between pnLengthOfSequence %d and pszSequence %zu for sequence number %d",
+ pnLengthOfSequence[ nSequenceNumber ],
+ strlen( pszSequence[ nSequenceNumber ] ),
+ nSequenceNumber );
+--- a/rwcstring.cpp
++++ b/rwcstring.cpp
+@@ -235,7 +235,7 @@
+
+ nMaxLength_ = nDefaultLengthForConversions;
+
+- nCurrentLength_ = sprintf( sz_, "%d", lNumberToConvert );
++ nCurrentLength_ = sprintf( sz_, "%ld", lNumberToConvert );
+
+ if ( nCurrentLength_ > nMaxLength_ ) {
+ // big trouble--might not even make it here--might segmentation fault
+--- a/someOtherProgramSentACommandToConsed.cpp
++++ b/someOtherProgramSentACommandToConsed.cpp
+@@ -89,7 +89,7 @@
+
+ char szLine2[ nMaxLine ];
+
+- sprintf( szLine2, "# of chars = %d %s", strlen( szLine ), szLine );
++ sprintf( szLine2, "# of chars = %zu %s", strlen( szLine ), szLine );
+
+ cout << szLine2 << endl;
+
+--- a/tag.cpp
++++ b/tag.cpp
+@@ -466,7 +466,7 @@
+ fprintf( pPhdFile, "DATE: %s\n", soDate_.data() );
+
+ if ( lID_ != nUndefinedTagID ) {
+- fprintf( pPhdFile, "ID: %d\n", lID_ );
++ fprintf( pPhdFile, "ID: %ld\n", lID_ );
+ }
+
+
+--- a/userDefinedTagField.cpp
++++ b/userDefinedTagField.cpp
+@@ -64,7 +64,7 @@
+
+ void userDefinedIntegerTagField :: writeThyselfToAceFileOrPhdBall( FILE* pFile ) {
+
+- fprintf( pFile, "%s %d\n",
++ fprintf( pFile, "%s %ld\n",
+ pUserDefinedTagFieldType_->soFieldName_.data(),
+ l_ );
+ }
+@@ -119,7 +119,7 @@
+
+ void userDefinedPointerTagField :: writeThyselfToAceFileOrPhdBall( FILE* pFile ) {
+
+- fprintf( pFile, "%s %d\n",
++ fprintf( pFile, "%s %ld\n",
+ pUserDefinedTagFieldType_->soFieldName_.data(),
+ lID_ );
+