1 |
commit: 2551a092b4df2ab1f06f4d486d6b3f3049f0efc1 |
2 |
Author: Gerhard Bräunlich <wippbox <AT> gmx <DOT> net> |
3 |
AuthorDate: Mon Sep 5 16:16:24 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 6 20:12:39 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2551a092 |
7 |
|
8 |
sci-libs/dsdp: revbump (EAPI 4 -> 6) |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/2249 |
12 |
|
13 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
14 |
|
15 |
sci-libs/dsdp/dsdp-5.8-r3.ebuild | 80 +++++++++++++++++++++++++++++ |
16 |
sci-libs/dsdp/files/dsdp-5.8-malloc.patch | 4 +- |
17 |
sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch | 4 +- |
18 |
3 files changed, 84 insertions(+), 4 deletions(-) |
19 |
|
20 |
diff --git a/sci-libs/dsdp/dsdp-5.8-r3.ebuild b/sci-libs/dsdp/dsdp-5.8-r3.ebuild |
21 |
new file mode 100644 |
22 |
index 00000000..625dc23 |
23 |
--- /dev/null |
24 |
+++ b/sci-libs/dsdp/dsdp-5.8-r3.ebuild |
25 |
@@ -0,0 +1,80 @@ |
26 |
+# Copyright 1999-2016 Gentoo Foundation |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+# $Id$ |
29 |
+ |
30 |
+EAPI=6 |
31 |
+ |
32 |
+inherit multilib toolchain-funcs versionator |
33 |
+ |
34 |
+MYP=DSDP${PV} |
35 |
+ |
36 |
+DESCRIPTION="Software for interior-point for semidefinite programming" |
37 |
+HOMEPAGE="http://www.mcs.anl.gov/hs/software/DSDP/" |
38 |
+SRC_URI="http://www.mcs.anl.gov/hs/software/DSDP//${MYP}.tar.gz" |
39 |
+ |
40 |
+LICENSE="BSD" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
43 |
+IUSE="doc examples" |
44 |
+ |
45 |
+RDEPEND="virtual/lapack" |
46 |
+DEPEND="${RDEPEND} |
47 |
+ virtual/pkgconfig" |
48 |
+ |
49 |
+S="${WORKDIR}/${MYP}" |
50 |
+ |
51 |
+PATCHES=( |
52 |
+ "${FILESDIR}"/${P}-readsdpa.patch |
53 |
+ "${FILESDIR}"/${P}-malloc.patch |
54 |
+ "${FILESDIR}"/${P}-gold.patch |
55 |
+) |
56 |
+ |
57 |
+make_shared_lib() { |
58 |
+ local soname=$(basename "${1%.a}")$(get_libname $(get_major_version)) |
59 |
+ einfo "Making ${soname}" |
60 |
+ ${2:-$(tc-getCC)} ${LDFLAGS} \ |
61 |
+ -shared -Wl,-soname="${soname}" \ |
62 |
+ $([[ ${CHOST} == *-darwin* ]] && echo "-Wl,-install_name -Wl,${EPREFIX}/usr/$(get_libdir)/${soname}") \ |
63 |
+ -Wl,--whole-archive "${1}" -Wl,--no-whole-archive \ |
64 |
+ -o $(dirname "${1}")/"${soname}" \ |
65 |
+ -lm $($(tc-getPKG_CONFIG) --libs blas lapack) || return 1 |
66 |
+} |
67 |
+ |
68 |
+src_prepare() { |
69 |
+ default |
70 |
+ # to do proper parallel compilation |
71 |
+ while IFS="" read -d $'\0' -r file; do |
72 |
+ sed -i -e 's:make :$(MAKE) :g' "${file}" || die |
73 |
+ done < <(find . -name Makefile -print0) |
74 |
+ sed -i -e 's:make clean:$(MAKE) clean:g' make.include || die |
75 |
+ sed -i \ |
76 |
+ -e "s|#\(DSDPROOT[[:space:]]*=\).*|\1${S}|" \ |
77 |
+ -e "s|\(CC[[:space:]]*=\).*|\1$(tc-getCC)|" \ |
78 |
+ -e "s|\(OPTFLAGS[[:space:]]*=\).*|\1${CFLAGS}|" \ |
79 |
+ -e "s|\(CLINKER[[:space:]]*=\).*|\1 \${CC} ${LDFLAGS}|" \ |
80 |
+ -e "s|\(LAPACKBLAS[[:space:]]*=\).*|\1 $($(tc-getPKG_CONFIG) --libs blas lapack)|" \ |
81 |
+ -e "s|\(^ARCH[[:space:]]*=\).*|\1$(tc-getAR) cr|" \ |
82 |
+ -e "s|\(^RANLIB[[:space:]]*=\).*|\1$(tc-getRANLIB)|" \ |
83 |
+ make.include || die |
84 |
+} |
85 |
+ |
86 |
+src_compile() { |
87 |
+ emake OPTFLAGS="${CFLAGS} -fPIC" dsdplibrary |
88 |
+ make_shared_lib lib/lib${PN}.a || die "doing shared lib failed" |
89 |
+} |
90 |
+ |
91 |
+src_test() { |
92 |
+ emake -j1 example test |
93 |
+} |
94 |
+ |
95 |
+src_install() { |
96 |
+ dolib.so lib/lib${PN}$(get_libname $(get_major_version)) |
97 |
+ dosym lib${PN}$(get_libname $(get_major_version)) \ |
98 |
+ /usr/$(get_libdir)/lib${PN}$(get_libname) |
99 |
+ |
100 |
+ doheader include/*.h src/sdp/*.h |
101 |
+ |
102 |
+ use doc && DOCS+=( docs/*.pdf ) |
103 |
+ use examples && DOCS+=( examples/. ) |
104 |
+ einstalldocs |
105 |
+} |
106 |
|
107 |
diff --git a/sci-libs/dsdp/files/dsdp-5.8-malloc.patch b/sci-libs/dsdp/files/dsdp-5.8-malloc.patch |
108 |
index 48e067d..487c2a6 100644 |
109 |
--- a/sci-libs/dsdp/files/dsdp-5.8-malloc.patch |
110 |
+++ b/sci-libs/dsdp/files/dsdp-5.8-malloc.patch |
111 |
@@ -1,5 +1,5 @@ |
112 |
---- src/sys/dsdploginfo.c.orig 2012-04-04 09:59:25.212518434 +1200 |
113 |
-+++ src/sys/dsdploginfo.c 2012-04-04 10:00:05.676522161 +1200 |
114 |
+--- a/src/sys/dsdploginfo.c |
115 |
++++ b/src/sys/dsdploginfo.c |
116 |
@@ -6,7 +6,6 @@ |
117 |
#include <stdarg.h> |
118 |
#include <sys/types.h> |
119 |
|
120 |
diff --git a/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch b/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch |
121 |
index f555e50..799db6a 100644 |
122 |
--- a/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch |
123 |
+++ b/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch |
124 |
@@ -1,5 +1,5 @@ |
125 |
---- examples/readsdpa.c.orig 2011-03-14 16:49:10.000000000 +0000 |
126 |
-+++ examples/readsdpa.c 2011-03-14 17:05:52.000000000 +0000 |
127 |
+--- a/examples/readsdpa.c |
128 |
++++ b/examples/readsdpa.c |
129 |
@@ -87,7 +87,7 @@ |
130 |
double ddobj,ppobj,scl,dpot; |
131 |
char problemname[100],thisline[100], filename[300],savefile[100]; |