diff options
author | David Seifert <soap@gentoo.org> | 2016-09-09 21:50:41 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2016-09-09 21:54:09 +0200 |
commit | c22afc30e39035faf97d77ce20f5f72d7f02a558 (patch) | |
tree | 5d8432c1d44133bb211c34fe793863481b7889ed /sci-libs | |
parent | sci-libs/lis: Version bump to 1.6.5 (diff) | |
download | gentoo-c22afc30e39035faf97d77ce20f5f72d7f02a558.tar.gz gentoo-c22afc30e39035faf97d77ce20f5f72d7f02a558.tar.bz2 gentoo-c22afc30e39035faf97d77ce20f5f72d7f02a558.zip |
sci-libs/gerris: Patch use of sci-libs/lis function prototypes
Gentoo-bug: 593282
* EAPI=6
* Made all PATCHES -p1 compliant
* Exchanged -D_BSD_SOURCE with -D_DEFAULT_SOURCE in order
to silence deprecation from dev-libs/glib
* Add subslot operators for sci-libs/netcdf and sci-libs/gsl
* Add proper SLOT and operator for sci-libs/fftw
* Delete all .la files, as package provides .pc files
Package-Manager: portage-2.3.0
Diffstat (limited to 'sci-libs')
6 files changed, 111 insertions, 6 deletions
diff --git a/sci-libs/gerris/files/gerris-20130531-hypre-no-mpi.patch b/sci-libs/gerris/files/gerris-20130531-hypre-no-mpi.patch index f05512efbddf..a52c78bf77c8 100644 --- a/sci-libs/gerris/files/gerris-20130531-hypre-no-mpi.patch +++ b/sci-libs/gerris/files/gerris-20130531-hypre-no-mpi.patch @@ -1,7 +1,7 @@ patch to allow gerris to use hypre without mpi ---- configure.ac 2013-05-30 23:57:18.000000000 -0700 -+++ configure.ac.new 2013-07-22 13:52:36.083974663 -0700 +--- a/configure.ac ++++ b/configure.ac @@ -336,7 +336,7 @@ # Build hypre module if HYPRE is installed diff --git a/sci-libs/gerris/files/gerris-20130531-lis-matrix-csr.patch b/sci-libs/gerris/files/gerris-20130531-lis-matrix-csr.patch index 21d6810bbd2b..d4c7bfae15bb 100644 --- a/sci-libs/gerris/files/gerris-20130531-lis-matrix-csr.patch +++ b/sci-libs/gerris/files/gerris-20130531-lis-matrix-csr.patch @@ -1,5 +1,5 @@ ---- modules/lis.c.orig 2013-07-22 15:34:05.346631560 -0700 -+++ modules/lis.c 2013-07-22 15:33:28.621427315 -0700 +--- a/modules/lis.c ++++ b/modules/lis.c @@ -45,7 +45,7 @@ g_array_index (stencil->coeff, double, j), A); diff --git a/sci-libs/gerris/files/gerris-20130531-use-blas-lapack-system.patch b/sci-libs/gerris/files/gerris-20130531-use-blas-lapack-system.patch index 4c8985ce5e77..1c25a8f516b6 100644 --- a/sci-libs/gerris/files/gerris-20130531-use-blas-lapack-system.patch +++ b/sci-libs/gerris/files/gerris-20130531-use-blas-lapack-system.patch @@ -1,5 +1,5 @@ ---- modules/Makefile.am.orig 2013-07-22 14:13:10.339130133 -0700 -+++ modules/Makefile.am 2013-07-22 14:15:10.770813929 -0700 +--- a/modules/Makefile.am ++++ b/modules/Makefile.am @@ -105,7 +105,7 @@ libstokes2D_la_LIBADD = $(GFS2D_LIBS) diff --git a/sci-libs/gerris/files/gerris-20131206-DEFAULT_SOURCE-replacement.patch b/sci-libs/gerris/files/gerris-20131206-DEFAULT_SOURCE-replacement.patch new file mode 100644 index 000000000000..d20df635512c --- /dev/null +++ b/sci-libs/gerris/files/gerris-20131206-DEFAULT_SOURCE-replacement.patch @@ -0,0 +1,16 @@ +Silence warnings due to _BSD_SOURCE being deprecated by glib: +* /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and +* _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] +* # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + +--- a/configure.ac ++++ b/configure.ac +@@ -108,7 +108,7 @@ + AC_PROG_CC + + # -D_GNU_SOURCE is only necessary for old (< 2.10) glibc implementations of open_memstream() +-CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_GNU_SOURCE" ++CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_GNU_SOURCE" + if test x$GCC = xyes ; then + CFLAGS="$CFLAGS -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Wmissing-declarations -pipe -std=c99" + fi diff --git a/sci-libs/gerris/files/gerris-20131206-lis-api-change.patch b/sci-libs/gerris/files/gerris-20131206-lis-api-change.patch new file mode 100644 index 000000000000..28892ddadedf --- /dev/null +++ b/sci-libs/gerris/files/gerris-20131206-lis-api-change.patch @@ -0,0 +1,18 @@ +sci-libs/lis changed some of its function prototypes by renaming +lis_solver_get_iters to lis_solver_get_iter in version 1.4.43 from 17 July 2014 + +See also: +http://www.ssisc.org/lis/ChangeLog.txt +https://bugs.gentoo.org/show_bug.cgi?id=593282 + +--- a/modules/lis.c ++++ b/modules/lis.c +@@ -67,7 +67,7 @@ + + lis_solve (A, b, x, solver); + int iter; +- lis_solver_get_iters (solver, &iter); ++ lis_solver_get_iter (solver, &iter); + par->niter = iter; + + lis_vector_get_values (x, 0, lp->lhs->len, (double *) lp->lhs->data); diff --git a/sci-libs/gerris/gerris-20131206-r1.ebuild b/sci-libs/gerris/gerris-20131206-r1.ebuild new file mode 100644 index 000000000000..464ca8ab0de8 --- /dev/null +++ b/sci-libs/gerris/gerris-20131206-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit autotools flag-o-matic toolchain-funcs + +MY_P=${P/-20/-snapshot-} + +DESCRIPTION="Gerris Flow Solver" +HOMEPAGE="http://gfs.sourceforge.net/" +SRC_URI="http://gerris.dalembert.upmc.fr/gerris/tarballs/${MY_P}.tar.gz" + +LICENSE="GPL-2" + +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="examples mpi static-libs" + +# all these deps could be optional +# but the configure.in would have to be modified +# heavily for the automagic +RDEPEND=" + dev-libs/glib:2 + dev-games/ode + sci-libs/netcdf:= + sci-libs/gsl:= + sci-libs/gts + sci-libs/hypre[mpi?] + sci-libs/lis[mpi?] + sci-libs/proj + sci-libs/fftw:3.0= + virtual/lapack + mpi? ( virtual/mpi )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S="${WORKDIR}/${MY_P}" + +# buggy tests, need extra packages and require gerris to be installed +RESTRICT=test + +PATCHES=( + "${FILESDIR}"/${PN}-20130531-hypre-no-mpi.patch + "${FILESDIR}"/${PN}-20130531-lis-matrix-csr.patch + "${FILESDIR}"/${PN}-20130531-use-blas-lapack-system.patch + "${FILESDIR}"/${PN}-20131206-lis-api-change.patch + "${FILESDIR}"/${PN}-20131206-DEFAULT_SOURCE-replacement.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + append-cppflags "-I${EPREFIX}/usr/include/hypre" + econf \ + --enable-shared \ + $(use_enable static-libs static) \ + $(use_enable mpi) \ + LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)" +} + +src_install() { + default + use examples && dodoc -r doc/examples + + find "${D}" -name '*.la' -delete || die +} |