60 lines
2.1 KiB
Bash
60 lines
2.1 KiB
Bash
# Template file for 'flightgear'
|
|
pkgname=flightgear
|
|
version=2016.4.3
|
|
revision=1
|
|
build_style=cmake
|
|
configure_args="-DFG_DATA_DIR:STRING=/usr/share/flightgear/fgdata"
|
|
hostmakedepends="fltk pkg-config"
|
|
makedepends="MesaLib-devel boost-devel freealut-devel libfreeglut-devel fltk-devel
|
|
libgsm-devel speex-devel sqlite-devel osg-devel plib-devel libcurl-devel simgear
|
|
$(vopt_if qt qt5-devel)"
|
|
depends="flightgear-data>=${version}"
|
|
short_desc="Sophisticated flight wimulator"
|
|
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
|
license="GPL-3"
|
|
homepage="http://www.flightgear.org/"
|
|
distfiles="
|
|
$SOURCEFORGE_SITE/project/flightgear/release-${version%.*}/${pkgname}-${version}.tar.bz2
|
|
$SOURCEFORGE_SITE/project/flightgear/release-${version%.*}/FlightGear-${version}-data.tar.bz2"
|
|
checksum="
|
|
35a9c439265e4a9caf794458bb42917d93280b2e561cc7b9a02aaba1226d2822
|
|
e4f6b26624af3fa6cf874077a8fe2f57fc298d124a7899731946a593cd73c4f3"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) broken="failed to transform dependency simgear"
|
|
esac
|
|
|
|
build_options="qt"
|
|
build_options_default="qt"
|
|
if [ "$CROSS_BUILD" ]; then
|
|
configure_args+=" -DSIMGEAR_COMPILE_TEST_EXITCODE=0"
|
|
hostmakedepends+=" qt5-host-tools $(vopt_if qt qt5-devel)"
|
|
fi
|
|
# Suppress warnings regarding auto_ptr
|
|
CXXFLAGS="-Wno-deprecated-declarations"
|
|
|
|
post_configure() {
|
|
if [ -n "$CROSS_BUILD" ]; then
|
|
# Remove "-isystem ${XBPS_CROSS_BASE}/usr/include" from Makefiles
|
|
find ${wrksrc}/build -iname flags.make -exec sed -i "{}" \
|
|
-e "s;-isystem ${XBPS_CROSS_BASE}/usr/include ; ;g" \;
|
|
fi
|
|
}
|
|
|
|
post_install() {
|
|
vinstall package/flightgear.desktop 644 usr/share/applications
|
|
vinstall package/flightgear.ico 644 usr/share/icons
|
|
vinstall ${FILESDIR}/flightgear.png 644 usr/share/pixmaps
|
|
vinstall scripts/completion/fg-completion.bash 644 usr/share/bash-completion/completions/fgfs
|
|
sed -i ${DESTDIR}/usr/share/applications/flightgear.desktop \
|
|
-e "s;Exec=.*;Exec=fgfs --fg-root=/usr/share/flightgear/fgdata;"
|
|
}
|
|
|
|
flightgear-data_package() {
|
|
short_desc+=" - data files"
|
|
noarch=yes
|
|
pkg_install() {
|
|
vmkdir usr/share/flightgear
|
|
mv ${XBPS_BUILDDIR}/fgdata ${PKGDESTDIR}/usr/share/flightgear
|
|
}
|
|
}
|