Commit 044352c3 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[ADD] - this little distribution specifix mini-hack allows liberation fonts to...

[ADD] - this little distribution specifix mini-hack allows liberation fonts to be used by symlinking them on the target system. This is currently quite distribution specific.
parent efef1a81
......@@ -158,8 +158,11 @@ ENDIF()
# Provide several options to control some aspects of resource copy.
OPTION( OW_PACKAGE_BUILD "Enable this to get fine-grained control over several resources and files getting installed. This is very handy for package building." OFF )
IF( OW_PACKAGE_BUILD )
SET( OW_PACKAGE_PACKAGER "cpack" CACHE STRING "Package builder. Set this to enable packager-specific options during install." )
OPTION( OW_PACKAGE_NOCOPY_LICENSE "Disable to copy our licensing information. Enabling this can be useful for package maintainer since several packaging systems have their own licence mechanism (i.e. Debian)." OFF )
OPTION( OW_PACKAGE_NOLINK_OPENTHREADS "Enable this to avoid linking OpenThreads. On some systems, OpenSceneGraph already is linked against it and thus linking OpenThreads to OW is not needed (Debian and Ubuntu for example)." OFF )
OPTION( OW_PACKAGE_NOCOPY_COREFONTS "Enable this if you have liberation fonts installed on your system. They will be linked. If disabled, our fonts are copied." OFF )
ENDIF()
# ---------------------------------------------------------------------------------------------------------------------------------------------------
......
......@@ -95,7 +95,29 @@ ADD_CUSTOM_TARGET( core_devdoc
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# copy our own resources
SETUP_RESOURCES( "core" "CORE" )
IF( NOT OW_PACKAGE_NOCOPY_COREFONTS )
SETUP_RESOURCES( "core" "CORE" )
ELSE()
# This is a hack which is quite debian specific. We do this here to avoid font duplicates since the ttf-liberation fonts are already
# available on Debian. If you need to modify this for another packaging thingy, please let me know (ebaum@informatik.uni-leipzig.d). We then
# should find a generic solution.
IF( OW_PACKAGE_PACKAGER STREQUAL "deb" )
INSTALL( CODE "MESSAGE( \"INSTALL: Symlinking fonts.\" )"
COMPONENT "CORE" )
INSTALL( CODE "EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_PREFIX}/share/openwalnut/fonts )"
COMPONENT "CORE" )
INSTALL( CODE "EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/fonts/truetype/ttf-liberation/LiberationMono-Bold.ttf ${CMAKE_INSTALL_PREFIX}/share/openwalnut/fonts/arial.ttf )"
COMPONENT "CORE" )
INSTALL( CODE "EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/fonts/truetype/ttf-liberation/LiberationMono-Bold.ttf ${CMAKE_INSTALL_PREFIX}/share/openwalnut/fonts/Bold.ttf )"
COMPONENT "CORE" )
INSTALL( CODE "EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/fonts/truetype/ttf-liberation/LiberationMono-Italic.ttf ${CMAKE_INSTALL_PREFIX}/share/openwalnut/fonts/Italic.ttf )"
COMPONENT "CORE" )
INSTALL( CODE "EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/fonts/truetype/ttf-liberation/LiberationMono-Regular.ttf ${CMAKE_INSTALL_PREFIX}/share/openwalnut/fonts/Regular.ttf )"
COMPONENT "CORE" )
ELSE()
MESSAGE( STATUS "Warning: You enabled \"OW_PACKAGE_NOCOPY_COREFONTS\" but packager unknown." )
ENDIF()
ENDIF()
# where to put doc files?
# NOTE: the doc path should match the SONAME of lib. Use this command to query a proper name:
......
......@@ -21,7 +21,7 @@ Homepage: http://www.openwalnut.org
Package: libopenwalnut1
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Depends: ttf-liberation (>= 1.0.0), ${shlibs:Depends}, ${misc:Depends}
Description: Multi-modal medical and brain data visualization tool.
OpenWalnut is a tool for multi-modal medical and brain data
visualization. Its universality allows it to be easily extended and used in a
......
# These licenses belong to the liberation fonts we need to embedd.
libopenwalnut1: extra-license-file usr/share/openwalnut/fonts/License.txt
libopenwalnut1: extra-license-file usr/share/openwalnut/fonts/COPYING
......@@ -26,7 +26,9 @@ override_dh_auto_configure:
-DOW_USE_TESTS=OFF\
-DOW_PACKAGE_BUILD=ON\
-DOW_PACKAGE_NOCOPY_LICENSE=ON\
-DOW_PACKAGE_NOLINK_OPENTHREADS=ON
-DOW_PACKAGE_NOLINK_OPENTHREADS=ON\
-DOW_PACKAGE_NOCOPY_COREFONTS=ON\
-DOW_PACKAGE_PACKAGER=deb
# -DOW_MODULE_TOOLBOX_BASE=OFF -DOW_MODULE_TOOLBOX_EEG=OFF -DOW_MODULE_TOOLBOX_OTHERS=OFF -DOW_MODULE_TOOLBOX_IO=OFF -DOW_MODULE_TOOLBOX_IMAGEPROCESSING=OFF
override_dh_auto_install:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment