Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37339397
en ru br
ALT Linux repos
S:3.0.5.1-alt4

Group :: System/Libraries
RPM: wxGTK3.0

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# Unpackaged files in buildroot should terminate build
%define _unpackaged_files_terminate_build 1

%def_without compat
%def_with webkitgtk
%def_with sdl

%define wxbranch 3.0

Name: wxGTK3.0
Version: %wxbranch.5.1
Release: alt4

Summary: The GTK+ port of the wxWidgets library
License: wxWidgets License
Group: System/Libraries
Url: http://wxwidgets.org

# https://github.com/wxWidgets/wxWidgets.git

# branch: WX_3_0_BRANCH
Source: %name-%version.tar
Source2: ld_shared_wrapper.pl
Source3: wx-config

Patch1: wxGTK3-3.0.2-abicheck.patch

BuildRequires: gcc-c++
BuildRequires: libGL-devel libGLU-devel libSM-devel
BuildRequires: libX11-devel libXinerama-devel libICE-devel libXmu-devel libXext-devel libXp-devel
BuildRequires: xorg-xextproto-devel xorg-inputproto-devel libXtst-devel
BuildRequires: libexpat-devel
BuildRequires: libjpeg-devel libtiff-devel libpng-devel libmspack-devel zlib-devel
BuildRequires: libgtk+3-devel libcairo-devel

BuildRequires: libXxf86vm-devel libbfd-devel
BuildRequires: libstdc++-devel
BuildRequires: libGConf-devel
BuildRequires: gstreamer1.0-devel gst-plugins1.0-devel
BuildRequires: libnotify-devel

%if_with compat
BuildRequires: libgtk+2-devel
%endif

%if_with webkitgtk
BuildRequires: libwebkit2gtk-devel
%endif

%if_with sdl
BuildRequires: libSDL2-devel
%endif

%description
wxWidgets is a free C++ library for cross-platform GUI development.
With wxWidgets, you can create applications for different GUIs
(GTK+, Motif/LessTif, MS Windows, Mac) from the same source code.

This is a GTK+ port.

%package -n libwxBase%wxbranch
Summary: Non-GUI support classes from the wxWidgets library
Group: System/Libraries
Conflicts: lib%name < %EVR

%description -n libwxBase%wxbranch
Every wxWidgets application must link against this library. It contains
mandatory classes that any wxWidgets code depends on (like wxString) and
portability classes that abstract differences between platforms. wxBase can
be used to develop console mode applications -- it does not require any GUI
libraries or the X Window System.

%package -n libwxBase%wxbranch-devel
Group: Development/C++
Summary: Development files for the wxBase3 library
Requires: libwxBase%wxbranch = %EVR
Conflicts: lib%name-devel < %EVR
Conflicts: libwxGTK2.9-devel
Conflicts: libwxGTK3.1-devel
Conflicts: libwxBase%wxbranch-devel < 3.0.4-alt3.2
Conflicts: wxGTK-devel
Conflicts: libwxGTK-devel

%description -n libwxBase%wxbranch-devel
This package include files needed to link with the wxBase3 library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
GUI library, offering classes for all common GUI controls as well as a
comprehensive set of helper classes for most common application tasks,
ranging from networking to HTML display and image manipulation.

%package -n lib%name
Summary: The GTK+ port of the wxWidgets library
Group: System/Libraries
Requires: libwxBase%wxbranch = %EVR

%description -n lib%name
Header files for wxGTK, the GTK+ port of the wxWidgets library.

%package -n compat-lib%name-gtk2
Summary: GTK port of the wxWidgets GUI library
Group: System/Libraries
Requires: libwxBase%wxbranch = %EVR
Requires: %name-i18n = %EVR

%description -n compat-lib%name-gtk2
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
GUI library, offering classes for all common GUI controls as well as a
comprehensive set of helper classes for most common application tasks,
ranging from networking to HTML display and image manipulation.

%package -n lib%name-gl
Summary: OpenGL add-on for the wxWidgets library
Group: System/Libraries
Requires: lib%name = %EVR
Conflicts: lib%name < %EVR

%description -n lib%name-gl
OpenGL (a 3D graphics API) add-on for the wxWidgets library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
GUI library, offering classes for all common GUI controls as well as a
comprehensive set of helper classes for most common application tasks,
ranging from networking to HTML display and image manipulation.

%package -n compat-lib%name-gtk2-gl
Summary: OpenGL add-on for the wxWidgets library
Group: System/Libraries
Requires: compat-lib%name-gtk2 = %EVR

%description -n compat-lib%name-gtk2-gl
OpenGL (a 3D graphics API) add-on for the wxWidgets library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
GUI library, offering classes for all common GUI controls as well as a
comprehensive set of helper classes for most common application tasks,
ranging from networking to HTML display and image manipulation.

%package -n lib%name-webview
Summary: WebView add-on for the wxWidgets library
Group: System/Libraries
Requires: lib%name = %EVR

%description -n lib%name-webview
WebView add-on for the wxWidgets library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
GUI library, offering classes for all common GUI controls as well as a
comprehensive set of helper classes for most common application tasks,
ranging from networking to HTML display and image manipulation.

%package -n lib%name-sound_sdlu
Summary: sound_sdlu add-on for the wxWidgets library
Group: System/Libraries
Requires: libwxBase%wxbranch = %EVR

%description -n lib%name-sound_sdlu
sound_sdlu add-on for the wxWidgets library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
GUI library, offering classes for all common GUI controls as well as a
comprehensive set of helper classes for most common application tasks,
ranging from networking to HTML display and image manipulation.

%package -n lib%name-media
Summary: Multimedia add-on for the wxWidgets library
Group: System/Libraries
Requires: lib%name = %EVR
Conflicts: lib%name < %EVR

%description -n lib%name-media
Multimedia add-on for the wxWidgets library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
GUI library, offering classes for all common GUI controls as well as a
comprehensive set of helper classes for most common application tasks,
ranging from networking to HTML display and image manipulation.

%package -n compat-lib%name-gtk2-media
Summary: Multimedia add-on for the wxWidgets library
Group: System/Libraries
Requires: compat-lib%name-gtk2 = %EVR

%description -n compat-lib%name-gtk2-media
Multimedia add-on for the wxWidgets library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
GUI library, offering classes for all common GUI controls as well as a
comprehensive set of helper classes for most common application tasks,
ranging from networking to HTML display and image manipulation.

%package -n lib%name-devel
Summary: Development files for wxGTK library
Group: Development/C++
Requires: lib%name = %EVR
Requires: lib%name-gl = %EVR
Requires: lib%name-media = %EVR
Requires: libwxBase%wxbranch-devel = %EVR
%if_with webkitgtk
Requires: lib%name-webview = %EVR
%endif
%if_with sdl
Requires: lib%name-sound_sdlu = %EVR
%endif
%add_python_req_skip utils

%description -n lib%name-devel
Header files for wxGTK, the GTK+ port of the wxWidgets library.

%package -n compat-lib%name-gtk2-devel
Group: Development/C++
Summary: Development files for the %name library
Requires: compat-lib%name-gtk2 = %EVR
Requires: compat-lib%name-gtk2-gl = %EVR
Requires: lib%name-media = %EVR
Requires: libwxBase%wxbranch-devel = %EVR
%add_python_req_skip utils

%description -n compat-lib%name-gtk2-devel
This package include files needed to link with the %name library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
GUI library, offering classes for all common GUI controls as well as a
comprehensive set of helper classes for most common application tasks,
ranging from networking to HTML display and image manipulation.

%package i18n
Summary: i18n message catalogs for the wxWidgets library
Group: Development/C++
BuildArch: noarch

%description i18n
i18n message catalogs for the wxWidgets library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
GUI library, offering classes for all common GUI controls as well as a
comprehensive set of helper classes for most common application tasks,
ranging from networking to HTML display and image manipulation.

%package examples
Summary: wxGTK example programs
Group: Development/C++
BuildArch: noarch
Requires: lib%name-devel = %EVR

%description examples
wxGTK example programs.

%prep
%setup
%patch1 -p1

# patch some installed files to avoid conflicts with 2.8.*

#sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in
sed -i -e 's|wxstd.mo|wxstd30.mo|' Makefile.in
sed -i -e 's|wxmsw.mo|wxmsw30.mo|' Makefile.in
sed -i -e 's|bakefile/presets|bakefile/presets-\$(WX_RELEASE)|g' Makefile.in

# fix plugin dir for 64-bit

sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure
sed -i -e 's|/lib|/%{_lib}|' src/unix/stdpaths.cpp

# Trick configure into using pkg-config for cppunit-config

sed -i -e 's|$CPPUNIT_CONFIG --version|$CPPUNIT_CONFIG --modversion|' configure

%build
CONF_FLAG="--enable-shared \
--without-debug_flag \
--without-debug_info \
--with-zlib=sys \
--with-expat=sys \
--enable-display \
--with-libjpeg=sys \
--with-libpng=sys \
--with-libtiff=sys \
--with-opengl \
%if_with sdl
--with-sdl \
%endif
--enable-unicode \
--enable-optimise \
--with-regex=yes \
--disable-rpath \
--without-odbc \
--disable-joystick \
--enable-plugins \
--enable-precomp-headers=yes \
--enable-compat26 \
--enable-compat28 \
--enable-soname \
--enable-mediactrl \
--enable-sound \
--enable-stc \
--enable-gui \
--with-xresources \
--without-gnomeprint \
--enable-graphics_ctx \
--with-libmspack \
--disable-stl \
--enable-ipv6 \
--enable-no_deps \
--with-subdirs"
# for perl-Wx:
# error: cannot convert 'const wxString' to 'const wxChar*'
# --enable-std_string_conv_in_wxstring \
# error: invalid initialization of reference of type 'const wxList&' from expression of type 'const wxVariantList'
# --enable-std_containers \

./autogen.sh
export LIBS="-lX11"
DEFS="-DUNICODE=1 -DwxUSE_UNICODE=1"
%add_optflags -fno-strict-aliasing -std=gnu++11 $GST_CFLAGS $DEFS

%define _configure_script ../configure

%if_with compat
mkdir bld_gtk2
pushd bld_gtk2
%configure $CONF_FLAG \
--with-gtk=2 \
--disable-webview

%make_build
popd
%endif

mkdir bld_gtk3
pushd bld_gtk3
%configure $CONF_FLAG \
--with-gtk=3 \
%if_with webkitgtk
--enable-webview
%endif
%nil
%make_build
popd

%make -C locale allmo

%install
%if_with compat
pushd bld_gtk2
%makeinstall_std
popd
%endif

pushd bld_gtk3
%makeinstall_std
popd

mkdir -p %buildroot%_datadir/wx-%wxbranch/examples/src
cp -a demos samples %buildroot%_datadir/wx-%wxbranch/examples

cp -fR include/wx/private %buildroot%_includedir/wx-%wxbranch/wx/
cp -fR include/wx/unix/private %buildroot%_includedir/wx-%wxbranch/wx/unix/

# install our multilib-aware wrapper

##Remove installed
rm %buildroot%_bindir/wx-config
##Install new and symlink
install -p -D -m 755 %SOURCE3 %buildroot%_libexecdir/%name/wx-config
ln -s ../..%_libexecdir/%name/wx-config %buildroot%_bindir/wx-config-%wxbranch
ln -s ../..%_libexecdir/%name/wx-config %buildroot%_bindir/wx-config

%find_lang wxstd30 wxmsw30 --output=wxstd.lang

%files -n libwxBase%wxbranch
%_libdir/libwx_baseu-*.so.*
%_libdir/libwx_baseu_net-*.so.*
%_libdir/libwx_baseu_xml-*.so.*
%dir %_libdir/wx

%files -n libwxBase%wxbranch-devel
%_bindir/wx-config
%_bindir/wxrc
%_bindir/wxrc-%wxbranch
%_bindir/wx-config-%wxbranch
%_includedir/wx-%wxbranch
%_libdir/libwx_baseu*.so
%dir %_libdir/wx
%dir %_libdir/wx/config
%dir %_libdir/wx/include
%_datadir/aclocal/wxwin.m4
%_datadir/bakefile/presets-%wxbranch
%_libexecdir/%name

%if_with sdl
%files -n lib%name-sound_sdlu
%dir %_libdir/wx/%wxbranch
%_libdir/wx/%wxbranch/sound_sdlu-*.so
%endif

%if_with webkitgtk
%files -n lib%name-webview
%dir %_libdir/wx/%wxbranch
%_libdir/libwx_gtk3u_webview-*.so.*
%_libdir/wx/%wxbranch/web-extensions
%endif

%files -n lib%name
%doc docs/changes.txt docs/gpl.txt docs/lgpl.txt docs/licence.txt
%doc docs/licendoc.txt docs/preamble.txt docs/readme.txt
%_libdir/libwx_gtk3u_adv-*.so.*
%_libdir/libwx_gtk3u_aui-*.so.*
%_libdir/libwx_gtk3u_core-*.so.*
%_libdir/libwx_gtk3u_html-*.so.*
%_libdir/libwx_gtk3u_propgrid-*.so.*
%_libdir/libwx_gtk3u_qa-*.so.*
%_libdir/libwx_gtk3u_ribbon-*.so.*
%_libdir/libwx_gtk3u_richtext-*.so.*
%_libdir/libwx_gtk3u_stc-*.so.*
%_libdir/libwx_gtk3u_xrc-*.so.*
%if_with webkitgtk
%exclude %_libdir/libwx_gtk3u_webview-*.so.*
%endif

%files -n lib%name-gl
%_libdir/libwx_gtk3u_gl-*.so.*

%files -n lib%name-media
%_libdir/libwx_gtk3u_media-*.so.*

%files -n lib%name-devel
%_libdir/libwx_gtk3u_*.so
%_libdir/wx/config/gtk3-unicode-3.0
%_libdir/wx/include/gtk3-unicode-3.0

%if_with compat
%files -n compat-lib%name-gtk2
%doc docs/changes.txt docs/gpl.txt docs/lgpl.txt docs/licence.txt
%doc docs/licendoc.txt docs/preamble.txt docs/readme.txt
%_libdir/libwx_gtk2u_adv-*.so.*
%_libdir/libwx_gtk2u_aui-*.so.*
%_libdir/libwx_gtk2u_core-*.so.*
%_libdir/libwx_gtk2u_html-*.so.*
%_libdir/libwx_gtk2u_propgrid-*.so.*
%_libdir/libwx_gtk2u_qa-*.so.*
%_libdir/libwx_gtk2u_ribbon-*.so.*
%_libdir/libwx_gtk2u_richtext-*.so.*
%_libdir/libwx_gtk2u_stc-*.so.*
%_libdir/libwx_gtk2u_xrc-*.so.*

%files -n compat-lib%name-gtk2-gl
%_libdir/libwx_gtk2u_gl-*.so.*

%files -n compat-lib%name-gtk2-media
%_libdir/libwx_gtk2u_media-*.so.*

%files -n compat-lib%name-gtk2-devel
%_libdir/libwx_gtk2u_*.so
%_libdir/wx/config/gtk2-unicode-3.0
%_libdir/wx/include/gtk2-unicode-3.0
%endif

%files i18n -f wxstd.lang

%files examples
%_datadir/wx-%wxbranch/examples

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin