math/zimpl: Change to cmake, install headers and libraries in addition to the executable.

This commit is contained in:
Yuri Victorovich 2021-08-01 01:08:53 -07:00
parent a839eee07c
commit 5652b672f7
5 changed files with 67 additions and 67 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= zimpl
DISTVERSION= 3.3.6
PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= https://zimpl.zib.de/download/
@ -17,14 +18,9 @@ ONLY_FOR_ARCHS_REASON= missing make/make.linux.$${arch}.gnu.opt for other archit
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 <bsd.port.mk>

View File

@ -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)

View File

@ -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

View File

@ -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

44
math/zimpl/pkg-plist Normal file
View File

@ -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