summaryrefslogtreecommitdiff
path: root/homebrew/amplmp/.make.sh-auto
diff options
context:
space:
mode:
Diffstat (limited to 'homebrew/amplmp/.make.sh-auto')
-rw-r--r--homebrew/amplmp/.make.sh-auto10
1 files changed, 10 insertions, 0 deletions
diff --git a/homebrew/amplmp/.make.sh-auto b/homebrew/amplmp/.make.sh-auto
new file mode 100644
index 000000000..7d661a00a
--- /dev/null
+++ b/homebrew/amplmp/.make.sh-auto
@@ -0,0 +1,10 @@
+pkg:setup
+cmake . -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DBUILD_SHARED_LIBS=True
+make all
+MachO::Tools.change_install_name("bin/libasl.dylib", "@rpath/libmp.3.dylib", "#{opt_lib}/libmp.dylib")
+make DESTDIR=${PKG_DEST} install
+mkdir_p libexec/"bin"
+mv Dir[bin/"*.dll"], libexec/"bin"
+%w[errchk.h jac2dim.h obj_adj.h].each { |h| cp "src/asl/solvers/#{h}", include/"asl" }
+resource("miniampl").stage do
+(pkgshare/"example").install "src/miniampl.c", Dir["examples/wb.*"]