Index: head/math/Makefile =================================================================== --- head/math/Makefile +++ head/math/Makefile @@ -91,6 +91,7 @@ SUBDIR += R-cran-units SUBDIR += R-cran-xts SUBDIR += R-cran-zoo + SUBDIR += SoPlex SUBDIR += aamath SUBDIR += abacus SUBDIR += abakus Index: head/math/SoPlex/Makefile =================================================================== --- head/math/SoPlex/Makefile +++ head/math/SoPlex/Makefile @@ -0,0 +1,31 @@ +# Created by: Yuri Victorovich +# $FreeBSD$ + +PORTNAME= SoPlex +DISTVERSION= 3.0.1 +CATEGORIES= math science +MASTER_SITES= http://soplex.zib.de/download/release/ +DISTNAME= ${PORTNAME:tl}-${DISTVERSION} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Optimization package for solving linear programming problems (LPs) + +LICENSE= ZIB +LICENSE_NAME= ZIB ACADEMIC LICENSE +LICENSE_FILE= ${WRKSRC}/COPYING +LICENSE_PERMS= dist-mirror pkg-mirror auto-accept + +LIB_DEPENDS= libgmp.so:math/gmp + +USES= cmake:outsource,noninja tar:tgz +USE_LDCONFIG= yes +PLIST_SUB= SHL4=${DISTVERSION}.0 SHL2=${DISTVERSION:R} + +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000 +CMAKE_ARGS= -DFREEBSD_NO_CXX_THREAD_LOCAL_BUG224581:BOOL=ON # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224581 +# This also necessitates noninja above for some reason +.endif + +.include Index: head/math/SoPlex/distinfo =================================================================== --- head/math/SoPlex/distinfo +++ head/math/SoPlex/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1514183609 +SHA256 (soplex-3.0.1.tgz) = f97a6be9f890f723c046ac21b80d8781ee6155e49e0e6ae90d151d44a23b8676 +SIZE (soplex-3.0.1.tgz) = 1343714 Index: head/math/SoPlex/files/patch-CMakeLists.txt =================================================================== --- head/math/SoPlex/files/patch-CMakeLists.txt +++ head/math/SoPlex/files/patch-CMakeLists.txt @@ -0,0 +1,71 @@ +--- CMakeLists.txt.orig 2017-09-04 15:12:27 UTC ++++ CMakeLists.txt +@@ -45,33 +45,33 @@ set(CMAKE_MACOSX_RPATH ON) + set(CMAKE_CXX_STANDARD 11) + + # create target to update the githash +-file(WRITE ${CMAKE_BINARY_DIR}/soplex_update_githash.cmake " +-find_program(GIT git) +-if(GIT) +- execute_process( +- COMMAND \${GIT} describe --always --dirty +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +- OUTPUT_VARIABLE GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE) +- if(GITHASH STREQUAL \"\") +- set(GITHASH \"------\") +- endif() +- string(REGEX REPLACE \"^.*-g\" \"\" GITHASH \${GITHASH}) +-else() +- set(GITHASH \"------\") +-endif() +-if(GITHASH STREQUAL \"------\") +- # read stored hash from file +- file(STRINGS \${DST} GITHASH) +- string(REGEX REPLACE \"#define SPX_GITHASH \" \"\" GITHASH \${GITHASH}) +-else() +- file(WRITE \${DST} \"#define SPX_GITHASH \\\"\${GITHASH}\\\"\") +-endif() +-message(STATUS \"Git hash: \" \${GITHASH}) +-") ++#file(WRITE ${CMAKE_BINARY_DIR}/soplex_update_githash.cmake " ++#find_program(GIT git) ++#if(GIT) ++# execute_process( ++# COMMAND \${GIT} describe --always --dirty ++# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ++# OUTPUT_VARIABLE GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE) ++# if(GITHASH STREQUAL \"\") ++# set(GITHASH \"------\") ++# endif() ++# string(REGEX REPLACE \"^.*-g\" \"\" GITHASH \${GITHASH}) ++#else() ++# set(GITHASH \"------\") ++#endif() ++#if(GITHASH STREQUAL \"------\") ++# # read stored hash from file ++# file(STRINGS \${DST} GITHASH) ++# string(REGEX REPLACE \"#define SPX_GITHASH \" \"\" GITHASH \${GITHASH}) ++#else() ++# file(WRITE \${DST} \"#define SPX_GITHASH \\\"\${GITHASH}\\\"\") ++#endif() ++#message(STATUS \"Git hash: \" \${GITHASH}) ++#") + # encode the current git hash into the binary +-add_custom_target(soplex_update_githash +- COMMAND ${CMAKE_COMMAND} -DDST=${PROJECT_SOURCE_DIR}/src/git_hash.cpp +- -P ${CMAKE_BINARY_DIR}/soplex_update_githash.cmake) ++#add_custom_target(soplex_update_githash ++# COMMAND ${CMAKE_COMMAND} -DDST=${PROJECT_SOURCE_DIR}/src/git_hash.cpp ++# -P ${CMAKE_BINARY_DIR}/soplex_update_githash.cmake) + + option(LEGACY "Build SoPlex in legacy mode" OFF) + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +@@ -85,7 +85,7 @@ if(LEGACY) + add_definitions(-DTHREADLOCAL=) + endif() + +-if(NOT "${CMAKE_CXX_COMPILE_FEATURES}" MATCHES "cxx_thread_local") ++if(NOT "${CMAKE_CXX_COMPILE_FEATURES}" MATCHES "cxx_thread_local" OR FREEBSD_NO_CXX_THREAD_LOCAL_BUG224581) + add_definitions(-DTHREADLOCAL=) + endif() + Index: head/math/SoPlex/files/patch-src_CMakeLists.txt =================================================================== --- head/math/SoPlex/files/patch-src_CMakeLists.txt +++ head/math/SoPlex/files/patch-src_CMakeLists.txt @@ -0,0 +1,27 @@ +--- src/CMakeLists.txt.orig 2017-09-04 15:08:47 UTC ++++ src/CMakeLists.txt +@@ -159,20 +159,20 @@ set(headers + wallclocktimer.h) + + # create soplex library with pic +-add_library(libsoplex-pic STATIC ${sources}) ++add_library(libsoplex-pic SHARED ${sources}) + set_target_properties(libsoplex-pic PROPERTIES + POSITION_INDEPENDENT_CODE on + VERSION ${SOPLEX_VERSION_MAJOR}.${SOPLEX_VERSION_MINOR}.${SOPLEX_VERSION_PATCH}.${SOPLEX_VERSION_SUB} + SOVERSION ${SOPLEX_VERSION_MAJOR}.${SOPLEX_VERSION_MINOR}) +-add_dependencies(libsoplex-pic soplex_update_githash) ++#add_dependencies(libsoplex-pic soplex_update_githash) + target_link_libraries(libsoplex-pic ${libs}) + + # create soplex library without pic +-add_library(libsoplex STATIC ${sources}) ++add_library(libsoplex SHARED ${sources}) + set_target_properties(libsoplex PROPERTIES + VERSION ${SOPLEX_VERSION_MAJOR}.${SOPLEX_VERSION_MINOR}.${SOPLEX_VERSION_PATCH}.${SOPLEX_VERSION_SUB} + SOVERSION ${SOPLEX_VERSION_MAJOR}.${SOPLEX_VERSION_MINOR}) +-add_dependencies(libsoplex soplex_update_githash) ++#add_dependencies(libsoplex soplex_update_githash) + target_link_libraries(libsoplex ${libs}) + + # create soplex binary using library without pic Index: head/math/SoPlex/pkg-descr =================================================================== --- head/math/SoPlex/pkg-descr +++ head/math/SoPlex/pkg-descr @@ -0,0 +1,18 @@ +SoPlex is an optimization package for solving linear programming problems (LPs) +based on an advanced implementation of the primal and dual revised simplex +algorithm. It provides special support for the exact solution of LPs with +rational input data. It can be used as a standalone solver reading MPS or LP +format files via a command line interface as well as embedded into other +programs via a C++ class library. The main features of SoPlex are: + +* presolving, scaling, exploitation of sparsity, hot-starting from any regular + basis +* column- and row-oriented form of the simplex algorithm +* an object-oriented software design written in C++ +* a compile-time option to use 80bit extended ("quad") precision for numerically + difficult LPs +* an LP iterative refinement procedure to compute high-precision solution +* routines for an exact rational LU factorization and continued fraction + approximations in order to compute exact solutions. + +WWW: http://soplex.zib.de Index: head/math/SoPlex/pkg-plist =================================================================== --- head/math/SoPlex/pkg-plist +++ head/math/SoPlex/pkg-plist @@ -0,0 +1,104 @@ +bin/soplex +include/array.h +include/basevectors.h +include/classarray.h +include/clufactor.h +include/clufactor_rational.h +include/cring.h +include/dataarray.h +include/datahashtable.h +include/datakey.h +include/dataset.h +include/didxset.h +include/dsvector.h +include/dsvectorbase.h +include/dvector.h +include/dvectorbase.h +include/exceptions.h +include/gzstream.h +include/idlist.h +include/idxset.h +include/islist.h +include/lpcol.h +include/lpcolbase.h +include/lpcolset.h +include/lpcolsetbase.h +include/lprow.h +include/lprowbase.h +include/lprowset.h +include/lprowsetbase.h +include/mpsinput.h +include/nameset.h +include/notimer.h +include/random.h +include/rational.h +include/ratrecon.h +include/slinsolver.h +include/slinsolver_rational.h +include/slufactor.h +include/slufactor_rational.h +include/sol.h +include/solbase.h +include/soplex.h +include/soplexlegacy.h +include/sorter.h +include/spxalloc.h +include/spxautopr.h +include/spxbasis.h +include/spxboundflippingrt.h +include/spxdantzigpr.h +include/spxdefaultrt.h +include/spxdefines.h +include/spxdevexpr.h +include/spxequilisc.h +include/spxfastrt.h +include/spxfileio.h +include/spxgeometsc.h +include/spxgithash.h +include/spxharrisrt.h +include/spxhybridpr.h +include/spxid.h +include/spxleastsqsc.h +include/spxlp.h +include/spxlpbase.h +include/spxmainsm.h +include/spxout.h +include/spxparmultpr.h +include/spxpricer.h +include/spxratiotester.h +include/spxscaler.h +include/spxsimplifier.h +include/spxsolver.h +include/spxstarter.h +include/spxsteepexpr.h +include/spxsteeppr.h +include/spxsumst.h +include/spxvectorst.h +include/spxweightpr.h +include/spxweightst.h +include/ssvector.h +include/ssvectorbase.h +include/statistics.h +include/svector.h +include/svectorbase.h +include/svset.h +include/svsetbase.h +include/timer.h +include/timerfactory.h +include/unitvector.h +include/unitvectorbase.h +include/updatevector.h +include/usertimer.h +include/validation.h +include/vector.h +include/vectorbase.h +include/wallclocktimer.h +lib/cmake/soplex/soplex-config.cmake +lib/cmake/soplex/soplex-targets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/soplex/soplex-targets.cmake +lib/libsoplex-pic.so +lib/libsoplex-pic.so.%%SHL2%% +lib/libsoplex-pic.so.%%SHL4%% +lib/libsoplex.so +lib/libsoplex.so.%%SHL2%% +lib/libsoplex.so.%%SHL4%%