void-packages/srcpkgs/gwenhywfar/template

89 lines
2.4 KiB
Bash

# Template file for 'gwenhywfar'
pkgname=gwenhywfar
version=5.4.0
revision=2
build_style=gnu-configure
configure_args="--enable-visibility --disable-binreloc
--with-qt5-moc=/usr/lib/qt5/bin/moc --with-qt5-uic=/usr/lib/qt5/bin/uic"
hostmakedepends="automake pkg-config libgcrypt-devel libtool which"
makedepends="libgcrypt-devel gnutls-devel gtk+-devel qt5-devel gtk+3-devel"
short_desc="OS abstraction functions for various projects"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://github.com/aqbanking/gwenhywfar"
distfiles="https://github.com/aqbanking/gwenhywfar/archive/${version}.tar.gz"
checksum=e46c3450d610b36f51b46ab97640ae340e8b68850f03b23b98c4ab682a5027c0
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-host-tools qt5-devel"
fi
pre_configure() {
export QT_SELECT=5
# Build all GUIs
vsed -i configure.ac -e's;"qt4 gtk2";"qt5 gtk2 gtk3";'
autoreconf -fi
if [ "$CROSS_BUILD" ]; then
cat > "${wrksrc}/qt.conf" <<_EOF
[Paths]
Sysroot=${XBPS_CROSS_BASE}
Prefix=${XBPS_CROSS_BASE}/usr
ArchData=${XBPS_CROSS_BASE}/usr/lib/qt5
Data=${XBPS_CROSS_BASE}/usr/share/qt5
Documentation=${XBPS_CROSS_BASE}/usr/share/doc/qt5
Headers=${XBPS_CROSS_BASE}/usr/include/qt5
Libraries=${XBPS_CROSS_BASE}/usr/lib
LibraryExecutables=/usr/lib/qt5/libexec
Binaries=/usr/lib/qt5/bin
Tests=${XBPS_CROSS_BASE}/usr/tests
Plugins=/usr/lib/qt5/plugins
Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/imports
Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/qml
Translations=${XBPS_CROSS_BASE}/usr/share/qt5/translations
Settings=${XBPS_CROSS_BASE}/etc/xdg
Examples=${XBPS_CROSS_BASE}/usr/share/qt5/examples
HostPrefix=/usr
HostData=/usr/lib/qt5
HostBinaries=/usr/lib/qt5/bin
HostLibraries=/usr/lib
Spec=linux-g++
TargetSpec=linux-g++
_EOF
configure_args+=" --with-qt5-config=${wrksrc}/qt.conf"
fi
}
gwenhywfar-gtk_package() {
short_desc+=" - gtk+2 bindings"
pkg_install() {
vmove usr/lib/*-gtk2*
}
}
gwenhywfar-gtk3_package() {
short_desc+=" - gtk+3 bindings"
pkg_install() {
vmove usr/lib/*-gtk3*
}
}
gwenhywfar-qt5_package() {
short_desc+=" - qt5 bindings"
pkg_install() {
vmove usr/lib/*-qt5*
}
}
gwenhywfar-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/bin/gwenhywfar-config
vmove usr/share/aclocal
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}