summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-rcar-gen3-adas/recipes-support/nlopt/nlopt.inc32
-rw-r--r--meta-rcar-gen3-adas/recipes-support/nlopt/nlopt/0001-Fix-compilation-error.patch25
-rw-r--r--meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_2.4.2.bb7
-rw-r--r--meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_git.bb8
4 files changed, 72 insertions, 0 deletions
diff --git a/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt.inc b/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt.inc
new file mode 100644
index 0000000..245fef2
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt.inc
@@ -0,0 +1,32 @@
+DESCRIPTION = "library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization"
+HOMEPAGE = "http://ab-initio.mit.edu/wiki/index.php/NLopt"
+SECTION = "System/Libraries"
+LICENSE = "LGPL-2.1 | MIT"
+
+LIC_FILES_CHKSUM ??= "file://COPYING;md5=7036bf07f719818948a837064b1af213"
+
+inherit autotools pkgconfig
+
+DEPENDS += "swig-native"
+
+# remove dead weight from the build
+EXTRA_OECONF += " \
+ --without-guile \
+ --without-python \
+ --without-octave \
+ --without-matlab \
+ --enable-shared \
+"
+
+# see https://github.com/stevengj/nlopt/issues/29
+EXTRA_OECONF += "--enable-maintainer-mode"
+
+EXTRA_OECONF_remove = "--disable-static"
+
+# see https://github.com/stevengj/nlopt/issues/9
+do_configure_prepend () {
+ touch ${S}/swig/nlopt.scm.in
+}
+
+SRC_URI_append = " file://0001-Fix-compilation-error.patch"
+
diff --git a/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt/0001-Fix-compilation-error.patch b/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt/0001-Fix-compilation-error.patch
new file mode 100644
index 0000000..10b3594
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt/0001-Fix-compilation-error.patch
@@ -0,0 +1,25 @@
+From 994c3fdbde7ce1b2a31d4bd3053aed7cdc857760 Mon Sep 17 00:00:00 2001
+From: Petr Nechaev <petr.nechaev@cogentembedded.com>
+Date: Sat, 31 Oct 2015 15:24:11 +0300
+Subject: [PATCH 1/1] Fix compilation error
+
+---
+ swig/Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/swig/Makefile.am b/swig/Makefile.am
+index 5ccbfe1..d55ac28 100644
+--- a/swig/Makefile.am
++++ b/swig/Makefile.am
+@@ -44,8 +44,6 @@ if MAINTAINER_MODE
+
+ nlopt-guile.cpp nlopt.scm.in: $(SWIG_SRC) nlopt-guile.i $(HDR)
+ swig -I$(top_srcdir)/api -outdir $(builddir) -c++ -guile -scmstub -o $@ $(srcdir)/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_srcdir)/api -outdir $(builddir) -c++ -python -o $@ $(srcdir)/nlopt.i
+--
+2.4.3
+
diff --git a/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_2.4.2.bb b/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_2.4.2.bb
new file mode 100644
index 0000000..5c72a31
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_2.4.2.bb
@@ -0,0 +1,7 @@
+require ${PN}.inc
+
+SRC_URI = "https://github.com/stevengj/${BPN}/archive/${BPN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "5f60160dd0cb0f7c4fed983940bd5224"
+SRC_URI[sha256sum] = "d838b5b4b1c6b6493666ff61a8817a4ebcee924f54fb95f6f64e5f727ddbf2a6"
+
+S = "${WORKDIR}/${BPN}-${BPN}-${PV}"
diff --git a/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_git.bb b/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_git.bb
new file mode 100644
index 0000000..dd425d9
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_git.bb
@@ -0,0 +1,8 @@
+require ${PN}.inc
+
+SRC_URI = "git://github.com/stevengj/${BPN}.git"
+S = "${WORKDIR}/git"
+SRCREV = "cc413c5491df015c93992ddedd43b222d4369b45"
+
+DEFAULT_PREFERENCE = "-1"
+