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/nlopt
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/nlopt')
-rw-r--r--sci-libs/nlopt/Manifest2
-rw-r--r--sci-libs/nlopt/files/nlopt-2.2.4-fix-nlopt_hpp-location.patch47
-rw-r--r--sci-libs/nlopt/files/nlopt-2.3-as-needed.patch23
-rw-r--r--sci-libs/nlopt/files/nlopt-2.3-pkgconfig.patch10
-rw-r--r--sci-libs/nlopt/metadata.xml21
-rw-r--r--sci-libs/nlopt/nlopt-2.2.4.ebuild98
-rw-r--r--sci-libs/nlopt/nlopt-2.4.2.ebuild103
7 files changed, 304 insertions, 0 deletions
diff --git a/sci-libs/nlopt/Manifest b/sci-libs/nlopt/Manifest
new file mode 100644
index 000000000000..4c71308be038
--- /dev/null
+++ b/sci-libs/nlopt/Manifest
@@ -0,0 +1,2 @@
+DIST nlopt-2.2.4.tar.gz 2315878 SHA256 a903125d6495df4861b2aea8b3ce9c6b881caaf36bf62db923335d96e3a60a20 SHA512 595a6da7f305a15ba16e42d6a2b28540fe3201568284600e57a091f9836dc04f657fad370ee5f2f528ebdc7ffa1f0fc81c2929bd49dbb861ddf7fd901beec871 WHIRLPOOL 62f8d0bf1e6fd003b8e3bb5da94eef7f59b10406d249026903f27f6738f4bf3e7bc83a06e1494a39a31f676f07df6d30d546717b44b469b77980dda3fce3c6f8
+DIST nlopt-2.4.2.tar.gz 2361992 SHA256 8099633de9d71cbc06cd435da993eb424bbcdbded8f803cdaa9fb8c6e09c8e89 SHA512 136aacc00a69f77e8a7ce5dc26a5f3f027bc8c01b97aa1f43919462e0a412154eabfb01be258e082dffe61f9b554bb2bfbb550a7b82c7c77c7b22874a64a9703 WHIRLPOOL ec07f402cc1868f05adf1f261aa2e50901448e965ccdee3d249e1447ad0abdff354caf1bafbf0700a25896f9fcee509c916fd5e7bdd768514a55bf6fff40784d
diff --git a/sci-libs/nlopt/files/nlopt-2.2.4-fix-nlopt_hpp-location.patch b/sci-libs/nlopt/files/nlopt-2.2.4-fix-nlopt_hpp-location.patch
new file mode 100644
index 000000000000..460b4378673a
--- /dev/null
+++ b/sci-libs/nlopt/files/nlopt-2.2.4-fix-nlopt_hpp-location.patch
@@ -0,0 +1,47 @@
+Author: Dustin Polke <DuPol@gmx.de>
+
+Header files are located in top_srcdir not top_builddir.
+--- a/swig/Makefile.am
++++ b/swig/Makefile.am
+@@ -3,7 +3,7 @@ EXTRA_DIST = $(SWIG_SRC) nlopt-guile.i n
+
+ BUILT_SOURCES = nlopt-guile.cpp nlopt-python.cpp nlopt-enum-renames.i nlopt.scm.in
+
+-HDR = $(top_builddir)/api/nlopt.hpp
++HDR = $(top_srcdir)/api/nlopt.hpp
+
+ ##############################################################################
+ # Guile wrapper
+@@ -11,7 +11,7 @@ HDR = $(top_builddir)/api/nlopt.hpp
+ libnlopt@NLOPT_SUFFIX@_guile_la_SOURCES = nlopt-guile.cpp
+ libnlopt@NLOPT_SUFFIX@_guile_la_LIBADD = ../libnlopt@NLOPT_SUFFIX@.la
+ libnlopt@NLOPT_SUFFIX@_guile_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
+-libnlopt@NLOPT_SUFFIX@_guile_la_CPPFLAGS = $(GUILE_CPPFLAGS) -I$(top_builddir)/api
++libnlopt@NLOPT_SUFFIX@_guile_la_CPPFLAGS = $(GUILE_CPPFLAGS) -I$(top_srcdir)/api
+
+ guiledir = $(GUILE_INSTALL_DIR)
+ if WITH_GUILE
+@@ -25,7 +25,7 @@ endif
+ _nlopt_la_SOURCES = nlopt-python.cpp
+ _nlopt_la_LIBADD = ../libnlopt@NLOPT_SUFFIX@.la
+ _nlopt_la_LDFLAGS = -module -version-info @SHARED_VERSION_INFO@
+-_nlopt_la_CPPFLAGS = $(PYTHON_INCLUDES) -I$(top_builddir)/api
++_nlopt_la_CPPFLAGS = $(PYTHON_INCLUDES) -I$(top_srcdir)/api
+
+ if WITH_PYTHON
+ python_PYTHON = nlopt.py
+@@ -43,12 +43,12 @@ lib_LTLIBRARIES = $(guilelib)
+ if MAINTAINER_MODE
+
+ nlopt-guile.cpp nlopt.scm.in: $(SWIG_SRC) nlopt-guile.i $(HDR)
+- swig -I$(top_builddir)/api -outdir $(builddir) -c++ -guile -scmstub -o $@ nlopt.i
++ swig -I$(top_srcdir)/api -outdir $(builddir) -c++ -guile -scmstub -o $@ nlopt.i
+ rm -f nlopt.scm.in
+ mv nlopt.scm nlopt.scm.in
+
+ nlopt-python.cpp nlopt.py: $(SWIG_SRC) nlopt-python.i numpy.i $(HDR)
+- swig -I$(top_builddir)/api -outdir $(builddir) -c++ -python -o $@ nlopt.i
++ swig -I$(top_srcdir)/api -outdir $(builddir) -c++ -python -o $@ nlopt.i
+
+ nlopt-enum-renames.i: $(top_srcdir)/api/nlopt.h
+ (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; egrep 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL|NLOPT_NUM_ALGORITHMS' $(top_srcdir)/api/nlopt.h | sed 's/NLOPT_//g' |tr -d ' ' |tr '/' ',' |tr '=' ',' |cut -d, -f1 |while read name; do echo "%rename(NLOPT_$$name) nlopt::$$name;"; done; egrep 'NLOPT_[A-Z_]* =' $(top_srcdir)/api/nlopt.h | egrep -v 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL' | sed 's/NLOPT_//g' |tr -d ' ' |cut -d'=' -f1 | while read name; do echo "%rename(NLOPT_$$name) nlopt::$$name;"; done) > $@
diff --git a/sci-libs/nlopt/files/nlopt-2.3-as-needed.patch b/sci-libs/nlopt/files/nlopt-2.3-as-needed.patch
new file mode 100644
index 000000000000..928ec174b771
--- /dev/null
+++ b/sci-libs/nlopt/files/nlopt-2.3-as-needed.patch
@@ -0,0 +1,23 @@
+diff -Nur nlopt-2.3.orig/Makefile.am nlopt-2.3/Makefile.am
+--- nlopt-2.3.orig/Makefile.am 2012-08-03 02:07:09.000000000 +0100
++++ nlopt-2.3/Makefile.am 2012-08-03 02:13:13.000000000 +0100
+@@ -25,6 +25,7 @@
+
+ if WITH_CXX
+ libnlopt@NLOPT_SUFFIX@_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
++libnlopt@NLOPT_SUFFIX@_la_LIBADD += -lstdc++
+ else
+ libnlopt@NLOPT_SUFFIX@_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
+ endif
+diff -Nur nlopt-2.3.orig/swig/Makefile.am nlopt-2.3/swig/Makefile.am
+--- nlopt-2.3.orig/swig/Makefile.am 2012-08-03 02:07:09.000000000 +0100
++++ nlopt-2.3/swig/Makefile.am 2012-08-03 03:04:30.000000000 +0100
+@@ -9,7 +9,7 @@
+ # Guile wrapper
+
+ libnlopt@NLOPT_SUFFIX@_guile_la_SOURCES = nlopt-guile.cpp
+-libnlopt@NLOPT_SUFFIX@_guile_la_LIBADD = ../libnlopt@NLOPT_SUFFIX@.la
++libnlopt@NLOPT_SUFFIX@_guile_la_LIBADD = ../libnlopt@NLOPT_SUFFIX@.la @GUILE_LIBS@
+ libnlopt@NLOPT_SUFFIX@_guile_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
+ libnlopt@NLOPT_SUFFIX@_guile_la_CPPFLAGS = $(GUILE_CPPFLAGS) -I$(top_builddir)/api
+
diff --git a/sci-libs/nlopt/files/nlopt-2.3-pkgconfig.patch b/sci-libs/nlopt/files/nlopt-2.3-pkgconfig.patch
new file mode 100644
index 000000000000..8a072b15e2e2
--- /dev/null
+++ b/sci-libs/nlopt/files/nlopt-2.3-pkgconfig.patch
@@ -0,0 +1,10 @@
+--- nlopt.pc.in.orig 2012-08-03 01:41:30.000000000 +0100
++++ nlopt.pc.in 2012-08-03 01:42:29.000000000 +0100
+@@ -6,5 +6,6 @@
+ Name: NLopt
+ Description: nonlinear optimization libary
+ Version: @VERSION@
+-Libs: -L${libdir} -lnlopt -lm
++Libs: -L${libdir} -lnlopt@NLOPT_SUFFIX@
++Libs.private: -lm
+ Cflags: -I${includedir}
diff --git a/sci-libs/nlopt/metadata.xml b/sci-libs/nlopt/metadata.xml
new file mode 100644
index 000000000000..41afd070ac46
--- /dev/null
+++ b/sci-libs/nlopt/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">
+ NLopt is a library for nonlinear optimization,
+ providing a common interface for a number of different free
+ optimization routines available online as well as original
+ implementations of various other algorithms. Its features include:
+ * Callable from variety of languages (C, C++, Fortran, Python, Octave)
+ * A common interface for many different algorithms—try a different
+ algorithm just by changing one parameter.
+ * Both global and local optimization algorithms.
+ * Both derivative-free and gradient-based optimization algorithms.
+ * Algorithms for unconstrained optimization, bound-constrained
+ optimization, and general nonlinear inequality constraints.
+</longdescription>
+<use>
+ <flag name="octave">Add plugin for <pkg>sci-mathematics/octave</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/sci-libs/nlopt/nlopt-2.2.4.ebuild b/sci-libs/nlopt/nlopt-2.2.4.ebuild
new file mode 100644
index 000000000000..b3c8cf6b91fa
--- /dev/null
+++ b/sci-libs/nlopt/nlopt-2.2.4.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+SUPPORT_PYTHON_ABIS="1"
+PYTHON_DEPEND="python? *"
+RESTRICT_PYTHON_ABIS="3.* 2.7-pypy-* *-jython"
+
+inherit python autotools-utils
+
+DESCRIPTION="Non-linear optimization library"
+HOMEPAGE="http://ab-initio.mit.edu/nlopt/"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1 MIT"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="cxx guile octave python static-libs"
+
+DEPEND="
+ guile? ( dev-scheme/guile )
+ octave? ( sci-mathematics/octave )
+ python? ( dev-python/numpy )"
+RDEPEND="${DEPEND}"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_prepare() {
+ if use python; then
+ sed -i \
+ -e '/^LTLIBRARIES/s:$(pyexec_LTLIBRARIES)::g' \
+ swig/Makefile.in || die
+ echo '#!/bin/sh' > py-compile
+ fi
+ epatch "${FILESDIR}"/${P}-fix-nlopt_hpp-location.patch
+ eautoreconf
+}
+
+src_configure() {
+ if use octave; then
+ export OCT_INSTALL_DIR="${EPREFIX}"/usr/libexec/octave/site/oct/${CHOST}
+ export M_INSTALL_DIR="${EPREFIX}"/usr/share/octave/site/m
+ else
+ export MKOCTFILE=None
+ fi
+ myeconfargs+=(
+ $(use_with cxx)
+ $(use_with guile)
+ $(use_with octave)
+ $(use_with python)
+ --without-matlab
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ if use python; then
+ python_copy_sources swig
+ compilation() {
+ autotools-utils_src_compile \
+ PYTHON_CPPFLAGS="-I${EPREFIX}$(python_get_includedir)" \
+ PYTHON_LDFLAGS="${EPREFIX}$(python_get_library -l)" \
+ PYTHON_SITE_PKG="${EPREFIX}$(python_get_sitedir)" \
+ PYTHON_VERSION="${EPREFIX}$(python_get_version)" \
+ PYTHON_INCLUDES="${EPREFIX}$(python_get_includedir)" \
+ pythondir="${EPREFIX}$(python_get_sitedir)" \
+ pyexecdir="${EPREFIX}$(python_get_sitedir)"
+ }
+ python_execute_function -s --source-dir swig compilation
+ fi
+}
+
+src_install() {
+ autotools-utils_src_install
+ if use python; then
+ installation() {
+ rm *.la
+ emake DESTDIR="${D}" install \
+ pyexecdir="${EPREFIX}$(python_get_sitedir)" \
+ pythondir="${EPREFIX}$(python_get_sitedir)"
+ }
+ python_execute_function -s --source-dir swig installation
+ python_clean_installation_image
+ fi
+ local r
+ for r in */README; do newdoc ${r} README.$(dirname ${r}); done
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize ${PN}.py
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup ${PN}.py
+}
diff --git a/sci-libs/nlopt/nlopt-2.4.2.ebuild b/sci-libs/nlopt/nlopt-2.4.2.ebuild
new file mode 100644
index 000000000000..4f161e8eb93f
--- /dev/null
+++ b/sci-libs/nlopt/nlopt-2.4.2.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+AUTOTOOLS_AUTORECONF=1
+
+inherit python-r1 autotools-utils
+
+DESCRIPTION="Non-linear optimization library"
+HOMEPAGE="http://ab-initio.mit.edu/nlopt/"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1 MIT"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="cxx guile octave python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+DEPEND="
+ guile? ( dev-scheme/guile )
+ octave? ( sci-mathematics/octave )
+ python? ( dev-python/numpy[${PYTHON_USEDEP}] )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3-pkgconfig.patch
+ "${FILESDIR}"/${PN}-2.3-as-needed.patch
+)
+
+src_prepare() {
+ autotools-utils_src_prepare
+ use cxx && BUILD_CXX="${S}_cxx"
+ use python && python_copy_sources
+}
+
+src_configure() {
+ if use octave; then
+ export OCT_INSTALL_DIR="$(octave-config -p LOCALOCTFILEDIR)"
+ export M_INSTALL_DIR="$(octave-config -p LOCALFCNFILEDIR)"
+
+ else
+ export MKOCTFILE=None
+ fi
+ local myeconfargs=(
+ $(use_with guile)
+ )
+ if use python; then
+ python_foreach_impl run_in_build_dir autotools-utils_src_configure
+ else
+ autotools-utils_src_configure
+ fi
+ if use cxx; then
+ myeconfargs+=( --with-cxx --without-octave --without-python )
+ BUILD_DIR="${BUILD_CXX}" autotools-utils_src_configure
+ fi
+}
+
+src_compile() {
+ if use python; then
+ python_foreach_impl run_in_build_dir autotools-utils_src_compile
+ else
+ autotools-utils_src_compile
+ fi
+ use cxx && BUILD_DIR="${BUILD_CXX}" autotools-utils_src_compile
+ #-C "${BUILD_DIR}_cxx"
+}
+
+src_test() {
+ do_test() {
+ local a f
+ cd "${BUILD_DIR}"/test
+ for a in {1..7}; do
+ for f in {5..9}; do
+ ./testopt -a $a -o $f || die "algorithm $a function $f failed"
+ done
+ done
+ }
+ if use python; then
+ python_foreach_impl run_in_build_dir do_test
+ else
+ do_test
+ fi
+ cd "${BUILD_CXX}"/test
+ for a in {1..9}; do
+ for f in {5..9}; do
+ ./testopt -a $a -o $f || die "algorithm $a function $f failed"
+ done
+ done
+}
+
+src_install() {
+ # build cxx first so the c lib overwrites the pc file
+ use cxx && BUILD_DIR="${BUILD_CXX}" autotools-utils_src_install
+ if use python; then
+ python_foreach_impl run_in_build_dir autotools-utils_src_install
+ else
+ autotools-utils_src_install
+ fi
+ local r
+ for r in */README; do newdoc ${r} README.$(dirname ${r}); done
+}