sci-biology/snpfile: Modernise to EAPI 6
authorDavid Seifert <soap@gentoo.org>
Sun, 26 Feb 2017 12:25:06 +0000 (13:25 +0100)
committerDavid Seifert <soap@gentoo.org>
Sun, 26 Feb 2017 12:40:46 +0000 (13:40 +0100)
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/4083

sci-biology/snpfile/files/snpfile-2.0.1-ax-boost.patch [new file with mode: 0644]
sci-biology/snpfile/files/snpfile-2.0.1-gentoo.diff
sci-biology/snpfile/snpfile-2.0.1-r2.ebuild [new file with mode: 0644]

diff --git a/sci-biology/snpfile/files/snpfile-2.0.1-ax-boost.patch b/sci-biology/snpfile/files/snpfile-2.0.1-ax-boost.patch
new file mode 100644 (file)
index 0000000..f77b476
--- /dev/null
@@ -0,0 +1,35 @@
+Modernise autoconf code to use modern archive macros.
+
+--- a/configure.in
++++ b/configure.in
+@@ -1,7 +1,7 @@
+ AC_INIT(snpfile, 2.0.1, mailund@birc.au.dk)
+ AM_INIT_AUTOMAKE
+ AC_CONFIG_MACRO_DIR([m4])
+-AM_CONFIG_HEADER(config.hh)
++AC_CONFIG_HEADERS([config.hh])
+ LT_INIT
+ AC_PROG_CXX
+@@ -14,18 +14,9 @@
+ fi
+ AC_DEFINE_UNQUOTED(PREFIX, "$thePREFIX", [Installation prefix])
+-AX_BOOST([1.33.1],,
+-AC_ERROR([[
+-************************************************************************
+-************************************************************************
+-The Boost library was not found on this system.  We use this library
+-extensively, and cannot proceed without it.  You can obtain it from
+-<http://www.boost.org>.
+-************************************************************************
+-************************************************************************
+-]])
+-)
+-
++AX_BOOST_BASE([1.33.1])
++AX_BOOST_PROGRAM_OPTIONS
++AX_BOOST_SIGNALS
+ AC_OUTPUT([
+       Makefile
index e6a8d60ec69c4fc141539fd65a942932f72bb6e6..b2a8a6b630ce78cd4fc885a5f5929c10ad95be3c 100644 (file)
@@ -2,8 +2,8 @@ Fixing as-needed issues, provide shared libs
 
 https://bugs.gentoo.org/show_bug.cgi?id=294971
 
---- Makefile.am
-+++ Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
 @@ -1,440 +1,92 @@
  ACLOCAL_AMFLAGS = -I m4
  
@@ -516,8 +516,8 @@ https://bugs.gentoo.org/show_bug.cgi?id=294971
 +      type_trait.hh
 +libsnpfile_la_LIBADD = $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_SIGNALS_LIB)
 +
---- configure.in
-+++ configure.in
+--- a/configure.in
++++ b/configure.in
 @@ -1,10 +1,11 @@
  AC_INIT(snpfile, 2.0.1, mailund@birc.au.dk)
  AM_INIT_AUTOMAKE
diff --git a/sci-biology/snpfile/snpfile-2.0.1-r2.ebuild b/sci-biology/snpfile/snpfile-2.0.1-r2.ebuild
new file mode 100644 (file)
index 0000000..8062ca0
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="A library and API for manipulating large SNP datasets"
+HOMEPAGE="http://www.birc.au.dk/~mailund/SNPFile/"
+SRC_URI="http://www.birc.au.dk/~mailund/SNPFile/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="static-libs"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-libs/boost:="
+DEPEND="
+       ${RDEPEND}
+       >=sys-devel/autoconf-archive-2016.09.16"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc44.patch
+       "${FILESDIR}"/${P}-gentoo.diff
+       "${FILESDIR}"/${P}-gold.patch
+       "${FILESDIR}"/${P}-ax-boost.patch
+)
+
+src_prepare() {
+       default
+       mv configure.{in,ac} || die
+       rm m4/ax_boost.m4 || die
+       eautoreconf
+}
+
+src_configure() {
+       econf $(use_enable static-libs static)
+}
+
+src_install() {
+       default
+
+       if ! use static-libs; then
+               find "${D}" -name '*.la' -delete || die
+       fi
+}