wxWidgets-gtk3: fix config after lib64 change

Also ships license.
This commit is contained in:
Đoàn Trần Công Danh 2021-01-19 08:17:53 +07:00
parent 124db02f50
commit fd01cfe069

View file

@ -1,26 +1,53 @@
# Template file for 'wxWidgets-gtk3'
pkgname=wxWidgets-gtk3
version=3.0.5.1
revision=1
configure_args="--with-gtk=3 --enable-unicode --with-opengl --with-sdl --with-libmspack
--with-libnotify --enable-mediactrl"
build_style=gnu-configure
revision=2
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="wxWindows"
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" \
${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 '/^libdir="\/usr/s,/usr,${exec_prefix},' \
-e '/^bindir="\/usr/s,/usr,${exec_prefix},' \
-e 's/is_cross().*/is_cross() { false; }/g' \
-e '/--\*=\*)/i --host=\*) continue;;' \
$DESTDIR/usr/lib/wx/config/gtk3-unicode-3.0
}
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
}
}
@ -31,9 +58,6 @@ wxWidgets-common-devel_package() {
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
}
}
@ -44,27 +68,5 @@ wxWidgets-gtk3-devel_package() {
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
}
}