summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerhard Bräunlich <wippbox@gmx.net>2016-09-05 18:16:24 +0200
committerDavid Seifert <soap@gentoo.org>2016-09-06 22:12:39 +0200
commit2551a092b4df2ab1f06f4d486d6b3f3049f0efc1 (patch)
tree2f75c7959a9b6f6830741c26e0df0fb37b3a2a3f /sci-libs/dsdp
parentsci-libs/neartree: Version bump to 5.1.1 (diff)
downloadgentoo-2551a092b4df2ab1f06f4d486d6b3f3049f0efc1.tar.gz
gentoo-2551a092b4df2ab1f06f4d486d6b3f3049f0efc1.tar.bz2
gentoo-2551a092b4df2ab1f06f4d486d6b3f3049f0efc1.zip
sci-libs/dsdp: revbump (EAPI 4 -> 6)
Package-Manager: portage-2.2.28 Closes: https://github.com/gentoo/gentoo/pull/2249 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-libs/dsdp')
-rw-r--r--sci-libs/dsdp/dsdp-5.8-r3.ebuild80
-rw-r--r--sci-libs/dsdp/files/dsdp-5.8-malloc.patch4
-rw-r--r--sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch4
3 files changed, 84 insertions, 4 deletions
diff --git a/sci-libs/dsdp/dsdp-5.8-r3.ebuild b/sci-libs/dsdp/dsdp-5.8-r3.ebuild
new file mode 100644
index 000000000000..625dc23e6aa5
--- /dev/null
+++ b/sci-libs/dsdp/dsdp-5.8-r3.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit multilib toolchain-funcs versionator
+
+MYP=DSDP${PV}
+
+DESCRIPTION="Software for interior-point for semidefinite programming"
+HOMEPAGE="http://www.mcs.anl.gov/hs/software/DSDP/"
+SRC_URI="http://www.mcs.anl.gov/hs/software/DSDP//${MYP}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc examples"
+
+RDEPEND="virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MYP}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-readsdpa.patch
+ "${FILESDIR}"/${P}-malloc.patch
+ "${FILESDIR}"/${P}-gold.patch
+)
+
+make_shared_lib() {
+ local soname=$(basename "${1%.a}")$(get_libname $(get_major_version))
+ einfo "Making ${soname}"
+ ${2:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname="${soname}" \
+ $([[ ${CHOST} == *-darwin* ]] && echo "-Wl,-install_name -Wl,${EPREFIX}/usr/$(get_libdir)/${soname}") \
+ -Wl,--whole-archive "${1}" -Wl,--no-whole-archive \
+ -o $(dirname "${1}")/"${soname}" \
+ -lm $($(tc-getPKG_CONFIG) --libs blas lapack) || return 1
+}
+
+src_prepare() {
+ default
+ # to do proper parallel compilation
+ while IFS="" read -d $'\0' -r file; do
+ sed -i -e 's:make :$(MAKE) :g' "${file}" || die
+ done < <(find . -name Makefile -print0)
+ sed -i -e 's:make clean:$(MAKE) clean:g' make.include || die
+ sed -i \
+ -e "s|#\(DSDPROOT[[:space:]]*=\).*|\1${S}|" \
+ -e "s|\(CC[[:space:]]*=\).*|\1$(tc-getCC)|" \
+ -e "s|\(OPTFLAGS[[:space:]]*=\).*|\1${CFLAGS}|" \
+ -e "s|\(CLINKER[[:space:]]*=\).*|\1 \${CC} ${LDFLAGS}|" \
+ -e "s|\(LAPACKBLAS[[:space:]]*=\).*|\1 $($(tc-getPKG_CONFIG) --libs blas lapack)|" \
+ -e "s|\(^ARCH[[:space:]]*=\).*|\1$(tc-getAR) cr|" \
+ -e "s|\(^RANLIB[[:space:]]*=\).*|\1$(tc-getRANLIB)|" \
+ make.include || die
+}
+
+src_compile() {
+ emake OPTFLAGS="${CFLAGS} -fPIC" dsdplibrary
+ make_shared_lib lib/lib${PN}.a || die "doing shared lib failed"
+}
+
+src_test() {
+ emake -j1 example test
+}
+
+src_install() {
+ dolib.so lib/lib${PN}$(get_libname $(get_major_version))
+ dosym lib${PN}$(get_libname $(get_major_version)) \
+ /usr/$(get_libdir)/lib${PN}$(get_libname)
+
+ doheader include/*.h src/sdp/*.h
+
+ use doc && DOCS+=( docs/*.pdf )
+ use examples && DOCS+=( examples/. )
+ einstalldocs
+}
diff --git a/sci-libs/dsdp/files/dsdp-5.8-malloc.patch b/sci-libs/dsdp/files/dsdp-5.8-malloc.patch
index 48e067d1d898..487c2a67d270 100644
--- a/sci-libs/dsdp/files/dsdp-5.8-malloc.patch
+++ b/sci-libs/dsdp/files/dsdp-5.8-malloc.patch
@@ -1,5 +1,5 @@
---- src/sys/dsdploginfo.c.orig 2012-04-04 09:59:25.212518434 +1200
-+++ src/sys/dsdploginfo.c 2012-04-04 10:00:05.676522161 +1200
+--- a/src/sys/dsdploginfo.c
++++ b/src/sys/dsdploginfo.c
@@ -6,7 +6,6 @@
#include <stdarg.h>
#include <sys/types.h>
diff --git a/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch b/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch
index f555e50ba0ce..799db6afd5ae 100644
--- a/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch
+++ b/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch
@@ -1,5 +1,5 @@
---- examples/readsdpa.c.orig 2011-03-14 16:49:10.000000000 +0000
-+++ examples/readsdpa.c 2011-03-14 17:05:52.000000000 +0000
+--- a/examples/readsdpa.c
++++ b/examples/readsdpa.c
@@ -87,7 +87,7 @@
double ddobj,ppobj,scl,dpot;
char problemname[100],thisline[100], filename[300],savefile[100];