svn commit: r508359 - in head/science/simbody: . files
Yuri Victorovich
yuri at FreeBSD.org
Thu Aug 8 04:06:04 UTC 2019
Author: yuri
Date: Thu Aug 8 04:06:03 2019
New Revision: 508359
URL: https://svnweb.freebsd.org/changeset/ports/508359
Log:
science/simbody: Add the option EXAMPLE_PROGRAMS that builds and installs example programs
Added:
head/science/simbody/files/
head/science/simbody/files/patch-examples_CMakeLists.txt (contents, props changed)
Modified:
head/science/simbody/Makefile
Modified: head/science/simbody/Makefile
==============================================================================
--- head/science/simbody/Makefile Thu Aug 8 02:46:20 2019 (r508358)
+++ head/science/simbody/Makefile Thu Aug 8 04:06:03 2019 (r508359)
@@ -3,7 +3,7 @@
PORTNAME= simbody
DISTVERSIONPREFIX= Simbody-
DISTVERSION= 3.6.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= science biology
PATCH_SITES= https://github.com/${PORTNAME}/${PORTNAME}/commit/
@@ -22,10 +22,10 @@ USES= blaslapack:openblas cmake compiler:c++11-lang f
USE_GITHUB= yes
USE_LDCONFIG= yes
-CMAKE_OFF= BUILD_TESTING BUILD_EXAMPLES
-CMAKE_ARGS= -DBLAS_LIBRARIES:STRING=${LOCALBASE}/lib/libopenblas.so -DLAPACK_LIBRARIES:STRING=${LOCALBASE}/lib/libopenblas.so
+CMAKE_OFF= BUILD_TESTING
+CMAKE_ARGS= -DBLAS_LIBRARIES:STRING=${LOCALBASE}/lib/libopenblas.so -DLAPACK_LIBRARIES:STRING=${LOCALBASE}/lib/libopenblas.so -DFREEBSD_EXAMPLESDIR=${EXAMPLESDIR}
-OPTIONS_DEFINE= DOCS VISUALIZER
+OPTIONS_DEFINE= DOCS VISUALIZER EXAMPLE_PROGRAMS # EXAMPLE_PROGRAMS significanly increases the build time and package size, so it is not called EXAMPLES to prevent it from being installed by default
OPTIONS_DEFAULT= VISUALIZER
OPTIONS_SUB= yes
@@ -36,7 +36,11 @@ VISUALIZER_CMAKE_BOOL= BUILD_VISUALIZER
VISUALIZER_USES= gl
VISUALIZER_USE= GL=gl,glu,glut XORG=xi,xmu
+EXAMPLE_PROGRAMS_DESC= Build and install example programs
+EXAMPLE_PROGRAMS_CMAKE_BOOL= BUILD_EXAMPLES
+
PORTDOCS= *
+# this port installs examples into ${EXAMPLESDIR} when EXAMPLE_PROGRAMS=ON, but check-plist doesn't complain for some reason
post-install-DOCS-on: # https://github.com/simbody/simbody/issues/652
@${RMDIR} ${STAGEDIR}${DOCSDIR}/api
Added: head/science/simbody/files/patch-examples_CMakeLists.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/science/simbody/files/patch-examples_CMakeLists.txt Thu Aug 8 04:06:03 2019 (r508359)
@@ -0,0 +1,20 @@
+--- examples/CMakeLists.txt.orig 2018-06-12 01:04:33 UTC
++++ examples/CMakeLists.txt
+@@ -67,7 +67,7 @@ if(WIN32)
+ set(EXAMPLES_INSTALL_BIN examples/bin/)
+ set(EXAMPLES_INSTALL_SRC examples/src/)
+ else()
+- set(EXAMPLES_INSTALL_BIN ${CMAKE_INSTALL_LIBDIR}/simbody/examples/) # if this changes, change the corresponding
++ set(EXAMPLES_INSTALL_BIN ${FREEBSD_EXAMPLESDIR}) # if this changes, change the corresponding
+ # FULL version in file(RELATIVE_PATH ) command
+ set(EXAMPLES_INSTALL_SRC ${CMAKE_INSTALL_DOCDIR}/examples/src/)
+ # Use full paths for the following as it will be used to create a symlink
+@@ -75,7 +75,7 @@ else()
+ set(EXAMPLES_SYMLINK_BIN ${CMAKE_INSTALL_FULL_DOCDIR}/examples)
+ file(RELATIVE_PATH EXAMPLE_INSTALL_BIN_REL_TO_DOC
+ ${EXAMPLES_SYMLINK_BIN}
+- ${CMAKE_INSTALL_FULL_LIBDIR}/simbody/examples/)
++ ${FREEBSD_EXAMPLESDIR})
+ endif()
+
+ # Set RPATH for all example targets in this directory and in subdirectories.
More information about the svn-ports-all
mailing list