svn commit: r485275 - in head/math: . osqp osqp/files
Yuri Victorovich
yuri at FreeBSD.org
Sun Nov 18 21:08:43 UTC 2018
Author: yuri
Date: Sun Nov 18 21:08:40 2018
New Revision: 485275
URL: https://svnweb.freebsd.org/changeset/ports/485275
Log:
New port: math/osqp: Operator Splitting QP Solver
Added:
head/math/osqp/
head/math/osqp/Makefile (contents, props changed)
head/math/osqp/distinfo (contents, props changed)
head/math/osqp/files/
head/math/osqp/files/patch-CMakeLists.txt (contents, props changed)
head/math/osqp/files/patch-lin__sys_direct_qdldl_qdldl__sources_CMakeLists.txt (contents, props changed)
head/math/osqp/pkg-descr (contents, props changed)
head/math/osqp/pkg-plist (contents, props changed)
Modified:
head/math/Makefile
Modified: head/math/Makefile
==============================================================================
--- head/math/Makefile Sun Nov 18 21:08:00 2018 (r485274)
+++ head/math/Makefile Sun Nov 18 21:08:40 2018 (r485275)
@@ -481,6 +481,7 @@
SUBDIR += openmesh
SUBDIR += opensolaris-libm
SUBDIR += orpie
+ SUBDIR += osqp
SUBDIR += p5-AI-DecisionTree
SUBDIR += p5-AI-Genetic
SUBDIR += p5-AI-NeuralNet-BackProp
Added: head/math/osqp/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/osqp/Makefile Sun Nov 18 21:08:40 2018 (r485275)
@@ -0,0 +1,22 @@
+# $FreeBSD$
+
+PORTNAME= osqp
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.4.1
+CATEGORIES= math
+
+MAINTAINER= yuri at FreeBSD.org
+COMMENT= Operator Splitting QP Solver
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= cmake:outsource
+USE_GITHUB= yes
+GH_ACCOUNT= oxfordcontrol
+GH_TUPLE= oxfordcontrol:qdldl:7ab0fca:q/lin_sys/direct/qdldl/qdldl_sources
+USE_LDCONFIG= yes
+
+CMAKE_OFF= BUILD_STATIC_LIBS BUILD_EXAMPLES UNITTESTS
+
+.include <bsd.port.mk>
Added: head/math/osqp/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/osqp/distinfo Sun Nov 18 21:08:40 2018 (r485275)
@@ -0,0 +1,5 @@
+TIMESTAMP = 1542574334
+SHA256 (oxfordcontrol-osqp-v0.4.1_GH0.tar.gz) = 0429d9580a9cdcce7c4ca61a9a97ccf4f24c7cab64f8dc44b3b9df73042cbac0
+SIZE (oxfordcontrol-osqp-v0.4.1_GH0.tar.gz) = 927482
+SHA256 (oxfordcontrol-qdldl-7ab0fca_GH0.tar.gz) = 9d02ed1a10ad2e8df4de3eb70469be4f9b896a8f93a9323065af625b08cd3645
+SIZE (oxfordcontrol-qdldl-7ab0fca_GH0.tar.gz) = 22930
Added: head/math/osqp/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/osqp/files/patch-CMakeLists.txt Sun Nov 18 21:08:40 2018 (r485275)
@@ -0,0 +1,71 @@
+--- CMakeLists.txt.orig 2018-09-26 17:51:55 UTC
++++ CMakeLists.txt
+@@ -296,28 +296,32 @@ endif (R_LANG)
+ add_subdirectory(lin_sys)
+
+ # Static library
+-add_library (osqpstatic STATIC ${osqp_src} ${osqp_headers} ${linsys_solvers})
+-# Give same name to static library output
+-set_target_properties(osqpstatic PROPERTIES OUTPUT_NAME osqp)
++if (BUILD_STATIC_LIBS)
++ add_library (osqpstatic STATIC ${osqp_src} ${osqp_headers} ${linsys_solvers})
++ # Give same name to static library output
++ set_target_properties(osqpstatic PROPERTIES OUTPUT_NAME osqp)
+
+-# Include directories for linear system solvers
+-target_include_directories(osqpstatic PRIVATE ${linsys_solvers_includes})
++ # Include directories for linear system solvers
++ target_include_directories(osqpstatic PRIVATE ${linsys_solvers_includes})
+
+-# Declare include directories for the cmake exported target
+-target_include_directories(osqpstatic
+- PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
+- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}/osqp>")
++ # Declare include directories for the cmake exported target
++ target_include_directories(osqpstatic
++ PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
++ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}/osqp>")
++endif()
+
+ # Install Static Library
+ # ----------------------------------------------
+
+ include(GNUInstallDirs)
+
+-install(TARGETS osqpstatic
+- EXPORT ${PROJECT_NAME}
+- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
++if (BUILD_STATIC_LIBS)
++ install(TARGETS osqpstatic
++ EXPORT ${PROJECT_NAME}
++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
++endif()
+
+
+ # Install Headers
+@@ -355,8 +359,10 @@ if (NOT PYTHON AND NOT MATLAB AND NOT R_
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+
+ # Create demo executable (linked to static library)
+- add_executable (osqp_demo ${PROJECT_SOURCE_DIR}/examples/osqp_demo.c)
+- target_link_libraries (osqp_demo osqpstatic)
++ if (BUILD_EXAMPLES)
++ add_executable (osqp_demo ${PROJECT_SOURCE_DIR}/examples/osqp_demo.c)
++ target_link_libraries (osqp_demo osqp)
++ endif()
+
+ endif (NOT PYTHON AND NOT MATLAB AND NOT R_LANG)
+
+@@ -449,7 +455,7 @@ if (UNITTESTS)
+ ${PROJECT_SOURCE_DIR}/tests/minunit.h
+ ${test_headers}
+ ${codegen_test_headers})
+- target_link_libraries (osqp_tester osqpstatic)
++ target_link_libraries (osqp_tester osqp)
+
+ # Add testing
+ include(CTest)
Added: head/math/osqp/files/patch-lin__sys_direct_qdldl_qdldl__sources_CMakeLists.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/osqp/files/patch-lin__sys_direct_qdldl_qdldl__sources_CMakeLists.txt Sun Nov 18 21:08:40 2018 (r485275)
@@ -0,0 +1,66 @@
+--- lin_sys/direct/qdldl/qdldl_sources/CMakeLists.txt.orig 2018-11-18 21:01:04 UTC
++++ lin_sys/direct/qdldl/qdldl_sources/CMakeLists.txt
+@@ -98,25 +98,29 @@ target_include_directories(qdldlobject P
+ # ----------------------------------------------
+
+ # Static library
+-add_library (qdldlstatic STATIC ${qdldl_src} ${qdldl_headers})
+-# Give same name to static library output
+-set_target_properties(qdldlstatic PROPERTIES OUTPUT_NAME qdldl)
++if (BUILD_STATIC_LIBS)
++ add_library (qdldlstatic STATIC ${qdldl_src} ${qdldl_headers})
++ # Give same name to static library output
++ set_target_properties(qdldlstatic PROPERTIES OUTPUT_NAME qdldl)
+
+-# Declare include directories for the cmake exported target
+-target_include_directories(qdldlstatic
+- PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
+- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}/qdldl>")
++ # Declare include directories for the cmake exported target
++ target_include_directories(qdldlstatic
++ PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
++ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}/qdldl>")
++endif()
+
+ # Install Static Library
+ # ----------------------------------------------
+
+ include(GNUInstallDirs)
+
+-install(TARGETS qdldlstatic
+- EXPORT ${PROJECT_NAME}
+- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
++if (BUILD_STATIC_LIBS)
++ install(TARGETS qdldlstatic
++ EXPORT ${PROJECT_NAME}
++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
++endif()
+
+
+ # Install Headers
+@@ -142,8 +146,10 @@ install(TARGETS qdldl
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+
+ # Create demo executable (linked to static library)
+-add_executable (qdldl_example ${PROJECT_SOURCE_DIR}/examples/c/example.c)
+-target_link_libraries (qdldl_example qdldlstatic)
++if (BUILD_ECAMPLES)
++ add_executable (qdldl_example ${PROJECT_SOURCE_DIR}/examples/c/example.c)
++ target_link_libraries (qdldl_example qdldl)
++endif()
+
+
+ # Create CMake packages for the build directory
+@@ -200,7 +206,7 @@ if (UNITTESTS)
+ add_executable(qdldl_tester
+ ${PROJECT_SOURCE_DIR}/tests/qdldl_tester.c ${PROJECT_SOURCE_DIR}/tests/minunit.h
+ ${test_headers})
+- target_link_libraries (qdldl_tester qdldlstatic)
++ target_link_libraries (qdldl_tester qdldl)
+
+ # Add testing
+ include(CTest)
Added: head/math/osqp/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/osqp/pkg-descr Sun Nov 18 21:08:40 2018 (r485275)
@@ -0,0 +1,9 @@
+OSQP uses a specialized ADMM-based first-order method with custom sparse linear
+algebra routines that exploit structure in problem data.
+
+The algorithm is absolutely division free after the setup and it requires no
+assumptions on problem data (the problem only needs to be convex).
+
+OSQP is self-contained and requires no external library to run.
+
+WWW: https://osqp.org/
Added: head/math/osqp/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/osqp/pkg-plist Sun Nov 18 21:08:40 2018 (r485275)
@@ -0,0 +1,25 @@
+include/osqp/auxil.h
+include/osqp/constants.h
+include/osqp/cs.h
+include/osqp/ctrlc.h
+include/osqp/glob_opts.h
+include/osqp/kkt.h
+include/osqp/lin_alg.h
+include/osqp/lin_sys.h
+include/osqp/osqp.h
+include/osqp/osqp_configure.h
+include/osqp/polish.h
+include/osqp/proj.h
+include/osqp/scaling.h
+include/osqp/types.h
+include/osqp/util.h
+include/qdldl/qdldl.h
+include/qdldl/qdldl_types.h
+lib/cmake/osqp/osqp-config.cmake
+lib/cmake/osqp/osqp-targets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/osqp/osqp-targets.cmake
+lib/cmake/qdldl/qdldl-config.cmake
+lib/cmake/qdldl/qdldl-targets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/qdldl/qdldl-targets.cmake
+lib/libosqp.so
+lib/libqdldl.so
More information about the svn-ports-all
mailing list