diff --git a/math/zimpl/Makefile b/math/zimpl/Makefile index 732166033681..c089f1505f93 100644 --- a/math/zimpl/Makefile +++ b/math/zimpl/Makefile @@ -1,30 +1,26 @@ # Created by: Yuri Victorovich PORTNAME= zimpl DISTVERSION= 3.3.6 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= https://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 ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= missing make/make.linux.$${arch}.gnu.opt for other architectures BUILD_DEPENDS= bison:devel/bison LIB_DEPENDS= libgmp.so:math/gmp -USES= gmake localbase:ldflags tar:tgz +USES= cmake 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} +CMAKE_ON= BUILD_SHARED_LIBS .include diff --git a/math/zimpl/files/patch-Makefile b/math/zimpl/files/patch-Makefile deleted file mode 100644 index 7918014efbab..000000000000 --- a/math/zimpl/files/patch-Makefile +++ /dev/null @@ -1,59 +0,0 @@ ---- Makefile.orig 2018-11-11 21:01:50 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/ \ -@@ -77,11 +78,11 @@ BINDIR = bin - LIBDIR = lib - LINTCONF = /opt/pclint/config - --CPPFLAGS = -I$(SRCDIR)/.. -DVERSION='"$(VERSION)"' --CFLAGS = -O --LDFLAGS = -lgmp -lm --YFLAGS = -d -t -v --LFLAGS = -d -+CPPFLAGS += -I$(SRCDIR)/.. -DVERSION='"$(VERSION)"' -+CFLAGS += -O -+LDFLAGS += -lgmp -lm -+YFLAGS += -d -t -v -+LFLAGS += -d - ARFLAGS = - DFLAGS = -MM - -@@ -103,10 +104,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) -@@ -141,7 +142,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/files/patch-src_CMakeLists.txt b/math/zimpl/files/patch-src_CMakeLists.txt new file mode 100644 index 000000000000..5358f70035f7 --- /dev/null +++ b/math/zimpl/files/patch-src_CMakeLists.txt @@ -0,0 +1,19 @@ +- Allow to build shared libs. + +--- src/CMakeLists.txt.orig 2021-08-01 07:59:48 UTC ++++ src/CMakeLists.txt +@@ -116,12 +116,12 @@ if(MSVC) + endif() + + #create zimpl with pic +-add_library(libzimpl-pic STATIC ${libsources}) ++add_library(libzimpl-pic ${libsources}) + set_target_properties(libzimpl-pic PROPERTIES POSITION_INDEPENDENT_CODE on) + target_link_libraries(libzimpl-pic ${libs}) + + #create zimpl without pic +-add_library(libzimpl STATIC ${libsources}) ++add_library(libzimpl ${libsources}) + target_link_libraries(libzimpl ${libs}) + + #create zimpl binary diff --git a/math/zimpl/pkg-descr b/math/zimpl/pkg-descr index ccf09211d9ba..8b2eb4e14e27 100644 --- a/math/zimpl/pkg-descr +++ b/math/zimpl/pkg-descr @@ -1,6 +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. +or MIP solver. WWW: https://zimpl.zib.de diff --git a/math/zimpl/pkg-plist b/math/zimpl/pkg-plist new file mode 100644 index 000000000000..080e1057e759 --- /dev/null +++ b/math/zimpl/pkg-plist @@ -0,0 +1,44 @@ +bin/zimpl +include/zimpl/blkmem.h +include/zimpl/bound.h +include/zimpl/code.h +include/zimpl/conname.h +include/zimpl/define.h +include/zimpl/elem.h +include/zimpl/entry.h +include/zimpl/gmpmisc.h +include/zimpl/hash.h +include/zimpl/heap.h +include/zimpl/idxset.h +include/zimpl/inst.h +include/zimpl/lint.h +include/zimpl/list.h +include/zimpl/local.h +include/zimpl/metaio.h +include/zimpl/mme.h +include/zimpl/mmlparse2.h +include/zimpl/mono.h +include/zimpl/mshell.h +include/zimpl/numb.h +include/zimpl/prog.h +include/zimpl/random.h +include/zimpl/ratlp.h +include/zimpl/ratlpstore.h +include/zimpl/ratlptypes.h +include/zimpl/rdefpar.h +include/zimpl/set.h +include/zimpl/set4.h +include/zimpl/stkchk.h +include/zimpl/stmt.h +include/zimpl/strstore.h +include/zimpl/symbol.h +include/zimpl/term.h +include/zimpl/tuple.h +include/zimpl/xlpglue.h +include/zimpl/zimpllib.h +include/zimpl/zlpglue.h +lib/cmake/zimpl/zimpl-config.cmake +lib/cmake/zimpl/zimpl-targets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/zimpl/zimpl-targets.cmake +lib/libzimpl-pic.so +lib/libzimpl.so