Project import
diff --git a/lpsolve-5.5/Makefile b/lpsolve-5.5/Makefile
new file mode 100644
index 0000000..e646c73
--- /dev/null
+++ b/lpsolve-5.5/Makefile
@@ -0,0 +1,155 @@
+#
+#    Copyright (c) 2011 Nest Labs, Inc.
+#    All rights reserved.
+#
+#    This document is the property of Nest Labs. 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 Labs.
+#
+#    Description:
+#      This file is the makefile for lp_solve, a linear and mixed
+#      integer program solver.
+#
+
+include pre.mak
+
+PackageName			:= lp_solve
+
+PackageExtension		:= tar.gz
+PackageSeparator		:= _
+
+PackagePatchArgs		:= -p1
+
+PackageArchive			:= $(PackageName).$(PackageExtension)
+PackageSourceDir		:= $(PackageName)$(PackageSeparator)$(PackageVersion)
+
+LpSolveBuildScriptName		:= ccc$(LPSolveMakefileExtension)
+
+LpSolveAppDir			:= lp_solve
+LpSolveLibDir			:= lpsolve55
+
+LpSolveAppBuildDir		:= $(call GenerateBuildPaths,$(LpSolveAppDir))
+LpSolveLibBuildDir		:= $(call GenerateBuildPaths,$(LpSolveLibDir))
+LpSolveBuildAppScript		:= $(call Slashify,$(LpSolveAppBuildDir))$(LpSolveBuildScriptName)
+LpSolveBuildLibScript		:= $(call Slashify,$(LpSolveLibBuildDir))$(LpSolveBuildScriptName)
+
+LpSolveAppName			:= lp_solve$(ProgramSuffix)
+LpSolveArchiveLibName		:= liblpsolve55$(ArchiveLibrarySuffix)
+LpSolveSharedLibName		:= liblpsolve55$(SharedLibrarySuffix)
+
+LpSolveBinaryDir		:= bin
+LpSolveAppBuildPath		:= $(call Slashify,$(LpSolveAppBuildDir))$(LpSolveBinaryDir)/$(LpSolveAppName)
+LpSolveArchiveLibBuildPath	:= $(call Slashify,$(LpSolveLibBuildDir))$(LpSolveBinaryDir)/$(LpSolveArchiveLibName)
+LpSolveSharedLibBuildPath	:= $(call Slashify,$(LpSolveLibBuildDir))$(LpSolveBinaryDir)/$(LpSolveSharedLibName)
+
+LpSolveAppResultDir		:= $(call GenerateResultPaths,,bin)
+LpSolveAppResultPath		:= $(call Slashify,$(LpSolveAppResultDir))$(LpSolveAppName)
+LpSolveLibResultDir		:= $(call GenerateResultPaths,,lib)
+LpSolveArchiveLibResultPath	:= $(call Slashify,$(LpSolveLibResultDir))$(LpSolveArchiveLibName)
+LpSolveSharedLibResultPath	:= $(call Slashify,$(LpSolveLibResultDir))$(LpSolveSharedLibName)
+
+LpSolveIncResultDir		:= $(call GenerateResultPaths,,include)
+LpSolveIncNames			:= lp_lib.h lp_types.h lp_utils.h lp_fortify.h fortify.h declare.h \
+                                   lp_bit.h lp_crash.h lp_explicit.h lp_Hash.h lpkit.h lp_matrix.h \
+                                   lp_MDO.h lp_mipbb.h lp_MPS.h lp_presolve.h lp_price.h lp_pricePSE.h lp_report.h \
+                                   lp_rlp.h lp_scale.h lp_simplex.h lp_SOS.h lp_wlp.h ufortify.h yacc_read.h
+
+LpSolveIncSourcePaths		:= $(addprefix $(call Slashify,$(PackageSourceDir)),$(LpSolveIncNames))
+LpSolveIncResultPaths		:= $(addprefix $(call Slashify,$(LpSolveIncResultDir)),$(LpSolveIncNames))
+
+LpSolveBuildWatchPath		:= $(call GenerateBuildPaths,lp_lib.h)
+
+CleanPaths			+= $(PackageLicenseFile)
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+$(PackageSourceDir)/README.txt: source
+
+$(PackageLicenseFile): $(PackageSourceDir)/README.txt
+	$(copy-result)
+
+# Extract the source from the archive and apply patches, if any.
+
+$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths)
+	$(expand-and-patch-package)
+
+# Prepare the sources.
+
+.PHONY: source
+source: | $(PackageSourceDir)
+
+# Patch the sources, if necessary.
+
+.PHONY: patch
+patch: source
+
+# Generate the package shadow directory. We set up the dependencies in this arbitrary way to ensure that 'create-links' runs once and only once.
+
+$(LpSolveBuildWatchPath): | $(PackageSourceDir) $(BuildDirectory)
+	$(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory))
+
+$(LpSolveBuildAppScript) $(LpSolveBuildLibScript): $(LpSolveBuildWatchPath)
+
+# Configure the source for building.
+
+.PHONY: configure
+configure: source
+
+# Build the source into the package application and libraries.
+
+$(LpSolveArchiveLibBuildPath) $(LpSolveSharedLibBuildPath): $(LpSolveBuildLibScript)
+	$(Verbose)cd $(<D) && \
+	ar=$(AR) c=$(CC) ranlib=$(RANLIB) libtool=$(LIBTOOL) \
+	sh -x ./$(<F)
+
+$(LpSolveAppBuildPath): $(LpSolveBuildAppScript)
+	$(Verbose)cd $(<D) && \
+	c=$(CC) \
+	sh -x ./$(<F)
+
+.PHONY: build-lib build-app
+build-lib: $(LpSolveArchiveLibBuildPath) $(LpSolveSharedLibBuildPath)
+
+build-app: $(LpSolveAppBuildPath)
+
+.PHONY: build
+build: build-app build-lib
+
+# Stage the build to a temporary installation area.
+
+$(LpSolveAppResultDir) $(LpSolveLibResultDir) $(LpSolveIncResultDir): | $(ResultDirectory)
+	$(create-directory)
+
+$(LpSolveArchiveLibResultPath): $(LpSolveArchiveLibBuildPath) | $(LpSolveLibResultDir)
+	$(copy-result)
+
+$(LpSolveSharedLibResultPath): $(LpSolveSharedLibBuildPath) | $(LpSolveLibResultDir)
+	$(copy-result)
+
+$(LpSolveAppResultPath): $(LpSolveAppBuildPath) | $(LpSolveAppResultDir)
+	$(copy-result)
+
+$(LpSolveIncResultPaths): $(LpSolveIncResultDir)/%: $(PackageSourceDir)/% | $(LpSolveIncResultDir) 
+	$(copy-result)
+
+.PHONY: stage-lib stage-app stage-inc
+stage-lib: $(LpSolveArchiveLibResultPath) $(LpSolveSharedLibResultPath)
+
+stage-app: $(LpSolveAppResultPath)
+
+stage-inc: $(LpSolveIncResultPaths)
+
+.PHONY: stage
+stage: stage-app stage-lib stage-inc
+
+clean:
+	$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
+
+include post.mak
diff --git a/lpsolve-5.5/lp_solve.patches.tar.gz b/lpsolve-5.5/lp_solve.patches.tar.gz
new file mode 100644
index 0000000..de26674
--- /dev/null
+++ b/lpsolve-5.5/lp_solve.patches.tar.gz
Binary files differ
diff --git a/lpsolve-5.5/lp_solve.tar.gz b/lpsolve-5.5/lp_solve.tar.gz
new file mode 100644
index 0000000..55cdf61
--- /dev/null
+++ b/lpsolve-5.5/lp_solve.tar.gz
Binary files differ
diff --git a/lpsolve-5.5/lp_solve.url b/lpsolve-5.5/lp_solve.url
new file mode 100644
index 0000000..cc7ba89
--- /dev/null
+++ b/lpsolve-5.5/lp_solve.url
@@ -0,0 +1 @@
+http://download.sourceforge.net/lpsolve/lp_solve_5.5.2.0_source.tar.gz
diff --git a/lpsolve-5.5/lp_solve.version b/lpsolve-5.5/lp_solve.version
new file mode 100644
index 0000000..9ad974f
--- /dev/null
+++ b/lpsolve-5.5/lp_solve.version
@@ -0,0 +1 @@
+5.5