void-packages/srcpkgs/osg/template
2016-12-30 18:29:23 +00:00

58 lines
2.2 KiB
Bash

# Template file for 'osg'
pkgname=osg
version=3.4.0
revision=8
wrksrc=OpenSceneGraph-${version}
build_style=cmake
# don't use /usr/lib64 on 64bit platforms
configure_args="-DLIB_POSTFIX= $(vopt_if qt '-DOSG_USE_QT=1' '-DOSG_USE_QT=0')"
hostmakedepends="pkg-config unzip xrandr"
makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-devel
jasper-devel tiff-devel libgdal-devel libgta-devel ffmpeg-devel xine-lib-devel
SDL2-devel gst-plugins-base1-devel
$(vopt_if openexr libopenexr-devel)
$(vopt_if poppler poppler-glib-devel)
$(vopt_if qt qt5-devel)
$(vopt_if vnc libvncserver-devel)"
depends="xrandr"
short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-3"
homepage="http://www.openscenegraph.org"
distfiles="http://trac.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-${version}.zip"
checksum=5c727d84755da276adf8c4a4a3a8ba9c9570fc4b4969f06f1d2e9f89b1e3040e
# Append CFLAGS and CXXFLAGS to set work around code which gcc6 would
# otherwise regard as out-of-specification and allow it to produce a
# working program.
CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 -Wno-deprecated-declarations"
build_options="openexr poppler qt vnc"
build_options_default="openexr poppler vnc"
desc_option_openexr="Enable support for high dynamic range images"
desc_option_poppler="Enable support for creating PDF"
desc_option_vnc="Enable support for VNC server"
if [ -z "$CROSS_BUILD" ]; then
build_options_default+=" qt"
else
# cmake can't check this when cross compiling
configure_args+=" -DPOPPLER_HAS_CAIRO_EXITCODE=0"
configure_args+=" -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=0"
fi
post_install() {
# Also install the cmake script FindOSG.cmake for developers to use
vinstall CMakeModules/FindOSG.cmake 644 usr/lib/cmake/OSG
}
osg-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove usr/lib/*.so
}
}