diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/coinor-csdp | |
download | gentoo-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/coinor-csdp')
-rw-r--r-- | sci-libs/coinor-csdp/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/coinor-csdp/coinor-csdp-6.1.1-r1.ebuild | 102 | ||||
-rw-r--r-- | sci-libs/coinor-csdp/metadata.xml | 16 |
3 files changed, 119 insertions, 0 deletions
diff --git a/sci-libs/coinor-csdp/Manifest b/sci-libs/coinor-csdp/Manifest new file mode 100644 index 000000000000..697e233aed0b --- /dev/null +++ b/sci-libs/coinor-csdp/Manifest @@ -0,0 +1 @@ +DIST Csdp-6.1.1.tgz 441574 SHA256 0558a46ac534e846bf866b76a9a44e8a854d84558efa50988ffc092f99a138b9 SHA512 ba5dc0faea223bad6293f131ee63daee0a395a6e84c76fe108dbbefb3ab0696b2a59f435766c78a2d22244801a9abda2719798cbfe30dd9e1c32317e0283fd2e WHIRLPOOL 51f4fa92a07e49071581695d31b504b7fa734659ee61387d3f55e7692866dbe68552466b4004104eadde39485c0201455ff18fc5836e50b3ab5cd7b6ae9a52a8 diff --git a/sci-libs/coinor-csdp/coinor-csdp-6.1.1-r1.ebuild b/sci-libs/coinor-csdp/coinor-csdp-6.1.1-r1.ebuild new file mode 100644 index 000000000000..6028c06ccbde --- /dev/null +++ b/sci-libs/coinor-csdp/coinor-csdp-6.1.1-r1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit versionator toolchain-funcs flag-o-matic multilib + +MYPN=Csdp + +DESCRIPTION="COIN-OR C Library for Semi-Definite Programming" +HOMEPAGE="https://projects.coin-or.org/Csdp/" +SRC_URI="http://www.coin-or.org/download/source/${MYPN}/${MYPN}-${PV}.tgz" + +LICENSE="CPL-1.0" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples openmp static-libs" + +RDEPEND=" + virtual/blas + virtual/lapack" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S="${WORKDIR}/${MYPN}-${PV}" + +static_to_shared() { + local libstatic=${1}; shift + local libname=$(basename ${libstatic%.a}) + local soname=${libname}$(get_libname $(get_version_component_range 1-2)) + local libdir=$(dirname ${libstatic}) + + einfo "Making ${soname} from ${libstatic}" + if [[ ${CHOST} == *-darwin* ]] ; then + ${LINK:-$(tc-getCC)} ${LDFLAGS} \ + -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \ + -Wl,-all_load -Wl,${libstatic} \ + "$@" -o ${libdir}/${soname} || die "${soname} failed" + else + ${LINK:-$(tc-getCC)} ${LDFLAGS} \ + -shared -Wl,-soname=${soname} \ + -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \ + "$@" -o ${libdir}/${soname} || die "${soname} failed" + [[ $(get_version_component_count) -gt 1 ]] && \ + ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version)) + ln -s ${soname} ${libdir}/${libname}$(get_libname) + fi +} + +pkg_setup() { + if use openmp && [[ $(tc-getCC) == *gcc* ]] && ! tc-has-openmp; then + eerror "Your selected gcc compiler does not support OpenMP" + die "OpenMP non capable gcc" + fi +} + +src_prepare() { + find . -name Makefile -exec sed -i -e 's:make:$(MAKE):g' '{}' + || die + append-cflags -DNOSHORTS -DUSEGETTIME -I../include + if use openmp; then + [[ $(tc-getCC) == *gcc* ]] && append-cflags -fopenmp \ + && append-ldflags -fopenmp + [[ $(tc-getCC) == *icc* ]] && append-cflags -openmp + append-cflags -DUSEOPENMP + fi + use amd64 && append-cflags -DBIT64 + [[ $($(tc-getPKG_CONFIG) --libs blas) =~ atlas ]] && append-cflags -DUSEATLAS + sed -i \ + -e "s:-O3:${CFLAGS} ${LDFLAGS}:" \ + -e "s:ar :$(tc-getAR) :" \ + */Makefile || die + + tc-export CC +} + +src_compile() { + emake CFLAGS="${CFLAGS} -fPIC" -C lib + local libs="$($(tc-getPKG_CONFIG) --libs blas lapack)" + static_to_shared lib/libsdp.a ${libs} + use static-libs && emake -C lib clean && emake -C lib + emake -C solver LIBS="${libs} -L../lib -lsdp -lm" + emake -C theta LIBS="${libs} -L../lib -lsdp -lm" +} + +src_test() { + LD_LIBRARY_PATH="${S}/lib" emake -C test +} + +src_install() { + dobin solver/csdp theta/{theta,graphtoprob,complement,rand_graph} + dolib.so lib/libsdp$(get_libname)* + use static-libs && dolib.a lib/libsdp.a + insinto /usr/include/${PN} + doins include/* + dodoc AUTHORS README + use doc && dodoc doc/csdpuser.pdf + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins example/* + fi +} diff --git a/sci-libs/coinor-csdp/metadata.xml b/sci-libs/coinor-csdp/metadata.xml new file mode 100644 index 000000000000..cfceba8a14b8 --- /dev/null +++ b/sci-libs/coinor-csdp/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci</herd> +<longdescription lang="en"> + CSDP is a library of routines that implements a predictor corrector + variant of the semidefinite programming algorithm of Helmberg, + Rendl, Vanderbei, and Wolkowicz. The main advantages of this code + are that it is written to be used as a callable subroutine, it is + written in C for efficiency, the code runs in parallel on shared + memory multi-processor systems, and it makes effective use of + sparsity in the constraint matrices. CSDP has been compiled on many + different systems. The code should work on any system with an ANSI + C Compiler and BLAS/LAPACK libraries. +</longdescription> +</pkgmetadata> |