void-packages/srcpkgs/wxWidgets-gtk3/template

74 lines
2.4 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 'wxWidgets-gtk3'
pkgname=wxWidgets-gtk3
version=3.0.5.1
revision=5
wrksrc="wxWidgets-${version}"
build_style=gnu-configure
configure_args="--with-gtk=3 --enable-unicode --with-opengl --with-sdl
--with-libmspack --with-libnotify --enable-mediactrl"
hostmakedepends="pkg-config"
makedepends="SDL2-devel gst-plugins-base1-devel gstreamer1-devel gtk+3-devel
libmspack-devel libnotify-devel tiff-devel webkit2gtk-devel glu-devel"
short_desc="The wxWidgets GUI toolkit library compiled with gtk3 support"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="custom:wxWindows"
homepage="https://www.wxwidgets.org"
distfiles="https://github.com/wxWidgets/wxWidgets/releases/download/v${version}/wxWidgets-${version}.tar.bz2"
checksum=440f6e73cf5afb2cbf9af10cec8da6cdd3d3998d527598a53db87099524ac807
post_install() {
local _config="gtk3-unicode-3.0"
# remove all occurrences of $XBPS_CROSS_TRIPLET in wx-config:
# - mark this build as native build
if [ "$CROSS_BUILD" ]; then
rename "${XBPS_CROSS_TRIPLET}-" "" \
${DESTDIR}/usr/lib/wx/config/* \
${DESTDIR}/usr/lib/wx/include/*
rename -- "-${XBPS_CROSS_TRIPLET}" "" ${DESTDIR}/usr/lib/*
sed -i -e "s/${XBPS_CROSS_TRIPLET}-//g" \
-e "s/-${XBPS_CROSS_TRIPLET}//g" \
-e "s,$XBPS_CROSS_BASE,,g" \
${DESTDIR}/usr/lib/wx/config/${_config}
fi
rm -f ${DESTDIR}/usr/bin/wx-config
ln -sf ../lib/wx/config/${_config} ${DESTDIR}/usr/bin/wx-config-gtk3
# - ignore --host option; breaks configure scripts when
# cross compiling (isnt necessary in our case anyway)
sed -i -e 's,^bindir=.*,bindir=${exec_prefix}/bin,' \
-e 's/is_cross().*/is_cross() { false; }/g' \
-e '/--\*=\*)/i --host=\*) continue;;' \
-e "s,/usr/lib,\${exec_prefix}/lib,g" \
$DESTDIR/usr/lib/wx/config/${_config}
}
wxWidgets-common_package() {
short_desc+=" - common files"
pkg_install() {
vmove "usr/lib/libwx_baseu*.so.*"
vmove usr/share
vlicense docs/licendoc.txt
vlicense docs/licence.txt
}
}
wxWidgets-common-devel_package() {
depends="wxWidgets-common>=${version}_${revision}"
short_desc+=" - common development files"
pkg_install() {
vmove "usr/bin/wxrc*"
vmove "usr/lib/libwx_baseu*.so"
vmove usr/include
}
}
wxWidgets-gtk3-devel_package() {
depends="${sourcepkg}>=${version}_${revision} wxWidgets-common-devel>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin
vmove "usr/lib/*.so"
vmove usr/lib/wx
}
}