70 lines
2.4 KiB
Bash
70 lines
2.4 KiB
Bash
# Template file for 'wxWidgets-gtk3'
|
||
pkgname=wxWidgets-gtk3
|
||
version=3.0.5
|
||
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=8aacd56b462f42fb6e33b4d8f5d40be5abc3d3b41348ea968aa515cc8285d813
|
||
|
||
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 (isn’t 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
|
||
}
|
||
}
|