void-packages/srcpkgs/cegui/template
2020-07-01 00:04:34 +02:00

89 lines
2.8 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Template file for 'cegui'
pkgname=cegui
version=0.8.7.20190225
revision=2
_githash=bfc6a841de45b8e63040d33b9cccc67745337f4e
wrksrc="${pkgname}-${_githash}"
build_style=cmake
make_build_args="all html"
hostmakedepends="graphviz doxygen dejavu-fonts-ttf gd glm perl pkg-config"
makedepends="MesaLib-devel SDL2-devel SDL2_image-devel libxml2-devel boost-devel
devil-devel glfw-devel ois-devel silly-devel fribidi-devel lua53-devel minizip-devel
$(vopt_if irrlicht irrlicht-devel)
$(vopt_if ogre libogre-devel)
$(vopt_if python python-devel)
$(vopt_if gtk gtk+-devel)"
depends="${pkgname}-data"
short_desc="Crazy Eddie's Graphical User Interface"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="MIT"
homepage="http://cegui.org.uk/"
distfiles="https://github.com/cegui/cegui/archive/${_githash}.tar.gz"
checksum=70156257313b81d068d6592887157dd16b91d7bc0dfdcba02a96ed371d329e64
build_options="gtk irrlicht ogre python"
desc_option_gtk="Enable support for GTK2"
desc_option_irrlicht="Enable support for Irrlicht"
desc_option_ogre="Enable support for Ogre"
build_options_default="gtk irrlicht"
if [ -z "$CROSS_BUILD" ]; then
# XXX: boost-python is not available when cross building
build_options_default+=" python"
fi
# Silence log output
CXXFLAGS="-Wno-unused-parameter -Wno-deprecated-copy"
pre_configure() {
# Use /usr/lib instead of /usr/lib64 or /usr/lib32
sed -i ${wrksrc}/CMakeLists.txt \
-e "s;lib64;lib;g" \
-e "s;lib32;lib;g"
# cmake sets standard to c++03 (which doesnt know int16_t)
sed -i -e "s/-std=c++03//" CMakeLists.txt
}
post_install() {
local _ver2=0.8
vlicense COPYING
ln -srv ${DESTDIR}/usr/lib/{cegui-${_ver2},}/libCEGUICoreWindowRendererSet.so
ln -srv ${DESTDIR}/usr/lib/{cegui-${_ver2},}/libCEGUISILLYImageCodec.so
ln -srv ${DESTDIR}/usr/lib/{cegui-${_ver2},}/libCEGUIDevILImageCodec.so
ln -srv ${DESTDIR}/usr/lib/{cegui-${_ver2},}/libCEGUIExpatParser.so
ln -srv ${DESTDIR}/usr/lib/{cegui-${_ver2},}/libCEGUILibXMLParser.so
}
cegui-data_package() {
short_desc+=" - data files"
archs=noarch
pkg_install() {
vmove usr/share/cegui-${version%%.*}
}
}
cegui-doc_package() {
short_desc+=" - documentation"
archs=noarch
pkg_install() {
vmkdir usr/share/doc/${sourcepkg}
vcopy ${wrksrc}/build/doc/doxygen/html usr/share/doc/${sourcepkg}
}
}
cegui-sample_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - example"
pkg_install() {
vmove usr/bin
vmove "usr/lib/cegui-0.8/libCEGUI*Demo.so"
vmove "usr/lib/cegui-0.8/libCEGUI*Demo6.so"
vmove "usr/lib/cegui-0.8/libCEGUI*Minesweeper.so"
}
}
cegui-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/libCEGUI*-0.so"
}
}