void-packages/srcpkgs/wxWidgets-gtk3/template

71 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.4
revision=1
configure_args="--with-gtk=3 --enable-unicode --with-opengl --with-sdl --with-libmspack
--with-libnotify --enable-mediactrl"
build_style=gnu-configure
wrksrc="wxWidgets-${version}"
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="wxWindows"
homepage="https://www.wxwidgets.org"
distfiles="https://github.com/wxWidgets/wxWidgets/releases/download/v${version}/wxWidgets-${version}.tar.bz2"
checksum=96157f988d261b7368e5340afa1a0cad943768f35929c22841f62c25b17bf7f0
wxWidgets-common_package() {
short_desc+=" - common files"
pkg_install() {
vmove "usr/lib/libwx_baseu*.so.*"
vmove usr/share
}
}
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
if [ "$CROSS_BUILD" ]; then
rename -- "-${XBPS_CROSS_TRIPLET}" "" ${PKGDESTDIR}/usr/lib/*
fi
}
}
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
mv ${PKGDESTDIR}/usr/bin/wx-config{,-gtk3}
# remove all occurrences of $XBPS_CROSS_TRIPLET
# wx-config:
# - mark this build as native build
# - ignore --host option; breaks configure scripts when
# cross compiling (isnt necessary in our case anyway)
if [ "$CROSS_BUILD" ]; then
local _config="gtk3-unicode-3.0"
mv ${PKGDESTDIR}/usr/lib/wx/include/{${XBPS_CROSS_TRIPLET}-${_config},${_config}}
rename "${XBPS_CROSS_TRIPLET}-" "" ${PKGDESTDIR}/usr/lib/wx/config/*
rename -- "-${XBPS_CROSS_TRIPLET}" "" ${PKGDESTDIR}/usr/lib/*
sed -i -e "s/${XBPS_CROSS_TRIPLET}-//g" \
-e "s/-${XBPS_CROSS_TRIPLET}//g" \
-e 's/is_cross() { \[ "xyes" = "xyes" \]; }/is_cross() { \[ "xno" = "xyes" \]; }/g' \
-e 's/--\*=\*)/--host=\*) continue;;\n\n --\*=\*)/' \
${PKGDESTDIR}/usr/lib/wx/config/${_config}
ln -sf ../lib/wx/config/${_config} ${PKGDESTDIR}/usr/bin/wx-config-gtk3
fi
}
}