66 lines
2.4 KiB
Bash
66 lines
2.4 KiB
Bash
# Template file for 'wxWidgets'
|
||
pkgname=wxWidgets
|
||
version=3.0.5.1
|
||
revision=5
|
||
build_style=gnu-configure
|
||
configure_args="--enable-unicode --with-opengl --with-sdl --with-libmspack
|
||
--with-libnotify --enable-mediactrl --with-gtk=2 --disable-webview"
|
||
hostmakedepends="pkg-config"
|
||
makedepends="gtk+-devel libjpeg-turbo-devel tiff-devel libSM-devel libnotify-devel
|
||
libXinerama-devel libmspack-devel SDL2-devel glu-devel
|
||
gstreamer1-devel gst-plugins-base1-devel"
|
||
depends="wxWidgets-common>=${version}"
|
||
short_desc="WxWidgets GUI toolkit library (version 3)"
|
||
maintainer="Martin Riese <grauehaare@gmx.de>"
|
||
license="WxWindows-exception-3.1"
|
||
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="gtk2-unicode-3.0"
|
||
# remove files that are already in wxWidgets-common
|
||
rm -f ${DESTDIR}/usr/lib/libwx_baseu*
|
||
rm -rf ${DESTDIR}/usr/bin/wxrc*
|
||
rm -rf ${DESTDIR}/usr/share
|
||
find ${DESTDIR}/usr/include -type f -not -name tabartgtk.h \
|
||
-not -name fontdlgg.h -not -name notifmsg.h -exec rm -f {} \;
|
||
for f in "" generic gtk; do
|
||
rm ${DESTDIR}/usr/include/wx-3.0/wx/$f/notifmsg.h
|
||
done
|
||
# remove all occurrences of $XBPS_CROSS_TRIPLET
|
||
# wx-config:
|
||
# - mark this build as native build
|
||
# - ignore --host option; breaks configure scripts when
|
||
# cross compiling (isn’t necessary in our case anyway)
|
||
if [ -n "$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
|
||
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}
|
||
ln -sf ../lib/wx/config/${_config} ${PKGDESTDIR}/usr/bin/wx-config-3.0
|
||
ln -sf wx-config-3.0 ${DESTDIR}/usr/bin/wx-config
|
||
}
|
||
|
||
wxWidgets-devel_package() {
|
||
depends="${sourcepkg}>=${version}_${revision} ${sourcepkg}-common-devel>=${version}"
|
||
short_desc+=" - development files"
|
||
pkg_install() {
|
||
vmove usr/include
|
||
vmove usr/bin
|
||
vmove "usr/lib/*.so"
|
||
vmove usr/lib/wx
|
||
}
|
||
}
|