Project import
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b64d845
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,91 @@
+#
+#    Copyright (c) 2015 Nest, Inc.
+#    All rights reserved.
+#
+#    This document is the property of Nest. It is considered
+#    confidential and proprietary information.
+#
+#    This document may not be reproduced or transmitted in any form,
+#    in whole or in part, without the express written permission of
+#    Nest.
+#
+#    Description:
+#      This file is the make file for eigen, a C++ linear algebra library
+#
+
+
+include pre.mak
+
+PackageName		:= eigen
+
+PackageExtension	:= tar.bz2
+PackageSeparator	:= -
+
+PackagePatchArgs	:= -p1
+
+PackageArchive		:= $(PackageName).$(PackageExtension)
+PackageSourceDir	:= $(PackageName)$(PackageSeparator)$(PackageVersion)
+
+PackageBuildMakefile	= $(call GenerateBuildPaths,Makefile)
+
+LicenseSourceFile	:= $(PackageSourceDir)/COPYING.MPL2
+
+CleanPaths		+= $(PackageLicenseFile)
+
+SOURCEDIRS = $(PackageSourceDir)
+$(PackageSourceDir)_RULE_TARGET = $(BuildDirectory)/configure
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+$(LicenseSourceFile): $(BuildDirectory)/source
+
+$(PackageLicenseFile): $(LicenseSourceFile)
+	$(copy-result)
+
+# Extract the source from the archive and apply patches, if any.
+
+$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths)
+	$(expand-and-patch-package)
+
+# Prepare the sources.
+
+$(BuildDirectory)/source: | $(PackageSourceDir)
+	$(Verbose)touch $@
+
+# Patch the sources, if necessary.
+
+$(BuildDirectory)/patch: $(BuildDirectory)/source
+	$(Verbose)touch $@
+
+$(BuildDirectory)/configure: $(BuildDirectory)/source
+	$(Verbose)touch $@
+
+ResultHeaderPath             = $(ResultDirectory)/include
+SourceHeaderPathEigen        = $(PackageSourceDir)/Eigen
+SourceHeaderPathUnsupported  = $(PackageSourceDir)/unsupported
+
+$(ResultHeaderPath):
+	$(create-directory)
+
+$(BuildDirectory)/copyEigen: $(BuildDirectory)/configure | $(ResultHeaderPath)
+	$(Verbose)cp -Rf $(SourceHeaderPathEigen) $(ResultHeaderPath)
+	$(Verbose)touch $@
+
+$(BuildDirectory)/copyUnsupported: $(BuildDirectory)/configure | $(ResultHeaderPath)
+	$(Verbose)cp -Rf $(SourceHeaderPathUnsupported) $(ResultHeaderPath)
+	$(Verbose)touch $@
+
+$(BuildDirectory)/stage: $(BuildDirectory)/copyEigen $(BuildDirectory)/copyUnsupported | $(ResultDirectory)
+	$(Verbose)touch $@
+
+.PHONY: stage
+stage: $(BuildDirectory)/stage
+
+clean:
+	$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
+
+include post.mak
diff --git a/eigen.patches/eigen-50.description b/eigen.patches/eigen-50.description
new file mode 100644
index 0000000..03d6810
--- /dev/null
+++ b/eigen.patches/eigen-50.description
@@ -0,0 +1,3 @@
+Disables optimization on GeneralMatrixVector's run function. This solves an
+issue with the CodeSourcery compiler whereby attempting to optimize the run
+function would result in a compile failure.
diff --git a/eigen.patches/eigen-50.patch b/eigen.patches/eigen-50.patch
new file mode 100644
index 0000000..553232a
--- /dev/null
+++ b/eigen.patches/eigen-50.patch
@@ -0,0 +1,12 @@
+diff -aruN eigen-eigen-10219c95fe65/Eigen/src/Core/products/GeneralMatrixVector.h eigen-eigen-10219c95fe65.N/Eigen/src/Core/products/GeneralMatrixVector.h
+--- eigen-eigen-10219c95fe65/Eigen/src/Core/products/GeneralMatrixVector.h	2015-01-21 08:26:41.000000000 -0800
++++ eigen-eigen-10219c95fe65.N/Eigen/src/Core/products/GeneralMatrixVector.h	2015-05-28 12:00:13.193765171 -0700
+@@ -52,7 +52,7 @@
+   Index rows, Index cols,
+   const LhsScalar* lhs, Index lhsStride,
+   const RhsScalar* rhs, Index rhsIncr,
+-  ResScalar* res, Index resIncr, RhsScalar alpha);
++  ResScalar* res, Index resIncr, RhsScalar alpha) nlATTRIBUTE_OPTIMIZE(nlOPTIMIZE_NONE);
+ };
+ 
+ template<typename Index, typename LhsScalar, bool ConjugateLhs, typename RhsScalar, bool ConjugateRhs, int Version>
diff --git a/eigen.patches/eigen-51.description b/eigen.patches/eigen-51.description
new file mode 100644
index 0000000..7e34142
--- /dev/null
+++ b/eigen.patches/eigen-51.description
@@ -0,0 +1,2 @@
+This patch resolves any -Wshadow warnings/errors that Eigen produces
+as a result of Sapphire calls.
diff --git a/eigen.patches/eigen-51.patch.gz b/eigen.patches/eigen-51.patch.gz
new file mode 100644
index 0000000..1f794cc
--- /dev/null
+++ b/eigen.patches/eigen-51.patch.gz
Binary files differ
diff --git a/eigen.tar.bz2 b/eigen.tar.bz2
new file mode 100644
index 0000000..1dcc960
--- /dev/null
+++ b/eigen.tar.bz2
Binary files differ
diff --git a/eigen.url b/eigen.url
new file mode 100644
index 0000000..e9626a2
--- /dev/null
+++ b/eigen.url
@@ -0,0 +1 @@
+http://bitbucket.org/eigen/eigen/get/3.2.4.tar.bz2
diff --git a/eigen.version b/eigen.version
new file mode 100644
index 0000000..a4c8315
--- /dev/null
+++ b/eigen.version
@@ -0,0 +1 @@
+eigen-10219c95fe65