aboutsummaryrefslogtreecommitdiff
path: root/math/zimpl
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2017-12-25 21:31:55 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2017-12-25 21:31:55 +0000
commit6ff500470b026a472e3113a2f7c5899f83d2cc08 (patch)
tree2338872b66124f406d5a683667a5a12604a6fab5 /math/zimpl
parent281b3eae6173bce0543c4a3dcf08c480d86c8427 (diff)
downloadports-6ff500470b026a472e3113a2f7c5899f83d2cc08.tar.gz
ports-6ff500470b026a472e3113a2f7c5899f83d2cc08.zip
New port: math/zimpl: Language to translate the LP models into .lp or .mps
Submitted by: myself Approved by: adamw (mentor) Differential Revision: https://reviews.freebsd.org/D13623
Notes
Notes: svn path=/head/; revision=457259
Diffstat (limited to 'math/zimpl')
-rw-r--r--math/zimpl/Makefile27
-rw-r--r--math/zimpl/distinfo3
-rw-r--r--math/zimpl/files/patch-Makefile51
-rw-r--r--math/zimpl/pkg-descr6
4 files changed, 87 insertions, 0 deletions
diff --git a/math/zimpl/Makefile b/math/zimpl/Makefile
new file mode 100644
index 000000000000..77b52d553c42
--- /dev/null
+++ b/math/zimpl/Makefile
@@ -0,0 +1,27 @@
+# Created by: Yuri Victorovich <yuri@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= zimpl
+DISTVERSION= 3.3.4
+CATEGORIES= math
+MASTER_SITES= http://zimpl.zib.de/download/
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Language to translate the LP models into .lp or .mps
+
+LICENSE= LGPL3
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libgmp.so:math/gmp
+
+USES= gmake localbase:ldflags tar:tgz
+USE_LDCONFIG= yes
+
+MAKE_ARGS= CC=${CC} LINKCC=${CC} DCC=${CC} LDFLAGS="${LDFLAGS} -lgmp -lm -lz" SHARED=true
+
+PLIST_FILES= bin/zimpl
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/zimpl-* ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
+.include <bsd.port.mk>
diff --git a/math/zimpl/distinfo b/math/zimpl/distinfo
new file mode 100644
index 000000000000..8e687c596c22
--- /dev/null
+++ b/math/zimpl/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1514229681
+SHA256 (zimpl-3.3.4.tgz) = 3362fb21524df459723d23f6e0c122ebdd684153a9cc991a2c7f5b2752a83eb2
+SIZE (zimpl-3.3.4.tgz) = 802251
diff --git a/math/zimpl/files/patch-Makefile b/math/zimpl/files/patch-Makefile
new file mode 100644
index 000000000000..55a9e8d801a0
--- /dev/null
+++ b/math/zimpl/files/patch-Makefile
@@ -0,0 +1,51 @@
+--- Makefile.orig 2017-03-07 17:20:10 UTC
++++ Makefile
+@@ -26,7 +26,7 @@
+ #
+ .PHONY: all depend clean lint doc doxygen check valgrind libdbl coverage
+
+-ARCH := $(shell uname -m | \
++ARCHX := $(shell uname -m | \
+ sed \
+ -e s/sun../sparc/ \
+ -e s/i.86/x86/ \
+@@ -40,6 +40,7 @@ OSTYPE := $(shell uname -s
+ tr '[:upper:]' '[:lower:]' | \
+ tr '/' '_' | \
+ sed \
++ -e s/freebsd/linux/ \
+ -e s/cygwin.*/cygwin/ \
+ -e s/irix../irix/ \
+ -e s/windows.*/windows/ \
+@@ -76,7 +77,7 @@ SRCDIR = src
+ BINDIR = bin
+ LIBDIR = lib
+
+-CPPFLAGS = -I$(SRCDIR) -DVERSION='"$(VERSION)"'
++CPPFLAGS += -I$(SRCDIR) -DVERSION='"$(VERSION)"'
+ CFLAGS = -O
+ LDFLAGS = -lgmp -lm
+ YFLAGS = -d -t -v
+@@ -102,10 +103,10 @@ ifeq ($(STATIC),true)
+ LINK = static
+ endif
+
+-BASE = $(OSTYPE).$(ARCH).$(COMP).$(OPT)
+-OBJDIR = obj/O.$(OSTYPE).$(ARCH).$(COMP).$(LINK).$(OPT)
++BASE = $(OSTYPE).$(ARCHX).$(COMP).$(OPT)
++OBJDIR = obj/O.$(OSTYPE).$(ARCHX).$(COMP).$(LINK).$(OPT)
+ NAME = zimpl
+-BINNAME = $(NAME)-$(VERSION).$(OSTYPE).$(ARCH).$(COMP).$(LINK).$(OPT)
++BINNAME = $(NAME)-$(VERSION).$(OSTYPE).$(ARCHX).$(COMP).$(LINK).$(OPT)
+ LIBNAME = $(NAME)-$(VERSION).$(BASE)
+
+ LIBRARY = $(LIBDIR)/lib$(LIBNAME)$(LIBEXT)
+@@ -140,7 +141,7 @@ OBJSRC = $(addprefix $(SRCDIR)/,$(OBJEC
+ LIBSRC = $(addprefix $(SRCDIR)/,$(LIBOBJ:.o=.c)) #(SRCDIR)/numbdbl.c
+
+ #-----------------------------------------------------------------------------
+-include make/make.$(OSTYPE).$(ARCH).$(COMP).$(OPT)
++include make/make.$(OSTYPE).$(ARCHX).$(COMP).$(OPT)
+ -include make/local/make.$(HOSTNAME)
+ -include make/local/make.$(HOSTNAME).$(COMP)
+ -include make/local/make.$(HOSTNAME).$(COMP).$(OPT)
diff --git a/math/zimpl/pkg-descr b/math/zimpl/pkg-descr
new file mode 100644
index 000000000000..55b40f565931
--- /dev/null
+++ b/math/zimpl/pkg-descr
@@ -0,0 +1,6 @@
+Zimpl is a little language to translate the mathematical model of a problem
+into a linear or nonlinear (mixed-) integer mathematical program expressed
+in .lp or .mps file format which can be read and (hopefully) solved by a LP
+or MIP solver.
+
+WWW: http://zimpl.zib.de