void-packages/srcpkgs/OpenCPN/template
2020-01-14 16:03:42 +01:00

57 lines
1.9 KiB
Bash

# Template file for 'OpenCPN'
pkgname=OpenCPN
version=5.0.0
revision=1
build_style=cmake
configure_args="-DBUNDLE_GSHHS=NONE -DBUNDLE_TCDATA=ON
-DBUNDLE_DOCS=ON -DOCPN_FORCE_GTK3=ON
-DOCPN_USE_CRASHREPORT=$(vopt_if crashreport ON OFF)
-DUSE_BUNDLED_LIBS=OFF"
hostmakedepends="gettext pkg-config"
makedepends="gtk+3-devel libcurl-devel portaudio-devel tinyxml-devel
wxWidgets-gtk3-devel $(vopt_if exif 'libexif-devel') glu-devel
$(vopt_if libarchive 'libarchive-devel' 'libunarr-devel') $(vopt_if lzma 'liblzma-devel')"
depends="gpsd hicolor-icon-theme OpenCPN-tcdata-${version}_${revision}
OpenCPN-gshhs-crude"
short_desc="Concise ChartPlotter/Navigator"
maintainer="John <johnz@posteo.net>"
license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.0-or-later, MIT, wxWidgets, JasPer-2.0, BSD-3-Clause"
homepage="https://opencpn.org/"
distfiles="https://github.com/OpenCPN/OpenCPN/archive/v${version}.tar.gz"
checksum=e58755fd9781c1a0f2da1244b75358c8d03d8f79ec2aa9633e5f6b5af98978b4
build_options="lzma libarchive exif crashreport"
build_options_default="lzma libarchive exif"
desc_option_crashreport="Enable displaying of crashreports"
desc_option_lzma="Enable support for reading compressed charts"
desc_option_exif="Enable reading of exif data of Images"
desc_option_libarchive="Use libarchive instead of bundled unarr"
case $XBPS_TARGET_MACHINE in
*-musl);;
*) build_options_default+=" crashreport";;
esac
if [ -z "$CROSS_BUILD" ]; then
configure_args+=" -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3"
fi
post_install() {
vlicense src/glshim/LICENSE LICENSE.glshim
}
OpenCPN-doc_package() {
short_desc+=" - Documentation"
pkg_install() {
vmove usr/share/opencpn/doc
vmove usr/share/opencpn/plugins/chartdldr_pi/data/doc
vmove usr/share/opencpn/CoC-909_2013-InlandECDIS_20170308s.pdf
}
}
OpenCPN-tcdata_package() {
short_desc="World shoreline data for OpenCPN Navigation software"
pkg_install() {
vmove usr/share/opencpn/tcdata
}
}