# Template file for 'wxWidgets-gtk3' pkgname=wxWidgets-gtk3 version=3.2.4 revision=3 build_style=cmake cmake_builddir="build-gtk3" configure_args="-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_OPENGL=ON -DwxUSE_LIBMSPACK=ON -DwxUSE_GTKPRINT=ON -DwxUSE_UNICODE=ON -DwxUSE_MEDIACTRL=ON -DwxUSE_PRIVATE_FONTS=ON -DwxUSE_REGEX=sys -DwxUSE_ZLIB=sys -DwxUSE_EXPAT=sys -DwxUSE_LIBJPEG=sys -DwxUSE_LIBPNG=sys -DwxUSE_LIBTIFF=sys -DwxUSE_LIBLZMA=sys -DwxUSE_LIBNOTIFY=sys -DwxUSE_LIBSDL=sys" hostmakedepends="pkg-config" makedepends="SDL2-devel gst-plugins-base1-devel gstreamer1-devel gtk+3-devel libmspack-devel libnotify-devel tiff-devel libwebkit2gtk41-devel glu-devel gst-plugins-bad1-devel libsecret-devel pcre2-devel liblzma-devel gspell-devel libcurl-devel zlib-devel expat-devel libpng-devel" short_desc="Cross-platform GUI library (built with GTK+ 3.0)" maintainer="Helmut Pozimski " license="custom:wxWindows" homepage="https://www.wxwidgets.org" distfiles="https://github.com/wxWidgets/wxWidgets/releases/download/v${version}/wxWidgets-${version}.tar.bz2" checksum=0640e1ab716db5af2ecb7389dbef6138d7679261fbff730d23845ba838ca133e CXXFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" post_patch() { if [ "${XBPS_TARGET_LIBC}" = "musl" ]; then patch -Np1 < "${FILESDIR}/musl-locale-l.patch" fi } post_install() { local _patch="${version#*.*.}" local _majmin="${version%."${_patch}"}" local _config="gtk3-unicode-${_majmin}" if [ "$CROSS_BUILD" ]; then # Remove $XBPS_CROSS_TRIPLET from cmake helper... local _xprefix="${XBPS_CROSS_BASE}/usr/" sed -i -e "s@${_xprefix}@\${_IMPORT_PREFIX}/@g" \ ${DESTDIR}/usr/lib/cmake/wxWidgets/wxWidgetsTargets.cmake # ...and the output of the wx-config utility sed -i -e "s@${_xprefix}@\${prefix}/@g" \ ${DESTDIR}/usr/lib/wx/config/${_config} fi # Remove generic wx-config, link to toolkit-specific version rm -f ${DESTDIR}/usr/bin/wx-config ln -sf ../lib/wx/config/${_config} ${DESTDIR}/usr/bin/wx-config-gtk3 # Make sure to install the autotools macro, CMake does not vmkdir usr/share/aclocal vinstall wxwin.m4 644 usr/share/aclocal } wxWidgets-common_package() { short_desc+=" - common files" pkg_install() { vmove "usr/lib/libwx_baseu*.so.*" vlicense docs/licendoc.txt vlicense docs/licence.txt } } 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 vmove usr/share/aclocal } } wxWidgets-gtk3-devel_package() { depends=" ${sourcepkg}>=${version}_${revision} wxWidgets-common-devel>=${version}_${revision} gtk+3-devel glib-devel SDL2-devel gspell-devel libnotify-devel " short_desc+=" - development files" pkg_install() { vmove usr/bin vmove "usr/lib/*.so" vmove usr/lib/wx vmove usr/lib/cmake } } wxWidgets_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" (transitional dummy package)" build_style=meta } wxWidgets-devel_package() { depends="${sourcepkg}-devel>=${version}_${revision}" short_desc+=" - development files (transitional dummy package)" build_style=meta }