### REF: https://src.fedoraproject.org/rpms/wxGTK/blob/rawhide/f/wxGTK.spec # Note: FreeFileSync 14.4 depends on wxWidgets=3.3.0. It is better to build it in another spec file. Name: wxGTK3 Version: 3.3.1 Release: 1%{?dist} Summary: A library for creating graphical user interfaces License: wxWidgets Library License URL: https://github.com/wxWidgets/wxWidgets Source0: %{url}/releases/download/v%{version}/wxWidgets-%{version}.tar.bz2 # Disable debug packages %global debug_package %{nil} %global debugsource_package %{nil} BuildRequires: gcc-c++ cmake gtk3-devel webkit2gtk4.1-devel BuildRequires: libtiff-devel expat-devel SDL2-devel zlib-devel libpng-devel libjpeg-devel BuildRequires: gstreamer1-plugins-bad-free-devel libmspack-devel BuildRequires: libsecret-devel libcurl-devel glibc-langpack-en mesa-libEGL %description wxWidgets is a free and open-source C++ library for creating cross-platform graphical user interfaces (GUIs). This package provides version 3.3.1 with GTK3 and WebKit2GTK support. %prep %setup -q -n wxWidgets-%{version} %build %cmake -DwxBUILD_SHARED=ON \ -DwxBUILD_MONOLITHIC=OFF \ -DwxBUILD_TOOLKIT=gtk3 \ -DwxUSE_NANOSVG=sys \ -DwxUSE_WEBVIEW=ON \ -DwxUSE_LIBLZMA=ON \ -DwxUSE_LIBSDL=ON \ -DwxUSE_LIBMSPACK=ON \ -DwxUSE_AUI=ON %cmake_build %install rm -rf %{buildroot} %cmake_install ## Fix absolute symlinks pointing into BUILDROOT for bin in wx-config wxrc wxrc-3.3; do path="%{buildroot}%{_bindir}/$bin" if [ -L "$path" ]; then target=$(readlink "$path") # If the target is absolute and points inside the buildroot if [[ "$target" = %{buildroot}* ]]; then rel_target=$(realpath --relative-to=$(dirname "$path") "$target") ln -sf "$rel_target" "$path" fi fi done ## Create pkgconfig directory mkdir -p %{buildroot}%{_libdir}/pkgconfig # Use wx-config output to create a .pc file WX_CONFIG=%{buildroot}%{_bindir}/wx-config $WX_CONFIG --libs all > wx.libs $WX_CONFIG --cxxflags > wx.cflags cat > %{buildroot}%{_libdir}/pkgconfig/wxgtk3.pc <