sci-libs/libgenome: Allow for compiling with GCC 6
authorDavid Seifert <soap@gentoo.org>
Tue, 20 Sep 2016 19:37:27 +0000 (21:37 +0200)
committerDavid Seifert <soap@gentoo.org>
Tue, 20 Sep 2016 21:06:07 +0000 (23:06 +0200)
Gentoo-bug: 594372
* EAPI=6

Package-Manager: portage-2.3.1

sci-libs/libgenome/files/libgenome-1.3-fix-c++14.patch [new file with mode: 0644]
sci-libs/libgenome/libgenome-1.3-r1.ebuild

diff --git a/sci-libs/libgenome/files/libgenome-1.3-fix-c++14.patch b/sci-libs/libgenome/files/libgenome-1.3-fix-c++14.patch
new file mode 100644 (file)
index 0000000..ffe30ef
--- /dev/null
@@ -0,0 +1,30 @@
+Fix building with C++14, which errors out due to collisions with internal abs() function.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=594372
+ 
+--- a/libGenome/gnDefs.h
++++ b/libGenome/gnDefs.h
+@@ -175,13 +175,6 @@
+ \r
+ #define CONTIG_SECTION_SIZE 3\r
+ \r
+-// some compilers don't have abs() for 64 bit ints\r
+-#if (defined(__GNUG__) && ( __GNUC__ <= 2 )) || defined(__INTEL_COMPILER) || (defined _MSC_VER && defined __cplusplus)\r
+-\r
+-int64 abs( int64 a );\r
+-\r
+-#endif\r
+-\r
+ #ifdef __cplusplus\r
+ namespace genome {\r
+ #endif\r
+--- a/libGenome/Makefile.am
++++ b/libGenome/Makefile.am
+@@ -29,7 +29,7 @@
+ gnGenomeSpec.cpp  gnLocation.cpp  \
+ gnRAWSource.cpp gnBaseFeature.cpp gnSEQSource.cpp gnSequence.cpp \
+ gnContigSpec.cpp gnSourceHeader.cpp gnException.cpp \
+-gnFastTranslator.cpp gnPosSpecificTranslator.cpp gnDefs.cpp
++gnFastTranslator.cpp gnPosSpecificTranslator.cpp
+ 
+ library_includedir=$(includedir)/$(GENERIC_LIBRARY_NAME)-$(GENERIC_API_VERSION)/$(GENERIC_LIBRARY_NAME)
+ 
index 77c6ca7ec1d585436e7a5d25d703177d12bbc909..a52575cbf16984487841ef5e0b7901c6b5adab0b 100644 (file)
@@ -1,32 +1,40 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="2"
+EAPI=6
 
-MY_TAG="mauve-2-3-0-release"
-#ESVN_REPO_URI="https://mauve.svn.sourceforge.net/svnroot/mauve/libGenome/tags/${MY_TAG}"
-
-#inherit subversion autotools
 inherit autotools
 
 DESCRIPTION="Library for sci-biology/mauve"
 HOMEPAGE="http://gel.ahabs.wisc.edu/mauve/"
-#SRC_URI=""
 SRC_URI="mirror://gentoo/${PF}.tar.bz2"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="doc"
+IUSE="doc static-libs"
 KEYWORDS="~amd64 ~x86"
 
 DEPEND="doc? ( app-doc/doxygen )"
 RDEPEND=""
 
+PATCHES=( "${FILESDIR}/${PN}-1.3-fix-c++14.patch" )
+
 src_prepare() {
+       default
+       rm libGenome/gnDefs.cpp || die
        eautoreconf
 }
 
+src_configure() {
+       econf \
+               --enable-shared \
+               $(use_enable static-libs static)
+}
+
 src_install() {
-       emake install DESTDIR="${D}" || die
+       default
+
+       # package provides .pc files
+       find "${D}" -name '*.la' -delete || die
 }