summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/dsdp
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/dsdp')
-rw-r--r--sci-libs/dsdp/Manifest1
-rw-r--r--sci-libs/dsdp/dsdp-5.8-r2.ebuild80
-rw-r--r--sci-libs/dsdp/files/dsdp-5.8-gold.patch13
-rw-r--r--sci-libs/dsdp/files/dsdp-5.8-malloc.patch10
-rw-r--r--sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch11
-rw-r--r--sci-libs/dsdp/metadata.xml21
6 files changed, 136 insertions, 0 deletions
diff --git a/sci-libs/dsdp/Manifest b/sci-libs/dsdp/Manifest
new file mode 100644
index 000000000000..a8bd51051e28
--- /dev/null
+++ b/sci-libs/dsdp/Manifest
@@ -0,0 +1 @@
+DIST DSDP5.8.tar.gz 2608518 SHA256 26aa624525a636de272c0b329e2dfd01a0d5b7827f1c1c76f393d71e37dead70 SHA512 0a32a34e33dcac151e95ed0f8cee62603bbe2b4ba1e448bba35324fe576376cb33c15908cde61ae5a7c0dcdea945f1ec544f19b3dd36524158573260182e080e WHIRLPOOL 63f5ce91d1c624b3c8f4d6ba61f8f386e739c0a5ad97515b4d36bb6026751ff4ca83b6a466deb5983e15eab3c84879bc3d87d7f2613e8070ab989e2607da9ddf
diff --git a/sci-libs/dsdp/dsdp-5.8-r2.ebuild b/sci-libs/dsdp/dsdp-5.8-r2.ebuild
new file mode 100644
index 000000000000..c60090db9515
--- /dev/null
+++ b/sci-libs/dsdp/dsdp-5.8-r2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils 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 ~ppc-macos ~x86-linux ~x86-macos ~x64-macos"
+IUSE="doc examples"
+
+RDEPEND="virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MYP}"
+
+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() {
+ epatch \
+ "${FILESDIR}"/${P}-readsdpa.patch \
+ "${FILESDIR}"/${P}-malloc.patch \
+ "${FILESDIR}"/${P}-gold.patch
+ # to do proper parallel compilation
+ find . -name Makefile -exec \
+ sed -i -e 's:make :$(MAKE) :g' '{}' \;
+ 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)
+
+ insinto /usr/include
+ doins include/*.h src/sdp/*.h
+
+ use doc && dodoc docs/*.pdf
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/sci-libs/dsdp/files/dsdp-5.8-gold.patch b/sci-libs/dsdp/files/dsdp-5.8-gold.patch
new file mode 100644
index 000000000000..ae677820ffc3
--- /dev/null
+++ b/sci-libs/dsdp/files/dsdp-5.8-gold.patch
@@ -0,0 +1,13 @@
+diff --git a/examples/Makefile b/examples/Makefile
+index 8d7d433..11b9c8c 100644
+--- a/examples/Makefile
++++ b/examples/Makefile
+@@ -4,7 +4,7 @@ default:
+
+ include ../make.include
+
+-EXAMPLE_LIBS = ${DSDPLIB} ${LAPACKBLAS}
++EXAMPLE_LIBS = ${DSDPLIB} ${LAPACKBLAS} -lm
+
+ dsdp: exinfo clean
+ ${MEX} -I${DSDPROOT}/include dsdp.c ${DSDPLIB};
diff --git a/sci-libs/dsdp/files/dsdp-5.8-malloc.patch b/sci-libs/dsdp/files/dsdp-5.8-malloc.patch
new file mode 100644
index 000000000000..48e067d1d898
--- /dev/null
+++ b/sci-libs/dsdp/files/dsdp-5.8-malloc.patch
@@ -0,0 +1,10 @@
+--- 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
+@@ -6,7 +6,6 @@
+ #include <stdarg.h>
+ #include <sys/types.h>
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include "dsdpsys.h"
+ #include "dsdpbasictypes.h"
+
diff --git a/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch b/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch
new file mode 100644
index 000000000000..f555e50ba0ce
--- /dev/null
+++ b/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch
@@ -0,0 +1,11 @@
+--- examples/readsdpa.c.orig 2011-03-14 16:49:10.000000000 +0000
++++ examples/readsdpa.c 2011-03-14 17:05:52.000000000 +0000
+@@ -87,7 +87,7 @@
+ double ddobj,ppobj,scl,dpot;
+ char problemname[100],thisline[100], filename[300],savefile[100];
+ char directory[100]="/home/benson/sdpexamples/sdplib/";
+- char outputfile[50]="",suffix[20]=".dat-s", tablename[20]="results-dsdp-5.8";
++ char outputfile[50]="",suffix[20]=".dat-s", tablename[100]="results-dsdp-5.8";
+ char success='s',sformat;
+ FILE *fp1=0,*fp2=0,*fout;
+ DSDPData dddd;
diff --git a/sci-libs/dsdp/metadata.xml b/sci-libs/dsdp/metadata.xml
new file mode 100644
index 000000000000..583a107924f4
--- /dev/null
+++ b/sci-libs/dsdp/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ The DSDP software is a free open source implementation of an
+ interior-point method for semidefinite programming. It provides
+ primal and dual solutions, exploits low-rank structure and sparsity
+ in the data, and has relatively low memory requirements for an
+ interior-point method. It allows feasible and infeasible starting
+ points and provides approximate certificates of infeasibility when
+ no feasible solution exists. The dual-scaling algorithm implemented
+ in this package has a convergence proof and worst-case polynomial
+ complexity under mild assumptions on the data. Furthermore, the
+ solver offers scalable parallel performance for large problems and a
+ well documented interface. Some of the most popular applications of
+ semidefinite programming and linear matrix inequalities (LMI) are
+ model control, truss topology design, and semidefinite relaxations
+ of combinatorial and global optimization problems.
+</longdescription>
+</pkgmetadata>