diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2014-01-14 21:54:44 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2014-01-14 21:54:44 +0000 |
commit | d7f47aa336361de99991602560c6fea0388ba108 (patch) | |
tree | 9ea9020e6b95df7ba500b33fe2cdb9ecee38bf7d /sci-libs/coinor-csdp | |
parent | Initial import in main tree (diff) | |
download | gentoo-2-d7f47aa336361de99991602560c6fea0388ba108.tar.gz gentoo-2-d7f47aa336361de99991602560c6fea0388ba108.tar.bz2 gentoo-2-d7f47aa336361de99991602560c6fea0388ba108.zip |
Initial import in main tree
(Portage version: 2.2.8-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'sci-libs/coinor-csdp')
-rw-r--r-- | sci-libs/coinor-csdp/ChangeLog | 12 | ||||
-rw-r--r-- | sci-libs/coinor-csdp/Manifest | 4 | ||||
-rw-r--r-- | sci-libs/coinor-csdp/coinor-csdp-6.1.1.ebuild | 100 | ||||
-rw-r--r-- | sci-libs/coinor-csdp/metadata.xml | 16 |
4 files changed, 132 insertions, 0 deletions
diff --git a/sci-libs/coinor-csdp/ChangeLog b/sci-libs/coinor-csdp/ChangeLog new file mode 100644 index 000000000000..83df6d158a0d --- /dev/null +++ b/sci-libs/coinor-csdp/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for sci-libs/coinor-csdp +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/coinor-csdp/ChangeLog,v 1.1 2014/01/14 21:54:44 bicatali Exp $ + + 29 Jan 2013; Sébastien Fabbro <bicatali@gentoo.org> coinor-csdp-6.1.1.ebuild: + sci-libs/coinor-csdp: use generic pkg-config + +*coinor-csdp-6.1.1 (20 Jul 2012) + + 20 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org> +coinor-csdp-6.1.1.ebuild, + +metadata.xml: + sci-libs/coinor-csdp: Initial import diff --git a/sci-libs/coinor-csdp/Manifest b/sci-libs/coinor-csdp/Manifest new file mode 100644 index 000000000000..582b96458426 --- /dev/null +++ b/sci-libs/coinor-csdp/Manifest @@ -0,0 +1,4 @@ +DIST Csdp-6.1.1.tgz 441574 SHA256 0558a46ac534e846bf866b76a9a44e8a854d84558efa50988ffc092f99a138b9 SHA512 ba5dc0faea223bad6293f131ee63daee0a395a6e84c76fe108dbbefb3ab0696b2a59f435766c78a2d22244801a9abda2719798cbfe30dd9e1c32317e0283fd2e WHIRLPOOL 51f4fa92a07e49071581695d31b504b7fa734659ee61387d3f55e7692866dbe68552466b4004104eadde39485c0201455ff18fc5836e50b3ab5cd7b6ae9a52a8 +EBUILD coinor-csdp-6.1.1.ebuild 2898 SHA256 a918b5c0a9eeb79aba5532a298b31d151469d375e6a69d31cee58d4b0f2968fc SHA512 f35643fc9f398a0f0fcdc323a1e26a0b7bf16ba7da5f1c2f63bae7534b03e4bf7d112468c30101e036997c00b22457bd7c797c5386c9e6e7b854d62ac0f6221c WHIRLPOOL 6d252634e954ea443120fceac53330305cf58178473e75bcdc7a7573037d4f5102fc3526ffb5c4c9419eed6170c8677075004f41210059bce31ca7542c7dd41d +MISC ChangeLog 422 SHA256 f0f9db0c17312037a19ffce35aadbfafe4a7a4d202c7f83d66379087fc4d6fac SHA512 0c5fc78e30924230629e2856b04a20e0f983d60f0b9cdd8d78ad380f4c29c5a9d72be04ea311029f7bc20d90639a621e88baabea7846f272ca62891de0a48981 WHIRLPOOL c3eb574f85a0c3907298cfa07f1b3edb1c75f225dbe5656ee13630fb3f5e26628b4041f21edd2a426f9b7f197accb06adb8fb27723eebb661939988e1b11e2dd +MISC metadata.xml 793 SHA256 522c76c0cbb011050ccc71cc00adc2d018d566a2382a1ef79dec85dbda992d2f SHA512 ae1c62d2c938a0e2487bfa16c33fd0aa9630402061ba0856d6c6e50302d9354a5384b0907fe14b8924df1f13423b665da5821ef848d5c7f9baebaa1a78cd002e WHIRLPOOL bd893e255ca5c40f994152aad0c6d00cdf802c46b264624f69d1575e3c5d07f6dd497f88a2e14576ef9d48319eda9869ed3fa0e10ae826ead12658cdadf17bf5 diff --git a/sci-libs/coinor-csdp/coinor-csdp-6.1.1.ebuild b/sci-libs/coinor-csdp/coinor-csdp-6.1.1.ebuild new file mode 100644 index 000000000000..fe472c1e30db --- /dev/null +++ b/sci-libs/coinor-csdp/coinor-csdp-6.1.1.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/coinor-csdp/coinor-csdp-6.1.1.ebuild,v 1.1 2014/01/14 21:54:44 bicatali Exp $ + +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' '{}' \; + 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) =~ -latlas ]] && append-cflags -DUSEATLAS + sed -i \ + -e "s:-O3:${CFLAGS}:" \ + -e "s:ar :$(tc-getAR) :" \ + */Makefile || die +} + +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" + emake -C theta LIBS="${libs} -L../lib -lsdp" +} + +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> |