void-packages/srcpkgs/wxWidgets/template

52 lines
1.9 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'
pkgname=wxWidgets
version=3.0.4
revision=1
configure_args="--enable-unicode --with-opengl --with-sdl --with-libmspack
--with-libnotify"
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="gtk+-devel libjpeg-turbo-devel tiff-devel libSM-devel libnotify-devel
libXinerama-devel libmspack-devel SDL-devel glu-devel webkitgtk2-devel"
short_desc="The wxWidgets GUI toolkit library (version 3)"
maintainer="Martin Riese <grauehaare@gmx.de>"
license="wxWindows"
homepage="https://www.wxwidgets.org/"
distfiles="https://github.com/wxWidgets/wxWidgets/releases/download/v${version}/wxWidgets-${version}.tar.bz2"
checksum=96157f988d261b7368e5340afa1a0cad943768f35929c22841f62c25b17bf7f0
wxWidgets-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/share
vmove usr/bin
vmove usr/lib/wx
ln -sf wx-config-3.0 ${PKGDESTDIR}/usr/bin/wx-config
ln -sf wxrc-3.0 ${PKGDESTDIR}/usr/bin/wxrc
# 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 [ -n "$CROSS_BUILD" ]; then
local _config="gtk2-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-3.0
fi
}
}