mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-26 09:46:09 +00:00
science/simbody: Add the option EXAMPLE_PROGRAMS that builds and installs example programs
This commit is contained in:
parent
a5d3607aa6
commit
482064760e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=508359
@ -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 fortran # fortran only for
|
||||
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
|
||||
|
20
science/simbody/files/patch-examples_CMakeLists.txt
Normal file
20
science/simbody/files/patch-examples_CMakeLists.txt
Normal file
@ -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.
|
Loading…
Reference in New Issue
Block a user